[PATCH] drm/amdgpu: fix warning on 32 bit

Christian König ckoenig.leichtzumerken at gmail.com
Thu Jun 27 13:52:15 UTC 2019


Am 27.06.19 um 15:50 schrieb Alex Deucher:
> Properly cast pointer to int.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> index c441e6ce95ec..988c0adaca91 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> @@ -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);



More information about the amd-gfx mailing list