diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lspcon.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lspcon.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c index 96a8d9524b0c..c18f14d41f1d 100644 --- a/drivers/gpu/drm/i915/intel_lspcon.c +++ b/drivers/gpu/drm/i915/intel_lspcon.c | |||
@@ -462,10 +462,8 @@ void lspcon_set_infoframes(struct intel_encoder *encoder, | |||
462 | uint8_t buf[VIDEO_DIP_DATA_SIZE]; | 462 | uint8_t buf[VIDEO_DIP_DATA_SIZE]; |
463 | struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base); | 463 | struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base); |
464 | struct intel_lspcon *lspcon = &dig_port->lspcon; | 464 | struct intel_lspcon *lspcon = &dig_port->lspcon; |
465 | struct intel_dp *intel_dp = &dig_port->dp; | 465 | const struct drm_display_mode *adjusted_mode = |
466 | struct drm_connector *connector = &intel_dp->attached_connector->base; | 466 | &crtc_state->base.adjusted_mode; |
467 | const struct drm_display_mode *mode = &crtc_state->base.adjusted_mode; | ||
468 | bool is_hdmi2_sink = connector->display_info.hdmi.scdc.supported; | ||
469 | 467 | ||
470 | if (!lspcon->active) { | 468 | if (!lspcon->active) { |
471 | DRM_ERROR("Writing infoframes while LSPCON disabled ?\n"); | 469 | DRM_ERROR("Writing infoframes while LSPCON disabled ?\n"); |
@@ -473,7 +471,8 @@ void lspcon_set_infoframes(struct intel_encoder *encoder, | |||
473 | } | 471 | } |
474 | 472 | ||
475 | ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi, | 473 | ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi, |
476 | mode, is_hdmi2_sink); | 474 | conn_state->connector, |
475 | adjusted_mode); | ||
477 | if (ret < 0) { | 476 | if (ret < 0) { |
478 | DRM_ERROR("couldn't fill AVI infoframe\n"); | 477 | DRM_ERROR("couldn't fill AVI infoframe\n"); |
479 | return; | 478 | return; |
@@ -488,11 +487,13 @@ void lspcon_set_infoframes(struct intel_encoder *encoder, | |||
488 | frame.avi.colorspace = HDMI_COLORSPACE_RGB; | 487 | frame.avi.colorspace = HDMI_COLORSPACE_RGB; |
489 | } | 488 | } |
490 | 489 | ||
491 | drm_hdmi_avi_infoframe_quant_range(&frame.avi, mode, | 490 | drm_hdmi_avi_infoframe_quant_range(&frame.avi, |
491 | conn_state->connector, | ||
492 | adjusted_mode, | ||
492 | crtc_state->limited_color_range ? | 493 | crtc_state->limited_color_range ? |
493 | HDMI_QUANTIZATION_RANGE_LIMITED : | 494 | HDMI_QUANTIZATION_RANGE_LIMITED : |
494 | HDMI_QUANTIZATION_RANGE_FULL, | 495 | HDMI_QUANTIZATION_RANGE_FULL, |
495 | false, is_hdmi2_sink); | 496 | false); |
496 | 497 | ||
497 | ret = hdmi_infoframe_pack(&frame, buf, sizeof(buf)); | 498 | ret = hdmi_infoframe_pack(&frame, buf, sizeof(buf)); |
498 | if (ret < 0) { | 499 | if (ret < 0) { |