From patchwork Fri Aug 29 10:12:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 4809931 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AD6BCC0338 for ; Fri, 29 Aug 2014 10:13:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9AAE20125 for ; Fri, 29 Aug 2014 10:13:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C077A20123 for ; Fri, 29 Aug 2014 10:13:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBF596E699; Fri, 29 Aug 2014 03:13:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 739176E6A8 for ; Fri, 29 Aug 2014 03:13:44 -0700 (PDT) Received: by mail-we0-f178.google.com with SMTP id u57so1985679wes.37 for ; Fri, 29 Aug 2014 03:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2bSq6Ut6CEM/AW3sVlyxSAM5+TGbe45vl4j/2T0gnYc=; b=Qg+pWNt/ZyGDGOiTecsSCQAbQg88EIPTGIuVKAG3gxembjuR1nyH7w/Wu/kUpPZDBB SxoPdjyTHlxJ9u4XlKhCx0d2gpESuzu0oC7gUmhBtIW1l5RH7v9Xd/YJoAVGhpqMXuJk m8IllnWxCt89il8aRVTzM8gGzE2EoboFentEqLhP5MOU0e4XjOBRAAqmKMsiVcLyKlIA QKz32OBTTr8LN3aADMztBfD5SJ4CuPCZ6qo88QcDkIHTVEkRXgBl0qt6ipuM4Vuj7z/K Q7fC11EL0Ug3nn+d7LQBwxEeLGkn57Ktoisz1ekwWJ7Bz/q7r0HO9oBAw1XBMT4QPwxo ORNQ== X-Received: by 10.194.59.201 with SMTP id b9mr12375928wjr.43.1409307223697; Fri, 29 Aug 2014 03:13:43 -0700 (PDT) Received: from david-tp.localdomain (stgt-4d02e0c1.pool.mediaWays.net. [77.2.224.193]) by mx.google.com with ESMTPSA id la2sm17479347wjb.5.2014.08.29.03.13.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Aug 2014 03:13:42 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 14/20] drm: move remaining includes in drmP.h to the top Date: Fri, 29 Aug 2014 12:12:40 +0200 Message-Id: <1409307166-12396-15-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> References: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Including headers somewhere else but at the top is ugly, deprecated and was used in early days only to speed up compile-times. Those days are over. Make headers independent and then move the inclusions to the top. Signed-off-by: David Herrmann Reviewed-by: Thierry Reding --- include/drm/drmP.h | 31 ++++++++++++------------------- include/drm/drm_agpsupport.h | 10 ++++++++-- include/drm/drm_crtc.h | 4 ++-- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 840a373..a8b24fc 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1,17 +1,14 @@ -/** - * \file drmP.h - * Private header for Direct Rendering Manager - * - * \author Rickard E. (Rik) Faith - * \author Gareth Hughes - */ - /* + * Internal Header for the Direct Rendering Manager + * * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * Copyright (c) 2009-2010, Code Aurora Forum. * All rights reserved. * + * Author: Rickard E. (Rik) Faith + * Author: Gareth Hughes + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation @@ -64,8 +61,14 @@ #include #include -#include +#include +#include + +#include +#include +#include #include +#include #include #include #include @@ -564,8 +567,6 @@ struct drm_gem_object { struct dma_buf_attachment *import_attach; }; -#include - /** * struct drm_master - drm master structure * @@ -1228,10 +1229,6 @@ extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc); extern int drm_modeset_ctl(struct drm_device *dev, void *data, struct drm_file *file_priv); - /* AGP/GART support (drm_agpsupport.h) */ - -#include - /* Stub support (drm_stub.h) */ extern int drm_setmaster_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); @@ -1397,8 +1394,6 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, struct vm_area_struct *vma); int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); -#include - static inline void drm_gem_object_reference(struct drm_gem_object *obj) { @@ -1472,8 +1467,6 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) { } -#include - struct drm_device *drm_dev_alloc(struct drm_driver *driver, struct device *parent); void drm_dev_ref(struct drm_device *dev); diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h index 4f1724c..055dc05 100644 --- a/include/drm/drm_agpsupport.h +++ b/include/drm/drm_agpsupport.h @@ -1,12 +1,16 @@ #ifndef _DRM_AGPSUPPORT_H_ #define _DRM_AGPSUPPORT_H_ +#include #include +#include #include #include #include -#include -#include +#include + +struct drm_device; +struct drm_file; #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && \ defined(MODULE))) @@ -61,6 +65,7 @@ int drm_agp_unbind_ioctl(struct drm_device *dev, void *data, int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); int drm_agp_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); + #else /* __OS_HAS_AGP */ static inline void drm_free_agp(struct agp_memory * handle, int pages) @@ -188,6 +193,7 @@ static inline int drm_agp_bind_ioctl(struct drm_device *dev, void *data, { return -ENODEV; } + #endif /* __OS_HAS_AGP */ #endif /* _DRM_AGPSUPPORT_H_ */ diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 0375d75..77d9763 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include struct drm_device;