public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Alex Deucher <Alexander.Deucher@amd.com>
Cc: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
	etnaviv@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/6] drm/radeon: use dma_resv_wait_timeout() instead of manually waiting
Date: Wed, 3 Nov 2021 08:55:11 +0100	[thread overview]
Message-ID: <ca60f37a-c478-59ed-e5a2-28fc87e03168@gmail.com> (raw)
In-Reply-To: <20211028132630.2330-6-christian.koenig@amd.com>

Ping, Alex do you have a moment for that one here?

Am 28.10.21 um 15:26 schrieb Christian König:
> Don't touch the exclusive fence manually here, but rather use the
> general dma_resv function. We did that for better hw reset handling but
> this doesn't necessary work correctly.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/radeon/radeon_uvd.c | 13 +++++--------
>   1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index 2ea86919d953..377f9cdb5b53 100644
> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
> @@ -469,7 +469,6 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
>   {
>   	int32_t *msg, msg_type, handle;
>   	unsigned img_size = 0;
> -	struct dma_fence *f;
>   	void *ptr;
>   
>   	int i, r;
> @@ -479,13 +478,11 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
>   		return -EINVAL;
>   	}
>   
> -	f = dma_resv_excl_fence(bo->tbo.base.resv);
> -	if (f) {
> -		r = radeon_fence_wait((struct radeon_fence *)f, false);
> -		if (r) {
> -			DRM_ERROR("Failed waiting for UVD message (%d)!\n", r);
> -			return r;
> -		}
> +	r = dma_resv_wait_timeout(bo->tbo.base.resv, false, false,
> +				  MAX_SCHEDULE_TIMEOUT);
> +	if (r <= 0) {
> +		DRM_ERROR("Failed waiting for UVD message (%d)!\n", r);
> +		return r ? r : -ETIME;
>   	}
>   
>   	r = radeon_bo_kmap(bo, &ptr);


  reply	other threads:[~2021-11-03  7:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 13:26 [PATCH 1/6] dma-buf: move dma_resv_prune_unlocked into dma_resv.c Christian König
2021-10-28 13:26 ` [PATCH 2/6] drm/amdgpu: stop getting excl fence separately Christian König
2021-10-28 13:26 ` [PATCH 3/6] drm/etnaviv: stop getting the excl fence separately here Christian König
2021-11-01  9:51   ` Lucas Stach
2021-10-28 13:26 ` [PATCH 4/6] dma-buf: drop excl_fence parameter from dma_resv_get_fences Christian König
2021-10-28 13:26 ` [PATCH 5/6] RDMA: use dma_resv_wait() instead of extracting the fence Christian König
2021-10-28 13:26 ` [PATCH 6/6] drm/radeon: use dma_resv_wait_timeout() instead of manually waiting Christian König
2021-11-03  7:55   ` Christian König [this message]
2021-11-03 16:36   ` Das, Nirmoy
2021-11-25  9:31 ` [PATCH 1/6] dma-buf: move dma_resv_prune_unlocked into dma_resv.c Maarten Lankhorst
2021-11-25  9:44   ` Christian König

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=ca60f37a-c478-59ed-e5a2-28fc87e03168@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=linux-media@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