From: "Christian König" <christian.koenig@amd.com>
To: zhanglianjie <zhanglianjie@uniontech.com>,
Alex Deucher <alexander.deucher@amd.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>,
David Airlie <airlied@linux.ie>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>
Subject: Re: [PATCH 2/2] drm/radeon/uvd: Fix forgotten unmap buffer objects
Date: Sun, 30 Jan 2022 09:56:12 +0100 [thread overview]
Message-ID: <bebb72d9-f9cc-c247-2d1c-96495aaf5f54@amd.com> (raw)
In-Reply-To: <20220129073524.31534-2-zhanglianjie@uniontech.com>
Am 29.01.22 um 08:35 schrieb zhanglianjie:
> after the buffer object is successfully mapped, call radeon_bo_kunmap before the function returns.
>
> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
>
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index 377f9cdb5b53..c5482f7793db 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,11 +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;
> }
>
> + radeon_bo_kunmap(bo);
> BUG();
That looks like it will trigger this BUG() now. Please also remove that
line.
Apart from that the patches look good to me.
Regards,
Christian.
> return -EINVAL;
> }
> --
> 2.20.1
>
>
>
prev parent reply other threads:[~2022-01-30 8:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-29 7:35 [PATCH 1/2] drm/amd/amdgpu/amdgpu_uvd: Fix forgotten unmap buffer object zhanglianjie
2022-01-29 7:35 ` [PATCH 2/2] drm/radeon/uvd: Fix forgotten unmap buffer objects zhanglianjie
2022-01-30 8:56 ` Christian König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bebb72d9-f9cc-c247-2d1c-96495aaf5f54@amd.com \
--to=christian.koenig@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhanglianjie@uniontech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®