From: Lepton Wu <ytht.net@gmail.com>
To: airlied@linux.ie, kraxel@redhat.com
Cc: Lepton Wu <ytht.net@gmail.com>,
dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org
Subject: [PATCH] drm/virtio: add create_handle support.
Date: Wed, 8 Nov 2017 10:42:09 -0800 [thread overview]
Message-ID: <20171108184209.46211-1-ytht.net@gmail.com> (raw)
In-Reply-To: <20171108125659.oyjzylx26zmz7753@phenom.ffwll.local>
Add create_handle support to virtio fb. Without this, screenshot tool
in chromium OS can't work.
Signed-off-by: Lepton Wu <ytht.net@gmail.com>
---
drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index b6d52055a11f..274b4206ca96 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -71,7 +71,19 @@ virtio_gpu_framebuffer_surface_dirty(struct drm_framebuffer *fb,
return virtio_gpu_surface_dirty(virtio_gpu_fb, clips, num_clips);
}
+static int
+virtio_gpu_framebuffer_create_handle(struct drm_framebuffer *fb,
+ struct drm_file *file_priv,
+ unsigned int *handle)
+{
+ struct virtio_gpu_framebuffer *virtio_gpu_fb =
+ to_virtio_gpu_framebuffer(fb);
+
+ return drm_gem_handle_create(file_priv, virtio_gpu_fb->obj, handle);
+}
+
static const struct drm_framebuffer_funcs virtio_gpu_fb_funcs = {
+ .create_handle = virtio_gpu_framebuffer_create_handle,
.destroy = virtio_gpu_user_framebuffer_destroy,
.dirty = virtio_gpu_framebuffer_surface_dirty,
};
--
2.15.0.403.gc27cc4dac6-goog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-11-08 18:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 20:39 [PATCH] drm/cirrus drm/virtio: add create_handle support Lepton Wu
2017-11-08 12:56 ` Daniel Vetter
2017-11-08 18:42 ` Lepton Wu [this message]
2017-11-13 22:19 ` [PATCH] " lepton
2017-11-14 10:11 ` Gerd Hoffmann
2017-11-14 10:11 ` Gerd Hoffmann
2017-11-13 22:19 ` lepton
2017-11-08 18:42 ` Lepton Wu
2017-11-08 18:55 ` [PATCH] drm/cirrus: " Lepton Wu
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=20171108184209.46211-1-ytht.net@gmail.com \
--to=ytht.net@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=virtualization@lists.linux-foundation.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 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.