From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Almahallawy, Khaled" <khaled.almahallawy@intel.com>
Cc: "Shankar, Uma" <uma.shankar@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"seanpaul@google.com" <seanpaul@google.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>,
"markyacoub@google.com" <markyacoub@google.com>
Subject: Re: [PATCH] drm/i915/display: Fix RGB limited range handling for DP
Date: Wed, 2 Jul 2025 22:25:44 +0300 [thread overview]
Message-ID: <aGWHuOniPesg63U_@intel.com> (raw)
In-Reply-To: <6e87afb3d644361e273e5c8c1b96367b7a5968da.camel@intel.com>
On Tue, Jul 01, 2025 at 05:38:21PM +0000, Almahallawy, Khaled wrote:
> Thank you for your patch. This fix enables us to pass the DP1.4 Link
> Layer Test "4.2.2.8 EDID Read on IRQ HPD Event after Branch Device
> Detection," which was failing due to the following error:
>
> "0003.610.625: Main Stream Attributes do not match expected values:
> 0003.610.669: Received 28h color format differs from expected 20h."
If the test needs full range then set full range in the test.
>
> Tested-by: Khaled Almahallawy <khaled.almahallawy@intel.com>
>
> On Tue, 2025-07-01 at 14:15 +0000, Shankar, Uma wrote:
> >
> >
> > > -----Original Message-----
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Sent: Tuesday, July 1, 2025 2:02 PM
> > > To: Shankar, Uma <uma.shankar@intel.com>
> > > Cc: intel-gfx@lists.freedesktop.org;
> > > intel-xe@lists.freedesktop.org; Borah,
> > > Chaitanya Kumar <chaitanya.kumar.borah@intel.com>; Almahallawy,
> > > Khaled
> > > <khaled.almahallawy@intel.com>
> > > Subject: Re: [PATCH] drm/i915/display: Fix RGB limited range
> > > handling for DP
> > >
> > > On Tue, Jul 01, 2025 at 01:47:56PM +0530, Uma Shankar wrote:
> > > > RGB limited range should be selected only if explicitly asked by
> > > > userspace by the broadcast RGB property with LIMITED_RANGE. This
> > > > is
> > > > mostly enabled in case of CEA modes.
> > > >
> > > > Display port by default uses Full Range, fixed the same. This
> > > > will
> > > > help set correct MSA information for colorimetry. Fixes a CTS
> > > > issue
> > > > wrt colorimetry.
> > >
> > > If the CTS is expecting that then it's not following the actual DP
> > > spec.
> > > Originally the spec required limited range output for cea modes,
> > > but later version
> > > relaxed it to "should" and also notes that full range may also be
> > > used. Presumably
> > > it was realized that existing implementations had no consitency
> > > here and so both
> > > behaviours must be allowed.
> >
> > Hi Ville,
> > Yes, there has been a flip flop. Ideally both should be allowed as
> > spec is not enforcing.
> >
> > However, we can default to FULL RANGE and do Limited range if
> > userspace explicitly asks for it
> > using the broadcast RGB property. DP mostly have the FULL RANGE while
> > limited range is more
> > in the HDMI TVs. This will make CTS also happy. What do you suggest ?
> >
> > Regards,
> > Uma Shankar
> >
> > > >
> > > > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > > > ---
> > > > drivers/gpu/drm/i915/display/intel_dp.c | 21 +++++++------------
> > > > --
> > > > 1 file changed, 7 insertions(+), 14 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> > > > b/drivers/gpu/drm/i915/display/intel_dp.c
> > > > index f48912f308df..8758b9d60d5e 100644
> > > > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > > > @@ -2708,8 +2708,6 @@ bool intel_dp_limited_color_range(const
> > > > struct
> > > > intel_crtc_state *crtc_state, {
> > > > const struct intel_digital_connector_state
> > > > *intel_conn_state =
> > > > to_intel_digital_connector_state(conn_state);
> > > > - const struct drm_display_mode *adjusted_mode =
> > > > - &crtc_state->hw.adjusted_mode;
> > > >
> > > > /*
> > > > * Our YCbCr output is always limited range.
> > > > @@ -2721,18 +2719,13 @@ bool intel_dp_limited_color_range(const
> > > > struct
> > > intel_crtc_state *crtc_state,
> > > > if (crtc_state->output_format !=
> > > > INTEL_OUTPUT_FORMAT_RGB)
> > > > return false;
> > > >
> > > > - if (intel_conn_state->broadcast_rgb ==
> > > INTEL_BROADCAST_RGB_AUTO) {
> > > > - /*
> > > > - * See:
> > > > - * CEA-861-E - 5.1 Default Encoding Parameters
> > > > - * VESA DisplayPort Ver.1.2a - 5.1.1.1 Video
> > > > Colorimetry
> > > > - */
> > > > - return crtc_state->pipe_bpp != 18 &&
> > > > -
> > > > drm_default_rgb_quant_range(adjusted_mode) ==
> > > > - HDMI_QUANTIZATION_RANGE_LIMITED;
> > > > - } else {
> > > > - return intel_conn_state->broadcast_rgb ==
> > > > - INTEL_BROADCAST_RGB_LIMITED;
> > > > + switch (intel_conn_state->broadcast_rgb) {
> > > > + case INTEL_BROADCAST_RGB_LIMITED:
> > > > + return true;
> > > > + case INTEL_BROADCAST_RGB_FULL:
> > > > + case INTEL_BROADCAST_RGB_AUTO:
> > > > + default:
> > > > + return false;
> > > > }
> > > > }
> > > >
> > > > --
> > > > 2.42.0
> > >
> > > --
> > > Ville Syrjälä
> > > Intel
>
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-07-02 19:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 8:17 [PATCH] drm/i915/display: Fix RGB limited range handling for DP Uma Shankar
2025-07-01 8:32 ` Ville Syrjälä
2025-07-01 14:15 ` Shankar, Uma
2025-07-01 17:38 ` Almahallawy, Khaled
2025-07-02 19:25 ` Ville Syrjälä [this message]
2025-07-01 8:53 ` ✓ i915.CI.BAT: success for " Patchwork
2025-07-02 1:34 ` ✗ i915.CI.Full: failure " Patchwork
2025-07-02 8:42 ` [PATCH] " Jani Nikula
2025-07-02 10:21 ` Shankar, Uma
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=aGWHuOniPesg63U_@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=khaled.almahallawy@intel.com \
--cc=markyacoub@google.com \
--cc=seanpaul@google.com \
--cc=uma.shankar@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