drm/amdgpu: fix warning on 32 bit
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2019 13:48:19 +0000 (08:48 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2019 13:56:16 +0000 (08:56 -0500)
Properly cast pointer to int.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c

index c441e6ce95ecbb6e57e990eec7cc3affb7547b85..988c0adaca916e797d42b236ad39a487adf013a4 100644 (file)
@@ -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);