From: "Christian König" <christian.koenig@amd.com>
To: zhanglianjie <zhanglianjie@uniontech.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>,
Xinhui.Pan@amd.com, Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH v2 2/2] drm/radeon/uvd: Fix forgotten unmap buffer objects
Date: Tue, 8 Feb 2022 08:23:36 +0100 [thread overview]
Message-ID: <9f12a0f2-ab42-c7fc-b3b8-e6babfd7dc59@amd.com> (raw)
In-Reply-To: <20220208031454.24232-1-zhanglianjie@uniontech.com>
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@uniontech.com>
Reviewed-by: Christian König <christian.koenig@amd.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
>
>
>
prev parent reply other threads:[~2022-02-08 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 3:14 zhanglianjie
2022-02-08 7:23 ` 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=9f12a0f2-ab42-c7fc-b3b8-e6babfd7dc59@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
Powered by JetHome