diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-12-13 17:07:50 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-01-20 09:57:57 -0500 |
commit | af26ef3b3978349cfbd864163a6ebb4906b733b5 (patch) | |
tree | 38efb55b2aac85582180caa018c26b7c3202e77c /drivers/gpu/drm/ast | |
parent | 0ae6d7bc0e70dafc1739d50b2b8d9d7c61968395 (diff) |
drm/<drivers>: Unified handling of unimplemented fb->create_handle
Some drivers don't have real ->create_handle callbacks.
- cirrus/ast/mga200: Returns either 0 or -EINVAL.
- udl: Didn't even bother with a callback, leading to a nice
userspace-triggerable OOPS.
- vmwgfx: This driver bothered with an implementation to return 0 as
the handle (which is the canonical no-obj gem handle).
All have in common that ->create_handle doesn't really make too much
sense for them - that ioctl is used only for seamless fb takeover in
the radeon/nouveau/i915 ddx drivers. So allow drivers to not implement
this and return a consistent -ENODEV.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/ast')
-rw-r--r-- | drivers/gpu/drm/ast/ast_main.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index d5ba7097e5b5..f60fd7bd1183 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c | |||
@@ -246,16 +246,8 @@ static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb) | |||
246 | kfree(fb); | 246 | kfree(fb); |
247 | } | 247 | } |
248 | 248 | ||
249 | static int ast_user_framebuffer_create_handle(struct drm_framebuffer *fb, | ||
250 | struct drm_file *file, | ||
251 | unsigned int *handle) | ||
252 | { | ||
253 | return -EINVAL; | ||
254 | } | ||
255 | |||
256 | static const struct drm_framebuffer_funcs ast_fb_funcs = { | 249 | static const struct drm_framebuffer_funcs ast_fb_funcs = { |
257 | .destroy = ast_user_framebuffer_destroy, | 250 | .destroy = ast_user_framebuffer_destroy, |
258 | .create_handle = ast_user_framebuffer_create_handle, | ||
259 | }; | 251 | }; |
260 | 252 | ||
261 | 253 | ||