Skip to contentSkip to conversation

drm/amdgpu: fix warning on 32 bit

PATCH In review Alex Deucher 2 participants 2 messages Jun 27, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix warning on 32 bit

Properly cast pointer to int.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +2 -2
index c441e6ce95ec..988c0adaca91 100644
@@ -1010,8 +1010,8 @@ static int vcn_v2_0_start_dpg_mode(struct amdgpu_device *adev, bool indirect)
 
 	if (indirect)
 		psp_update_vcn_sram(adev, 0, adev->vcn.dpg_sram_gpu_addr,
-			(uint32_t)((uint64_t)adev->vcn.dpg_sram_curr_addr -
-			(uint64_t)adev->vcn.dpg_sram_cpu_addr));
+				    (uint32_t)((uintptr_t)adev->vcn.dpg_sram_curr_addr -
+					       (uintptr_t)adev->vcn.dpg_sram_cpu_addr));
 
 	/* force RBC into idle state */
 	rb_bufsz = order_base_2(ring->ring_size);
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20190627135058.10947-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 27.06.19 um 15:50 schrieb Alex Deucher:

Quoted 3 lines

Properly cast pointer to int.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -0
index c441e6ce95ec..988c0adaca91 100644

drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static int vcn_v2_0_start_dpg_mode(struct amdgpu_device *adev, bool indirect) · line 1017

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +2 -2
@@ -1010,8 +1010,8 @@ static int vcn_v2_0_start_dpg_mode(struct amdgpu_device *adev, bool indirect)
 
  	if (indirect)
  		psp_update_vcn_sram(adev, 0, adev->vcn.dpg_sram_gpu_addr,
-			(uint32_t)((uint64_t)adev->vcn.dpg_sram_curr_addr -
-			(uint64_t)adev->vcn.dpg_sram_cpu_addr));
+				    (uint32_t)((uintptr_t)adev->vcn.dpg_sram_curr_addr -
+					       (uintptr_t)adev->vcn.dpg_sram_cpu_addr));
 
  	/* force RBC into idle state */
  	rb_bufsz = order_base_2(ring->ring_size);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx