Skip to content

Commit d6c4f95

Browse files
committed
drm/i915: Treat HDMI as DVI when cloning
When doing HDMI+non-HDMI cloning the other sink can't get the infoframes/etc. so stuff like limited range output is not a good idea. Similarly when doing HDMI+HDMI cloning on g4x (only platform where we allow it) only one of the ports can receive infoframes and so again using any fancy stuff is a bad idea. We also don't track the inforames/audio state per-port so we'd end up with some kind of random mismash state when multipled encoders try to compute the same stuff. And the hardware will in fact automagically disable audio/infoframe transmission if you try to enable it for multiple HDMI ports at the same time. Thus disable all HDMI specific features when cloning. 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 390a7d3 commit d6c4f95

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,13 +2058,6 @@ static bool hdmi_bpc_possible(const struct intel_crtc_state *crtc_state, int bpc
20582058
if (!intel_hdmi_source_bpc_possible(dev_priv, bpc))
20592059
return false;
20602060

2061-
/*
2062-
* HDMI deep color affects the clocks, so it's only possible
2063-
* when not cloning with other encoder types.
2064-
*/
2065-
if (bpc > 8 && crtc_state->output_types != BIT(INTEL_OUTPUT_HDMI))
2066-
return false;
2067-
20682061
/* Display Wa_1405510057:icl,ehl */
20692062
if (intel_hdmi_is_ycbcr420(crtc_state) &&
20702063
bpc == 10 && DISPLAY_VER(dev_priv) == 11 &&
@@ -2239,6 +2232,12 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder,
22392232
return ret;
22402233
}
22412234

2235+
static bool intel_hdmi_is_cloned(const struct intel_crtc_state *crtc_state)
2236+
{
2237+
return crtc_state->uapi.encoder_mask &&
2238+
!is_power_of_2(crtc_state->uapi.encoder_mask);
2239+
}
2240+
22422241
int intel_hdmi_compute_config(struct intel_encoder *encoder,
22432242
struct intel_crtc_state *pipe_config,
22442243
struct drm_connector_state *conn_state)
@@ -2254,8 +2253,9 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
22542253
return -EINVAL;
22552254

22562255
pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
2257-
pipe_config->has_hdmi_sink = intel_has_hdmi_sink(intel_hdmi,
2258-
conn_state);
2256+
pipe_config->has_hdmi_sink =
2257+
intel_has_hdmi_sink(intel_hdmi, conn_state) &&
2258+
!intel_hdmi_is_cloned(pipe_config);
22592259

22602260
if (pipe_config->has_hdmi_sink)
22612261
pipe_config->has_infoframe = true;

0 commit comments

Comments
 (0)