From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Clark Subject: [PATCH 0/3] RFC: Common functions for GEM offset creation Date: Mon, 18 Jul 2011 19:20:56 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-gy0-f177.google.com (mail-gy0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id D03CF9E7B4 for ; Mon, 18 Jul 2011 17:21:18 -0700 (PDT) Received: by gya1 with SMTP id 1so40599gya.36 for ; Mon, 18 Jul 2011 17:21:18 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: Rob Clark List-Id: dri-devel@lists.freedesktop.org In the process of adding GEM support for OMAP DRM 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. 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. -- For the curious, OMAP DRM driver is here: https://github.com/robclark/kernel-omap4/commits/linux-omap-3.0-drm I'll send patches when it's dependencies are merged and it is slightly more than half baked ;-) Rob Clark (3): 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 drivers/gpu/drm/drm_gem.c | 88 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem.c | 85 +----------------------------------- drivers/staging/gma500/psb_gem.c | 63 +-------------------------- include/drm/drmP.h | 3 + 4 files changed, 95 insertions(+), 144 deletions(-) -- 1.7.4.1