diff mbox series

[5/6] drm/i915: Enable pipe gamma for the overlay

Message ID 20191028113036.27553-5-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [1/6] drm/i915: Fix i845/i865 cursor width | expand

Commit Message

Ville Syrjälä Oct. 28, 2019, 11:30 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We pass the plane data through the pipe gamma for all the other
planes. Can't see why we should treat the overlay differently,
so let's enable pipe gamma for it as well.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_overlay.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Chris Wilson May 15, 2020, 4:40 p.m. UTC | #1
Quoting Ville Syrjala (2019-10-28 11:30:35)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We pass the plane data through the pipe gamma for all the other
> planes. Can't see why we should treat the overlay differently,
> so let's enable pipe gamma for it as well.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_overlay.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
> index e51592e35efe..3241cc98e251 100644
> --- a/drivers/gpu/drm/i915/display/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/display/intel_overlay.c
> @@ -784,6 +784,8 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
>                 if (crtc_state->gamma_enable &&
>                     crtc_state->gamma_mode == GAMMA_MODE_MODE_8BIT)
>                         oconfig |= OCONF_CC_OUT_8BIT;
> +               if (crtc_state->gamma_enable)
> +                       oconfig |= OCONF_GAMMA2_ENABLE;

Makes sense,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
index e51592e35efe..3241cc98e251 100644
--- a/drivers/gpu/drm/i915/display/intel_overlay.c
+++ b/drivers/gpu/drm/i915/display/intel_overlay.c
@@ -784,6 +784,8 @@  static int intel_overlay_do_put_image(struct intel_overlay *overlay,
 		if (crtc_state->gamma_enable &&
 		    crtc_state->gamma_mode == GAMMA_MODE_MODE_8BIT)
 			oconfig |= OCONF_CC_OUT_8BIT;
+		if (crtc_state->gamma_enable)
+			oconfig |= OCONF_GAMMA2_ENABLE;
 		if (IS_GEN(dev_priv, 4))
 			oconfig |= OCONF_CSC_MODE_BT709;
 		oconfig |= pipe == 0 ?