diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0017-amdgpu-gfxv8-Remove-magic-numbers-from-function-gfx_.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0017-amdgpu-gfxv8-Remove-magic-numbers-from-function-gfx_.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0017-amdgpu-gfxv8-Remove-magic-numbers-from-function-gfx_.patch b/common/recipes-kernel/linux/files/0017-amdgpu-gfxv8-Remove-magic-numbers-from-function-gfx_.patch new file mode 100644 index 00000000..8b3a2684 --- /dev/null +++ b/common/recipes-kernel/linux/files/0017-amdgpu-gfxv8-Remove-magic-numbers-from-function-gfx_.patch @@ -0,0 +1,30 @@ +From a238e5cbb433f5a0df5ca1c4125f20fa61bc4914 Mon Sep 17 00:00:00 2001 +From: Tom St Denis <tom.stdenis@amd.com> +Date: Thu, 3 Dec 2015 12:23:28 -0500 +Subject: [PATCH 0017/1110] amdgpu/gfxv8: Remove magic numbers from function + gfx_v8_0_tiling_mode_table_init() + +Signed-off-by: Tom St Denis <tom.stdenis@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +index 0446565..15db401 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +@@ -1640,8 +1640,8 @@ static int gfx_v8_0_sw_fini(void *handle) + static void gfx_v8_0_tiling_mode_table_init(struct amdgpu_device *adev) + { + uint32_t *modearray, *mod2array; +- const u32 num_tile_mode_states = 32; +- const u32 num_secondary_tile_mode_states = 16; ++ const u32 num_tile_mode_states = ARRAY_SIZE(adev->gfx.config.tile_mode_array); ++ const u32 num_secondary_tile_mode_states = ARRAY_SIZE(adev->gfx.config.macrotile_mode_array); + u32 reg_offset; + + modearray = adev->gfx.config.tile_mode_array; +-- +2.7.4 + |