* [PATCH] drm/cirrus drm/virtio: add create_handle support.
@ 2017-11-07 20:39 Lepton Wu
2017-11-08 12:56 ` Daniel Vetter
0 siblings, 1 reply; 9+ messages in thread
From: Lepton Wu @ 2017-11-07 20:39 UTC (permalink / raw)
To: airlied, kraxel; +Cc: Lepton Wu, dri-devel
Add create_handle support to cirrus and virtio fb which are used
in virtual machines. Without this, screenshot tool in chromium OS
can't work.
Signed-off-by: Lepton Wu <ytht.net@gmail.com>
---
drivers/gpu/drm/cirrus/cirrus_main.c | 9 +++++++++
drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++
2 files changed, 21 insertions(+)
diff --git a/drivers/gpu/drm/cirrus/cirrus_main.c b/drivers/gpu/drm/cirrus/cirrus_main.c
index b5f528543956..26df1e8cd490 100644
--- a/drivers/gpu/drm/cirrus/cirrus_main.c
+++ b/drivers/gpu/drm/cirrus/cirrus_main.c
@@ -13,6 +13,14 @@
#include "cirrus_drv.h"
+static int cirrus_create_handle(struct drm_framebuffer *fb,
+ struct drm_file* file_priv,
+ unsigned int* handle)
+{
+ struct cirrus_framebuffer *cirrus_fb = to_cirrus_framebuffer(fb);
+
+ return drm_gem_handle_create(file_priv, cirrus_fb->obj, handle);
+}
static void cirrus_user_framebuffer_destroy(struct drm_framebuffer *fb)
{
@@ -24,6 +32,7 @@ static void cirrus_user_framebuffer_destroy(struct drm_framebuffer *fb)
}
static const struct drm_framebuffer_funcs cirrus_fb_funcs = {
+ .create_handle = cirrus_create_handle,
.destroy = cirrus_user_framebuffer_destroy,
};
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/cirrus drm/virtio: add create_handle support.
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 ` [PATCH] " Lepton Wu
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Daniel Vetter @ 2017-11-08 12:56 UTC (permalink / raw)
To: Lepton Wu; +Cc: airlied, kraxel, dri-devel
On Tue, Nov 07, 2017 at 12:39:35PM -0800, Lepton Wu wrote:
> Add create_handle support to cirrus and virtio fb which are used
> in virtual machines. Without this, screenshot tool in chromium OS
> can't work.
>
> Signed-off-by: Lepton Wu <ytht.net@gmail.com>
Please split per-driver and cc relevant driver maintainers on each
individually. Would also be sweet if you could somewhat move these over to
Noralf's shiny new gem helpers.
Thanks, Daniel
> ---
> drivers/gpu/drm/cirrus/cirrus_main.c | 9 +++++++++
> drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/drivers/gpu/drm/cirrus/cirrus_main.c b/drivers/gpu/drm/cirrus/cirrus_main.c
> index b5f528543956..26df1e8cd490 100644
> --- a/drivers/gpu/drm/cirrus/cirrus_main.c
> +++ b/drivers/gpu/drm/cirrus/cirrus_main.c
> @@ -13,6 +13,14 @@
>
> #include "cirrus_drv.h"
>
> +static int cirrus_create_handle(struct drm_framebuffer *fb,
> + struct drm_file* file_priv,
> + unsigned int* handle)
> +{
> + struct cirrus_framebuffer *cirrus_fb = to_cirrus_framebuffer(fb);
> +
> + return drm_gem_handle_create(file_priv, cirrus_fb->obj, handle);
> +}
>
> static void cirrus_user_framebuffer_destroy(struct drm_framebuffer *fb)
> {
> @@ -24,6 +32,7 @@ static void cirrus_user_framebuffer_destroy(struct drm_framebuffer *fb)
> }
>
> static const struct drm_framebuffer_funcs cirrus_fb_funcs = {
> + .create_handle = cirrus_create_handle,
> .destroy = cirrus_user_framebuffer_destroy,
> };
>
> 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
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm/virtio: add create_handle support.
2017-11-08 12:56 ` Daniel Vetter
2017-11-08 18:42 ` [PATCH] " Lepton Wu
@ 2017-11-08 18:42 ` Lepton Wu
2017-11-08 18:55 ` [PATCH] drm/cirrus: " Lepton Wu
2 siblings, 0 replies; 9+ messages in thread
From: Lepton Wu @ 2017-11-08 18:42 UTC (permalink / raw)
To: airlied, kraxel; +Cc: Lepton Wu, dri-devel, virtualization
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] drm/virtio: add create_handle support.
2017-11-08 12:56 ` Daniel Vetter
@ 2017-11-08 18:42 ` Lepton Wu
2017-11-13 22:19 ` lepton
2017-11-13 22:19 ` lepton
2017-11-08 18:42 ` Lepton Wu
2017-11-08 18:55 ` [PATCH] drm/cirrus: " Lepton Wu
2 siblings, 2 replies; 9+ messages in thread
From: Lepton Wu @ 2017-11-08 18:42 UTC (permalink / raw)
To: airlied, kraxel; +Cc: Lepton Wu, dri-devel, virtualization
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] drm/cirrus: add create_handle support.
2017-11-08 12:56 ` Daniel Vetter
2017-11-08 18:42 ` [PATCH] " Lepton Wu
2017-11-08 18:42 ` Lepton Wu
@ 2017-11-08 18:55 ` Lepton Wu
2 siblings, 0 replies; 9+ messages in thread
From: Lepton Wu @ 2017-11-08 18:55 UTC (permalink / raw)
To: airlied, kraxel; +Cc: Lepton Wu, virtualization
Add create_handle support to cirrus fb. Without this, screenshot tool
in chromium OS can't work.
Signed-off-by: Lepton Wu <ytht.net@gmail.com>
---
drivers/gpu/drm/cirrus/cirrus_main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/cirrus/cirrus_main.c b/drivers/gpu/drm/cirrus/cirrus_main.c
index b5f528543956..26df1e8cd490 100644
--- a/drivers/gpu/drm/cirrus/cirrus_main.c
+++ b/drivers/gpu/drm/cirrus/cirrus_main.c
@@ -13,6 +13,14 @@
#include "cirrus_drv.h"
+static int cirrus_create_handle(struct drm_framebuffer *fb,
+ struct drm_file* file_priv,
+ unsigned int* handle)
+{
+ struct cirrus_framebuffer *cirrus_fb = to_cirrus_framebuffer(fb);
+
+ return drm_gem_handle_create(file_priv, cirrus_fb->obj, handle);
+}
static void cirrus_user_framebuffer_destroy(struct drm_framebuffer *fb)
{
@@ -24,6 +32,7 @@ static void cirrus_user_framebuffer_destroy(struct drm_framebuffer *fb)
}
static const struct drm_framebuffer_funcs cirrus_fb_funcs = {
+ .create_handle = cirrus_create_handle,
.destroy = cirrus_user_framebuffer_destroy,
};
--
2.15.0.403.gc27cc4dac6-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/virtio: add create_handle support.
2017-11-08 18:42 ` [PATCH] " Lepton Wu
2017-11-13 22:19 ` lepton
@ 2017-11-13 22:19 ` lepton
1 sibling, 0 replies; 9+ messages in thread
From: lepton @ 2017-11-13 22:19 UTC (permalink / raw)
To: airlied, kraxel; +Cc: Lepton Wu, dri-devel, virtualization
Ping.
On Wed, Nov 8, 2017 at 10:42 AM, Lepton Wu <ytht.net@gmail.com> wrote:
> 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
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/virtio: add create_handle support.
2017-11-08 18:42 ` [PATCH] " Lepton Wu
@ 2017-11-13 22:19 ` lepton
2017-11-14 10:11 ` Gerd Hoffmann
2017-11-14 10:11 ` Gerd Hoffmann
2017-11-13 22:19 ` lepton
1 sibling, 2 replies; 9+ messages in thread
From: lepton @ 2017-11-13 22:19 UTC (permalink / raw)
To: airlied, kraxel; +Cc: Lepton Wu, dri-devel, virtualization
Ping.
On Wed, Nov 8, 2017 at 10:42 AM, Lepton Wu <ytht.net@gmail.com> wrote:
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/virtio: add create_handle support.
2017-11-13 22:19 ` lepton
2017-11-14 10:11 ` Gerd Hoffmann
@ 2017-11-14 10:11 ` Gerd Hoffmann
1 sibling, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2017-11-14 10:11 UTC (permalink / raw)
To: lepton; +Cc: airlied, dri-devel, virtualization
On Mon, Nov 13, 2017 at 02:19:29PM -0800, lepton wrote:
> Ping.
>
> On Wed, Nov 8, 2017 at 10:42 AM, Lepton Wu <ytht.net@gmail.com> wrote:
> > Add create_handle support to virtio fb. Without this, screenshot tool
> > in chromium OS can't work.
Already queued up in drm-misc-next (the cirrus patch too).
cheers,
Gerd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/virtio: add create_handle support.
2017-11-13 22:19 ` lepton
@ 2017-11-14 10:11 ` Gerd Hoffmann
2017-11-14 10:11 ` Gerd Hoffmann
1 sibling, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2017-11-14 10:11 UTC (permalink / raw)
To: lepton; +Cc: airlied, dri-devel, virtualization
On Mon, Nov 13, 2017 at 02:19:29PM -0800, lepton wrote:
> Ping.
>
> On Wed, Nov 8, 2017 at 10:42 AM, Lepton Wu <ytht.net@gmail.com> wrote:
> > Add create_handle support to virtio fb. Without this, screenshot tool
> > in chromium OS can't work.
Already queued up in drm-misc-next (the cirrus patch too).
cheers,
Gerd
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-11-14 10:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] " Lepton Wu
2017-11-13 22:19 ` 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
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.