Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: add type conversion for gc info

gc info usage misses type conversion.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Li Ma <li.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yifan Zhang and committed by
Alex Deucher
0e64c9aa 1a2ab18c

+3 -3
+3 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
··· 1439 1439 adev->gfx.config.num_sc_per_sh = le32_to_cpu(gc_info->v1.gc_num_sc_per_se) / 1440 1440 le32_to_cpu(gc_info->v1.gc_num_sa_per_se); 1441 1441 adev->gfx.config.num_packer_per_sc = le32_to_cpu(gc_info->v1.gc_num_packer_per_sc); 1442 - if (gc_info->v1.header.version_minor >= 1) { 1442 + if (le16_to_cpu(gc_info->v1.header.version_minor) >= 1) { 1443 1443 adev->gfx.config.gc_num_tcp_per_sa = le32_to_cpu(gc_info->v1_1.gc_num_tcp_per_sa); 1444 1444 adev->gfx.config.gc_num_sdp_interface = le32_to_cpu(gc_info->v1_1.gc_num_sdp_interface); 1445 1445 adev->gfx.config.gc_num_tcps = le32_to_cpu(gc_info->v1_1.gc_num_tcps); 1446 1446 } 1447 - if (gc_info->v1.header.version_minor >= 2) { 1447 + if (le16_to_cpu(gc_info->v1.header.version_minor) >= 2) { 1448 1448 adev->gfx.config.gc_num_tcp_per_wpg = le32_to_cpu(gc_info->v1_2.gc_num_tcp_per_wpg); 1449 1449 adev->gfx.config.gc_tcp_l1_size = le32_to_cpu(gc_info->v1_2.gc_tcp_l1_size); 1450 1450 adev->gfx.config.gc_num_sqc_per_wgp = le32_to_cpu(gc_info->v1_2.gc_num_sqc_per_wgp); ··· 1473 1473 adev->gfx.config.num_sc_per_sh = le32_to_cpu(gc_info->v2.gc_num_sc_per_se) / 1474 1474 le32_to_cpu(gc_info->v2.gc_num_sh_per_se); 1475 1475 adev->gfx.config.num_packer_per_sc = le32_to_cpu(gc_info->v2.gc_num_packer_per_sc); 1476 - if (gc_info->v2.header.version_minor == 1) { 1476 + if (le16_to_cpu(gc_info->v2.header.version_minor == 1)) { 1477 1477 adev->gfx.config.gc_num_tcp_per_sa = le32_to_cpu(gc_info->v2_1.gc_num_tcp_per_sh); 1478 1478 adev->gfx.config.gc_tcp_size_per_cu = le32_to_cpu(gc_info->v2_1.gc_tcp_size_per_cu); 1479 1479 adev->gfx.config.gc_num_sdp_interface = le32_to_cpu(gc_info->v2_1.gc_num_sdp_interface); /* per XCD */