drm/amdgpu: correct the memcpy size for ip discovery firmware
Subsystems (2)
PATCH 1/1 drm/amdgpu: correct the memcpy size for ip discovery firmware
Use fw->size instead of discovery_tmr_size for fallback path.
Change-Id I61f1ec55314ea5948ed3ef821becfdd63d876272
Signed-off-by Le Ma <[email protected]>
Acked-by Christian König <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -1
@@ -234,7 +234,7 @@ static int amdgpu_discovery_read_binary_from_file(struct amdgpu_device *adev, uireturn r; } -memcpy ((u8 *)binary, (u8 *)fw->data, adev->mman.discovery_tmr_size); +memcpy ((u8 *)binary, (u8 *)fw->data, fw->size);release_firmware (fw);return 0 ;
Signature · 1 line
2.17.1
[AMD Official Use Only - General]
Reviewed-by Hawking Zhang <[email protected]>
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Le Ma
Sent: Thursday, September 29, 2022 15:50
To: [email protected]
Cc: Ma, Le <[email protected]>
Subject: [PATCH] drm/amdgpu: correct the memcpy size for ip discovery firmware
Use fw->size instead of discovery_tmr_size for fallback path.
Change-Id I61f1ec55314ea5948ed3ef821becfdd63d876272
Signed-off-by Le Ma <[email protected]>
Acked-by Christian König <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -1
@@ -234,7 +234,7 @@ static int amdgpu_discovery_read_binary_from_file(struct amdgpu_device *adev, uireturn r; } -memcpy ((u8 *)binary, (u8 *)fw->data, adev->mman.discovery_tmr_size); +memcpy ((u8 *)binary, (u8 *)fw->data, fw->size);release_firmware (fw);return 0 ;
Signature · 1 line
2.17.1