Advertisement
Guest User

Build amdgpu-pro DKMS package on ARCH for linux 4.9.0-rc5

a guest
Nov 20th, 2016
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.73 KB | None | 0 0
  1. diff -ur a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_acp.c b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_acp.c
  2. --- a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_acp.c 2016-10-25 03:01:17.000000000 +0200
  3. +++ b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_acp.c 2016-11-20 11:32:51.000000000 +0100
  4. @@ -434,7 +434,9 @@
  5. * hw and ACP-genpd status are in sync.
  6. * 'suspend_power_off' represents "Power status before system suspend"
  7. */
  8. - if (adev->acp.acp_genpd->gpd.suspend_power_off == true) {
  9. + // HACK, power_off suggested by gcc, cast to bool is doubtful.
  10. + // if (adev->acp.acp_genpd->gpd.suspend_power_off == true) {
  11. + if ((bool) adev->acp.acp_genpd->gpd.power_off == true) {
  12. apd = container_of(&adev->acp.acp_genpd->gpd,
  13. struct acp_pm_domain, gpd);
  14.  
  15. diff -ur a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_connectors.c b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_connectors.c
  16. --- a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_connectors.c 2016-10-25 03:01:17.000000000 +0200
  17. +++ b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_connectors.c 2016-11-20 10:58:39.000000000 +0100
  18. @@ -168,12 +168,16 @@
  19. }
  20.  
  21. /* Any defined maximum tmds clock limit we must not exceed? */
  22. - if (connector->max_tmds_clock > 0) {
  23. + // HACK
  24. + // if (connector->max_tmds_clock > 0) {
  25. + if (connector->display_info.max_tmds_clock > 0) {
  26. /* mode_clock is clock in kHz for mode to be modeset on this connector */
  27. mode_clock = amdgpu_connector->pixelclock_for_modeset;
  28.  
  29. /* Maximum allowable input clock in kHz */
  30. - max_tmds_clock = connector->max_tmds_clock * 1000;
  31. + // HACK
  32. + // max_tmds_clock = connector->max_tmds_clock * 1000;
  33. + max_tmds_clock = connector->display_info.max_tmds_clock * 1000;
  34.  
  35. DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n",
  36. connector->name, mode_clock, max_tmds_clock);
  37. diff -ur a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_gds.h b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_gds.h
  38. --- a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_gds.h 2016-11-20 16:13:01.166729742 +0100
  39. +++ b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_gds.h 2016-11-20 11:16:09.000000000 +0100
  40. @@ -31,6 +31,15 @@
  41. #define AMDGPU_GWS_SHIFT PAGE_SHIFT
  42. #define AMDGPU_OA_SHIFT PAGE_SHIFT
  43.  
  44. +//HACK : following amdgpu_ttm.h
  45. +#define TTM_PL_PRIV0 (TTM_PL_PRIV + 0)
  46. +#define TTM_PL_PRIV1 (TTM_PL_PRIV + 1)
  47. +#define TTM_PL_PRIV2 (TTM_PL_PRIV + 2)
  48. +
  49. +#define TTM_PL_FLAG_PRIV0 (TTM_PL_FLAG_PRIV << 0)
  50. +#define TTM_PL_FLAG_PRIV1 (TTM_PL_FLAG_PRIV << 1)
  51. +#define TTM_PL_FLAG_PRIV2 (TTM_PL_FLAG_PRIV << 2)
  52. +
  53. #define AMDGPU_PL_GDS TTM_PL_PRIV0
  54. #define AMDGPU_PL_GWS TTM_PL_PRIV1
  55. #define AMDGPU_PL_OA TTM_PL_PRIV2
  56. diff -ur a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_ttm.c b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_ttm.c
  57. --- a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_ttm.c 2016-11-19 22:31:47.000000000 +0100
  58. +++ b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_ttm.c 2016-11-20 11:12:02.000000000 +0100
  59. @@ -225,7 +225,9 @@
  60.  
  61. if (amdgpu_ttm_tt_get_usermm(bo->ttm))
  62. return -EPERM;
  63. - return drm_vma_node_verify_access(&rbo->gem_base.vma_node, filp);
  64. + // HACK
  65. + // return drm_vma_node_verify_access(&rbo->gem_base.vma_node, filp);
  66. + return drm_vma_node_verify_access(&rbo->gem_base.vma_node, filp->private_data);
  67. }
  68.  
  69. static void amdgpu_move_null(struct ttm_buffer_object *bo,
  70. @@ -345,7 +347,9 @@
  71. goto out_cleanup;
  72. }
  73. #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
  74. - r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
  75. + // HACK
  76. + // r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
  77. + r = ttm_bo_move_ttm(bo, true, no_wait_gpu, new_mem);
  78. #else
  79. r = ttm_bo_move_ttm(bo, true, no_wait_gpu, new_mem);
  80. #endif
  81. @@ -382,7 +386,9 @@
  82. return r;
  83. }
  84. #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
  85. - r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
  86. + // HACK
  87. + // r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
  88. + r = ttm_bo_move_ttm(bo, true, no_wait_gpu, &tmp_mem);
  89. #else
  90. r = ttm_bo_move_ttm(bo, true, no_wait_gpu, &tmp_mem);
  91. #endif
  92. diff -ur a/amdgpu-pro-16.40-348864/amd/backport/include/kcl/kcl_mm.h b/amdgpu-pro-16.40-348864/amd/backport/include/kcl/kcl_mm.h
  93. --- a/amdgpu-pro-16.40-348864/amd/backport/include/kcl/kcl_mm.h 2016-10-25 03:01:17.000000000 +0200
  94. +++ b/amdgpu-pro-16.40-348864/amd/backport/include/kcl/kcl_mm.h 2016-11-20 10:43:28.000000000 +0100
  95. @@ -9,7 +9,9 @@
  96. struct vm_area_struct **vmas)
  97. {
  98. #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
  99. - return get_user_pages(start, nr_pages, write, force, pages, vmas);
  100. + // HACK
  101. + return get_user_pages(start, nr_pages, write, pages, vmas);
  102. + //return get_user_pages(start, nr_pages, write, force, pages, vmas);
  103. #else
  104. return get_user_pages(tsk, mm, start, nr_pages,
  105. write, force, pages, vmas);
  106. diff -ur a/amdgpu-pro-16.40-348864/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amdgpu-pro-16.40-348864/amd/dal/amdgpu_dm/amdgpu_dm_types.c
  107. --- a/amdgpu-pro-16.40-348864/amd/dal/amdgpu_dm/amdgpu_dm_types.c 2016-11-19 22:31:47.000000000 +0100
  108. +++ b/amdgpu-pro-16.40-348864/amd/dal/amdgpu_dm/amdgpu_dm_types.c 2016-11-20 15:21:03.000000000 +0100
  109. @@ -909,8 +909,15 @@
  110. }
  111. }
  112.  
  113. +// HACK
  114. +/*
  115. + * static struct dc_target *create_target_for_sink(
  116. + * const struct amdgpu_connector *aconnector,
  117. + * const struct drm_display_mode *drm_mode,
  118. + * const struct dm_connector_state *dm_state)
  119. + * */
  120. static struct dc_target *create_target_for_sink(
  121. - const struct amdgpu_connector *aconnector,
  122. + struct amdgpu_connector *aconnector,
  123. const struct drm_display_mode *drm_mode,
  124. const struct dm_connector_state *dm_state)
  125. {
  126. @@ -1640,8 +1647,11 @@
  127. }
  128.  
  129. static const struct drm_plane_helper_funcs dm_plane_helper_funcs = {
  130. - .prepare_fb = dm_plane_helper_prepare_fb,
  131. - .cleanup_fb = dm_plane_helper_cleanup_fb,
  132. + // HACK
  133. + // .prepare_fb = dm_plane_helper_prepare_fb,
  134. + // .cleanup_fb = dm_plane_helper_cleanup_fb,
  135. + .prepare_fb = (void*) dm_plane_helper_prepare_fb,
  136. + .cleanup_fb = (void*) dm_plane_helper_cleanup_fb,
  137. };
  138.  
  139. /*
  140. diff -ur a/amdgpu-pro-16.40-348864/amd/dal/Makefile b/amdgpu-pro-16.40-348864/amd/dal/Makefile
  141. --- a/amdgpu-pro-16.40-348864/amd/dal/Makefile 2016-10-25 03:01:17.000000000 +0200
  142. +++ b/amdgpu-pro-16.40-348864/amd/dal/Makefile 2016-11-20 15:30:24.000000000 +0100
  143. @@ -5,7 +5,9 @@
  144.  
  145. AMDDALPATH = $(RELATIVE_AMD_DAL_PATH)
  146.  
  147. -subdir-ccflags-y += -Werror
  148. +# HACK : non guarded if statements in freesync.c
  149. +# subdir-ccflags-y += -Werror
  150. +subdir-ccflags-y += -Wno-error
  151.  
  152. subdir-ccflags-y += -I$(AMDDALPATH)/ -I$(AMDDALPATH)/include
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement