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. Reviewed-by: Ville Syrjälä <[email protected]> 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; + return false; + } + ret = drm_dp_dpcd_read(&intel_dp->aux, get_hdr_status_reg(lspcon), &hdr_caps, 1); -- 2.53.0
