drm/amdgpu: temporarily read bounding box from gpu_info fw for navi12
Subsystems (2)
PATCH 1/1 drm/amdgpu: temporarily read bounding box from gpu_info fw for navi12
From: "Tianci.Yin" <[email protected]>
The bounding box is still needed by Navi12, temporarily read it from gpu_info firmware. Should be droped when DAL no longer needs it.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +15 -1
@@ -1537,7 +1537,14 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)if (adev->discovery_bin) {amdgpu_discovery_get_gfx_info (adev); -return 0 ; + +/* +* FIXME: The bounding box is still needed by Navi12, so +* temporarily read it from gpu_info firmware. Should be droped +* when DAL no longer needs it. +*/ +if (adev->asic_type !=CHIP_NAVI12 ) +return 0 ; }switch (adev->asic_type) {
@@ -1627,6 +1634,12 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) (const struct gpu_info_firmware_v1_0 *)(adev->firmware.gpu_info_fw->data +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); +/* +* Should be droped when DAL no longer needs it. +*/ +if (adev->asic_type ==CHIP_NAVI12 ) + goto parse_soc_bounding_box; + adev->gfx.config.max_shader_engines =le32_to_cpu (gpu_info_fw->gc_num_se); adev->gfx.config.max_cu_per_sh =le32_to_cpu (gpu_info_fw->gc_num_cu_per_sh); adev->gfx.config.max_sh_per_se =le32_to_cpu (gpu_info_fw->gc_num_sh_per_se);
@@ -1655,6 +1668,7 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)le32_to_cpu (gpu_info_fw->num_packer_per_sc); } +parse_soc_bounding_box:/* * soc bounding box info is not integrated in disocovery table, * we always need to parse it from gpu info firmware if needed.
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: Tianci Yin <[email protected]>
Sent: Wednesday, June 3, 2020 10:08 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Xu, Feifei <[email protected]>; Yuan, Xiaojie <[email protected]>; Li, Pauline <[email protected]>; Yin, Tianci (Rico) <[email protected]>
Subject: [PATCH] drm/amdgpu: temporarily read bounding box from gpu_info fw for navi12
From: "Tianci.Yin" <[email protected]>
The bounding box is still needed by Navi12, temporarily read it from gpu_info firmware. Should be droped when DAL no longer needs it.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +15 -1
@@ -1537,7 +1537,14 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)if (adev->discovery_bin) {amdgpu_discovery_get_gfx_info (adev); -return 0 ; + +/* +* FIXME: The bounding box is still needed by Navi12, so +* temporarily read it from gpu_info firmware. Should be droped +* when DAL no longer needs it. +*/ +if (adev->asic_type !=CHIP_NAVI12 ) +return 0 ; }switch (adev->asic_type) {
@@ -1627,6 +1634,12 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) (const struct gpu_info_firmware_v1_0 *)(adev->firmware.gpu_info_fw->data +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); +/* +* Should be droped when DAL no longer needs it. +*/ +if (adev->asic_type ==CHIP_NAVI12 ) +goto parse_soc_bounding_box; + adev->gfx.config.max_shader_engines =le32_to_cpu (gpu_info_fw->gc_num_se); adev->gfx.config.max_cu_per_sh =le32_to_cpu (gpu_info_fw->gc_num_cu_per_sh); adev->gfx.config.max_sh_per_se =le32_to_cpu (gpu_info_fw->gc_num_sh_per_se);
@@ -1655,6 +1668,7 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)le32_to_cpu (gpu_info_fw->num_packer_per_sc); } +parse_soc_bounding_box:/* * soc bounding box info is not integrated in disocovery table, * we always need to parse it from gpu info firmware if needed.
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 18 lines · Tianci Yin
From: "Tianci.Yin" <[email protected]>
The bounding box is still needed by Navi12, temporarily read it from
gpu_infofirmware. Should be droped when DAL no longer needs it.Change-Id Ifc330ec860f9b0665134a81df2fc80ca91c41a33Reviewed-by Alex Deucher <[email protected]>Reviewed-by Xiaojie Yuan <[email protected]>Signed-off-by Tianci.Yin <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) · line 1543
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4
-1@@ -1537,7 +1537,14 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)if (adev->discovery_bin) {amdgpu_discovery_get_gfx_info (adev); -return 0 ; + +/* +* FIXME: The bounding box is still needed by Navi12, so +* temporarily read it from gpu_info firmware. Should be droped
Spelling: "dropped"
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) · line 1638
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6
-0+* when DAL no longer needs it. +*/ +if (adev->asic_type !=CHIP_NAVI12 ) +return 0 ; }switch (adev->asic_type) {@@ -1627,6 +1634,12 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) (const struct gpu_info_firmware_v1_0 *)(adev->firmware.gpu_info_fw->data +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); +/* +* Should be droped when DAL no longer needs it.
Add "FIXME" here as well.
Spelling: "dropped".
Regards,
Luben
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4
-0+*/ +if (adev->asic_type ==CHIP_NAVI12 ) + goto parse_soc_bounding_box; + adev->gfx.config.max_shader_engines =le32_to_cpu (gpu_info_fw->gc_num_se); adev->gfx.config.max_cu_per_sh =le32_to_cpu (gpu_info_fw->gc_num_cu_per_sh); adev->gfx.config.max_sh_per_se =le32_to_cpu (gpu_info_fw->gc_num_sh_per_se);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) · line 1674
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0@@ -1655,6 +1668,7 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)le32_to_cpu (gpu_info_fw->num_packer_per_sc); } +parse_soc_bounding_box:/* * soc bounding box info is not integrated in disocovery table, * we always need to parse it from gpu info firmware if needed.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx