From patchwork Tue Mar 26 23:23:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ahmed S. Darwish" X-Patchwork-Id: 10872311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ADCCE14DE for ; Tue, 26 Mar 2019 23:23:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9799A28CDA for ; Tue, 26 Mar 2019 23:23:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AB3528D6E; Tue, 26 Mar 2019 23:23:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2D7D228CDA for ; Tue, 26 Mar 2019 23:23:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D5D56E06B; Tue, 26 Mar 2019 23:23:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 604A46E06B for ; Tue, 26 Mar 2019 23:23:51 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id v14so14779023wmf.2 for ; Tue, 26 Mar 2019 16:23:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=ock9RknuwGRRmoDjHutsZLKWnYREdb2LKPndjaXq3dI=; b=Ct3Q0kQWc6hQ+jUtl2CIO9aNABZL2HQ3uSJKvvfkcZ8xNjPGGJ1LO41/6vJkKlGSwf on1KMOQmtaIZmK7HXSlRUBJHN8C8l5nZ/jiPSzISIAhebW7o0tXImkeDEnwosVDXrMW3 4Z+F8Y74h5v59py2dLMus2SV6R3xGILmqngR/Jp0pYbY5JIFSZT8nCakPdLXum2BQ/M/ xLsmX/tce1/44zRA4fmeKxNOQY6tp7Z4x2nYqwQz2lzUUJKALKED13XpQrmwCqNvU0CW 7PkICAkaG0BuguzItoZo733eEIROQgaQZqpVr2rlwylhq9LjTTEnI9O23MHXl8oihQtD 2f1Q== X-Gm-Message-State: APjAAAXoNo5glVRIaJ0Hf5vY74UgQGaDxNUonQ93o1Hozt6IpVkiUzXp FBrhvCXAeLlWlmYP1wVWyA4rJaAG X-Google-Smtp-Source: APXvYqw8DcJvPYUvZSHneiCAeHPZY/YwkI7W4sRfFlojqstx2f653yraD0FwbmTY/nYhU12NlHfRlw== X-Received: by 2002:a1c:f618:: with SMTP id w24mr3140551wmc.3.1553642628931; Tue, 26 Mar 2019 16:23:48 -0700 (PDT) Received: from darwi-home-pc (ip-109-42-2-54.web.vodafone.de. [109.42.2.54]) by smtp.gmail.com with ESMTPSA id r9sm8075571wrv.82.2019.03.26.16.23.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 26 Mar 2019 16:23:48 -0700 (PDT) Date: Wed, 27 Mar 2019 00:23:43 +0100 From: "Ahmed S. Darwish" To: DRI Development Subject: [PATCH] drm: headers: Add neccessary include files and guards Message-ID: <20190326232308.GA8155@darwi-home-pc> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.11.3 (2019-02-01) X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=ock9RknuwGRRmoDjHutsZLKWnYREdb2LKPndjaXq3dI=; b=HwWXfCY+s0RppKxD3SEiyRCd5/WL2qO4gn5HPbSgCK7LD3Wwv5d1DJNaBEGcP+6J2Y SiEIf0KhVp7tsOkgFOnfAn87oPgUDGQDv057m3reoms0ECESXXvk/SBf7X0TMFFnpUGo +ufjWu/nGq6LS55QytvHyCnTPVmbnEKhNaQDoWFAcC2PWVINbXEnhWrnGWSWHip5n4u6 hW7KbjjJoUmwDrODgCMNyNcWt1S7ZkxwcpJ8v4ms0eCBCZ15ZSDqijmRFdI4piE7jbMe 5G9haJagqY2hka4jR9ckV+QEyG6h5BAw3B/E1X8OmPtyKuYLOOStzygQ49Or7wioqhJO DhbQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Otherwise gcc will complain about unknown types, and declarations inside parameter lists, if "drm_internal.h" is used in C files with less headers than what's now typically done under drivers/gpu/drm/. Signed-off-by: Ahmed S. Darwish --- Notes: This was triggered by the in-development drm-panic code. drivers/gpu/drm/drm_crtc_helper_internal.h | 5 +++++ drivers/gpu/drm/drm_crtc_internal.h | 5 +++++ drivers/gpu/drm/drm_internal.h | 12 ++++++++++++ include/drm/drm_auth.h | 9 +++++++++ 4 files changed, 31 insertions(+) -- darwi http://darwish.chasingpointers.com diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h index b5ac1581e623..ee8d8682db09 100644 --- a/drivers/gpu/drm/drm_crtc_helper_internal.h +++ b/drivers/gpu/drm/drm_crtc_helper_internal.h @@ -20,6 +20,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#ifndef _DRM_CRTC_HELPER_INTERNAL_H +#define _DRM_CRTC_HELPER_INTERNAL_H + /* * This header file contains mode setting related functions and definitions * which are only used within the drm kms helper module as internal @@ -75,3 +78,5 @@ enum drm_mode_status drm_encoder_mode_valid(struct drm_encoder *encoder, const struct drm_display_mode *mode); enum drm_mode_status drm_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode); + +#endif /* _DRM_CRTC_HELPER_INTERNAL_H */ diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index 216f2a9ee3d4..840c1cb2eb7b 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -25,6 +25,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#ifndef _DRM_CRTC_INTERNAL_H +#define _DRM_CRTC_INTERNAL_H + /* * This header file contains mode setting related functions and definitions * which are only used within the drm module as internal implementation details @@ -252,3 +255,5 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, void drm_mode_fixup_1366x768(struct drm_display_mode *mode); void drm_reset_display_info(struct drm_connector *connector); u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edid); + +#endif /* _DRM_CRTC_INTERNAL_H */ diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index 251d67e04c2d..a1b68836b048 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -21,7 +21,17 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#ifndef _DRM_INTERNAL_H +#define _DRM_INTERNAL_H + +#include + +#include +#include +#include +#include #include +#include #define DRM_IF_MAJOR 1 #define DRM_IF_MINOR 4 @@ -191,3 +201,5 @@ int drm_syncobj_signal_ioctl(struct drm_device *dev, void *data, void drm_framebuffer_print_info(struct drm_printer *p, unsigned int indent, const struct drm_framebuffer *fb); int drm_framebuffer_debugfs_init(struct drm_minor *minor); + +#endif /* _DRM_INTERNAL_H */ diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h index 86bff9841b54..a1a59fbf26b1 100644 --- a/include/drm/drm_auth.h +++ b/include/drm/drm_auth.h @@ -28,6 +28,15 @@ #ifndef _DRM_AUTH_H_ #define _DRM_AUTH_H_ +#include +#include +#include + +#include + +#include +#include + /* * Legacy DRI1 locking data structure. Only here instead of in drm_legacy.h for * include ordering reasons.