]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.5.7/drm-amdgpu-fix-hdmi-deep-color-support.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 4.5.7 / drm-amdgpu-fix-hdmi-deep-color-support.patch
1 From 9d746ab68163d642dae13756b2b3145b2e38cb65 Mon Sep 17 00:00:00 2001
2 From: Mario Kleiner <mario.kleiner.de@gmail.com>
3 Date: Tue, 24 May 2016 18:12:43 +0200
4 Subject: drm/amdgpu: Fix hdmi deep color support.
5
6 From: Mario Kleiner <mario.kleiner.de@gmail.com>
7
8 commit 9d746ab68163d642dae13756b2b3145b2e38cb65 upstream.
9
10 When porting the hdmi deep color detection code from
11 radeon-kms to amdgpu-kms apparently some kind of
12 copy and paste error happened, attaching an else
13 branch to the wrong if statement.
14
15 The result is that hdmi deep color mode is always
16 disabled, regardless of gpu and display capabilities and
17 user wishes, as the code mistakenly thinks that the display
18 doesn't provide the required max_tmds_clock limit and falls
19 back to 8 bpc.
20
21 This patch fixes deep color support, as tested on a
22 R9 380 Tonga Pro + suitable display, and should be
23 backported to all kernels with amdgpu-kms support.
24
25 Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
26 Cc: Alex Deucher <alexander.deucher@amd.com>
27 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
28 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29
30 ---
31 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 10 +++++-----
32 1 file changed, 5 insertions(+), 5 deletions(-)
33
34 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
35 +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
36 @@ -194,12 +194,12 @@ int amdgpu_connector_get_monitor_bpc(str
37 bpc = 8;
38 DRM_DEBUG("%s: HDMI deep color 10 bpc exceeds max tmds clock. Using %d bpc.\n",
39 connector->name, bpc);
40 - } else if (bpc > 8) {
41 - /* max_tmds_clock missing, but hdmi spec mandates it for deep color. */
42 - DRM_DEBUG("%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n",
43 - connector->name);
44 - bpc = 8;
45 }
46 + } else if (bpc > 8) {
47 + /* max_tmds_clock missing, but hdmi spec mandates it for deep color. */
48 + DRM_DEBUG("%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n",
49 + connector->name);
50 + bpc = 8;
51 }
52 }
53