On Sat, Nov 21, 2026 at 08:54:08AM +0800, Yitian Shao wrote:
> intel_lspcon_detect_hdr_capability() asks the LSPCON whether it can do HDR,
> but not whether the port can actually transmit the gamut metadata DIP. If
> an LSPCON is hooked up to a port without that capability we would advertise
> HDR support that cannot be delivered.
> 
> Refuse to claim HDR support in that case.
> 
> Signed-off-by: Yitian Shao <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c 
> b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index 9ceabbc..797137d 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -137,6 +137,11 @@ bool intel_lspcon_detect_hdr_capability(struct 
> intel_digital_port *dig_port)
>       u8 hdr_caps;
>       int ret;
>  
> +     if (!intel_dp_has_gamut_metadata_dip(&dig_port->base)) {
> +             lspcon->hdr_supported = false;

Maybe a bit redundant, but the other code paths also do this so 
I think we do want the redundancy in the name of consistency.

Reviewed-by: Ville Syrjälä <[email protected]>

> +             return false;
> +     }
> +
>       ret = drm_dp_dpcd_read(&intel_dp->aux, get_hdr_status_reg(lspcon),
>                              &hdr_caps, 1);
>  
> -- 
> 2.53.0

-- 
Ville Syrjälä
Intel

Reply via email to