This series adds helper functions that abstract the core parts of .gem_prime_import and .gem_prime_export so that drivers don't have to worry about the low-level details. These helpers are optional. A driver can use them by plugging in drm_gem_prime_import and drm_gem_prime_export into the drm_driver structure, or it can bypass them by plugging in its own functions. The first patch adds these helpers, and the later patches switch three drivers over to using them. Jerome, I tried to address your concerns about code sharing by making the helpers available without making them required. I haven't yet compile-tested the Exynos change since I don't have a toolchain set up for that, but I'll try to do that today. Aaron Plattner (4): drm: add prime helpers drm/nouveau: use prime helpers drm/radeon: use prime helpers drm/exynos: use prime helpers drivers/gpu/drm/drm_prime.c | 190 ++++++++++++++++++++++++++++- drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 151 ++--------------------- drivers/gpu/drm/exynos/exynos_drm_dmabuf.h | 13 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 + drivers/gpu/drm/nouveau/nouveau_bo.h | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 - drivers/gpu/drm/nouveau/nouveau_gem.h | 11 +- drivers/gpu/drm/nouveau/nouveau_prime.c | 172 ++++---------------------- drivers/gpu/drm/radeon/radeon_drv.c | 17 +-- drivers/gpu/drm/radeon/radeon_prime.c | 169 ++++--------------------- include/drm/drmP.h | 15 +++ 12 files changed, 288 insertions(+), 464 deletions(-) -- 1.8.0.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel