Skip to content

Commit

Permalink
drm/amdgpu: correct the memcpy size for ip discovery firmware
Browse files Browse the repository at this point in the history
Use fw->size instead of discovery_tmr_size for fallback path.

Signed-off-by: Le Ma <le.ma@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Le Ma authored and Alex Deucher committed Sep 29, 2022
1 parent f61a825 commit a79852a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static int amdgpu_discovery_read_binary_from_file(struct amdgpu_device *adev, ui
return 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;
Expand Down

0 comments on commit a79852a

Please sign in to comment.