mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
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>
This commit is contained in:
parent
b19870ee67
commit
4ea67bc700
@ -3793,7 +3793,7 @@
|
|||||||
|
|
||||||
#define _SPACNTR (VLV_DISPLAY_BASE + 0x72180)
|
#define _SPACNTR (VLV_DISPLAY_BASE + 0x72180)
|
||||||
#define SP_ENABLE (1<<31)
|
#define SP_ENABLE (1<<31)
|
||||||
#define SP_GEAMMA_ENABLE (1<<30)
|
#define SP_GAMMA_ENABLE (1<<30)
|
||||||
#define SP_PIXFORMAT_MASK (0xf<<26)
|
#define SP_PIXFORMAT_MASK (0xf<<26)
|
||||||
#define SP_FORMAT_YUV422 (0<<26)
|
#define SP_FORMAT_YUV422 (0<<26)
|
||||||
#define SP_FORMAT_BGR565 (5<<26)
|
#define SP_FORMAT_BGR565 (5<<26)
|
||||||
|
@ -104,6 +104,12 @@ vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable gamma to match primary/cursor plane behaviour.
|
||||||
|
* FIXME should be user controllable via propertiesa.
|
||||||
|
*/
|
||||||
|
sprctl |= SP_GAMMA_ENABLE;
|
||||||
|
|
||||||
if (obj->tiling_mode != I915_TILING_NONE)
|
if (obj->tiling_mode != I915_TILING_NONE)
|
||||||
sprctl |= SP_TILED;
|
sprctl |= SP_TILED;
|
||||||
|
|
||||||
@ -257,6 +263,12 @@ ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
|
|||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable gamma to match primary/cursor plane behaviour.
|
||||||
|
* FIXME should be user controllable via propertiesa.
|
||||||
|
*/
|
||||||
|
sprctl |= SPRITE_GAMMA_ENABLE;
|
||||||
|
|
||||||
if (obj->tiling_mode != I915_TILING_NONE)
|
if (obj->tiling_mode != I915_TILING_NONE)
|
||||||
sprctl |= SPRITE_TILED;
|
sprctl |= SPRITE_TILED;
|
||||||
|
|
||||||
@ -453,6 +465,12 @@ ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
|
|||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable gamma to match primary/cursor plane behaviour.
|
||||||
|
* FIXME should be user controllable via propertiesa.
|
||||||
|
*/
|
||||||
|
dvscntr |= DVS_GAMMA_ENABLE;
|
||||||
|
|
||||||
if (obj->tiling_mode != I915_TILING_NONE)
|
if (obj->tiling_mode != I915_TILING_NONE)
|
||||||
dvscntr |= DVS_TILED;
|
dvscntr |= DVS_TILED;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user