summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/cirrus
diff options
context:
space:
mode:
authorLepton Wu <ytht.net@gmail.com>2017-11-08 10:55:37 -0800
committerGerd Hoffmann <kraxel@redhat.com>2017-11-10 12:45:34 +0100
commitadbf6eb3cd703398934a274ccb689344cfceb0cb (patch)
treee1e5af829a677e84ceb1c920c58b3f363928c770 /drivers/gpu/drm/cirrus
parent7bac534e027fee318ded13512d12cfaf7d3a937f (diff)
drm/cirrus: add create_handle support.
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> Link: http://patchwork.freedesktop.org/patch/msgid/20171108185537.56167-1-ytht.net@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/cirrus')
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_main.c9
1 files changed, 9 insertions, 0 deletions
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,
};