summarylogtreecommitdiffstats
path: root/0003-fix_drm_connector.patch
blob: a056ebe3d3c5dfb7ff5be55fd67835771a415429 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/amd/amdgpu/amdgpu_connectors.c b/amd/amdgpu/amdgpu_connectors.c
index 818d589..cb78d1c 100644
--- a/amd/amdgpu/amdgpu_connectors.c
+++ b/amd/amdgpu/amdgpu_connectors.c
@@ -168,12 +168,20 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector)
 		}
 
 		/* Any defined maximum tmds clock limit we must not exceed? */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+		if (connector->display_info.max_tmds_clock > 0) {
+#else
 		if (connector->max_tmds_clock > 0) {
+#endif
 			/* mode_clock is clock in kHz for mode to be modeset on this connector */
 			mode_clock = amdgpu_connector->pixelclock_for_modeset;
 
 			/* Maximum allowable input clock in kHz */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+			max_tmds_clock = connector->display_info.max_tmds_clock * 1000;
+#else
 			max_tmds_clock = connector->max_tmds_clock * 1000;
+#endif
 
 			DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n",
 				  connector->name, mode_clock, max_tmds_clock);