drm/cirrus drm/virtio: add create_handle support.
Subsystems (4)
PATCH 1/1 drm/cirrus drm/virtio: add create_handle support.
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.
--- drivers/gpu/drm/cirrus/cirrus_main.c | 9 +++++++++ drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++ 2 files changed, 21 insertions(+)
drivers/gpu/drm/cirrus/cirrus_main.c +9 -0
@@ -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, };
drivers/gpu/drm/virtio/virtgpu_display.c +12 -0
@@ -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, };
Signature · 6 lines
2.15.0.403.gc27cc4dac6-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Lepton Wu
Add
create_handlesupport 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 <[email protected]>
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
Quoted 63 lines
--- drivers/gpu/drm/cirrus/cirrus_main.c | 9 +++++++++ drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++ 2 files changed, 21 insertions(+)drivers/gpu/drm/cirrus/cirrus_main.c +9
-0@@ -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, };drivers/gpu/drm/virtio/virtgpu_display.c +12
-0@@ -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, };Signature · 6 lines
2.15.0.403.gc27cc4dac6-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm/virtio: add create_handle support.
Add create_handle support to virtio fb. Without this, screenshot tool in chromium OS can't work.
--- drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/virtio/virtgpu_display.c +12 -0
@@ -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, };
Signature · 1 line
2.15.0.403.gc27cc4dac6-goog
PATCH 1/1 drm/virtio: add create_handle support.
In reply to Daniel VetterAdd create_handle support to virtio fb. Without this, screenshot tool in chromium OS can't work.
--- drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/virtio/virtgpu_display.c +12 -0
@@ -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, };
Signature · 6 lines
2.15.0.403.gc27cc4dac6-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/virtio: add create_handle support.
Ping.
Quoted 35 lines · Lepton Wu
Add
create_handlesupport to virtio fb. Without this, screenshot tool in chromium OS can't work.Signed-off-by Lepton Wu <[email protected]>--- drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/virtio/virtgpu_display.c +12
-1@@ -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
Re: [PATCH] drm/virtio: add create_handle support.
In reply to Lepton WuPing.
Quoted 33 lines · Lepton Wu
Add
create_handlesupport to virtio fb. Without this, screenshot tool in chromium OS can't work.Signed-off-by Lepton Wu <[email protected]>--- drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/virtio/virtgpu_display.c +12
-1@@ -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, }; --
Quoted 2 lines
2.15.0.403.gc27cc4dac6-goog
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Gerd Hoffmann
maintainerRe: [PATCH] drm/virtio: add create_handle support.
Quoted 5 lines · lepton
Ping.
Quoted 2 lines · Lepton Wu
Add
create_handlesupport 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
Gerd Hoffmann
maintainerRe: [PATCH] drm/virtio: add create_handle support.
In reply to leptonQuoted 5 lines · lepton
Ping.
Quoted 2 lines · Lepton Wu
Add
create_handlesupport 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm/cirrus: add create_handle support.
In reply to Daniel VetterAdd create_handle support to cirrus fb. Without this, screenshot tool in chromium OS can't work.
--- drivers/gpu/drm/cirrus/cirrus_main.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/cirrus/cirrus_main.c +9 -0
@@ -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, };
Signature · 1 line
2.15.0.403.gc27cc4dac6-goog