All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Uma Shankar <uma.shankar@intel.com>
Cc: intel-gfx@lists.freedesktop.org, ville.syrjala@intel.com,
	maarten.lankhorst@intel.com
Subject: Re: [PATCH 1/2] drm/i915: Fix GCMAX color register programming
Date: Fri, 29 Mar 2019 15:10:18 +0200	[thread overview]
Message-ID: <20190329131018.GX3888@intel.com> (raw)
In-Reply-To: <1553863759-20436-2-git-send-email-uma.shankar@intel.com>

On Fri, Mar 29, 2019 at 06:19:18PM +0530, Uma Shankar wrote:
> GC MAX register is used to program values from 1.0 to
> less than 3.0. A different register was used instead of
> the intended one. Fixed the same.
> 
> Currently limiting it to 1.0 due to ABI limitations.
> 
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_color.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
> index ff910ed..dd179a8 100644
> --- a/drivers/gpu/drm/i915/intel_color.c
> +++ b/drivers/gpu/drm/i915/intel_color.c
> @@ -518,14 +518,14 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
>  			I915_WRITE(PREC_PAL_DATA(pipe), word);
>  		}
>  
> -		/* Program the max register to clamp values > 1.0. */
> -		i = lut_size - 1;
> -		I915_WRITE(PREC_PAL_GC_MAX(pipe, 0),
> -			   drm_color_lut_extract(lut[i].red, 16));
> -		I915_WRITE(PREC_PAL_GC_MAX(pipe, 1),
> -			   drm_color_lut_extract(lut[i].green, 16));
> -		I915_WRITE(PREC_PAL_GC_MAX(pipe, 2),
> -			   drm_color_lut_extract(lut[i].blue, 16));
> +		/*
> +		 * Program the max register to clamp values > 1.0.
> +		 * ToDo: Extend the ABI to be able to program values
> +		 * from 1.0 to 3.0
> +		 */
> +		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
> +		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
> +		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);

Maybe we want these to be just 1<<16 to match how we set up the glk+
degamma?

>  	} else {
>  		for (i = 0; i < lut_size; i++) {
>  			u32 v = (i * ((1 << 10) - 1)) / (lut_size - 1);
> @@ -534,9 +534,9 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
>  				   (v << 20) | (v << 10) | v);
>  		}
>  
> -		I915_WRITE(PREC_PAL_GC_MAX(pipe, 0), (1 << 16) - 1);
> -		I915_WRITE(PREC_PAL_GC_MAX(pipe, 1), (1 << 16) - 1);
> -		I915_WRITE(PREC_PAL_GC_MAX(pipe, 2), (1 << 16) - 1);
> +		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
> +		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
> +		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
>  	}
>  
>  	/*
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-29 13:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 12:49 [PATCH 0/2] Fixed GC MAX register programming for gamma luts Uma Shankar
2019-03-29 12:39 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-03-29 12:49 ` [PATCH 1/2] drm/i915: Fix GCMAX color register programming Uma Shankar
2019-03-29 13:10   ` Ville Syrjälä [this message]
2019-03-29 13:50     ` Shankar, Uma
2019-03-29 12:49 ` [PATCH 2/2] drm/i915: Program EXT2 GC MAX registers Uma Shankar
2019-03-29 13:10   ` Ville Syrjälä
2019-03-29 13:51     ` Shankar, Uma
2019-03-29 13:07 ` ✓ Fi.CI.BAT: success for Fixed GC MAX register programming for gamma luts 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=20190329131018.GX3888@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@intel.com \
    --cc=uma.shankar@intel.com \
    --cc=ville.syrjala@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.