mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
drm/amdgpu/gfx9: Fix incorrect firmware size calculation
[WHY] The memcpy() function copies n bytes from memory area src to memory area dest. So specify the firmware size in bytes. [How] Correct the calculation. Acked-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Lei Guo <raykwok1150@163.com> Reviewed-by: Junwei Zhang <zjunweihit@163.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f503fe69eb
commit
74a353ffa0
1 changed files with 1 additions and 1 deletions
|
@ -1960,7 +1960,7 @@ static int gfx_v9_0_mec_init(struct amdgpu_device *adev)
|
|||
fw_data = (const __le32 *)
|
||||
(adev->gfx.mec_fw->data +
|
||||
le32_to_cpu(mec_hdr->header.ucode_array_offset_bytes));
|
||||
fw_size = le32_to_cpu(mec_hdr->header.ucode_size_bytes) / 4;
|
||||
fw_size = le32_to_cpu(mec_hdr->header.ucode_size_bytes);
|
||||
|
||||
r = amdgpu_bo_create_reserved(adev, mec_hdr->header.ucode_size_bytes,
|
||||
PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,
|
||||
|
|
Loading…
Add table
Reference in a new issue