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>
This commit is contained in:
parent
7bac534e02
commit
adbf6eb3cd
1 changed files with 9 additions and 0 deletions
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue