All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/amdgpu: skip gpu_info firmware if discovery info is available
@ 2020-05-28 21:35 Alex Deucher
  2020-05-28 21:35 ` [PATCH 2/6] drm/amdgpu: clean up discovery testing Alex Deucher
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Alex Deucher @ 2020-05-28 21:35 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

The GPU info firmware is only applicable at bring up when the
IP discovery table is not present.  If it's available, use that
first and then fallback to parsing the gpu info firmware.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 2f0e8da7bacf..716f1f7ebe3d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1533,6 +1533,11 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
 
 	adev->firmware.gpu_info_fw = NULL;
 
+	if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
+		amdgpu_discovery_get_gfx_info(adev);
+		return 0;
+	}
+
 	switch (adev->asic_type) {
 #ifdef CONFIG_DRM_AMDGPU_SI
 	case CHIP_VERDE:
@@ -1617,11 +1622,6 @@ 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));
 
-		if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
-			amdgpu_discovery_get_gfx_info(adev);
-			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);
@@ -1650,10 +1650,9 @@ 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.
+		 * we always need to parse it from gpu info firmware if needed.
 		 */
 		if (hdr->version_minor == 2) {
 			const struct gpu_info_firmware_v1_2 *gpu_info_fw =
-- 
2.25.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-05-29  3:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 21:35 [PATCH 1/6] drm/amdgpu: skip gpu_info firmware if discovery info is available Alex Deucher
2020-05-28 21:35 ` [PATCH 2/6] drm/amdgpu: clean up discovery testing Alex Deucher
2020-05-28 21:35 ` [PATCH 3/6] drm/amdgpu: use IP discovery table for renoir Alex Deucher
2020-05-28 21:35 ` [PATCH 4/6] drm/amdgpu/nv: allow access to SDMA status registers Alex Deucher
2020-05-28 21:35 ` [PATCH 5/6] drm/amdgpu/nv: remove some dead code Alex Deucher
2020-05-28 21:35 ` [PATCH 6/6] drm/amdgpu/nv: enable init reset check Alex Deucher
2020-05-29  3:02   ` Zhang, Hawking
2020-05-29  3:02   ` Quan, Evan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.