From: "Kim, Dongwon" <dongwon.kim@intel.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
<dri-devel@lists.freedesktop.org>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>, kraxel@redhat.com
Subject: Re: [RFC PATCH 1/3] drm/virtio: .release ops for virtgpu fence release
Date: Thu, 17 Aug 2023 19:36:04 -0700 [thread overview]
Message-ID: <5ecc80d3-6633-bcec-1424-b489f653663a@intel.com> (raw)
In-Reply-To: <853f28d6-91e5-1482-d923-5f7fd0e6d018@collabora.com>
On 8/16/2023 10:05 PM, Dmitry Osipenko wrote:
> On 8/16/23 21:10, Kim, Dongwon wrote:
>> Hi,
>>
>> On 8/14/2023 9:18 PM, Dmitry Osipenko wrote:
>>> On 7/13/23 01:44, Dongwon Kim wrote:
>>>> virtio_gpu_fence_release is added to free virtio-gpu-fence
>>>> upon release of dma_fence.
>>>>
>>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>>> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
>>>> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
>>>> ---
>>>> drivers/gpu/drm/virtio/virtgpu_fence.c | 8 ++++++++
>>>> 1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c
>>>> b/drivers/gpu/drm/virtio/virtgpu_fence.c
>>>> index f28357dbde35..ba659ac2a51d 100644
>>>> --- a/drivers/gpu/drm/virtio/virtgpu_fence.c
>>>> +++ b/drivers/gpu/drm/virtio/virtgpu_fence.c
>>>> @@ -63,12 +63,20 @@ static void virtio_gpu_timeline_value_str(struct
>>>> dma_fence *f, char *str,
>>>> (u64)atomic64_read(&fence->drv->last_fence_id));
>>>> }
>>>> +static void virtio_gpu_fence_release(struct dma_fence *f)
>>>> +{
>>>> + struct virtio_gpu_fence *fence = to_virtio_gpu_fence(f);
>>>> +
>>>> + kfree(fence);
>>>> +}
>>>> +
>>>> static const struct dma_fence_ops virtio_gpu_fence_ops = {
>>>> .get_driver_name = virtio_gpu_get_driver_name,
>>>> .get_timeline_name = virtio_gpu_get_timeline_name,
>>>> .signaled = virtio_gpu_fence_signaled,
>>>> .fence_value_str = virtio_gpu_fence_value_str,
>>>> .timeline_value_str = virtio_gpu_timeline_value_str,
>>>> + .release = virtio_gpu_fence_release,
>>>> };
>>>> struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct
>>>> virtio_gpu_device *vgdev,
>>> This change doesn't do anything practically useful, AFAICT.
>> The intention of this ".release" is to free virtio_gpu_fence when the
>> last dma_fence_put is done for the associated dma fence.
> What makes you think that fence won't be freed otherwise? Sounds like
> haven't tried to check what dma_fence_release() code does, have you?
I see it now. For some reason, I assumed virtio_gpu_fence holds the
pointer of dma_fence. This release ops is indeed not needed as you
mentioned. Thanks
>
next prev parent reply other threads:[~2023-08-18 2:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 22:44 [PFC PATCH 0/3] drm/virtio: synchronous guest framebuffer update Dongwon Kim
2023-07-12 22:44 ` [RFC PATCH 1/3] drm/virtio: .release ops for virtgpu fence release Dongwon Kim
2023-08-15 4:18 ` Dmitry Osipenko
2023-08-16 18:10 ` Kim, Dongwon
2023-08-17 5:05 ` Dmitry Osipenko
2023-08-17 5:25 ` Kim, Dongwon
2023-08-18 2:09 ` Dmitry Osipenko
2023-08-18 2:36 ` Kim, Dongwon [this message]
2023-07-12 22:44 ` [RFC PATCH 2/3] drm/virtio: new fence for every plane update Dongwon Kim
2023-08-18 2:21 ` Dmitry Osipenko
2023-08-21 2:28 ` Kim, Dongwon
2023-07-12 22:44 ` [RFC PATCH 3/3] drm/virtio: drm_gem_plane_helper_prepare_fb for obj synchronization Dongwon Kim
2023-08-18 2:33 ` Dmitry Osipenko
2023-08-20 20:58 ` Kim, Dongwon
2023-08-24 3:52 ` Dmitry Osipenko
2023-08-24 17:58 ` Kim, Dongwon
2023-08-31 22:51 ` Dmitry Osipenko
2023-09-05 21:08 ` Kim, Dongwon
2023-10-04 23:31 ` Dmitry Osipenko
2023-10-04 23:44 ` Kim, Dongwon
-- strict thread matches above, loose matches on Subject: below --
2022-09-26 23:06 [PFC PATCH 0/3] drm/virtio: synchronous guest framebuffer update Dongwon Kim
2022-09-26 23:06 ` [RFC PATCH 1/3] drm/virtio: .release ops for virtgpu fence release Dongwon Kim
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=5ecc80d3-6633-bcec-1424-b489f653663a@intel.com \
--to=dongwon.kim@intel.com \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=vivek.kasireddy@intel.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