From patchwork Tue Jan 8 19:29:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10752757 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 A610891E for ; Tue, 8 Jan 2019 19:29:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 921BB28D90 for ; Tue, 8 Jan 2019 19:29:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85E1628DA6; Tue, 8 Jan 2019 19:29: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,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 D277228D90 for ; Tue, 8 Jan 2019 19:29:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0ED606E583; Tue, 8 Jan 2019 19:29:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8E2F36E583 for ; Tue, 8 Jan 2019 19:29:53 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id c19-v6so4416021lja.5 for ; Tue, 08 Jan 2019 11:29:53 -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=QROh7OCQrXt9g019C2ypOS2+SuZs8Qynl+T7q8Jh3vk=; b=P/Fen28KgP8s4uROnpsPtu2lYsE8kG6ZS86TBiZZKwRreSQ2OdmYex2Ok3dMgGVUE4 VZFh48HTPMDaNFRXvqSV8QkSSPg/DqtbFo8QjNpfLvWS0iPLYbdqxeToyzOSLPpxKWjy oo4DjUJMckipwIvr18zmcI0arlqrUyd8/uV1LTZDfQsstpUMKI5P2rKGNLrxX+QBlVRI Ncjpuh3dh5eQox7GFn5VkGW4gQ817BaWYsX6A3jH2hrCtRumo3XXUn5lItTCexw8ksOu bvcEYtsBMolhGTKZ2z92hF8oMApQtqiHM68C4TrRPy21BrLpd4coVxfzQcfR+bRp9v1/ scJQ== X-Gm-Message-State: AJcUukfNZZLCSbpi5wiOs7z/yrmBLl+hFzhdP6sXLcyIlb5aJ8xr79H+ /i0VhvADYG56cUd7+elHwis= X-Google-Smtp-Source: ALg8bN5rS552hIz9niwMttO6oy4iFhLFkVMqJinAgtXWIRqdDoVCFUmY2U2AUndhg8qCnH/gdwYG2Q== X-Received: by 2002:a2e:7615:: with SMTP id r21-v6mr1719499ljc.131.1546975791795; Tue, 08 Jan 2019 11:29:51 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id q128-v6sm9122246ljq.14.2019.01.08.11.29.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:29:51 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 01/12] drm: drm_device.h: update comments to kernel-doc style Date: Tue, 8 Jan 2019 20:29:28 +0100 Message-Id: <20190108192939.15255-2-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190108192939.15255-1-sam@ravnborg.org> References: <20190108192939.15255-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 , Jonathan Corbet MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Updated comment style to kernel-doc format in drm_device.h In struct drm_device there are 12 struct members without doc: - registered - filelist_mutex - filelist - irq - vbl_lock - event_lock - hose - sigdata - sigdata.context - sigdata.lock - agp_buffer_map - agp_buffer_token They all need proper documentation, a task left for someone that knows their usage. drm_device is not plugged into Documentation/gpu/drm-internals.rst as this would create a new load of warnings. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Jonathan Corbet --- include/drm/drm_device.h | 199 +++++++++++++++++++++++++++++++---------------- 1 file changed, 134 insertions(+), 65 deletions(-) diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h index 42411b3ea0c8..2b154ead9efc 100644 --- a/include/drm/drm_device.h +++ b/include/drm/drm_device.h @@ -25,24 +25,48 @@ struct pci_dev; struct pci_controller; /** - * DRM device structure. This structure represent a complete card that + * struct drm_device - DRM device structure + * + * This structure represent a complete card that * may contain multiple heads. */ struct drm_device { - struct list_head legacy_dev_list;/**< list of devices per driver for stealth attach cleanup */ - int if_version; /**< Highest interface version set */ - - /** \name Lifetime Management */ - /*@{ */ - struct kref ref; /**< Object ref-count */ - struct device *dev; /**< Device structure of bus-device */ - struct drm_driver *driver; /**< DRM driver managing the device */ - void *dev_private; /**< DRM driver private data */ - struct drm_minor *primary; /**< Primary node */ - struct drm_minor *render; /**< Render node */ + /** + * @legacy_dev_list: + * + * List of devices per driver for stealth attach cleanup + */ + struct list_head legacy_dev_list; + + /** @if_version: Highest interface version set */ + int if_version; + + /** @ref: Object ref-count */ + struct kref ref; + + /** @dev: Device structure of bus-device */ + struct device *dev; + + /** @driver: DRM driver managing the device */ + struct drm_driver *driver; + + /** @dev_private: DRM driver private data */ + void *dev_private; + + /** @primary: Primary node */ + struct drm_minor *primary; + + /** @render: Render node */ + struct drm_minor *render; + bool registered; - /* currently active master for this device. Protected by master_mutex */ + /** + * @master: + * + * Currently active master for this device. + * Protected by &master_mutex + */ struct drm_master *master; /** @@ -63,23 +87,42 @@ struct drm_device { */ bool unplugged; - struct inode *anon_inode; /**< inode for private address-space */ - char *unique; /**< unique name of the device */ - /*@} */ + /** @anon_inode: inode for private address-space */ + struct inode *anon_inode; + + /** @unique: Unique name of the device */ + char *unique; + + /** + * @struct_mutex: + * + * Lock for others (not &drm_minor.master and &drm_file.is_master) + */ + struct mutex struct_mutex; + + /** + * @master_mutex: + * + * Lock for &drm_minor.master and &drm_file.is_master + */ + struct mutex master_mutex; + + /** + * @open_count: + * + * Usage counter for outstanding files open, + * protected by drm_global_mutex + */ + int open_count; + + /** @buf_lock: Lock for &buf_use and a few other things. */ + spinlock_t buf_lock; - /** \name Locks */ - /*@{ */ - struct mutex struct_mutex; /**< For others */ - struct mutex master_mutex; /**< For drm_minor::master and drm_file::is_master */ - /*@} */ + /** @buf_use: Usage counter for buffers in use -- cannot alloc */ + int buf_use; - /** \name Usage Counters */ - /*@{ */ - int open_count; /**< Outstanding files open, protected by drm_global_mutex. */ - spinlock_t buf_lock; /**< For drm_device::buf_use and a few other things. */ - int buf_use; /**< Buffers in use -- cannot alloc */ - atomic_t buf_alloc; /**< Buffer allocation in progress */ - /*@} */ + /** @buf_alloc: Buffer allocation in progress */ + atomic_t buf_alloc; struct mutex filelist_mutex; struct list_head filelist; @@ -87,51 +130,64 @@ struct drm_device { /** * @filelist_internal: * - * List of open DRM files for in-kernel clients. Protected by @filelist_mutex. + * List of open DRM files for in-kernel clients. + * Protected by &filelist_mutex. */ struct list_head filelist_internal; /** * @clientlist_mutex: * - * Protects @clientlist access. + * Protects &clientlist access. */ struct mutex clientlist_mutex; /** * @clientlist: * - * List of in-kernel clients. Protected by @clientlist_mutex. + * List of in-kernel clients. Protected by &clientlist_mutex. */ struct list_head clientlist; - /** \name Memory management */ - /*@{ */ - struct list_head maplist; /**< Linked list of regions */ - struct drm_open_hash map_hash; /**< User token hash table for maps */ + /** @maplist: Memory management - linked list of regions */ + struct list_head maplist; - /** \name Context handle management */ - /*@{ */ - struct list_head ctxlist; /**< Linked list of context handles */ - struct mutex ctxlist_mutex; /**< For ctxlist */ + /** @map_hash: Memory management - user token hash table for maps */ + struct drm_open_hash map_hash; - struct idr ctx_idr; + /** + * @ctxlist: + * Context handle management - linked list of context handles + */ + struct list_head ctxlist; - struct list_head vmalist; /**< List of vmas (for debugging) */ + /** + * @ctxlist_mutex: + * + * Context handle management - mutex for &ctxlist + */ + struct mutex ctxlist_mutex; - /*@} */ + /** + * @ctx_idr: + * Context handle management + */ + struct idr ctx_idr; - /** \name DMA support */ - /*@{ */ - struct drm_device_dma *dma; /**< Optional pointer for DMA support */ - /*@} */ + /** + * @vmalist: + * Context handle management - list of vmas (for debugging) + */ + struct list_head vmalist; + + /** @dma: Optional pointer for DMA support */ + struct drm_device_dma *dma; - /** \name Context support */ - /*@{ */ + /** @context_flag: Context swapping flag */ + __volatile__ long context_flag; - __volatile__ long context_flag; /**< Context swapping flag */ - int last_context; /**< Last current context */ - /*@} */ + /** @last_context: Last current context */ + int last_context; /** * @irq_enabled: @@ -168,7 +224,12 @@ struct drm_device { */ struct drm_vblank_crtc *vblank; - spinlock_t vblank_time_lock; /**< Protects vblank count and time updates during vblank enable/disable */ + /** + * @vblank_time_lock: + * + * Protects vblank count and time updates during vblank enable/disable + */ + spinlock_t vblank_time_lock; spinlock_t vbl_lock; /** @@ -186,25 +247,29 @@ struct drm_device { * * If non-zeor, &drm_crtc_funcs.get_vblank_counter must be set. */ - u32 max_vblank_count; /**< size of vblank counter register */ - /** - * List of events - */ + /** @max_vblank_count: Size of vblank counter register */ + u32 max_vblank_count; + + /** @vblank_event_list: List of vblank events */ struct list_head vblank_event_list; spinlock_t event_lock; - /*@} */ + /** @agp: AGP data */ + struct drm_agp_head *agp; - struct drm_agp_head *agp; /**< AGP data */ + /** @pdev: PCI device structure */ + struct pci_dev *pdev; - struct pci_dev *pdev; /**< PCI device structure */ #ifdef __alpha__ struct pci_controller *hose; #endif - struct drm_sg_mem *sg; /**< Scatter gather memory */ - unsigned int num_crtcs; /**< Number of CRTCs on this device */ + /** @sg: Scatter gather memory */ + struct drm_sg_mem *sg; + + /** @num_crtcs: Number of CRTCs on this device */ + unsigned int num_crtcs; struct { int context; @@ -214,14 +279,18 @@ struct drm_device { struct drm_local_map *agp_buffer_map; unsigned int agp_buffer_token; - struct drm_mode_config mode_config; /**< Current mode config */ + /** @mode_config: Current mode config */ + struct drm_mode_config mode_config; - /** \name GEM information */ - /*@{ */ + /** @object_name_lock: GEM information */ struct mutex object_name_lock; + + /** @object_name_idr: GEM information */ struct idr object_name_idr; + + /** @vma_offset_manager: GEM information */ struct drm_vma_offset_manager *vma_offset_manager; - /*@} */ + int switch_power_state; /** From patchwork Tue Jan 8 19:29:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10752759 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 19690746 for ; Tue, 8 Jan 2019 19:30:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0952628D05 for ; Tue, 8 Jan 2019 19:30:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F08E428D83; Tue, 8 Jan 2019 19:30:00 +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 9A67928D90 for ; Tue, 8 Jan 2019 19:30:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E94A6F02B; Tue, 8 Jan 2019 19:29:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 661C66E583 for ; Tue, 8 Jan 2019 19:29:54 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id c19-v6so4416059lja.5 for ; Tue, 08 Jan 2019 11:29:54 -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=1awO/MoKoVwOfNgJEovkQ5ae+K1bPPHX4RXZHhL2kVE=; b=P0mOPu+A0IjUIwsnK0wDiYz1EF3ObN8UmjPRY+NCyIXcQobRNmxiGAstDa3neco8Mw V/wst+PFlWR5RKO41UrHeEN8/4h3i5jBBgWiiDpfhRrdlpvpEvsRpge5t2eEZjwkVyrw lahIBMMF6/Z193G82Y/cfTkvoWnPLVsatOgnQg0wrOIry83JTLqa/IwYYFZnivCLXNGb VjcNUdhCwNQSlRci2xJ0Z5ZAeg5NZuRVfqCHIEgQerPbgoAthZZhFPOwcrbgP1mmjSnX qGhOGxPSVWxfhorJqaDHZP1D0Cs9Bh/eoOpbNrU6vGdcDckpDoN0QxEuUyzdcu5StFHW SqzQ== X-Gm-Message-State: AJcUukfOJeEP+mcp6cD1sSojfn6/ryXA2F7iQgxxLNCvPLpKUsKbaw1D 50n/+8jV5x/2+Em48OkT4NI= X-Google-Smtp-Source: ALg8bN7Sh6h+PveqxzyabyL3Odd/fBddfwjtuvwPxWGw6iRBuz5Gkz+Lip+hC4L7sT7+n5J6xEYqaw== X-Received: by 2002:a2e:197:: with SMTP id f23-v6mr1795389lji.144.1546975792755; Tue, 08 Jan 2019 11:29:52 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id q128-v6sm9122246ljq.14.2019.01.08.11.29.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:29:52 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 02/12] drm: move DRM_SWITCH_POWER defines to drm_device.h Date: Tue, 8 Jan 2019 20:29:29 +0100 Message-Id: <20190108192939.15255-3-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190108192939.15255-1-sam@ravnborg.org> References: <20190108192939.15255-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 Move DRM_SWITCH_POWER out of drmP.h to allow users to get rid of the drmP include. Moved to drm_device.h because drm_device.switch_power_state is the only user. Converted to enum and added sparse kerneldoc comments. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- include/drm/drmP.h | 5 ----- include/drm/drm_device.h | 29 ++++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index db94ef00940e..9e47c8dc6b87 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -94,11 +94,6 @@ struct dma_buf_attachment; struct pci_dev; struct pci_controller; -#define DRM_SWITCH_POWER_ON 0 -#define DRM_SWITCH_POWER_OFF 1 -#define DRM_SWITCH_POWER_CHANGING 2 -#define DRM_SWITCH_POWER_DYNAMIC_OFF 3 - /* returns true if currently okay to sleep */ static inline bool drm_can_sleep(void) { diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h index 2b154ead9efc..d7cedbac66a3 100644 --- a/include/drm/drm_device.h +++ b/include/drm/drm_device.h @@ -24,6 +24,25 @@ struct inode; struct pci_dev; struct pci_controller; + +/** + * enum drm_switch_power - power state of drm device + */ + +enum switch_power_state { + /** @DRM_SWITCH_POWER_ON: Power state is ON */ + DRM_SWITCH_POWER_ON = 0, + + /** @DRM_SWITCH_POWER_OFF: Power state is OFF */ + DRM_SWITCH_POWER_OFF = 1, + + /** @DRM_SWITCH_POWER_CHANGING: Power state is changing */ + DRM_SWITCH_POWER_CHANGING = 2, + + /** @DRM_SWITCH_POWER_DYNAMIC_OFF: Suspended */ + DRM_SWITCH_POWER_DYNAMIC_OFF = 3, +}; + /** * struct drm_device - DRM device structure * @@ -291,7 +310,15 @@ struct drm_device { /** @vma_offset_manager: GEM information */ struct drm_vma_offset_manager *vma_offset_manager; - int switch_power_state; + /** + * @switch_power_state: + * + * Power state of the client. + * Used by drivers supporting the switcheroo driver. + * The state is maintained in the + * &vga_switcheroo_client_ops.set_gpu_state callback + */ + enum switch_power_state switch_power_state; /** * @fb_helper: From patchwork Tue Jan 8 19:29:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10752761 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 77A7091E for ; Tue, 8 Jan 2019 19:30:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 635AE28D05 for ; Tue, 8 Jan 2019 19:30:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5167D28D90; Tue, 8 Jan 2019 19:30:03 +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 E2D2F28D05 for ; Tue, 8 Jan 2019 19:30:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CBDD6F02C; Tue, 8 Jan 2019 19:29:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6BBD66EB86 for ; Tue, 8 Jan 2019 19:29:55 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id t9-v6so4421924ljh.6 for ; Tue, 08 Jan 2019 11:29:55 -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=UhLHqKV8ZqJzYdMYFl7lpMzt0UBk0gRoGf+aJ87pnvg=; b=p3hEeO8f3oVafI11mO00Ub0d3cHfBTeLL0Q/cxVgYN3tBub9hm1hijJXagY1/R4bon P5scI3bM+zgJ2yBEbEDHWA7VUZ5J6kaTyi/NyB1/2TWVja3nUgma45ztrxUPk+L9YZoo epVtOe2mgvMHQgWgmz9DRLHjif00YFw/qjy6JlK1h/7Yr4SNgyYzO/Eo1Xzs0hSqtVVL TCuzpnOGelZHqdNlGY6d+Ros9xPtmUbWoGPM+baPFcaszCkD9Ooy4bYLNMxAIkd9Yuuq 8o82P4jYABGTdqswM7qkQ5xqUXCgWFh+v1tEActn9akEilADeSZSUtdjB8zBmi7Cmrha tMEg== X-Gm-Message-State: AJcUukdibCFU8CSv13UGKnVb4lVAD2uTI1RuDYMl64l8VZZKIhfxDS8r pwemTryTnTlhzyX+FVftZe7ZlngtvaE= X-Google-Smtp-Source: ALg8bN4kth/slCSVVPi5BzQppB3HtGxMNfg2zzqP+dDgtVJuRfZlWzAUSvsXt5YmVDHrxEzjDhWE/w== X-Received: by 2002:a2e:908b:: with SMTP id l11-v6mr1800131ljg.150.1546975793809; Tue, 08 Jan 2019 11:29:53 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id q128-v6sm9122246ljq.14.2019.01.08.11.29.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:29:53 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 03/12] drm: make drm_framebuffer.h self contained Date: Tue, 8 Jan 2019 20:29:30 +0100 Message-Id: <20190108192939.15255-4-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190108192939.15255-1-sam@ravnborg.org> References: <20190108192939.15255-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 Add forward declaration and pull in include file to make drm_framebuffer.h self contained. While add it order include files alphabetically. The use of TASK_COMM_LEN is the reason for including sched.h. I could not see any good way to avoid this dependency, and users of drm_framebuffer.comm already use TASK_COMM_LEN to check for length etc. v2: - Added forward declaration of drm_gem_object (Noralf) - Added ack from Noralf Signed-off-by: Sam Ravnborg Acked-by: Noralf Trønnes Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- include/drm/drm_framebuffer.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h index c94acedfb08e..f0b34c977ec5 100644 --- a/include/drm/drm_framebuffer.h +++ b/include/drm/drm_framebuffer.h @@ -23,13 +23,17 @@ #ifndef __DRM_FRAMEBUFFER_H__ #define __DRM_FRAMEBUFFER_H__ -#include #include +#include +#include + #include -struct drm_framebuffer; -struct drm_file; +struct drm_clip_rect; struct drm_device; +struct drm_file; +struct drm_framebuffer; +struct drm_gem_object; /** * struct drm_framebuffer_funcs - framebuffer hooks From patchwork Tue Jan 8 19:29:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10752773 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 8819A1399 for ; Tue, 8 Jan 2019 19:30:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 781F628D9E for ; Tue, 8 Jan 2019 19:30:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C05728E6F; Tue, 8 Jan 2019 19:30:20 +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 A938128D9E for ; Tue, 8 Jan 2019 19:30:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 540736F038; Tue, 8 Jan 2019 19:30:12 +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 B38E96F006 for ; Tue, 8 Jan 2019 19:29:56 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id k15-v6so4397583ljc.8 for ; Tue, 08 Jan 2019 11:29:56 -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=10cHjW1LdR9XR6PMLJGqRMqK0MKdEg2mGiU47GHXUlA=; b=szGWlm2tW8Fo58PLuaE3DhOkzKNLwsl//mxWv+GgGifkCBQBHbh8+cClfe5tj9eVxY Guw7a1Ec92Wv1DdFbK6+PCHw5VNq3CCgWbOQQi0fw0MufC/rMiC47yEqpaWd8AcRJs6c B3CAnaqVXwQTAxmdy7Hc5iTmqqZVsqKp6GkBu1pYXpv+/dXHRzZ8N5BMfoxXjwo0txH9 4OvtZmLL9N+bHUsYaLNCBMG8h2wvH13LymTCXWc6/2RLkwFiQuXEi0G3g+p7RWfyeT4/ YFJpIhueQxuDO+o1YnpHCAIJef3JKXpiVel1peqS8I1ozjDNcpAF1xgjPaaWi9AlynZb jlgQ== X-Gm-Message-State: AJcUukdVDOyVtvzf5Oj6L3QRAO43hMqsjOSpuUFaNsKqYnY6OGVQElEe G8f/y6hq0VhZVcaeK75j1qY= X-Google-Smtp-Source: ALg8bN7QEOmjgqjrV9FK109xyU/XVO2cQ07iTh2pETTjz5WzfFML5GSQ3uIFI5iKV0GOetB5VirTGA== X-Received: by 2002:a2e:9017:: with SMTP id h23-v6mr1559349ljg.71.1546975795016; Tue, 08 Jan 2019 11:29:55 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id q128-v6sm9122246ljq.14.2019.01.08.11.29.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:29:54 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 04/12] drm: move drm_can_sleep() to drm_util.h Date: Tue, 8 Jan 2019 20:29:31 +0100 Message-Id: <20190108192939.15255-5-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190108192939.15255-1-sam@ravnborg.org> References: <20190108192939.15255-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: Tomi Valkeinen , Gerd Hoffmann , Alex Deucher , Sam Ravnborg , =?utf-8?q?Christian_K=C3=B6nig?= 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. Update comments to use kernel-doc style. Add FIXME to drm_can_sleep and add note that this function should not be used in new code Add include of drm_util.h to all users. 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 --- 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 | 42 ++++++++++++++++++++++++- 13 files changed, 56 insertions(+), 9 deletions(-) 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 a80bca1a857f..eb66bf7d3e63 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 96c2b828dba4..fa2d1d8995ee 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..8fda5777471c 100644 --- a/include/drm/drm_util.h +++ b/include/drm/drm_util.h @@ -26,7 +26,47 @@ #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 Tue Jan 8 19:29:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10752769 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 CC4781399 for ; Tue, 8 Jan 2019 19:30:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCE0628D83 for ; Tue, 8 Jan 2019 19:30:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0A8F28DF0; Tue, 8 Jan 2019 19:30:15 +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 B29C528EA1 for ; Tue, 8 Jan 2019 19:30:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A4906F034; Tue, 8 Jan 2019 19:30:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id D43A26F006 for ; Tue, 8 Jan 2019 19:29:57 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id c19-v6so4416207lja.5 for ; Tue, 08 Jan 2019 11:29:57 -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=0kVbErTVxLQ/iwOaPUKS8AqQHff1RBfk92A+KhzaWwA=; b=fZPbiDLtRLQj81XbgivB8cYvbYRp51aYj2rPXTtBgA5uWU1dr0TB0ii2aezT0MTI6h /ZNpu3lmt7IvyLhWwMsU9dbVsnLdKl6MiMAHf4753XSi/cPJaIk1t7vWWoPjnvIrc29l GS4wWZT5qjmpD8IKxLzypxbHRMsnqMLirMa8Oq4f3eIKXME4PlaFdGCBq3BqPyowVk/q tU5xsINgoMLn4uRcHEqocP2oUyIVJqSQwK3oZ96/YbSEO945lOLYrkgdCNQkJCt7Q6/Q FwWXe9mQaYOIfrqpyrIPY0DMqIdqcDJ8GeSewL1L+9mXLMkU9PRxGyO1KMrR6VP5YS7g CF6Q== X-Gm-Message-State: AJcUukd5+YFXDtFOXH8SSfmWKiohUfAg6vFk+JJklMtZkWWsn/S3xXLF l2doDvXTwSIZj/rEXfQFqbE= X-Google-Smtp-Source: ALg8bN5TRm02o0HUoxFfZ66gENM1ecngBvAvaap1geQMbBMLVFkfKSY++B2bmaUhmrrJzyg3wboEJw== X-Received: by 2002:a2e:6f11:: with SMTP id k17-v6mr1760443ljc.94.1546975796048; Tue, 08 Jan 2019 11:29:56 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id q128-v6sm9122246ljq.14.2019.01.08.11.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:29:55 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 05/12] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h Date: Tue, 8 Jan 2019 20:29:32 +0100 Message-Id: <20190108192939.15255-6-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190108192939.15255-1-sam@ravnborg.org> References: <20190108192939.15255-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 --- 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 8fda5777471c..cd1e4be1dfb3 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 Tue Jan 8 19:29:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10752763 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 7F95991E for ; Tue, 8 Jan 2019 19:30:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71EE728DB5 for ; Tue, 8 Jan 2019 19:30:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 533FE28DD8; Tue, 8 Jan 2019 19:30:05 +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 C651A28E3A for ; Tue, 8 Jan 2019 19:30:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1AEF6F006; Tue, 8 Jan 2019 19:30:00 +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 EEFA76F006 for ; Tue, 8 Jan 2019 19:29:58 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id y11so3820864lfj.4 for ; Tue, 08 Jan 2019 11:29:58 -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=rsqg6VO4Q8c9jUSGJHvew3cVal4OPEurWyEvoMbmpIE=; b=jGe+JK0zMGyjPtdMBUX5b3egHPrOtTe4V5MTWR4miSivXfMyllhkI1GskiT4vWDTzY a/f2FD512iw+sA67LAYmLaOczSMj2VtzhdflJ4DkX6CR4n5p5FCqWMNPS5L8xtRQPHZF cJh/HUkbyu2fiYOcugg/Ve5gt7Zfv+8jI5SoWmDN7RDtS4YGGdgKyl1I1Lw+ZZDtuPvK UBaa+x99WaVoJqCDLH8OMmjTOww3cfSXSoduBB/qQZ87r4SmbIlzC4fY4XpkXYrbXBVL eZY88CZoAxZPexvHqxsszAQlVspfAIhE9JKGpTB9uSZTDc3BMikvVnqKI1Inq3K/9D0/ O7DA== X-Gm-Message-State: AJcUukeRLmlSHmHHknkM+wtu/jwJretHR2slKYGuZLtVO66eF8Lijf9M dXNFdYq3Hc9cWPwpLlTLhh4= X-Google-Smtp-Source: ALg8bN50hmVl6uda0cbNwKUDtuBqSvzOmrlkAWuZUaxw09BicImmgTcEaOliMwqzlKPyW7Ch16VCNA== X-Received: by 2002:a19:660a:: with SMTP id a10mr1917175lfc.146.1546975797149; Tue, 08 Jan 2019 11:29:57 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id q128-v6sm9122246ljq.14.2019.01.08.11.29.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:29:56 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 06/12] drm: remove include of drmP.h from bridge/dw_hdmi.h Date: Tue, 8 Jan 2019 20:29:33 +0100 Message-Id: <20190108192939.15255-7-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190108192939.15255-1-sam@ravnborg.org> References: <20190108192939.15255-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: Neil Armstrong , Kieran Bingham , Fabio Estevam , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP drmP.h is an relic from the days when there was a single header file. To enable the removal of drmP.h from all users drop include of drmP.h from bridge/dw_hdmi.h. A few files relied on the file included in drmP.h - add explicit include statements or forward declarations to these files. Build tested with arm and x86. v2: - prefer forward declarations when possible (Laurent Pinchart) - sort include files (Laurent Pinchart) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Archit Taneja Cc: Andrzej Hajda Cc: David Airlie Cc: Daniel Vetter Cc: Kieran Bingham Cc: Fabio Estevam Cc: Neil Armstrong Cc: Maxime Ripard --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 4 ++++ drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c | 1 + include/drm/bridge/dw_hdmi.h | 6 ++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c index 2228689d9a5e..5cbb71a866d5 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c @@ -5,6 +5,10 @@ * Copyright (c) 2017 Renesas Solutions Corp. * Kuninori Morimoto */ + +#include +#include + #include #include diff --git a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c index 75490a3e0a2a..790d499daa10 100644 --- a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c +++ b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c @@ -7,6 +7,7 @@ * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com) */ +#include #include #include diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index 9c56412bb2cf..9f93895dde88 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -10,9 +10,11 @@ #ifndef __DW_HDMI__ #define __DW_HDMI__ -#include - +struct drm_connector; +struct drm_display_mode; +struct drm_encoder; struct dw_hdmi; +struct platform_device; /** * DOC: Supported input formats and encodings From patchwork Tue Jan 8 19:29:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10752775 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 943681399 for ; Tue, 8 Jan 2019 19:30:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8591A28DA8 for ; Tue, 8 Jan 2019 19:30:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79E1328E37; Tue, 8 Jan 2019 19:30:21 +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 311E828E6F for ; Tue, 8 Jan 2019 19:30:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 449B46F03E; Tue, 8 Jan 2019 19:30:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id AC3876F02F for ; Tue, 8 Jan 2019 19:29:59 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id n18-v6so4415746lji.7 for ; Tue, 08 Jan 2019 11:29:59 -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=S7GQPxs0t3y9zlAXIHUyGYnhNOIZDGXN8RuqBsuueiw=; b=QfeMhOCGRnSbLOaL3H8MqHIqXA5cNmLmR6/rlIXlV0tsEH+6GLda0jXHyeq22XAhaD bF3ww6KN6B7pkpf/niiiZrmun23YcOKkHjBmcYuoZRpPpIE9+2hcbBFyejGSB6A1kzRB W5JmvJPJJX+gieyK96+QmPdRoT9JG9sCRvCt87U8KV8Thf8Sofk+ohDsQG+ZA6nZfos8 71gj15UgOWLQJPpq8Am2InCrc44GIz8fDKheb973wrm79wJWIEeBXdaJdPYmJ8u8Z6Pz xuu5X0Drzqnt8noMuKzPDZ+H0D5FSsQw6kTjE6UMEB+yibw0B9TTrQB4xaKWOwZkAQnA G5EQ== X-Gm-Message-State: AJcUukf3om2FccPV8n1+NzLkT6oEQ1nO7ptp1HbKL6Oa0nUw7MPap7pf GMUxNMWcSgVFJggDu5pUjGI= X-Google-Smtp-Source: ALg8bN45yISxVeVGV0Q2ry4GyZgf9iC+eVMVl8DRMCSNume8GHSW54RwDAkchGpZpjG5SXGdKnU4ww== X-Received: by 2002:a2e:974a:: with SMTP id f10-v6mr1992077ljj.61.1546975798138; Tue, 08 Jan 2019 11:29:58 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id q128-v6sm9122246ljq.14.2019.01.08.11.29.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:29:57 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 07/12] drm: remove include of drmP.h from drm_encoder_slave.h Date: Tue, 8 Jan 2019 20:29:34 +0100 Message-Id: <20190108192939.15255-8-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190108192939.15255-1-sam@ravnborg.org> References: <20190108192939.15255-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 No further changes required. Signed-off-by: Sam Ravnborg Acked-by: Noralf Trønnes Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- include/drm/drm_encoder_slave.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/drm/drm_encoder_slave.h b/include/drm/drm_encoder_slave.h index 1107b4b1c599..a09864f6d684 100644 --- a/include/drm/drm_encoder_slave.h +++ b/include/drm/drm_encoder_slave.h @@ -27,7 +27,6 @@ #ifndef __DRM_ENCODER_SLAVE_H__ #define __DRM_ENCODER_SLAVE_H__ -#include #include #include From patchwork Tue Jan 8 19:29:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10752771 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 5FFE491E for ; Tue, 8 Jan 2019 19:30:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51A8F28E2B for ; Tue, 8 Jan 2019 19:30:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 459D128E28; Tue, 8 Jan 2019 19:30:17 +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 AEBE228DF0 for ; Tue, 8 Jan 2019 19:30:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C6AC76F035; Tue, 8 Jan 2019 19:30:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id E80556F024 for ; Tue, 8 Jan 2019 19:30:00 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id x85-v6so4432973ljb.2 for ; Tue, 08 Jan 2019 11:30:00 -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=4E+CRC/Vb1YBvB774DuOXRpJUYqdKQe5t91V4N0keqM=; b=f7xxrjJ+btGJu4DtS7UU9Z0KNkakSUlQYjgob67W2Px+JrF5PZsJ1Pae/sGC+KtspH pHrJQH9AxF+oCdkB1k8UD+qnM+PN6mlDRyh9ZQSVBkFzNhzl+WcgfA1Qwp9nNgZv+6Gq 8zNnD0N+UgW5CStVkjwQVh/GHcCOl+Kh52Bhq4ZeSrvSJB2f99g2E9OtAdkHRYeX96T6 TM7zzrwGvnD/WZFB1GSzyXbohs8zKFLHBBnpvZqcCc/No7fBwyq6skxvXM9dBDgm67+c /T6pL7vaUJ/3cFcBOY+NmdBUuUC1hQDKlZJJ1yyIXoW3H0Dc2tXxrmJRlrr2pxE5X8rl hECQ== X-Gm-Message-State: AJcUukdb69SfY75TGByqO5IpRuRB6xIp/IUh0Kh8gd/KNjcFoGpZabjy nkBkgy9ybSIMtaXTy3rn7DM= X-Google-Smtp-Source: ALg8bN6Sz9ejynb3IjR/B/eLPLCoxIozXkiylHTiMOe9oFrcnLjg60ang+aeuPcQdTHZqIks4wNe2Q== X-Received: by 2002:a2e:990e:: with SMTP id v14-v6mr1978936lji.60.1546975799298; Tue, 08 Jan 2019 11:29:59 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id q128-v6sm9122246ljq.14.2019.01.08.11.29.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:29:58 -0800 (PST) From: Sam Ravnborg To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 08/12] drm: remove include of drmP.h from drm_modeset_helper.h Date: Tue, 8 Jan 2019 20:29:35 +0100 Message-Id: <20190108192939.15255-9-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190108192939.15255-1-sam@ravnborg.org> References: <20190108192939.15255-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: Alexey Brodkin , Kieran Bingham , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP drmP.h is an relic from the days when there was a single header file. To enable the removal of drmP.h from all users drop include of drmP.h from drm_modeset_helper.h. A few files relied on the file included in drmP.h - add explicit include statements to these files. Build tested with arm and x86. v2: - Add forward declarations to drm_modeset_helper.h (Laurent Pinchart) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Alexey Brodkin Cc: David Airlie Cc: Daniel Vetter Cc: Archit Taneja Cc: Andrzej Hajda Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: Kieran Bingham --- drivers/gpu/drm/arc/arcpgu_sim.c | 1 + drivers/gpu/drm/bridge/cdns-dsi.c | 2 ++ drivers/gpu/drm/drm_modeset_helper.c | 2 ++ drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 + include/drm/drm_modeset_helper.h | 6 +++++- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arc/arcpgu_sim.c b/drivers/gpu/drm/arc/arcpgu_sim.c index 68629e614990..3b7556f62230 100644 --- a/drivers/gpu/drm/arc/arcpgu_sim.c +++ b/drivers/gpu/drm/arc/arcpgu_sim.c @@ -14,6 +14,7 @@ * */ +#include #include #include diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c index ce9496d13986..4b73d0969468 100644 --- a/drivers/gpu/drm/bridge/cdns-dsi.c +++ b/drivers/gpu/drm/bridge/cdns-dsi.c @@ -8,11 +8,13 @@ #include #include #include +#include #include #include #include