summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2021-05-11 19:05:28 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2021-05-26 17:56:00 +0300
commitf02e6c859514c86ccb53846042e84e04373f7ac7 (patch)
treefc128f8981e5b318fb7d98b309f801b00920c20f
parent06e0df24fcf1a4be96d5b497036c0bb8ae216542 (diff)
drm/i915: Move has_hdmi_sink check into intel_hdmi_bpc_possible()
We wish intel_hdmi_bpc_possible() to consider whether the sink supports HDMI or just DVI when checking whether it'll support HDMI deep color or not. This also takes care of the "force DVI" property. Cc: Werner Sembach <wse@tuxedocomputers.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
-rw-r--r--drivers/gpu/drm/i915/display/intel_hdmi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index df5fb0741c8e..c2a1bbc6caf2 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1873,11 +1873,17 @@ static bool intel_hdmi_bpc_possible(struct drm_connector *connector,
switch (bpc) {
case 12:
+ if (!has_hdmi_sink)
+ return false;
+
if (ycbcr420_output)
return hdmi->y420_dc_modes & DRM_EDID_YCBCR420_DC_36;
else
return info->edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_36;
case 10:
+ if (!has_hdmi_sink)
+ return false;
+
if (ycbcr420_output)
return hdmi->y420_dc_modes & DRM_EDID_YCBCR420_DC_30;
else
@@ -1975,9 +1981,6 @@ bool intel_hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
if (crtc_state->pipe_bpp < bpc * 3)
return false;
- if (!has_hdmi_sink)
- return false;
-
for_each_new_connector_in_state(state, connector, connector_state, i) {
if (connector_state->crtc != crtc_state->uapi.crtc)
continue;