[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18415279-39d3-4ce3-bef2-58566276799b@collabora.com>
Date: Fri, 25 Oct 2024 20:59:27 +0300
From: Dmitry Osipenko <dmitry.osipenko@...labora.com>
To: "Kasireddy, Vivek" <vivek.kasireddy@...el.com>,
David Airlie <airlied@...hat.com>, Gerd Hoffmann <kraxel@...hat.com>,
Gurchetan Singh <gurchetansingh@...omium.org>, Chia-I Wu
<olvaffe@...il.com>, Rob Clark <robdclark@...il.com>,
Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@....com>,
"Kim, Dongwon" <dongwon.kim@...el.com>
Cc: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel@...labora.com" <kernel@...labora.com>
Subject: Re: [PATCH v3 2/2] drm/virtio: New fence for every plane update
On 10/22/24 07:44, Kasireddy, Vivek wrote:
>> virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle,
>> x, y,
>> - width, height, objs, vgfb->fence);
>> + width, height, objs,
>> + vgplane_st->fence);
>> virtio_gpu_notify(vgdev);
>> -
>> - dma_fence_wait_timeout(&vgfb->fence->f, true,
>> + dma_fence_wait_timeout(&vgplane_st->fence->f, true,
>> msecs_to_jiffies(50));
>> - dma_fence_put(&vgfb->fence->f);
>> - vgfb->fence = NULL;
> Not sure if it makes any difference but would there be a problem if you unref
> the fence here (existing behavior) instead of deferring it until cleanup?
Previously fence was a part of virtio-gpu framebuffer, which was kind of
a hack. Maybe there was no better option back then, when this code was
written initially.
Now fence is a part of plane's atomic state, like it should be. We
shouldn't change atomic state at the commit time.
...
>> @@ -326,11 +348,9 @@ static void virtio_gpu_cursor_plane_update(struct
>> drm_plane *plane,
>> (vgdev, 0,
>> plane->state->crtc_w,
>> plane->state->crtc_h,
>> - 0, 0, objs, vgfb->fence);
>> + 0, 0, objs, vgplane_st->fence);
>> virtio_gpu_notify(vgdev);
>> - dma_fence_wait(&vgfb->fence->f, true);
>> - dma_fence_put(&vgfb->fence->f);
>> - vgfb->fence = NULL;
> Same comment as above.
> Regardless, the patch LGTM.
>
> Acked-by: Vivek Kasireddy <vivek.kasireddy@...el.com>
Thanks for the review :)
--
Best regards,
Dmitry
Powered by blists - more mailing lists