Commit 9d746ab6 authored by Mario Kleiner's avatar Mario Kleiner Committed by Alex Deucher

drm/amdgpu: Fix hdmi deep color support.

When porting the hdmi deep color detection code from
radeon-kms to amdgpu-kms apparently some kind of
copy and paste error happened, attaching an else
branch to the wrong if statement.

The result is that hdmi deep color mode is always
disabled, regardless of gpu and display capabilities and
user wishes, as the code mistakenly thinks that the display
doesn't provide the required max_tmds_clock limit and falls
back to 8 bpc.

This patch fixes deep color support, as tested on a
R9 380 Tonga Pro + suitable display, and should be
backported to all kernels with amdgpu-kms support.
Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
Cc: stable@vger.kernel.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 48c60c03
...@@ -194,6 +194,7 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector) ...@@ -194,6 +194,7 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector)
bpc = 8; bpc = 8;
DRM_DEBUG("%s: HDMI deep color 10 bpc exceeds max tmds clock. Using %d bpc.\n", DRM_DEBUG("%s: HDMI deep color 10 bpc exceeds max tmds clock. Using %d bpc.\n",
connector->name, bpc); connector->name, bpc);
}
} else if (bpc > 8) { } else if (bpc > 8) {
/* max_tmds_clock missing, but hdmi spec mandates it for deep color. */ /* max_tmds_clock missing, but hdmi spec mandates it for deep color. */
DRM_DEBUG("%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n", DRM_DEBUG("%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n",
...@@ -201,7 +202,6 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector) ...@@ -201,7 +202,6 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector)
bpc = 8; bpc = 8;
} }
} }
}
if ((amdgpu_deep_color == 0) && (bpc > 8)) { if ((amdgpu_deep_color == 0) && (bpc > 8)) {
DRM_DEBUG("%s: Deep color disabled. Set amdgpu module param deep_color=1 to enable.\n", DRM_DEBUG("%s: Deep color disabled. Set amdgpu module param deep_color=1 to enable.\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment