All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Swati Sharma <swati2.sharma@intel.com>, intel-gfx@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch, ankit.k.nautiyal@intel.com
Subject: Re: [PATCH 1/3] drm/i915/display: Add gamma precision function for CHV
Date: Fri, 06 Sep 2019 15:09:40 +0300	[thread overview]
Message-ID: <87pnkd39tn.fsf@intel.com> (raw)
In-Reply-To: <1567711031-26144-2-git-send-email-swati2.sharma@intel.com>

On Fri, 06 Sep 2019, Swati Sharma <swati2.sharma@intel.com> wrote:
> intel_color_get_gamma_bit_precision() is extended for
> cherryview by adding chv_gamma_precision(), i965 will use existing
> i9xx_gamma_precision() func only.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>

Could be part of patch 3/3, but no big deal,

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_color.c | 25 +++++++++++++++++++------
>  1 file changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
> index 6d641e1..4d9a568 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1400,6 +1400,14 @@ static int ilk_gamma_precision(const struct intel_crtc_state *crtc_state)
>  	}
>  }
>  
> +static int chv_gamma_precision(const struct intel_crtc_state *crtc_state)
> +{
> +	if (crtc_state->cgm_mode & CGM_PIPE_MODE_GAMMA)
> +		return 10;
> +	else
> +		return i9xx_gamma_precision(crtc_state);
> +}
> +
>  static int glk_gamma_precision(const struct intel_crtc_state *crtc_state)
>  {
>  	switch (crtc_state->gamma_mode) {
> @@ -1421,12 +1429,17 @@ int intel_color_get_gamma_bit_precision(const struct intel_crtc_state *crtc_stat
>  	if (!crtc_state->gamma_enable)
>  		return 0;
>  
> -	if (HAS_GMCH(dev_priv) && !IS_CHERRYVIEW(dev_priv))
> -		return i9xx_gamma_precision(crtc_state);
> -	else if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
> -		return glk_gamma_precision(crtc_state);
> -	else if (IS_IRONLAKE(dev_priv))
> -		return ilk_gamma_precision(crtc_state);
> +	if (HAS_GMCH(dev_priv)) {
> +		if (IS_CHERRYVIEW(dev_priv))
> +			return chv_gamma_precision(crtc_state);
> +		else
> +			return i9xx_gamma_precision(crtc_state);
> +	} else {
> +		if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
> +			return glk_gamma_precision(crtc_state);
> +		else if (IS_IRONLAKE(dev_priv))
> +			return ilk_gamma_precision(crtc_state);
> +	}
>  
>  	return 0;
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-06 12:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 19:17 [PATCH 0/3] adding gamma state checker for CHV and i965 Swati Sharma
2019-09-05 19:17 ` [PATCH 1/3] drm/i915/display: Add gamma precision function for CHV Swati Sharma
2019-09-06 12:09   ` Jani Nikula [this message]
2019-09-05 19:17 ` [PATCH 2/3] drm/i915/display: Extract i965_read_luts() Swati Sharma
2019-09-06 12:04   ` Jani Nikula
2019-09-05 19:17 ` [PATCH 3/3] drm/i915/display: Extract chv_read_luts() Swati Sharma
2019-09-06 12:10   ` Jani Nikula
2019-09-05 20:21 ` ✗ Fi.CI.CHECKPATCH: warning for adding gamma state checker for CHV and i965 Patchwork
2019-09-05 20:42 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-06  1:48 ` ✓ 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=87pnkd39tn.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=swati2.sharma@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.