[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9f12a0f2-ab42-c7fc-b3b8-e6babfd7dc59@amd.com>
Date: Tue, 8 Feb 2022 08:23:36 +0100
From: Christian König <christian.koenig@....com>
To: zhanglianjie <zhanglianjie@...ontech.com>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>, Xinhui.Pan@....com,
Alex Deucher <alexander.deucher@....com>
Subject: Re: [PATCH v2 2/2] drm/radeon/uvd: Fix forgotten unmap buffer objects
Am 08.02.22 um 04:14 schrieb zhanglianjie:
> after the buffer object is successfully mapped, call radeon_bo_kunmap before the function returns.
>
> Signed-off-by: zhanglianjie <zhanglianjie@...ontech.com>
Reviewed-by: Christian König <christian.koenig@....com>
>
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index 377f9cdb5b53..0558d928d98d 100644
> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
> @@ -497,6 +497,7 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
> handle = msg[2];
>
> if (handle == 0) {
> + radeon_bo_kunmap(bo);
> DRM_ERROR("Invalid UVD handle!\n");
> return -EINVAL;
> }
> @@ -559,12 +560,10 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
> return 0;
>
> default:
> -
> DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
> - return -EINVAL;
> }
>
> - BUG();
> + radeon_bo_kunmap(bo);
> return -EINVAL;
> }
>
> --
> 2.20.1
>
>
>
Powered by blists - more mailing lists