From: "Christian König" <christian.koenig@amd.com>
To: Pan Bian <bianpan201603@163.com>,
Alex Deucher <alexander.deucher@amd.com>,
David Airlie <airlied@linux.ie>
Cc: <amd-gfx@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
Pan Bian <bianpan2016@163.com>
Subject: Re: [PATCH 1/1] drm/radeon: check return value of radeon_fence_emit
Date: Mon, 24 Apr 2017 11:08:39 +0200 [thread overview]
Message-ID: <a50e28c1-40ce-947f-21bf-1d9f32449adf@amd.com> (raw)
In-Reply-To: <1493023551-12003-1-git-send-email-bianpan201603@163.com>
Am 24.04.2017 um 10:45 schrieb Pan Bian:
> From: Pan Bian <bianpan2016@163.com>
>
> Function radeon_fence_emit() returns -ENOMEM if there is no enough
> memory. And in this case, function radeon_ring_unlock_undo() rather than
> function radeon_ring_unlock_commit() should be called. However, in
> function radeon_test_create_and_emit_fence(), the return value of
> radeon_fence_emit() is ignored. This patch adds the check.
>
> Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_test.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
> index 79181816..623768e 100644
> --- a/drivers/gpu/drm/radeon/radeon_test.c
> +++ b/drivers/gpu/drm/radeon/radeon_test.c
> @@ -298,7 +298,12 @@ static int radeon_test_create_and_emit_fence(struct radeon_device *rdev,
> DRM_ERROR("Failed to lock ring A %d\n", ring->idx);
> return r;
> }
> - radeon_fence_emit(rdev, fence, ring->idx);
> + r = radeon_fence_emit(rdev, fence, ring->idx);
> + if (r) {
> + DRM_ERROR("Failed to emit fence\n");
> + radeon_ring_unlock_undo(rdev, ring);
> + return r;
> + }
> radeon_ring_unlock_commit(rdev, ring, false);
> }
> return 0;
prev parent reply other threads:[~2017-04-24 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 8:45 Pan Bian
2017-04-24 9:08 ` 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=a50e28c1-40ce-947f-21bf-1d9f32449adf@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bianpan201603@163.com \
--cc=bianpan2016@163.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/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®