Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
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] [v11 07/13] i915/display: Enable BT2020 for HDR on LSPCON devices
Date: Thu, 26 Nov 2020 20:23:05 +0000	[thread overview]
Message-ID: <4dedb8478ddd4d67be67cb7aeab340ab@intel.com> (raw)
In-Reply-To: <20201126171309.GJ6112@intel.com>



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Thursday, November 26, 2020 10:43 PM
> To: Shankar, Uma <uma.shankar@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [v11 07/13] i915/display: Enable BT2020 for HDR on LSPCON devices
> 
> On Thu, Nov 26, 2020 at 01:44:39PM +0530, Uma Shankar wrote:
> > Enable Colorspace as BT2020 if driving HDR content.Sending Colorimetry
> > data for HDR using AVI infoframe. LSPCON firmware expects this and
> > though SOC drives DP, for HDMI panel AVI infoframe is sent to the
> > LSPCON device which transfers the same to HDMI sink.
> >
> > v2: Dropped state managed in drm core as per Jani Nikula's suggestion.
> >
> > v3: Aligned colorimetry handling for lspcon as per
> > compute_avi_infoframes, as suggested by Ville.
> >
> > v4: Added BT2020 as default for HDR. Adding the colorspace property
> > interface for pcon will be take up separately. Moved changes of
> > quantization in a separate patch as per Ville's comments.
> >
> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_lspcon.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c
> > b/drivers/gpu/drm/i915/display/intel_lspcon.c
> > index 0a4c05d67108..f6f58a991e7a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> > +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> > @@ -481,6 +481,10 @@ void lspcon_read_infoframe(struct intel_encoder
> *encoder,
> >  	/* FIXME implement this */
> >  }
> >
> > +/* HDMI HDR Colorspace Spec Definitions */
> > +#define NORMAL_COLORIMETRY_MASK		0x3
> > +#define EXTENDED_COLORIMETRY_MASK	0x7
> > +#define HDMI_COLORIMETRY_BT2020_YCC	((3 << 0) | (6 << 2) | (0 << 5))
> >  void lspcon_set_infoframes(struct intel_encoder *encoder,
> >  			   bool enable,
> >  			   const struct intel_crtc_state *crtc_state, @@ -523,6
> +527,20 @@
> > void lspcon_set_infoframes(struct intel_encoder *encoder,
> >  	else
> >  		frame.avi.colorspace = HDMI_COLORSPACE_RGB;
> >
> > +	/*
> > +	 * Set BT2020 colorspace if driving HDR data
> > +	 * ToDo: Make this generic and expose all colorspaces for
> > +	 * lspcon. We need to expose HDMI colorspaces when we detect
> > +	 * lspcon, this has to happen after connector is registered,
> > +	 * so need to fix this appropriately
> > +	 */
> > +	if (lspcon->active && conn_state->hdr_output_metadata) {
> > +		frame.avi.colorimetry = HDMI_COLORIMETRY_BT2020_YCC &
> > +					NORMAL_COLORIMETRY_MASK;
> > +		frame.avi.extended_colorimetry =
> (HDMI_COLORIMETRY_BT2020_YCC >> 2) &
> > +
> EXTENDED_COLORIMETRY_MASK;
> > +	}
> > +
> 
> I don't understand the point of dancing around this instead of just fixing it.
> 
> There, I did half the work for you
> https://patchwork.freedesktop.org/series/84309/

Somehow was not able to think of right way to handle this.
Thanks Ville for your patience and help. I will add the patch to series and build
on top of it.

Regards,
Uma Shankar
> 
> >  	/* nonsense combination */
> >  	drm_WARN_ON(encoder->base.dev, crtc_state->limited_color_range &&
> >  		    crtc_state->output_format != INTEL_OUTPUT_FORMAT_RGB);
> > --
> > 2.26.2
> 
> --
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-11-26 20:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  8:14 [Intel-gfx] [v11 00/13] Enable HDR on MCA LSPCON based Gen9 devices Uma Shankar
2020-11-26  8:14 ` [Intel-gfx] [v11 01/13] drm/i915/display: Add HDR Capability detection for LSPCON Uma Shankar
2020-11-26 16:26   ` Ville Syrjälä
2020-11-26 20:10     ` Shankar, Uma
2020-11-26  8:14 ` [Intel-gfx] [v11 02/13] drm/i915/display: Enable HDR on gen9 devices with MCA Lspcon Uma Shankar
2020-11-26  8:14 ` [Intel-gfx] [v11 03/13] drm/i915/display: Attach HDR property for capable Gen9 devices Uma Shankar
2020-11-26  8:14 ` [Intel-gfx] [v11 04/13] drm/i915/display: Enable quantization range for HDR on LSPCON devices Uma Shankar
2020-11-26 16:27   ` Ville Syrjälä
2020-11-26  8:14 ` [Intel-gfx] [v11 05/13] drm/i915/display: Add a WARN for invalid output range and format Uma Shankar
2020-11-26 16:27   ` Ville Syrjälä
2020-11-26  8:14 ` [Intel-gfx] [v11 06/13] drm/i915/display: Attach content type property for LSPCON Uma Shankar
2020-11-26 16:28   ` Ville Syrjälä
2020-11-26  8:14 ` [Intel-gfx] [v11 07/13] i915/display: Enable BT2020 for HDR on LSPCON devices Uma Shankar
2020-11-26 17:13   ` Ville Syrjälä
2020-11-26 20:23     ` Shankar, Uma [this message]
2020-11-26  8:14 ` [Intel-gfx] [v11 08/13] drm/i915/display: Enable HDR for Parade based lspcon Uma Shankar
2020-11-26  8:14 ` [Intel-gfx] [v11 09/13] drm/i915/display: Implement infoframes readback for LSPCON Uma Shankar
2020-11-26 16:32   ` Ville Syrjälä
2020-11-26 17:44     ` Ville Syrjälä
2020-11-26 20:11       ` Shankar, Uma
2020-11-26  8:14 ` [Intel-gfx] [v11 10/13] drm/i915/display: Implement DRM infoframe read " Uma Shankar
2020-11-26  8:14 ` [Intel-gfx] [v11 11/13] drm/i915/lspcon: Create separate infoframe_enabled helper Uma Shankar
2020-11-26  8:14 ` [Intel-gfx] [v11 12/13] drm/i915/lspcon: Do not send DRM infoframes to non-HDMI sinks Uma Shankar
2020-11-26  8:14 ` [Intel-gfx] [v11 13/13] drm/i915/display: [NOT FOR MERGE] Reduce blanking to support 4k60@10bpp for LSPCON Uma Shankar
2020-11-26  9:41 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable HDR on MCA LSPCON based Gen9 devices (rev11) Patchwork
2020-11-26  9:42 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-11-26 10:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-11-26 12:06 ` [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=4dedb8478ddd4d67be67cb7aeab340ab@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