From patchwork Fri Oct 12 23:49:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 1589441 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 460243FCFC for ; Sun, 14 Oct 2012 09:46:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 313E49EEB1 for ; Sun, 14 Oct 2012 02:46:08 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 53DC99E761 for ; Fri, 12 Oct 2012 16:49:45 -0700 (PDT) Received: by mail-pa0-f49.google.com with SMTP id bi5so3398516pad.36 for ; Fri, 12 Oct 2012 16:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=rhLPGrg9J8F/tsV7NmdSxLZLK6RZz+0vYlBf/KLqo2c=; b=hT99a0uni6OXtXfus0y3sWa5eMdF+FzHhUcnNZ308IziX5IlsVeoOpGaBsREJjdgvT snsbEjVPoZ8uHxjhoS1FNGHM1WiwcGuJwvBAjXjYNEzaT/s90LW2SacRXaEzk+ghh1Nt dfUFOXheKZbps/uQ/Vk2FEzF2HlG7SQzg8fEtLLWdOMSgBYvxMqVgRjfSaCrEkfX/D16 Rm2DFNsC3v/XgEVMd2chfhLsLD9Udq+RvLg4TtenanJ31ek8rL0EaUoDtwWkePpHp7qn gmSY01JWULZp9Hqlq7Tn6G+vBVKQr/GLjODA4gywqyBVpxT2gPqeqcJ+qFOtW/BfkI5x Apqg== Received: by 10.66.83.234 with SMTP id t10mr15027288pay.39.1350085784895; Fri, 12 Oct 2012 16:49:44 -0700 (PDT) Received: from mcgrof@gmail.com (c-24-7-61-223.hsd1.ca.comcast.net. [24.7.61.223]) by mx.google.com with ESMTPS id i4sm5044337pav.20.2012.10.12.16.49.41 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2012 16:49:43 -0700 (PDT) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Fri, 12 Oct 2012 16:49:39 -0700 From: "Luis R. Rodriguez" To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] uapi: update includes for drm content when no kernel API exists Date: Fri, 12 Oct 2012 16:49:31 -0700 Message-Id: <1350085772-8755-2-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350085772-8755-1-git-send-email-mcgrof@do-not-panic.com> References: <1350085772-8755-1-git-send-email-mcgrof@do-not-panic.com> X-Mailman-Approved-At: Sun, 14 Oct 2012 02:44:11 -0700 Cc: devel@driverdev.osuosl.org, backports@vger.kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, daniel.vetter@ffwll.ch, "Luis R. Rodriguez" , dhowells@redhat.com, bskeggs@redhat.com, davej@redhat.com, alexander.deucher@amd.com, rob@ti.com, tglx@linutronix.de, paulmck@linux.vnet.ibm.com, laurent.pinchart@ideasonboard.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: "Luis R. Rodriguez" The UAPI changes split kernel API and userspace API content onto two separate header files. The userspace API drm content was moved to include/uapi/drm/ with the same file name while kernel specific API content was kept under include/drm/ with the same file name. When one file was split into two files the kernel header includes the uapi header and a UAPI prefix was added to the uapi header for its header guard. When there was no kernel API content found the uapi header file was the only one that was kept and the original guard for the header file was kept. In this particular case the original users of this header file were not modified and the uapi header file is expected to be picked up by path. This may work well at compilation on the kernel but when backporting this creates a few complexities. To help with backporting [0] lets be explicit about the new uapi path when there is no respective kernel API header file. For more details on the UAPI changes see the lwn article on this [1]. [0] https://backports.wiki.kernel.org [1] http://lwn.net/Articles/507794/ Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: devel@driverdev.osuosl.org Cc: backports@vger.kernel.org Cc: Rob Clark Cc: Arnd Bergmann Cc: Dave Jones Cc: David Airlie Cc: Ben Skeggs Cc: Alan Cox Cc: David Howells Cc: Thomas Gleixner Cc: Daniel Vetter Cc: Jesse Barnes Cc: Alex Deucher Cc: Paul E. McKenney Cc: Greg Kroah-Hartman Cc: Laurent Pinchart Signed-off-by: Luis R. Rodriguez --- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/nouveau/nv04_cursor.c | 2 +- drivers/staging/omapdrm/omap_crtc.c | 2 +- include/drm/drmP.h | 4 ++-- include/drm/drm_crtc.h | 4 ++-- include/uapi/drm/drm.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index ef1b221..6486e89 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include /* Avoid boilerplate. I'm tired of typing. */ #define DRM_ENUM_NAME_FN(fnname, list) \ diff --git a/drivers/gpu/drm/nouveau/nv04_cursor.c b/drivers/gpu/drm/nouveau/nv04_cursor.c index fe86f0d..7af590f 100644 --- a/drivers/gpu/drm/nouveau/nv04_cursor.c +++ b/drivers/gpu/drm/nouveau/nv04_cursor.c @@ -1,5 +1,5 @@ #include -#include +#include #include "nouveau_drm.h" #include "nouveau_reg.h" #include "nouveau_crtc.h" diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c index 732f2ad..029c9ec 100644 --- a/drivers/staging/omapdrm/omap_crtc.c +++ b/drivers/staging/omapdrm/omap_crtc.c @@ -19,7 +19,7 @@ #include "omap_drv.h" -#include "drm_mode.h" +#include #include "drm_crtc.h" #include "drm_crtc_helper.h" diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 3fd8280..9030369 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -72,8 +72,8 @@ #include #include #include -#include -#include +#include +#include #include diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 3fa18b7..1012503 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -30,9 +30,9 @@ #include #include #include -#include -#include +#include +#include struct drm_device; struct drm_mode_set; diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 1e3481e..51ee504 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -628,7 +628,7 @@ struct drm_prime_handle { __s32 fd; }; -#include +#include #define DRM_IOCTL_BASE 'd' #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)