From e66225885feed7b10129f246fcbbbc49ad4517be Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Sun, 1 Jan 2017 01:30:12 -0600 Subject: [PATCH 1/1] Fix BPP clamping on HDMI When a monitor connected via HDMI reported an EDID with BPP greater than 24, BPP was assumed to be sufficient for 12BPC. This is not a safe assumption due to some monitors reporting BPP in-between 24 and 36, eg: 30, which must be rounded down rather than up. --- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index fb88e32e25a3..58811fb1ab81 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -1349,7 +1349,7 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, * outputs. We also need to check that the higher clock still fits * within limits. */ - if (pipe_config->pipe_bpp > 8*3 && pipe_config->has_hdmi_sink && + if (pipe_config->pipe_bpp >= 12*3 && pipe_config->has_hdmi_sink && hdmi_port_clock_valid(intel_hdmi, clock_12bpc, true) == MODE_OK && hdmi_12bpc_possible(pipe_config)) { DRM_DEBUG_KMS("picking bpc to 12 for HDMI output\n"); -- 2.11.0