From: "Shankar, Uma" <uma.shankar@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915/xelpd: Enable Pipe Degamma
Date: Thu, 25 Nov 2021 19:49:22 +0000 [thread overview]
Message-ID: <3371d6fe2d124fb38b53de48b2bbabef@intel.com> (raw)
In-Reply-To: <YZ5R0JmEmkL04Phm@intel.com>
> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Wednesday, November 24, 2021 8:23 PM
> To: Shankar, Uma <uma.shankar@intel.com>
> Cc: intel-gfx@lists.freedesktop.org; =ville.syrjala@linux.intel.com
> Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915/xelpd: Enable Pipe Degamma
>
> On Wed, Nov 24, 2021 at 01:06:48AM +0530, Uma Shankar wrote:
> > Enable Pipe Degamma for XE_LPD. Extend the legacy implementation to
> > incorparate the extended lut size for XE_LPD.
> >
> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_color.c | 12 +++++++++---
> > 1 file changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> > b/drivers/gpu/drm/i915/display/intel_color.c
> > index e529dbeee525..81046d5ab509 100644
> > --- a/drivers/gpu/drm/i915/display/intel_color.c
> > +++ b/drivers/gpu/drm/i915/display/intel_color.c
> > @@ -815,6 +815,12 @@ static void glk_load_degamma_lut(const struct
> intel_crtc_state *crtc_state)
> > enum pipe pipe = crtc->pipe;
> > int i, lut_size = INTEL_INFO(dev_priv)->color.degamma_lut_size;
> > const struct drm_color_lut *lut = crtc_state->hw.degamma_lut->data;
> > + u32 extended_lut_size;
> > +
> > + if (DISPLAY_VER(dev_priv) >= 13)
> > + extended_lut_size = 131;
> > + else
> > + extended_lut_size = 35;
>
> Can you extract that into a small helper? IIRC I did that for the internal version
> already.
Ok sure, will update this.
Regards,
Uma Shankar
> >
> > /*
> > * When setting the auto-increment bit, the hardware seems to @@
> > -827,8 +833,8 @@ static void glk_load_degamma_lut(const struct
> > intel_crtc_state *crtc_state)
> >
> > for (i = 0; i < lut_size; i++) {
> > /*
> > - * First 33 entries represent range from 0 to 1.0
> > - * 34th and 35th entry will represent extended range
> > + * First lut_size entries represent range from 0 to 1.0
> > + * 3 additional lut entries will represent extended range
> > * inputs 3.0 and 7.0 respectively, currently clamped
> > * at 1.0. Since the precision is 16bit, the user
> > * value can be directly filled to register.
> > @@ -844,7 +850,7 @@ static void glk_load_degamma_lut(const struct
> intel_crtc_state *crtc_state)
> > }
> >
> > /* Clamp values > 1.0. */
> > - while (i++ < 35)
> > + while (i++ < extended_lut_size)
> > intel_de_write_fw(dev_priv, PRE_CSC_GAMC_DATA(pipe), 1 << 16);
> >
> > intel_de_write_fw(dev_priv, PRE_CSC_GAMC_INDEX(pipe), 0);
> > --
> > 2.25.1
>
> --
> Ville Syrjälä
> Intel
next prev parent reply other threads:[~2021-11-25 19:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 19:36 [Intel-gfx] [PATCH 0/3] Enable pipe color support on D13 platform Uma Shankar
2021-11-23 19:36 ` [Intel-gfx] [PATCH 1/3] drm/i915/xelpd: Enable Pipe color support for " Uma Shankar
2021-11-24 14:58 ` Ville Syrjälä
2021-11-25 19:48 ` Shankar, Uma
2021-11-23 19:36 ` [Intel-gfx] [PATCH 2/3] drm/i915/xelpd: Enable Pipe Degamma Uma Shankar
2021-11-24 14:53 ` Ville Syrjälä
2021-11-25 19:49 ` Shankar, Uma [this message]
2021-11-23 19:36 ` [Intel-gfx] [PATCH 3/3] drm/i915/xelpd: Add Pipe Color Lut caps to platform config Uma Shankar
2021-11-24 14:57 ` Ville Syrjälä
2021-11-25 20:12 ` Shankar, Uma
2021-11-23 21:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for Enable pipe color support on D13 platform Patchwork
2021-11-24 0:13 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=3371d6fe2d124fb38b53de48b2bbabef@intel.com \
--to=uma.shankar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox