Skip to content

Commit f4a3500

Browse files
6by9pelwell
authored andcommitted
drm/connector: hdmi: Disable the infoframes by default
If an infoframe was ever enabled, duplicate_state would memcpy the infoframe including the "set" flag. The infoframe functions then never cleared it, so once set it was always set. This was most obvious with the HDR infoframe as it resulted in bad colour rendering. Signed-off-by: Dave Stevenson <[email protected]>
1 parent 3127399 commit f4a3500

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/display/drm_hdmi_state_helper.c

+8
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ static int hdmi_generate_avi_infoframe(const struct drm_connector *connector,
347347
is_limited_range ? HDMI_QUANTIZATION_RANGE_LIMITED : HDMI_QUANTIZATION_RANGE_FULL;
348348
int ret;
349349

350+
infoframe->set = false;
351+
350352
ret = drm_hdmi_avi_infoframe_from_display_mode(frame, connector, mode);
351353
if (ret)
352354
return ret;
@@ -376,6 +378,8 @@ static int hdmi_generate_spd_infoframe(const struct drm_connector *connector,
376378
&infoframe->data.spd;
377379
int ret;
378380

381+
infoframe->set = false;
382+
379383
ret = hdmi_spd_infoframe_init(frame,
380384
connector->hdmi.vendor,
381385
connector->hdmi.product);
@@ -398,6 +402,8 @@ static int hdmi_generate_hdr_infoframe(const struct drm_connector *connector,
398402
&infoframe->data.drm;
399403
int ret;
400404

405+
infoframe->set = false;
406+
401407
if (connector->max_bpc < 10)
402408
return 0;
403409

@@ -425,6 +431,8 @@ static int hdmi_generate_hdmi_vendor_infoframe(const struct drm_connector *conne
425431
&infoframe->data.vendor.hdmi;
426432
int ret;
427433

434+
infoframe->set = false;
435+
428436
if (!info->has_hdmi_infoframe)
429437
return 0;
430438

0 commit comments

Comments
 (0)