From: Dongwon Kim <dongwon.kim@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Dongwon Kim <dongwon.kim@intel.com>,
Gurchetan Singh <gurchetansingh@chromium.org>
Subject: [PATCH 1/3] drm/virtio: .release ops for virtgpu fence release
Date: Tue, 10 May 2022 17:06:21 -0700 [thread overview]
Message-ID: <20220511000623.12938-1-dongwon.kim@intel.com> (raw)
virtio_gpu_fence_release is added to free virtio-gpu-fence
upon release of dma_fence.
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
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,
--
2.20.1
next reply other threads:[~2022-05-11 0:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 0:06 Dongwon Kim [this message]
2022-05-11 0:06 ` [PATCH 2/3] drm/virtio: fence created per cursor/plane update Dongwon Kim
2022-05-11 0:06 ` [PATCH 3/3] drm/virtio: use the fence for every plane update Dongwon Kim
2022-05-11 7:10 ` kernel test robot
2022-05-11 7:10 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-05-11 13:28 kernel test robot
2022-05-11 13:37 ` Dan Carpenter
2022-05-11 13:37 ` Dan Carpenter
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=20220511000623.12938-1-dongwon.kim@intel.com \
--to=dongwon.kim@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.