Re: [PATCHv2] drm/amdgpu: Fix typo in IP discovery parsing

2023-10-26 Thread Alex Deucher
On Thu, Oct 26, 2023 at 2:32 PM Mukul Joshi  wrote:
>
> Fix a typo in parsing of the GC info table header when
> reading the IP discovery table.
>
> Fixes: ecb70926eb86 ("drm/amdgpu: add type conversion for gc info")
> Signed-off-by: Mukul Joshi 

Reviewed-by: Alex Deucher 

> ---
> v1->v2:
> - Add the Fixes tag.
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index 8d3681172cea..81476cd8461c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -1488,7 +1488,7 @@ static int amdgpu_discovery_get_gfx_info(struct 
> amdgpu_device *adev)
> adev->gfx.config.num_sc_per_sh = 
> le32_to_cpu(gc_info->v2.gc_num_sc_per_se) /
> le32_to_cpu(gc_info->v2.gc_num_sh_per_se);
> adev->gfx.config.num_packer_per_sc = 
> le32_to_cpu(gc_info->v2.gc_num_packer_per_sc);
> -   if (le16_to_cpu(gc_info->v2.header.version_minor == 1)) {
> +   if (le16_to_cpu(gc_info->v2.header.version_minor) == 1) {
> adev->gfx.config.gc_num_tcp_per_sa = 
> le32_to_cpu(gc_info->v2_1.gc_num_tcp_per_sh);
> adev->gfx.config.gc_tcp_size_per_cu = 
> le32_to_cpu(gc_info->v2_1.gc_tcp_size_per_cu);
> adev->gfx.config.gc_num_sdp_interface = 
> le32_to_cpu(gc_info->v2_1.gc_num_sdp_interface); /* per XCD */
> --
> 2.35.1
>


[PATCHv2] drm/amdgpu: Fix typo in IP discovery parsing

2023-10-26 Thread Mukul Joshi
Fix a typo in parsing of the GC info table header when
reading the IP discovery table.

Fixes: ecb70926eb86 ("drm/amdgpu: add type conversion for gc info")
Signed-off-by: Mukul Joshi 
---
v1->v2:
- Add the Fixes tag.

 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 8d3681172cea..81476cd8461c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -1488,7 +1488,7 @@ static int amdgpu_discovery_get_gfx_info(struct 
amdgpu_device *adev)
adev->gfx.config.num_sc_per_sh = 
le32_to_cpu(gc_info->v2.gc_num_sc_per_se) /
le32_to_cpu(gc_info->v2.gc_num_sh_per_se);
adev->gfx.config.num_packer_per_sc = 
le32_to_cpu(gc_info->v2.gc_num_packer_per_sc);
-   if (le16_to_cpu(gc_info->v2.header.version_minor == 1)) {
+   if (le16_to_cpu(gc_info->v2.header.version_minor) == 1) {
adev->gfx.config.gc_num_tcp_per_sa = 
le32_to_cpu(gc_info->v2_1.gc_num_tcp_per_sh);
adev->gfx.config.gc_tcp_size_per_cu = 
le32_to_cpu(gc_info->v2_1.gc_tcp_size_per_cu);
adev->gfx.config.gc_num_sdp_interface = 
le32_to_cpu(gc_info->v2_1.gc_num_sdp_interface); /* per XCD */
-- 
2.35.1