From patchwork Sat Jan 12 19:32:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10761059 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 D816113BF for ; Sat, 12 Jan 2019 19:33:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C840C28C9E for ; Sat, 12 Jan 2019 19:33:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B93AE29099; Sat, 12 Jan 2019 19:33:32 +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,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 EC6F628C9E for ; Sat, 12 Jan 2019 19:33:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D45DB6E447; Sat, 12 Jan 2019 19:33:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 027B06E449 for ; Sat, 12 Jan 2019 19:33:29 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id i26so13124061lfc.0 for ; Sat, 12 Jan 2019 11:33:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pWlL3BNVMa5QGJHXHfhIZdBQ9W7gilruA9FJqZpOeOo=; b=RYEQMcIMD45XIddykyRhNbugmU8ezZyUz5An3Y+zC3M/Vn1mM0tor4ghhfqizj6xg5 JnKKsavSLNohkMepckHUTm2Hiq3RaC5G4c74o1zPWZWNxodmstlAeO1LzT9UlLl7OYUX BfpF6C+avMPZzo9QMpr4tSk7M3xh1cYnMLS4aY6EOjJJRz6qksb0shH0UwV8umHfIwXr 9dEb8Om339MyQ4xwpsYjxt8tA5itlKxbrCYFv17P5yIPn4UJ0Srmd3P/ispQLDdU3U3t myQOpwdXhB4ITY13th37Ekrm/ADsnKDmVrvO3z7VUAhLkowk8USYrbehO5/yqKdA3dlM JhYw== X-Gm-Message-State: AJcUukdyZkieMDErkkiKXAtLJttRZEtF6x0Oac9l3xSP1k3AwHDKb+H0 BuzDIzRtA/h4UeSkMvg7Grc= X-Google-Smtp-Source: ALg8bN6OHWYGoLuOmXiRkjWglLokTj0rHjxzUvNpKcM6ZYsNObdwVrnsCONU2ungqpzWWGGwAB1/Gw== X-Received: by 2002:a19:a84e:: with SMTP id r75mr10941679lfe.45.1547321607333; Sat, 12 Jan 2019 11:33:27 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id d82sm15624452lfd.82.2019.01.12.11.33.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 11:33:26 -0800 (PST) From: Sam Ravnborg To: Alex Deucher , Alexey Brodkin , Andrzej Hajda , Benjamin Gaignard , Chen Feng , Christian Konig , Daniel Vetter , David Airlie , David Zhou , Eric Anholt , Gerd Hoffmann , Kieran Bingham , Laurent Pinchart , Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Philippe Cornu , Rob Clark , Rongrong Zou , Sean Paul , Tomi Valkeinen , Vincent Abriou , Xinliang Liu , Xinwei Kong , Yannick Fertre , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 1/8] drm: move drm_can_sleep() to drm_util.h Date: Sat, 12 Jan 2019 20:32:44 +0100 Message-Id: <20190112193251.20450-2-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190112193251.20450-1-sam@ravnborg.org> References: <20190112193251.20450-1-sam@ravnborg.org> MIME-Version: 1.0 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: Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Move drm_can_sleep() out of drmP.h to allow users to get rid of the drmP.h include. There was no header file that was a good match for this helper function. So add this to drm_util with the relevant includes. Add include of drm_util.h to all users. v2: - Update comments to use kernel-doc style (Daniel) - Add FIXME to drm_can_sleep and add note that this function should not be used in new code (Daniel) v3: - Fix kernel-doc syntax (Daniel) - Plug drm_util.h into drm-internels.rst (Daniel) Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: Gerd Hoffmann Cc: Rob Clark Cc: Tomi Valkeinen Cc: Eric Anholt Reviewed-by: Laurent Pinchart --- Documentation/gpu/drm-internals.rst | 9 ++++++ drivers/gpu/drm/amd/amdgpu/atom.c | 2 ++ drivers/gpu/drm/ast/ast_fb.c | 2 ++ drivers/gpu/drm/cirrus/cirrus_fbdev.c | 1 + drivers/gpu/drm/drm_flip_work.c | 1 + drivers/gpu/drm/mgag200/mgag200_fb.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 1 + drivers/gpu/drm/omapdrm/omap_fbdev.c | 1 + drivers/gpu/drm/qxl/qxl_cmd.c | 2 ++ drivers/gpu/drm/radeon/atom.c | 2 ++ drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 1 + include/drm/drmP.h | 8 ----- include/drm/drm_util.h | 43 ++++++++++++++++++++++++- 14 files changed, 66 insertions(+), 9 deletions(-) diff --git a/Documentation/gpu/drm-internals.rst b/Documentation/gpu/drm-internals.rst index 9090fabf3f7a..2caf21effd28 100644 --- a/Documentation/gpu/drm-internals.rst +++ b/Documentation/gpu/drm-internals.rst @@ -233,6 +233,15 @@ Printer .. kernel-doc:: drivers/gpu/drm/drm_print.c :export: +Utilities +--------- + +.. kernel-doc:: include/drm/drm_util.h + :doc: drm utils + +.. kernel-doc:: include/drm/drm_util.h + :internal: + Legacy Support Code =================== diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c index e9934de1b9cf..dd30f4e61a8c 100644 --- a/drivers/gpu/drm/amd/amdgpu/atom.c +++ b/drivers/gpu/drm/amd/amdgpu/atom.c @@ -27,6 +27,8 @@ #include #include +#include + #define ATOM_DEBUG #include "atom.h" diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c index 75f867d00031..2c9f8dd9733a 100644 --- a/drivers/gpu/drm/ast/ast_fb.c +++ b/drivers/gpu/drm/ast/ast_fb.c @@ -39,7 +39,9 @@ #include #include #include +#include #include + #include "ast_drv.h" static void ast_dirty_update(struct ast_fbdev *afbdev, diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c index 4dd499c7d1ba..79fea1b8bc14 100644 --- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c +++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include diff --git a/drivers/gpu/drm/drm_flip_work.c b/drivers/gpu/drm/drm_flip_work.c index 12dea16f22a8..3da3bf5af405 100644 --- a/drivers/gpu/drm/drm_flip_work.c +++ b/drivers/gpu/drm/drm_flip_work.c @@ -22,6 +22,7 @@ */ #include +#include #include /** diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 30726c9fe28c..6893934b26c0 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c index 7cebcb2b3a37..6153514db04c 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c @@ -16,6 +16,7 @@ * this program. If not, see . */ +#include #include "mdp5_kms.h" #include "mdp5_smp.h" diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index aee99194499f..851c59f07eb1 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c @@ -16,6 +16,7 @@ */ #include +#include #include #include "omap_drv.h" diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index dffc5093ff16..2e100f644236 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -25,6 +25,8 @@ /* QXL cmd/ring handling */ +#include + #include "qxl_drv.h" #include "qxl_object.h" diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index e55cbeee7a53..ac98ad561870 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -27,6 +27,8 @@ #include #include +#include + #define ATOM_DEBUG #include "atom.h" diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index 222a1fa41d7c..7e3257e8fd56 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -24,6 +24,7 @@ * Alex Deucher */ #include +#include #include #include #include "radeon.h" diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index c24b078f0593..2c635f001c71 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 9e47c8dc6b87..bc4cb3732407 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -94,14 +94,6 @@ struct dma_buf_attachment; struct pci_dev; struct pci_controller; -/* returns true if currently okay to sleep */ -static inline bool drm_can_sleep(void) -{ - if (in_atomic() || in_dbg_master() || irqs_disabled()) - return false; - return true; -} - #if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE) #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x) #else diff --git a/include/drm/drm_util.h b/include/drm/drm_util.h index 88abdca89baa..f776a55e5508 100644 --- a/include/drm/drm_util.h +++ b/include/drm/drm_util.h @@ -26,7 +26,48 @@ #ifndef _DRM_UTIL_H_ #define _DRM_UTIL_H_ -/* helper for handling conditionals in various for_each macros */ +/** + * DOC: drm utils + * + * Macros and inline functions that does not naturally belong in other places + */ + +#include +#include +#include +#include + +/** + * for_each_if - helper for handling conditionals in various for_each macros + * @condition: The condition to check + * + * Typical use:: + * + * #define for_each_foo_bar(x, y) \' + * list_for_each_entry(x, y->list, head) \' + * for_each_if(x->something == SOMETHING) + * + * The for_each_if() macro makes the use of for_each_foo_bar() less error + * prone. + */ #define for_each_if(condition) if (!(condition)) {} else +/** + * drm_can_sleep - returns true if currently okay to sleep + * + * This function shall not be used in new code. + * The check for running in atomic context may not work - see linux/preempt.h. + * + * FIXME: All users of drm_can_sleep should be removed (see todo.rst) + * + * Returns: + * True if kgdb is active or we are in an atomic context or irqs are disabled + */ +static inline bool drm_can_sleep(void) +{ + if (in_atomic() || in_dbg_master() || irqs_disabled()) + return false; + return true; +} + #endif From patchwork Sat Jan 12 19:32:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10761061 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 EFFEB1390 for ; Sat, 12 Jan 2019 19:33:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D854B29098 for ; Sat, 12 Jan 2019 19:33:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC407290A6; Sat, 12 Jan 2019 19:33:34 +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,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 6CE3329098 for ; Sat, 12 Jan 2019 19:33:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BC596E449; Sat, 12 Jan 2019 19:33:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A8926E447 for ; Sat, 12 Jan 2019 19:33:30 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id s5-v6so15695597ljd.12 for ; Sat, 12 Jan 2019 11:33:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=89MFC7PzVXRSmDKlMJ5K+IukfdSMY05DYh7kT8q/Ruc=; b=El/Fbh7uqqN0GwaxB1Z2zn6dTzReyalL49A1E4kNHWULWxTFALGF9NIo0cxVTRwdRR ZvCAq8r4y0jat6BfjF4gKJPVb+QVOcfv6CwTAoRu2odkPFtis8sDp6akZGiRRoby/eWj lhErk0cGLJt+9rZJ/visvluH1HEq4kCrC/zuCuqaVOPFjqQCQ37nQVPwnaWo42Sig2L0 VubH46af28oyi2r5/727+VAQo1hI3hsaZceP1xWzoiyTAy+jlBbzemlJf6I8S3b9F+84 9GnR1uuFvG0gkOmnbWzWyQAKL4Mdoh7G2pHajg/lWUWjj3yq+qQLPn1T8YWuQWWmGKtQ FpHg== X-Gm-Message-State: AJcUuke/+XxRrT/HLGmcWcUacjLejNivroQuZoLgg6LxBQnI0uQj4X4o E2lTu2oeDodRhOKMQE6sJME= X-Google-Smtp-Source: ALg8bN7kAPSZgjHPy5k0HkCJWWnna4Jzk894Ppuwhs0yQ35ZzT+0tQPPTkEjtPm8JM1rDQW9+NSUog== X-Received: by 2002:a2e:e02:: with SMTP id 2-v6mr8257679ljo.10.1547321608796; Sat, 12 Jan 2019 11:33:28 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id d82sm15624452lfd.82.2019.01.12.11.33.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 11:33:28 -0800 (PST) From: Sam Ravnborg To: Alex Deucher , Alexey Brodkin , Andrzej Hajda , Benjamin Gaignard , Chen Feng , Christian Konig , Daniel Vetter , David Airlie , David Zhou , Eric Anholt , Gerd Hoffmann , Kieran Bingham , Laurent Pinchart , Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Philippe Cornu , Rob Clark , Rongrong Zou , Sean Paul , Tomi Valkeinen , Vincent Abriou , Xinliang Liu , Xinwei Kong , Yannick Fertre , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 2/8] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h Date: Sat, 12 Jan 2019 20:32:45 +0100 Message-Id: <20190112193251.20450-3-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190112193251.20450-1-sam@ravnborg.org> References: <20190112193251.20450-1-sam@ravnborg.org> 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: Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP In the quest to get rid of drmP.h move the newly added EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h. Fix the single user. Add a note to drmP.h to avoid further use of it. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/drm_framebuffer.c | 1 + include/drm/drmP.h | 11 ++++++----- include/drm/drm_util.h | 10 ++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index fcaea8f50513..7abcb265a108 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "drm_internal.h" #include "drm_crtc_internal.h" diff --git a/include/drm/drmP.h b/include/drm/drmP.h index bc4cb3732407..3f5c577c9dbd 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -94,10 +94,11 @@ struct dma_buf_attachment; struct pci_dev; struct pci_controller; -#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE) -#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x) -#else -#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) -#endif +/* + * NOTE: drmP.h is obsolete - do NOT add anything to this file + * + * Do not include drmP.h in new files. + * Work is ongoing to remove drmP.h includes from existing files + */ #endif diff --git a/include/drm/drm_util.h b/include/drm/drm_util.h index f776a55e5508..0500da65b1d1 100644 --- a/include/drm/drm_util.h +++ b/include/drm/drm_util.h @@ -37,6 +37,16 @@ #include #include +/* + * Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall + * only be visible for drmselftests. + */ +#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE) +#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x) +#else +#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) +#endif + /** * for_each_if - helper for handling conditionals in various for_each macros * @condition: The condition to check From patchwork Sat Jan 12 19:32:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10761069 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 5D8221390 for ; Sat, 12 Jan 2019 19:33:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5093628C9E for ; Sat, 12 Jan 2019 19:33:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4423A29099; Sat, 12 Jan 2019 19:33:43 +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,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 D518A28C9E for ; Sat, 12 Jan 2019 19:33:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 399556E44D; Sat, 12 Jan 2019 19:33:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id D2E826E44A for ; Sat, 12 Jan 2019 19:33:31 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id i26so13124105lfc.0 for ; Sat, 12 Jan 2019 11:33:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=vjKbpYaaeJmSc6X5KV6yIBLsR3nMJMIiYs2qfLs+ds0=; b=FxjHprEnpgom784bAKR0jYvZn65LXMPMkSzqEea8Fiia9vFxR1+Xv0MRJd2RDZz6pW h2QTwSlsUBbGjxxQUrM6ueDlMtW+lfmJbdMxzGVowN/pzEh0dWVB0HzCrM03X6VyXGB3 ROMxlEmON880yB2KdLLBBvWlHnP7ik5t+lTeuBFEWFZEbsk2sNoad7HrVgqyjRD889CJ 7N263bqU3eR8+h3dm/zqsE0HrW/2NWt5KIJ8/g96DTcf3wnFRCgkMlzCyk6gujvqjeA+ f2Glf9RgoJ3XUj5YKNtgEj5TUQ4AV3wNXRPVSbKtl5oh3/BaVMiWHYIRSaVGKXP3RrLf OifA== X-Gm-Message-State: AJcUukeIYhY6UISbDDnJezGJ3EWsojBnycVkrAw4CKI5jTe9Y+AYa2FH eDuCyvHowGbbIRq7BzAMXBo= X-Google-Smtp-Source: ALg8bN6dyEywFLwzKmQ35U/3dPBN1hhiGFCCkM+3SW9afg4fu9SRkDA59R4abQYiXOIk/deNbRAFqA== X-Received: by 2002:a19:7919:: with SMTP id u25mr10099813lfc.18.1547321610247; Sat, 12 Jan 2019 11:33:30 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id d82sm15624452lfd.82.2019.01.12.11.33.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 11:33:29 -0800 (PST) From: Sam Ravnborg To: Alex Deucher , Alexey Brodkin , Andrzej Hajda , Benjamin Gaignard , Chen Feng , Christian Konig , Daniel Vetter , David Airlie , David Zhou , Eric Anholt , Gerd Hoffmann , Kieran Bingham , Laurent Pinchart , Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Philippe Cornu , Rob Clark , Rongrong Zou , Sean Paul , Tomi Valkeinen , Vincent Abriou , Xinliang Liu , Xinwei Kong , Yannick Fertre , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 3/8] drm/stm: prepare for drmP.h removal from drm_modeset_helper.h Date: Sat, 12 Jan 2019 20:32:46 +0100 Message-Id: <20190112193251.20450-4-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190112193251.20450-1-sam@ravnborg.org> References: <20190112193251.20450-1-sam@ravnborg.org> 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: Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused drm/stm to fail to build. This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h. Build tested on arm and x86 allmodconfig Signed-off-by: Sam Ravnborg Cc: Yannick Fertre Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: David Airlie Cc: Daniel Vetter Acked-by: Benjamin Gaignard --- drivers/gpu/drm/stm/drv.c | 4 ++++ drivers/gpu/drm/stm/ltdc.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 8dec001b9d37..58bf8bae789c 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -9,15 +9,19 @@ */ #include +#include +#include #include #include #include #include +#include #include #include #include #include +#include #include "ltdc.h" diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 61dd661aa0ac..de29f4713140 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -10,18 +10,25 @@ #include #include +#include +#include +#include #include #include +#include #include #include #include #include +#include #include +#include #include #include #include #include +#include #include