diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2225-drm-amdgpu-discovery-fix-calculations-of-some-gfx-in.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2225-drm-amdgpu-discovery-fix-calculations-of-some-gfx-in.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2225-drm-amdgpu-discovery-fix-calculations-of-some-gfx-in.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2225-drm-amdgpu-discovery-fix-calculations-of-some-gfx-in.patch new file mode 100644 index 00000000..fd3ae142 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2225-drm-amdgpu-discovery-fix-calculations-of-some-gfx-in.patch @@ -0,0 +1,44 @@ +From 678fc29b73516ae3f20c64e7841559b2464bed15 Mon Sep 17 00:00:00 2001 +From: Xiaojie Yuan <xiaojie.yuan@amd.com> +Date: Thu, 21 Feb 2019 14:05:47 +0800 +Subject: [PATCH 2225/2940] drm/amdgpu/discovery: fix calculations of some gfx + info + +Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com> +Acked-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +index 7b58273e2ed5..f61eb8542c4d 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +@@ -381,8 +381,9 @@ int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev) + le16_to_cpu(bhdr->table_list[GC].offset)); + + adev->gfx.config.max_shader_engines = le32_to_cpu(gc_info->gc_num_se); +- adev->gfx.config.max_cu_per_sh = le32_to_cpu(gc_info->gc_num_wgp0_per_sa); +- adev->gfx.config.max_sh_per_se = le32_to_cpu(gc_info->gc_num_wgp1_per_sa); ++ adev->gfx.config.max_cu_per_sh = 2 * (le32_to_cpu(gc_info->gc_num_wgp0_per_sa) + ++ le32_to_cpu(gc_info->gc_num_wgp1_per_sa)); ++ adev->gfx.config.max_sh_per_se = le32_to_cpu(gc_info->gc_num_sa_per_se); + adev->gfx.config.max_backends_per_se = le32_to_cpu(gc_info->gc_num_rb_per_se); + adev->gfx.config.max_texture_channel_caches = le32_to_cpu(gc_info->gc_num_gl2c); + adev->gfx.config.max_gprs = le32_to_cpu(gc_info->gc_num_gprs); +@@ -394,8 +395,9 @@ int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev) + adev->gfx.cu_info.max_waves_per_simd = le32_to_cpu(gc_info->gc_max_waves_per_simd); + adev->gfx.cu_info.max_scratch_slots_per_cu = le32_to_cpu(gc_info->gc_max_scratch_slots_per_cu); + adev->gfx.cu_info.lds_size = le32_to_cpu(gc_info->gc_lds_size); +- adev->gfx.config.num_sc_per_sh = le32_to_cpu(gc_info->gc_num_sc_per_se); +- adev->gfx.config.num_packer_per_sc = le32_to_cpu(gc_info->gc_num_sa_per_se); ++ adev->gfx.config.num_sc_per_sh = le32_to_cpu(gc_info->gc_num_sc_per_se) / ++ le32_to_cpu(gc_info->gc_num_sa_per_se); ++ adev->gfx.config.num_packer_per_sc = le32_to_cpu(gc_info->gc_num_packer_per_sc); + + return 0; + } +-- +2.17.1 + |