Skip to content

Commit 390a7d3

Browse files
committed
drm/i915: Force RGB output for DVI sink
YCbCr output requires infoframes and whatnot, so don't allow it when dealing with a DVI sink (or a HDMI sink we wish to treat as DVI). Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
1 parent 95067dc commit 390a7d3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/gpu/drm/i915/display/intel_hdmi.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,9 +2191,13 @@ static bool intel_hdmi_has_audio(struct intel_encoder *encoder,
21912191
}
21922192

21932193
static enum intel_output_format
2194-
intel_hdmi_output_format(struct intel_connector *connector,
2194+
intel_hdmi_output_format(const struct intel_crtc_state *crtc_state,
2195+
struct intel_connector *connector,
21952196
bool ycbcr_420_output)
21962197
{
2198+
if (!crtc_state->has_hdmi_sink)
2199+
return INTEL_OUTPUT_FORMAT_RGB;
2200+
21972201
if (connector->base.ycbcr_420_allowed && ycbcr_420_output)
21982202
return INTEL_OUTPUT_FORMAT_YCBCR420;
21992203
else
@@ -2212,7 +2216,8 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder,
22122216
bool ycbcr_420_only = drm_mode_is_420_only(info, adjusted_mode);
22132217
int ret;
22142218

2215-
crtc_state->output_format = intel_hdmi_output_format(connector, ycbcr_420_only);
2219+
crtc_state->output_format =
2220+
intel_hdmi_output_format(crtc_state, connector, ycbcr_420_only);
22162221

22172222
if (ycbcr_420_only && !intel_hdmi_is_ycbcr420(crtc_state)) {
22182223
drm_dbg_kms(&i915->drm,
@@ -2227,7 +2232,7 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder,
22272232
!drm_mode_is_420_also(info, adjusted_mode))
22282233
return ret;
22292234

2230-
crtc_state->output_format = intel_hdmi_output_format(connector, true);
2235+
crtc_state->output_format = intel_hdmi_output_format(crtc_state, connector, true);
22312236
ret = intel_hdmi_compute_clock(encoder, crtc_state, respect_downstream_limits);
22322237
}
22332238

0 commit comments

Comments
 (0)