drm/amdgpu/umsch: declare umsch firmware
Subsystems (2)
Alex Deucher
maintainerPATCH 1/3 drm/amdgpu/umsch: declare umsch firmware
Needed to be properly picked up for the initrd, etc.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +2 -0
@@ -32,6 +32,8 @@#include "amdgpu_umsch_mm.h" #include "umsch_mm_v4_0.h" +MODULE_FIRMWARE ("amdgpu/umsch_mm_4_0_0.bin" ); +struct umsch_mm_test_ctx_data {uint8_t process_csa[PAGE_SIZE ];uint8_t vpe_ctx_csa[PAGE_SIZE ];
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 2/3 drm/amdgpu/umsch: fix ucode check
Return an error if the IP version doesn't match otherwise we end up passing a NULL string to amdgpu_ucode_request. We should never hit this in practice today since we only enable the umsch code on the supported IP versions, but add a check to be safe.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +1 -1
@@ -586,7 +586,7 @@ int amdgpu_umsch_mm_init_microcode(struct amdgpu_umsch_mm *umsch) fw_name ="amdgpu/umsch_mm_4_0_0.bin" ;break ;default : -break ; +return -EINVAL ; } r = amdgpu_ucode_request(adev, &adev->umsch_mm.fw, AMDGPU_UCODE_REQUIRED,
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 3/3 drm/amdgpu/umsch: tidy up the ucode name string handling
In reply to Alex DeucherMake the constant parts of the name part of the string we pass to amdgpu_ucode_request(). Only the version number varies from IP to IP.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +2 -2
@@ -583,14 +583,14 @@ int amdgpu_umsch_mm_init_microcode(struct amdgpu_umsch_mm *umsch)switch (amdgpu_ip_version (adev,VCN_HWIP ,0 )) {case IP_VERSION (4 ,0 ,5 ):case IP_VERSION (4 ,0 ,6 ): - fw_name ="amdgpu/umsch_mm_4_0_0.bin" ; + fw_name ="4_0_0" ;break ;default :return -EINVAL ; } r =amdgpu_ucode_request (adev, &adev->umsch_mm.fw,AMDGPU_UCODE_REQUIRED , -"%s" , fw_name); +"amdgpu/umsch_mm_%s.bin" , fw_name);if (r) {release_firmware (adev->umsch_mm.fw); adev->umsch_mm.fw =NULL ;
Signature · 1 line
2.48.1
A message that is not in the archive (sent off-list or not yet received): CY5PR12MB6130D813E6E37328D4D120E7E3FF2@CY5PR12MB6130.namprd12.prod.outlook.com
Hi,
Changes looks good to me.
Series is Reviewed-by: Saleemkhan Jamadar <[email protected]>
Regards,
Saleem
Quoted 33 lines
[AMD Official Use Only - AMD Internal Distribution Only]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, February 13, 2025 3:18 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Yu, Lang <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu/umsch: declare umsch firmwareNeeded to be properly picked up for the initrd, etc.
Signed-off-by Alex Deucher <[email protected]>Cc Lang Yu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +2
-1@@ -32,6 +32,8 @@#include "amdgpu_umsch_mm.h" #include "umsch_mm_v4_0.h" +MODULE_FIRMWARE ("amdgpu/umsch_mm_4_0_0.bin" ); +struct umsch_mm_test_ctx_data {uint8_t process_csa[PAGE_SIZE ];uint8_t vpe_ctx_csa[PAGE_SIZE ]; --2.48.1