aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sprite.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-11-18 21:32:38 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-21 03:09:37 -0500
commit4ea67bc700c0c085e0428b6cb75071ec8c858f7b (patch)
treeeae1a50a7955d7a94afc1566ac231278b54e2e78 /drivers/gpu/drm/i915/intel_sprite.c
parentb19870ee67ad8b552db0e7456a8d1d33f96421c0 (diff)
drm/i915: Enable pipe gamma for sprites
We send the primary and cursor plane data through the gamma unit. In order to get matching output from sprites, also send the sprite data through the gamma unit. In the future we should add some properties to control this explicitly, and also add properties for the per-sprite gamma ramps what have you, but for now this seems like a reasonable thing to do. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index b9fabf826f7d..90a3f6db8288 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -104,6 +104,12 @@ vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc,
104 break; 104 break;
105 } 105 }
106 106
107 /*
108 * Enable gamma to match primary/cursor plane behaviour.
109 * FIXME should be user controllable via propertiesa.
110 */
111 sprctl |= SP_GAMMA_ENABLE;
112
107 if (obj->tiling_mode != I915_TILING_NONE) 113 if (obj->tiling_mode != I915_TILING_NONE)
108 sprctl |= SP_TILED; 114 sprctl |= SP_TILED;
109 115
@@ -257,6 +263,12 @@ ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
257 BUG(); 263 BUG();
258 } 264 }
259 265
266 /*
267 * Enable gamma to match primary/cursor plane behaviour.
268 * FIXME should be user controllable via propertiesa.
269 */
270 sprctl |= SPRITE_GAMMA_ENABLE;
271
260 if (obj->tiling_mode != I915_TILING_NONE) 272 if (obj->tiling_mode != I915_TILING_NONE)
261 sprctl |= SPRITE_TILED; 273 sprctl |= SPRITE_TILED;
262 274
@@ -453,6 +465,12 @@ ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
453 BUG(); 465 BUG();
454 } 466 }
455 467
468 /*
469 * Enable gamma to match primary/cursor plane behaviour.
470 * FIXME should be user controllable via propertiesa.
471 */
472 dvscntr |= DVS_GAMMA_ENABLE;
473
456 if (obj->tiling_mode != I915_TILING_NONE) 474 if (obj->tiling_mode != I915_TILING_NONE)
457 dvscntr |= DVS_TILED; 475 dvscntr |= DVS_TILED;
458 476