From: Rob Clark <rob@xxxxxx> In the process of adding GEM support for omapdrm driver, I noticed that I was adding code for creating/freeing mmap offsets which was virtually identical to what was already duplicated in i915 and gma500 drivers. And the code for attach/detatch_pages was quite similar as well. Rather than duplicating the code a 3rd time, it seemed like a good idea to move it to the GEM core. Note that I don't actually have a way to test psb or i915, but the changes seem straightforward enough. v1: initial patches v2: rebase + add common get/put_pages functions Rob Clark (6): drm/gem: add functions for mmap offset creation drm/i915: use common functions for mmap offset creation drm/gma500: use common functions for mmap offset creation drm/gem: add functions to get/put pages drm/i915: use common functions for get/put pages drm/gma500: use common functions for get/put pages drivers/gpu/drm/drm_gem.c | 156 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem.c | 136 +++----------------------------- drivers/staging/gma500/gem.c | 2 +- drivers/staging/gma500/gem_glue.c | 61 +-------------- drivers/staging/gma500/gem_glue.h | 1 - drivers/staging/gma500/gtt.c | 47 +++-------- include/drm/drmP.h | 6 ++ 7 files changed, 188 insertions(+), 221 deletions(-) -- 1.7.5.4 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel