All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 05/13] drm/i915: Pull GAMMA_MODE write out from haswell_load_luts()
Date: Fri, 11 Jan 2019 16:57:03 -0800	[thread overview]
Message-ID: <20190112005703.GX4563@mdroper-desk.amr.corp.intel.com> (raw)
In-Reply-To: <20190111170823.4441-6-ville.syrjala@linux.intel.com>

On Fri, Jan 11, 2019 at 07:08:15PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> For bdw+ let's move the GAMMA_MODE write for the legacy LUT
> mode into the .load_luts() funciton directly, rather than
> relying on haswell_load_luts(). We'll be getting rid of
> haswell_load_luts() entirely soon, and it's anyway cleaner
> to have the GAMMA_MODE write in a single place.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_color.c | 36 +++++++++++++++++-------------
>  1 file changed, 20 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
> index 0dfd104b89d7..df3567686c45 100644
> --- a/drivers/gpu/drm/i915/intel_color.c
> +++ b/drivers/gpu/drm/i915/intel_color.c
> @@ -473,21 +473,20 @@ static void broadwell_load_luts(const struct intel_crtc_state *crtc_state)
>  	enum pipe pipe = crtc->pipe;
>  
>  	if (crtc_state_is_legacy_gamma(crtc_state)) {
> -		haswell_load_luts(crtc_state);
> -		return;
> -	}
> +		i9xx_load_luts(crtc_state);
> +	} else {
> +		bdw_load_degamma_lut(crtc_state);
> +		bdw_load_gamma_lut(crtc_state,
> +				   INTEL_INFO(dev_priv)->color.degamma_lut_size);
>  
> -	bdw_load_degamma_lut(crtc_state);
> -	bdw_load_gamma_lut(crtc_state,
> -			   INTEL_INFO(dev_priv)->color.degamma_lut_size);
> +		/*
> +		 * Reset the index, otherwise it prevents the legacy palette to be
> +		 * written properly.
> +		 */
> +		I915_WRITE(PREC_PAL_INDEX(pipe), 0);
> +	}
>  
>  	I915_WRITE(GAMMA_MODE(pipe), crtc_state->gamma_mode);
> -
> -	/*
> -	 * Reset the index, otherwise it prevents the legacy palette to be
> -	 * written properly.
> -	 */
> -	I915_WRITE(PREC_PAL_INDEX(pipe), 0);
>  }
>  
>  static void glk_load_degamma_lut(const struct intel_crtc_state *crtc_state)
> @@ -530,11 +529,16 @@ static void glk_load_luts(const struct intel_crtc_state *crtc_state)
>  	glk_load_degamma_lut(crtc_state);
>  
>  	if (crtc_state_is_legacy_gamma(crtc_state)) {
> -		haswell_load_luts(crtc_state);
> -		return;
> -	}
> +		i9xx_load_luts(crtc_state);
> +	} else {
> +		bdw_load_gamma_lut(crtc_state, 0);
>  
> -	bdw_load_gamma_lut(crtc_state, 0);
> +		/*
> +		 * Reset the index, otherwise it prevents the legacy palette to be
> +		 * written properly.
> +		 */
> +		I915_WRITE(PREC_PAL_INDEX(pipe), 0);
> +	}
>  
>  	I915_WRITE(GAMMA_MODE(pipe), crtc_state->gamma_mode);
>  }
> -- 
> 2.19.2
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-01-12  0:57 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 17:08 [PATCH 00/13] Enable/disable gamma/csc dynamically and fix C8 Ville Syrjala
2019-01-11 17:08 ` [PATCH 01/13] drm/i915: Clean up intel_plane_atomic_check_with_state() Ville Syrjala
2019-01-12  0:41   ` Matt Roper
2019-01-16 16:08   ` Shankar, Uma
2019-01-11 17:08 ` [PATCH 02/13] drm/i915: Split the gamma/csc enable bits from the plane_ctl() function Ville Syrjala
2019-01-12  0:41   ` Matt Roper
2019-01-14 17:11     ` Ville Syrjälä
2019-01-14 19:11       ` Ville Syrjälä
2019-01-16 17:11         ` Shankar, Uma
2019-01-17 16:34           ` Ville Syrjälä
2019-01-11 17:08 ` [PATCH 03/13] drm/i915: Precompute gamma_mode Ville Syrjala
2019-01-12  0:41   ` Matt Roper
2019-01-16 17:18     ` Shankar, Uma
2019-01-11 17:08 ` [PATCH 04/13] drm/i915: Constify the state arguments to the color management stuff Ville Syrjala
2019-01-12  0:42   ` Matt Roper
2019-01-16 17:21     ` Shankar, Uma
2019-01-11 17:08 ` [PATCH 05/13] drm/i915: Pull GAMMA_MODE write out from haswell_load_luts() Ville Syrjala
2019-01-12  0:57   ` Matt Roper [this message]
2019-01-16 17:26     ` Shankar, Uma
2019-01-11 17:08 ` [PATCH 06/13] drm/i915: Split color mgmt based on single vs. double buffered registers Ville Syrjala
2019-01-15  0:56   ` Matt Roper
2019-01-16 18:22     ` Shankar, Uma
2019-01-11 17:08 ` [PATCH 07/13] drm/i915: Move LUT programming to happen after vblank waits Ville Syrjala
2019-01-16 17:38   ` Matt Roper
2019-01-16 18:02     ` Ville Syrjälä
2019-01-17 15:00     ` Ville Syrjälä
2019-01-11 17:08 ` [PATCH 08/13] drm/i915: Populate gamma_mode for all platforms Ville Syrjala
2019-01-16 18:31   ` Matt Roper
2019-01-16 18:58     ` Ville Syrjälä
2019-01-16 19:51       ` Ville Syrjälä
2019-01-29 15:59         ` Ville Syrjälä
2019-01-11 17:08 ` [PATCH 09/13] drm/i915: Track pipe gamma enable/disable in crtc state Ville Syrjala
2019-01-16 19:36   ` Matt Roper
2019-01-17  5:14     ` Shankar, Uma
2019-01-17 14:57       ` Ville Syrjälä
2019-01-11 17:08 ` [PATCH 10/13] drm/i915: Track pipe csc enable " Ville Syrjala
2019-01-16 19:43   ` Matt Roper
2019-01-17  5:17     ` Shankar, Uma
2019-01-11 17:08 ` [PATCH 11/13] drm/i915: Turn off pipe gamma when it's not needed Ville Syrjala
2019-01-17  5:32   ` Shankar, Uma
2019-01-17 18:40   ` Matt Roper
2019-01-17 18:48     ` Ville Syrjälä
2019-01-11 17:08 ` [PATCH 12/13] drm/i915: Turn off pipe CSC " Ville Syrjala
2019-01-17  5:37   ` Shankar, Uma
2019-01-17 18:54   ` Matt Roper
2019-01-11 17:08 ` [PATCH 13/13] drm/i915: Disable pipe gamma when C8 pixel format is used Ville Syrjala
2019-01-17  5:58   ` Shankar, Uma
2019-01-17 19:13   ` Matt Roper
2019-01-17 19:27     ` Ville Syrjälä
2019-01-11 17:25 ` ✗ Fi.CI.CHECKPATCH: warning for Enable/disable gamma/csc dynamically and fix C8 Patchwork
2019-01-11 17:44 ` ✓ Fi.CI.BAT: success " Patchwork
2019-01-11 22:03 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190112005703.GX4563@mdroper-desk.amr.corp.intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.