OSDN Git Service

drm/<drivers>: Unified handling of unimplemented fb->create_handle
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 13 Dec 2012 22:07:50 +0000 (23:07 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 20 Jan 2013 14:57:57 +0000 (15:57 +0100)
commitaf26ef3b3978349cfbd864163a6ebb4906b733b5
tree38efb55b2aac85582180caa018c26b7c3202e77c
parent0ae6d7bc0e70dafc1739d50b2b8d9d7c61968395
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>
drivers/gpu/drm/ast/ast_main.c
drivers/gpu/drm/cirrus/cirrus_main.c
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/mgag200/mgag200_main.c
drivers/gpu/drm/udl/udl_fb.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c