drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers

Less code ftw.

This converts all drivers except the tinydrm helper module. That one
needs more work, since it gets the THIS_MODULE reference from
tinydrm.ko instead of the actual driver module like it should.
Probably needs a similar trick like I used here with generating the
entire struct with a macro.

Cc: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-24-daniel.vetter@ffwll.ch
This commit is contained in:
Daniel Vetter
2017-03-08 15:12:56 +01:00
parent 098899fee6
commit d55f7e5d54
17 changed files with 46 additions and 158 deletions

View File

@@ -89,6 +89,9 @@ DEFINE_MUTEX(drm_global_mutex);
* .mmap = drm_gem_mmap,
* };
*
* For CMA based drivers there is the DEFINE_DRM_GEM_CMA_FOPS() macro to make
* this simpler.
*
* FIXME: We should have a macro for this (and the CMA version) so that drivers
* don't have to repeat it all the time.
*/