[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <11f0d3e5-8823-212f-0f4e-83a639a1d476@suse.de>
Date: Wed, 17 Feb 2021 20:21:26 +0100
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Gerd Hoffmann <kraxel@...hat.com>, dri-devel@...ts.freedesktop.org
Cc: Dave Airlie <airlied@...hat.com>, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
<virtualization@...ts.linux-foundation.org>,
"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
<spice-devel@...ts.freedesktop.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 02/11] drm/qxl: more fence wait rework
Am 17.02.21 um 13:32 schrieb Gerd Hoffmann:
> Move qxl_io_notify_oom() call into wait condition.
> That way the driver will call it again if one call
> wasn't enough.
>
> Also allows to remove the extra dma_fence_is_signaled()
> check and the goto.
>
> Fixes: 5a838e5d5825 ("drm/qxl: simplify qxl_fence_wait")
> Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
Acked-by: Thomas Zimmermann <tzimmermann@...e.de>
> ---
> drivers/gpu/drm/qxl/qxl_release.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c
> index 6ed673d75f9f..579c6de10c8e 100644
> --- a/drivers/gpu/drm/qxl/qxl_release.c
> +++ b/drivers/gpu/drm/qxl/qxl_release.c
> @@ -62,16 +62,12 @@ static long qxl_fence_wait(struct dma_fence *fence, bool intr,
>
> qdev = container_of(fence->lock, struct qxl_device, release_lock);
>
> - if (dma_fence_is_signaled(fence))
> - goto signaled;
> -
> - qxl_io_notify_oom(qdev);
> if (!wait_event_timeout(qdev->release_event,
> - dma_fence_is_signaled(fence),
> + (dma_fence_is_signaled(fence) ||
> + (qxl_io_notify_oom(qdev), 0)),
> timeout))
> return 0;
>
> -signaled:
> cur = jiffies;
> if (time_after(cur, end))
> return 0;
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)
Powered by blists - more mailing lists