Skip to content

Commit 013dd9e

Browse files
committed
drm/i915/dp: fall back to 18 bpp when sink capability is unknown
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 996a223 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 Cc: [email protected] Reported-and-tested-by: Dihan Wickremasuriya <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=105331 Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6765bd6 commit 013dd9e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12157,11 +12157,21 @@ connected_sink_compute_bpp(struct intel_connector *connector,
1215712157
pipe_config->pipe_bpp = connector->base.display_info.bpc*3;
1215812158
}
1215912159

12160-
/* Clamp bpp to 8 on screens without EDID 1.4 */
12161-
if (connector->base.display_info.bpc == 0 && bpp > 24) {
12162-
DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of 24\n",
12163-
bpp);
12164-
pipe_config->pipe_bpp = 24;
12160+
/* Clamp bpp to default limit on screens without EDID 1.4 */
12161+
if (connector->base.display_info.bpc == 0) {
12162+
int type = connector->base.connector_type;
12163+
int clamp_bpp = 24;
12164+
12165+
/* Fall back to 18 bpp when DP sink capability is unknown. */
12166+
if (type == DRM_MODE_CONNECTOR_DisplayPort ||
12167+
type == DRM_MODE_CONNECTOR_eDP)
12168+
clamp_bpp = 18;
12169+
12170+
if (bpp > clamp_bpp) {
12171+
DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of %d\n",
12172+
bpp, clamp_bpp);
12173+
pipe_config->pipe_bpp = clamp_bpp;
12174+
}
1216512175
}
1216612176
}
1216712177

0 commit comments

Comments
 (0)