drm/amdgpu: add check when no firmware need to load
Subsystems (2)
PATCH 1/1 drm/amdgpu: add check when no firmware need to load
---
Hi Alex, Ken,
This patch is fixing the check to let driver be able to work only enabling common/gmc/ih/psp blocks. It's useful to debug issue.
Thanks,
Ray
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +8 -0
@@ -347,6 +347,11 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)struct amdgpu_firmware_info *ucode =NULL ;const struct common_firmware_header *header =NULL ; +if (!adev->firmware.fw_size) { +dev_warn (adev->dev,"No ip firmware need to load\n" ); +return 0 ; + } + err =amdgpu_bo_create (adev, adev->firmware.fw_size,PAGE_SIZE , true,amdgpu_sriov_vf (adev) ?AMDGPU_GEM_DOMAIN_VRAM :AMDGPU_GEM_DOMAIN_GTT ,0 ,NULL ,NULL , bo);
@@ -428,6 +433,9 @@ int amdgpu_ucode_fini_bo(struct amdgpu_device *adev)int i;struct amdgpu_firmware_info *ucode =NULL ; +if (!adev->firmware.fw_size) +return 0 ; +for (i =0 ; i < adev->firmware.max_ucodes; i++) { ucode = &adev->firmware.ucode[i];if (ucode->fw) {
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1497425261-16658-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Reviewed-byQuoted 10 lines · Huang Rui
Signed-off-by Huang Rui <[email protected]>---
Hi Alex, Ken,
This patch is fixing the check to let driver be able to work only enabling common/gmc/ih/psp blocks. It's useful to debug issue.
Thanks,
Ray
Quoted 34 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +8
-1@@ -347,6 +347,11 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)struct amdgpu_firmware_info *ucode =NULL ;const struct common_firmware_header *header =NULL ; +if (!adev->firmware.fw_size) { +dev_warn (adev->dev,"No ip firmware need to load\n" ); +return 0 ; + } + err =amdgpu_bo_create (adev, adev->firmware.fw_size,PAGE_SIZE , true,amdgpu_sriov_vf (adev) ?AMDGPU_GEM_DOMAIN_VRAM :AMDGPU_GEM_DOMAIN_GTT ,0 ,NULL ,NULL , bo);@@ -428,6 +433,9 @@ int amdgpu_ucode_fini_bo(struct amdgpu_device *adev)int i;struct amdgpu_firmware_info *ucode =NULL ; +if (!adev->firmware.fw_size) +return 0 ; +for (i =0 ; i < adev->firmware.max_ucodes; i++) { ucode = &adev->firmware.ucode[i];if (ucode->fw) { --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx