From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Plattner Subject: [PATCH 0/4] Prime helpers Date: Thu, 6 Dec 2012 10:07:47 -0800 Message-ID: <1354817271-5121-1-git-send-email-aplattner@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from hqemgate04.nvidia.com (hqemgate04.nvidia.com [216.228.121.35]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A508E5CB1 for ; Thu, 6 Dec 2012 10:08:17 -0800 (PST) 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, Jerome Glisse , David Airlie List-Id: dri-devel@lists.freedesktop.org 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