On Sat, Nov 21, 2026 at 08:54:06AM +0800, Yitian Shao wrote:
> intel_dp_has_gamut_metadata_dip() returns false for LSPCON encoders, which
> is not what the function is asking. LSPCON does send the HDR metadata
> infoframe, only through lspcon_write_infoframe() instead of the transcoder
> DIP.

lspcon_write_infoframe() does use the same DIP for this, so this
statement is a bit confusing. I guess we just want to say something
along the lines that the DIP does exist regardless of whether
LSPCON is used or not.

Otherwise this looks good.

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

> 
> The check only existed to keep intel_dp_add_properties() from attaching
> HDR_OUTPUT_METADATA before intel_lspcon_detect_hdr_capability() has probed
> the hardware. Move that check to intel_dp_add_properties() where the
> attach decision is made.
> 
> Signed-off-by: Yitian Shao <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index afd4169..2736a78 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6672,9 +6672,6 @@ intel_dp_has_gamut_metadata_dip(struct intel_encoder 
> *encoder)
>       struct intel_display *display = to_intel_display(encoder);
>       enum port port = encoder->port;
>  
> -     if (intel_bios_encoder_is_lspcon(encoder->devdata))
> -             return false;
> -
>       if (DISPLAY_VER(display) >= 11)
>               return true;
>  
> @@ -6715,7 +6712,9 @@ intel_dp_add_properties(struct intel_dp *intel_dp, 
> struct drm_connector *_connec
>               intel_attach_dp_colorspace_property(&connector->base);
>       }
>  
> -     if (intel_dp_has_gamut_metadata_dip(&dp_to_dig_port(intel_dp)->base))
> +     /* LSPCON attaches the property itself in intel_dp_connector_register() 
> */
> +     if 
> (!intel_bios_encoder_is_lspcon(dp_to_dig_port(intel_dp)->base.devdata) &&
> +         intel_dp_has_gamut_metadata_dip(&dp_to_dig_port(intel_dp)->base))
>               
> drm_connector_attach_hdr_output_metadata_property(&connector->base);
>  
>       if (HAS_VRR(display))
> -- 
> 2.53.0

-- 
Ville Syrjälä
Intel

Reply via email to