aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sprite.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2017-03-17 17:17:56 -0400
committerVille Syrjälä <ville.syrjala@linux.intel.com>2017-03-23 09:41:34 -0400
commit2e881264b47414e6798329783d9dd9b30d89b76d (patch)
treeea60a77b3a8310af976e1caf13aeeb12284d3d67 /drivers/gpu/drm/i915/intel_sprite.c
parent46f788ba2e09c9f48d50f47e27c8e2cfc7e1c076 (diff)
drm/i915: Use skl_plane_ctl() for the SKL "sprite" planes
On SKL the planes are uniform so the "sprites" can use the primary plane code perfectly fine. The only difference we have is the color key handling, but since we never enable that for the primary plane the same code works just fine. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170317211808.14693-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index b931d0bd7a64..455a9ed44204 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -232,23 +232,7 @@ skl_update_plane(struct drm_plane *drm_plane,
232 uint32_t src_h = drm_rect_height(&plane_state->base.src) >> 16; 232 uint32_t src_h = drm_rect_height(&plane_state->base.src) >> 16;
233 unsigned long irqflags; 233 unsigned long irqflags;
234 234
235 plane_ctl = PLANE_CTL_ENABLE; 235 plane_ctl = skl_plane_ctl(crtc_state, plane_state);
236
237 if (!IS_GEMINILAKE(dev_priv)) {
238 plane_ctl |=
239 PLANE_CTL_PIPE_GAMMA_ENABLE |
240 PLANE_CTL_PIPE_CSC_ENABLE |
241 PLANE_CTL_PLANE_GAMMA_DISABLE;
242 }
243
244 plane_ctl |= skl_plane_ctl_format(fb->format->format);
245 plane_ctl |= skl_plane_ctl_tiling(fb->modifier);
246 plane_ctl |= skl_plane_ctl_rotation(rotation);
247
248 if (key->flags & I915_SET_COLORKEY_DESTINATION)
249 plane_ctl |= PLANE_CTL_KEY_ENABLE_DESTINATION;
250 else if (key->flags & I915_SET_COLORKEY_SOURCE)
251 plane_ctl |= PLANE_CTL_KEY_ENABLE_SOURCE;
252 236
253 /* Sizes are 0 based */ 237 /* Sizes are 0 based */
254 src_w--; 238 src_w--;