diff options
author | Slava Grigorev | 2016-03-23 04:34:29 +0100 |
---|---|---|
committer | Alex Deucher | 2016-05-05 02:28:37 +0200 |
commit | ae17c999f0a679aa71577e1a0f488c680aae316c (patch) | |
tree | 063cbd2cb5db439358ac2deb7d503ff756974b42 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |
parent | drm/amdgpu: add polaris10/11 smc fw declaration (diff) | |
download | kernel-qcow2-linux-ae17c999f0a679aa71577e1a0f488c680aae316c.tar.gz kernel-qcow2-linux-ae17c999f0a679aa71577e1a0f488c680aae316c.tar.xz kernel-qcow2-linux-ae17c999f0a679aa71577e1a0f488c680aae316c.zip |
drm/amd/amdgpu: fix 64-bit division
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 6be83f183f16..aeb9caee5c1a 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -942,14 +942,14 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev) goto out; } - tmp = (unsigned int *)((uint64_t)rlc_hdr + + tmp = (unsigned int *)((uintptr_t)rlc_hdr + le32_to_cpu(rlc_hdr->reg_list_format_array_offset_bytes)); for (i = 0 ; i < (rlc_hdr->reg_list_format_size_bytes >> 2); i++) adev->gfx.rlc.register_list_format[i] = le32_to_cpu(tmp[i]); adev->gfx.rlc.register_restore = adev->gfx.rlc.register_list_format + i; - tmp = (unsigned int *)((uint64_t)rlc_hdr + + tmp = (unsigned int *)((uintptr_t)rlc_hdr + le32_to_cpu(rlc_hdr->reg_list_array_offset_bytes)); for (i = 0 ; i < (rlc_hdr->reg_list_size_bytes >> 2); i++) adev->gfx.rlc.register_restore[i] = le32_to_cpu(tmp[i]); |