aboutsummarylogtreecommitdiffstats
path: root/patch_amd_amdgpu_dce_v6_0_c.patch
blob: 2f2b372be0fb0f45ec2ca8d98002daa5ccbef10c (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
26
27
28
29
30
31
--- ./amd/amdgpu/dce_v6_0.c.orig	2019-07-06 00:42:03.000000000 +0000
+++ ./amd/amdgpu/dce_v6_0.c	2019-07-23 17:48:36.545768493 +0000
@@ -21,6 +21,9 @@
  *
  */
 #include <drm/drmP.h>
+#if DRM_VERSION_CODE >= DRM_VERSION(5, 1, 0)
+#include <drm/drm_probe_helper.h>
+#endif
 #include "amdgpu.h"
 #include "amdgpu_pm.h"
 #include "amdgpu_i2c.h"
@@ -1423,6 +1426,9 @@
 	struct amdgpu_device *adev = dev->dev_private;
 	struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder);
 	struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv;
+#if DRM_VERSION_CODE >= DRM_VERSION(5, 1, 0)
+	struct drm_connector *connector = amdgpu_get_connector_for_encoder(encoder);
+#endif
 	struct hdmi_avi_infoframe frame;
 	u8 buffer[HDMI_INFOFRAME_HEADER_SIZE + HDMI_AVI_INFOFRAME_SIZE];
 	uint8_t *payload = buffer + 3;
@@ -1433,6 +1439,8 @@
 #if DRM_VERSION_CODE < DRM_VERSION(4, 14, 0) && \
 	!defined(OS_NAME_SUSE_15) && !defined(OS_NAME_SUSE_15_1)
 	err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode);
+#elif DRM_VERSION_CODE >= DRM_VERSION(5, 1, 0)
+	err = drm_hdmi_avi_infoframe_from_display_mode(&frame, connector, mode);
 #else
 	err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode, false);
 #endif