Skip to contentSkip to conversation

Patch "drm/i915/dp: fall back to 18 bpp when sink capability is unknown" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 1, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/i915/dp: fall back to 18 bpp when sink capability is unknown

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     drm-i915-dp-fall-back-to-18-bpp-when-sink-capability-is-unknown.patch

and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 5efd407674068dede403551bea3b0b134c32513a Mon Sep 17 00:00:00 2001

From: Jani Nikula <[email protected]>
Date: Wed, 13 Jan 2016 16:35:20 +0200
Subject: drm/i915/dp: fall back to 18 bpp when sink capability is unknown
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Jani Nikula <[email protected]>

commit 5efd407674068dede403551bea3b0b134c32513a upstream.

Per DP spec, the source device should fall back to 18 bpp, VESA range RGB when the sink capability is unknown. Fix the color depth clamping. 18 bpp color depth should ensure full color range in automatic mode.

The clamping has been HDMI specific since its introduction in

commit 996a2239f93b03c5972923f04b097f65565c5bed

Author: Daniel Vetter <[email protected]>
Date:   Fri Apr 19 11:24:34 2013 +0200

drm/i915: Disable high-bpc on pre-1.4 EDID screens

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=105331

---
 drivers/gpu/drm/i915/intel_display.c |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_display.c +15 -5
@@ -11930,11 +11930,21 @@ connected_sink_compute_bpp(struct intel_
 		pipe_config->pipe_bpp = connector->base.display_info.bpc*3;
 	}
 
-	/* Clamp bpp to 8 on screens without EDID 1.4 */
-	if (connector->base.display_info.bpc == 0 && bpp > 24) {
-		DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of 24\n",
-			      bpp);
-		pipe_config->pipe_bpp = 24;
+	/* Clamp bpp to default limit on screens without EDID 1.4 */
+	if (connector->base.display_info.bpc == 0) {
+		int type = connector->base.connector_type;
+		int clamp_bpp = 24;
+
+		/* Fall back to 18 bpp when DP sink capability is unknown. */
+		if (type == DRM_MODE_CONNECTOR_DisplayPort ||
+		    type == DRM_MODE_CONNECTOR_eDP)
+			clamp_bpp = 18;
+
+		if (bpp > clamp_bpp) {
+			DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of %d\n",
+				      bpp, clamp_bpp);
+			pipe_config->pipe_bpp = clamp_bpp;
+		}
 	}
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/drm-i915-dp-fall-back-to-18-bpp-when-sink-capability-is-unknown.patch queue-4.4/drm-i915-init-power-domains-early-in-driver-load.patch queue-4.4/drm-i915-don-t-reject-primary-plane-windowing-with-color-keying-enabled-on-skl.patch queue-4.4/drm-i915-dsi-don-t-pass-arbitrary-data-to-sideband.patch queue-4.4/drm-i915-fix-error-path-in-intel_setup_gmbus.patch queue-4.4/drm-i915-make-sure-dc-writes-are-coherent-on-flush.patch queue-4.4/drm-i915-dsi-defend-gpio-table-against-out-of-bounds-access.patch queue-4.4/drm-i915-skl-don-t-skip-mst-encoders-in-skl_ddi_pll_select.patch queue-4.4/drm-i915-restore-inhibiting-the-load-of-the-default-context.patch queue-4.4/drm-i915-intel_hpd_init-fix-suspend-resume-reprobing.patch