diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2014-12-23 13:41:51 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-12 17:59:15 -0500 |
commit | 4a3b8769f8b847d1dc3c0c14a0b0e1878be2d01c (patch) | |
tree | 61bd9ef1887744d4c20aa040c8b8fce4a1071ca9 /drivers/gpu/drm/i915/intel_display.c | |
parent | c34c9ee4828f251a4f4200211d40d3cb79761ef0 (diff) |
drm/i915: Clarify sprite plane function names (v4)
A few of the sprite-related function names in i915 are very similar
(e.g., intel_enable_planes() vs intel_crtc_enable_planes()) and don't
make it clear whether they only operate on sprite planes, or whether
they also apply to all universal plane types. Rename a few functions to
be more consistent with our function naming for primary/cursor planes or
to clarify that they apply specifically to sprite planes:
- s/intel_disable_planes/intel_disable_sprite_planes/
- s/intel_enable_planes/intel_enable_sprite_planes/
Also, drop the sprite-specific intel_destroy_plane() and just use
the type-agnostic intel_plane_destroy() function. The extra 'disable'
call that intel_destroy_plane() did is unnecessary since the plane will
already be disabled due to framebuffer destruction by the point it gets
called.
v2: Earlier consolidation patches have reduced the number of functions
we need to rename here.
v3: Also rename intel_plane_funcs vtable to intel_sprite_plane_funcs
for consistency with primary/cursor. (Ander)
v4: Convert comment for intel_plane_destroy() to kerneldoc now that it
is no longer a static function. (Ander)
Reviewed-by(v1): Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index b7c59d56c3a6..d304cb87493d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4037,7 +4037,7 @@ static void ironlake_pfit_enable(struct intel_crtc *crtc) | |||
4037 | } | 4037 | } |
4038 | } | 4038 | } |
4039 | 4039 | ||
4040 | static void intel_enable_planes(struct drm_crtc *crtc) | 4040 | static void intel_enable_sprite_planes(struct drm_crtc *crtc) |
4041 | { | 4041 | { |
4042 | struct drm_device *dev = crtc->dev; | 4042 | struct drm_device *dev = crtc->dev; |
4043 | enum pipe pipe = to_intel_crtc(crtc)->pipe; | 4043 | enum pipe pipe = to_intel_crtc(crtc)->pipe; |
@@ -4051,7 +4051,7 @@ static void intel_enable_planes(struct drm_crtc *crtc) | |||
4051 | } | 4051 | } |
4052 | } | 4052 | } |
4053 | 4053 | ||
4054 | static void intel_disable_planes(struct drm_crtc *crtc) | 4054 | static void intel_disable_sprite_planes(struct drm_crtc *crtc) |
4055 | { | 4055 | { |
4056 | struct drm_device *dev = crtc->dev; | 4056 | struct drm_device *dev = crtc->dev; |
4057 | enum pipe pipe = to_intel_crtc(crtc)->pipe; | 4057 | enum pipe pipe = to_intel_crtc(crtc)->pipe; |
@@ -4195,7 +4195,7 @@ static void intel_crtc_enable_planes(struct drm_crtc *crtc) | |||
4195 | int pipe = intel_crtc->pipe; | 4195 | int pipe = intel_crtc->pipe; |
4196 | 4196 | ||
4197 | intel_enable_primary_hw_plane(crtc->primary, crtc); | 4197 | intel_enable_primary_hw_plane(crtc->primary, crtc); |
4198 | intel_enable_planes(crtc); | 4198 | intel_enable_sprite_planes(crtc); |
4199 | intel_crtc_update_cursor(crtc, true); | 4199 | intel_crtc_update_cursor(crtc, true); |
4200 | intel_crtc_dpms_overlay(intel_crtc, true); | 4200 | intel_crtc_dpms_overlay(intel_crtc, true); |
4201 | 4201 | ||
@@ -4230,7 +4230,7 @@ static void intel_crtc_disable_planes(struct drm_crtc *crtc) | |||
4230 | 4230 | ||
4231 | intel_crtc_dpms_overlay(intel_crtc, false); | 4231 | intel_crtc_dpms_overlay(intel_crtc, false); |
4232 | intel_crtc_update_cursor(crtc, false); | 4232 | intel_crtc_update_cursor(crtc, false); |
4233 | intel_disable_planes(crtc); | 4233 | intel_disable_sprite_planes(crtc); |
4234 | intel_disable_primary_hw_plane(crtc->primary, crtc); | 4234 | intel_disable_primary_hw_plane(crtc->primary, crtc); |
4235 | 4235 | ||
4236 | /* | 4236 | /* |
@@ -12012,8 +12012,14 @@ intel_disable_plane(struct drm_plane *plane) | |||
12012 | 0, 0, 0, 0, 0, 0, 0, 0); | 12012 | 0, 0, 0, 0, 0, 0, 0, 0); |
12013 | } | 12013 | } |
12014 | 12014 | ||
12015 | /* Common destruction function for both primary and cursor planes */ | 12015 | /** |
12016 | static void intel_plane_destroy(struct drm_plane *plane) | 12016 | * intel_plane_destroy - destroy a plane |
12017 | * @plane: plane to destroy | ||
12018 | * | ||
12019 | * Common destruction function for all types of planes (primary, cursor, | ||
12020 | * sprite). | ||
12021 | */ | ||
12022 | void intel_plane_destroy(struct drm_plane *plane) | ||
12017 | { | 12023 | { |
12018 | struct intel_plane *intel_plane = to_intel_plane(plane); | 12024 | struct intel_plane *intel_plane = to_intel_plane(plane); |
12019 | drm_plane_cleanup(plane); | 12025 | drm_plane_cleanup(plane); |