1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--- ./amd/amdgpu/amdgpu_fb.c.orig 2019-07-23 17:49:26.555766634 +0000
+++ ./amd/amdgpu/amdgpu_fb.c 2019-07-23 17:55:38.005752841 +0000
@@ -266,7 +266,7 @@
#if DRM_VERSION_CODE < DRM_VERSION(4, 11, 0)
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
-#else
+#elif DRM_VERSION_CODE < DRM_VERSION(5, 2, 0)
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
#endif
@@ -278,7 +278,11 @@
info->screen_base = amdgpu_bo_kptr(abo);
info->screen_size = amdgpu_bo_size(abo);
+#if DRM_VERSION_CODE >= DRM_VERSION(5, 2, 0)
+ drm_fb_helper_fill_info(info, &rfbdev->helper, sizes);
+#else
drm_fb_helper_fill_var(info, &rfbdev->helper, sizes->fb_width, sizes->fb_height);
+#endif
/* setup aperture base/size for vesafb takeover */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|