Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ur a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_acp.c b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_acp.c
- --- a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_acp.c 2016-10-25 03:01:17.000000000 +0200
- +++ b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_acp.c 2016-11-20 11:32:51.000000000 +0100
- @@ -434,7 +434,9 @@
- * hw and ACP-genpd status are in sync.
- * 'suspend_power_off' represents "Power status before system suspend"
- */
- - if (adev->acp.acp_genpd->gpd.suspend_power_off == true) {
- + // HACK, power_off suggested by gcc, cast to bool is doubtful.
- + // if (adev->acp.acp_genpd->gpd.suspend_power_off == true) {
- + if ((bool) adev->acp.acp_genpd->gpd.power_off == true) {
- apd = container_of(&adev->acp.acp_genpd->gpd,
- struct acp_pm_domain, gpd);
- diff -ur a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_connectors.c b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_connectors.c
- --- a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_connectors.c 2016-10-25 03:01:17.000000000 +0200
- +++ b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_connectors.c 2016-11-20 10:58:39.000000000 +0100
- @@ -168,12 +168,16 @@
- }
- /* Any defined maximum tmds clock limit we must not exceed? */
- - if (connector->max_tmds_clock > 0) {
- + // HACK
- + // if (connector->max_tmds_clock > 0) {
- + if (connector->display_info.max_tmds_clock > 0) {
- /* 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 */
- - max_tmds_clock = connector->max_tmds_clock * 1000;
- + // HACK
- + // max_tmds_clock = connector->max_tmds_clock * 1000;
- + max_tmds_clock = connector->display_info.max_tmds_clock * 1000;
- DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n",
- connector->name, mode_clock, max_tmds_clock);
- diff -ur a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_gds.h b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_gds.h
- --- a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_gds.h 2016-11-20 16:13:01.166729742 +0100
- +++ b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_gds.h 2016-11-20 11:16:09.000000000 +0100
- @@ -31,6 +31,15 @@
- #define AMDGPU_GWS_SHIFT PAGE_SHIFT
- #define AMDGPU_OA_SHIFT PAGE_SHIFT
- +//HACK : following amdgpu_ttm.h
- +#define TTM_PL_PRIV0 (TTM_PL_PRIV + 0)
- +#define TTM_PL_PRIV1 (TTM_PL_PRIV + 1)
- +#define TTM_PL_PRIV2 (TTM_PL_PRIV + 2)
- +
- +#define TTM_PL_FLAG_PRIV0 (TTM_PL_FLAG_PRIV << 0)
- +#define TTM_PL_FLAG_PRIV1 (TTM_PL_FLAG_PRIV << 1)
- +#define TTM_PL_FLAG_PRIV2 (TTM_PL_FLAG_PRIV << 2)
- +
- #define AMDGPU_PL_GDS TTM_PL_PRIV0
- #define AMDGPU_PL_GWS TTM_PL_PRIV1
- #define AMDGPU_PL_OA TTM_PL_PRIV2
- diff -ur a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_ttm.c b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_ttm.c
- --- a/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_ttm.c 2016-11-19 22:31:47.000000000 +0100
- +++ b/amdgpu-pro-16.40-348864/amd/amdgpu/amdgpu_ttm.c 2016-11-20 11:12:02.000000000 +0100
- @@ -225,7 +225,9 @@
- if (amdgpu_ttm_tt_get_usermm(bo->ttm))
- return -EPERM;
- - return drm_vma_node_verify_access(&rbo->gem_base.vma_node, filp);
- + // HACK
- + // return drm_vma_node_verify_access(&rbo->gem_base.vma_node, filp);
- + return drm_vma_node_verify_access(&rbo->gem_base.vma_node, filp->private_data);
- }
- static void amdgpu_move_null(struct ttm_buffer_object *bo,
- @@ -345,7 +347,9 @@
- goto out_cleanup;
- }
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
- - r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
- + // HACK
- + // r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
- + r = ttm_bo_move_ttm(bo, true, no_wait_gpu, new_mem);
- #else
- r = ttm_bo_move_ttm(bo, true, no_wait_gpu, new_mem);
- #endif
- @@ -382,7 +386,9 @@
- return r;
- }
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
- - r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
- + // HACK
- + // r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
- + r = ttm_bo_move_ttm(bo, true, no_wait_gpu, &tmp_mem);
- #else
- r = ttm_bo_move_ttm(bo, true, no_wait_gpu, &tmp_mem);
- #endif
- 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
- --- a/amdgpu-pro-16.40-348864/amd/backport/include/kcl/kcl_mm.h 2016-10-25 03:01:17.000000000 +0200
- +++ b/amdgpu-pro-16.40-348864/amd/backport/include/kcl/kcl_mm.h 2016-11-20 10:43:28.000000000 +0100
- @@ -9,7 +9,9 @@
- struct vm_area_struct **vmas)
- {
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
- - return get_user_pages(start, nr_pages, write, force, pages, vmas);
- + // HACK
- + return get_user_pages(start, nr_pages, write, pages, vmas);
- + //return get_user_pages(start, nr_pages, write, force, pages, vmas);
- #else
- return get_user_pages(tsk, mm, start, nr_pages,
- write, force, pages, vmas);
- 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
- --- a/amdgpu-pro-16.40-348864/amd/dal/amdgpu_dm/amdgpu_dm_types.c 2016-11-19 22:31:47.000000000 +0100
- +++ b/amdgpu-pro-16.40-348864/amd/dal/amdgpu_dm/amdgpu_dm_types.c 2016-11-20 15:21:03.000000000 +0100
- @@ -909,8 +909,15 @@
- }
- }
- +// HACK
- +/*
- + * static struct dc_target *create_target_for_sink(
- + * const struct amdgpu_connector *aconnector,
- + * const struct drm_display_mode *drm_mode,
- + * const struct dm_connector_state *dm_state)
- + * */
- static struct dc_target *create_target_for_sink(
- - const struct amdgpu_connector *aconnector,
- + struct amdgpu_connector *aconnector,
- const struct drm_display_mode *drm_mode,
- const struct dm_connector_state *dm_state)
- {
- @@ -1640,8 +1647,11 @@
- }
- static const struct drm_plane_helper_funcs dm_plane_helper_funcs = {
- - .prepare_fb = dm_plane_helper_prepare_fb,
- - .cleanup_fb = dm_plane_helper_cleanup_fb,
- + // HACK
- + // .prepare_fb = dm_plane_helper_prepare_fb,
- + // .cleanup_fb = dm_plane_helper_cleanup_fb,
- + .prepare_fb = (void*) dm_plane_helper_prepare_fb,
- + .cleanup_fb = (void*) dm_plane_helper_cleanup_fb,
- };
- /*
- diff -ur a/amdgpu-pro-16.40-348864/amd/dal/Makefile b/amdgpu-pro-16.40-348864/amd/dal/Makefile
- --- a/amdgpu-pro-16.40-348864/amd/dal/Makefile 2016-10-25 03:01:17.000000000 +0200
- +++ b/amdgpu-pro-16.40-348864/amd/dal/Makefile 2016-11-20 15:30:24.000000000 +0100
- @@ -5,7 +5,9 @@
- AMDDALPATH = $(RELATIVE_AMD_DAL_PATH)
- -subdir-ccflags-y += -Werror
- +# HACK : non guarded if statements in freesync.c
- +# subdir-ccflags-y += -Werror
- +subdir-ccflags-y += -Wno-error
- subdir-ccflags-y += -I$(AMDDALPATH)/ -I$(AMDDALPATH)/include
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement