aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4040-drm-amdgpu-simplify-gds_compute_max_wave_id-computat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4040-drm-amdgpu-simplify-gds_compute_max_wave_id-computat.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4040-drm-amdgpu-simplify-gds_compute_max_wave_id-computat.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4040-drm-amdgpu-simplify-gds_compute_max_wave_id-computat.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4040-drm-amdgpu-simplify-gds_compute_max_wave_id-computat.patch
new file mode 100644
index 00000000..74344eb2
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4040-drm-amdgpu-simplify-gds_compute_max_wave_id-computat.patch
@@ -0,0 +1,43 @@
+From 7e43df13b1fcc8262cc247a0acf17d093aae4fe9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <marek.olsak@amd.com>
+Date: Wed, 25 Sep 2019 15:50:17 -0400
+Subject: [PATCH 4040/4256] drm/amdgpu: simplify gds_compute_max_wave_id
+ computation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Marek Olšák <marek.olsak@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+index 9daf28e83236..1df3a835e62f 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+@@ -5275,15 +5275,12 @@ static void gfx_v10_0_set_rlc_funcs(struct amdgpu_device *adev)
+
+ static void gfx_v10_0_set_gds_init(struct amdgpu_device *adev)
+ {
+- /* init asic gds info */
+- switch (adev->asic_type) {
+- case CHIP_NAVI10:
+- default:
+- adev->gds.gds_size = 0x10000;
+- adev->gds.gds_compute_max_wave_id = 0x4ff;
+- break;
+- }
++ unsigned total_cu = adev->gfx.config.max_cu_per_sh *
++ adev->gfx.config.max_sh_per_se *
++ adev->gfx.config.max_shader_engines;
+
++ adev->gds.gds_size = 0x10000;
++ adev->gds.gds_compute_max_wave_id = total_cu * 32 - 1;
+ adev->gds.gws_size = 64;
+ adev->gds.oa_size = 16;
+ }
+--
+2.17.1
+