Skip to contentSkip to conversation

drm: minimize drmP.h dependencies

PATCH Superseded Sam Ravnborg 3 participants 21 messages Jan 8, 2019 – Jan 11, 2019

Subsystems (13)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover drm: minimize drmP.h dependencies

- drmP.h is now stripped down to include files and forward declarations.
- All header files in include/drm/ no longer include drmP.h.

The series was made on top of drm-misc-next
Build tested using arm and x86 all{yes,mod}config

The patches are trivial but touches a lot of files, so a lot of people on cc: for the individual patches.

I expect the full series to be applied to drm-misc-next

There are still ~700 uses of drmP.h so a long way ahead of us to get rid of it.

The kernel-doc parts that I authored in the following may require some extra info as I know too little about DRM to be able to write something really useful. Or at least review by someone with knowledge of DRM, but that goes for everything.

v3:
- Added Acks/Reviewed annotations (thanks!)
- Add forward of drm_gem_object to drm_framebuffer.h (Noralf)
- Drop "drm: move DRM_IF_VERSION to drm_internal.h" as it is applied to drm-misc
- Drop "drm: make drm_file.h self contained" as Jan made a similar patch that was appleid to drm-misc
- Rebased on top of drm-misc-next

v2:
- DRM_SWITCH_POWER as enum (Daniel Vetter)
- Prefer forward decalration over includes (Laurent Pinchart)
- Updated drm_device to use kerneldoc style (Daniel Vetter)
- Improved commit messages (David Lechner)
- Split up patch when removing drmP.h from drm_gem_cma_helper.h
- rebased on top of drm-misc-next
- dropped patch already applied
- added reviewed-by from Laurent Pinchart (Laurent Pinchart)
- add drm_framebuffer.h patch
- add kernel-doc comments to drm_util.h
- moved EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
- added note to drmP.h not to add new stuff and not to use in new files

Sam

Sam Ravnborg (12):
drm: drm_device.h: update comments to kernel-doc style
drm: move DRM_SWITCH_POWER defines to drm_device.h
drm: make drm_framebuffer.h self contained
drm: move drm_can_sleep() to drm_util.h
drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
drm: remove include of drmP.h from bridge/dw_hdmi.h
drm: remove include of drmP.h from drm_encoder_slave.h
drm: remove include of drmP.h from drm_modeset_helper.h drm/arc: do not reply on drmP.h from drm_gem_cma_helper.h drm/stm: do not reply on drmP.h from drm_gem_cma_helper.h drm/tinydrm: do not reply on drmP.h from drm_gem_cma_helper.h
drm: remove drmP.h from drm_gem_cma_helper.h

 drivers/gpu/drm/amd/amdgpu/atom.c                  |   2 +
 drivers/gpu/drm/arc/arcpgu_crtc.c                  |   2 +
 drivers/gpu/drm/arc/arcpgu_drv.c                   |   6 +
 drivers/gpu/drm/arc/arcpgu_sim.c                   |   1 +
 drivers/gpu/drm/ast/ast_fb.c                       |   2 +
 drivers/gpu/drm/bridge/cdns-dsi.c                  |   2 +
 .../gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c    |   4 +
 drivers/gpu/drm/cirrus/cirrus_fbdev.c              |   1 +
 drivers/gpu/drm/drm_flip_work.c                    |   1 +
 drivers/gpu/drm/drm_framebuffer.c                  |   1 +
 drivers/gpu/drm/drm_modeset_helper.c               |   2 +
 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/rcar-du/rcar_dw_hdmi.c             |   1 +
 drivers/gpu/drm/rcar-du/rcar_lvds.c                |   1 +
 drivers/gpu/drm/stm/drv.c                          |   6 +-
 drivers/gpu/drm/stm/ltdc.c                         |   9 +-
 drivers/gpu/drm/tinydrm/core/tinydrm-core.c        |   3 +
 drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c        |   3 +
 drivers/gpu/drm/tinydrm/hx8357d.c                  |   1 +
 drivers/gpu/drm/tinydrm/ili9225.c                  |   2 +
 drivers/gpu/drm/tinydrm/ili9341.c                  |   1 +
 drivers/gpu/drm/tinydrm/mi0283qt.c                 |   1 +
 drivers/gpu/drm/tinydrm/mipi-dbi.c                 |   3 +
 drivers/gpu/drm/tinydrm/repaper.c                  |   1 +
 drivers/gpu/drm/tinydrm/st7586.c                   |   1 +
 drivers/gpu/drm/tinydrm/st7735r.c                  |   1 +
 drivers/gpu/drm/vc4/vc4_drv.h                      |   1 +
 include/drm/bridge/dw_hdmi.h                       |   6 +-
 include/drm/drmP.h                                 |  24 +--
 include/drm/drm_device.h                           | 228 +++++++++++++++------
 include/drm/drm_encoder_slave.h                    |   1 -
 include/drm/drm_framebuffer.h                      |  10 +-
 include/drm/drm_gem_cma_helper.h                   |   5 +-
 include/drm/drm_modeset_helper.h                   |   6 +-
 include/drm/drm_util.h                             |  52 ++++-
 40 files changed, 304 insertions(+), 95 deletions(-)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

PATCH v3 1/12 drm: drm_device.h: update comments to kernel-doc style

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.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Jonathan Corbet <[email protected]>
---
 include/drm/drm_device.h | 199 +++++++++++++++++++++++++++++++----------------
 1 file changed, 134 insertions(+), 65 deletions(-)
include/drm/drm_device.h +134 -65
index 42411b3ea0c8..2b154ead9efc 100644
@@ -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;
 
 	/**
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

PATCH v3 2/12 drm: move DRM_SWITCH_POWER defines to drm_device.h

In reply to Sam Ravnborg

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.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 include/drm/drmP.h       |  5 -----
 include/drm/drm_device.h | 29 ++++++++++++++++++++++++++++-
 2 files changed, 28 insertions(+), 6 deletions(-)
include/drm/drmP.h +0 -5
index db94ef00940e..9e47c8dc6b87 100644
@@ -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)
 {
include/drm/drm_device.h +28 -1
index 2b154ead9efc..d7cedbac66a3 100644
@@ -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:
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

PATCH v3 3/12 drm: make drm_framebuffer.h self contained

In reply to Sam Ravnborg

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

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 include/drm/drm_framebuffer.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
include/drm/drm_framebuffer.h +7 -3
index c94acedfb08e..f0b34c977ec5 100644
@@ -23,13 +23,17 @@
 #ifndef __DRM_FRAMEBUFFER_H__
 #define __DRM_FRAMEBUFFER_H__
 
-#include <linux/list.h>
 #include <linux/ctype.h>
+#include <linux/list.h>
+#include <linux/sched.h>
+
 #include <drm/drm_mode_object.h>
 
-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
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH v3 4/12 drm: move drm_can_sleep() to drm_util.h

In reply to Sam Ravnborg

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.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Alex Deucher <[email protected]>
Cc "Christian König" <[email protected]>
Cc "David (ChunMing) Zhou" <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Rob Clark <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Eric Anholt <[email protected]>
---
 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(-)
drivers/gpu/drm/amd/amdgpu/atom.c +2 -0
index e9934de1b9cf..dd30f4e61a8c 100644
@@ -27,6 +27,8 @@
 #include <linux/slab.h>
 #include <asm/unaligned.h>
 
+#include <drm/drm_util.h>
+
 #define ATOM_DEBUG
 
 #include "atom.h"
drivers/gpu/drm/ast/ast_fb.c +2 -0
index a80bca1a857f..eb66bf7d3e63 100644
@@ -39,7 +39,9 @@
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_util.h>
 #include <drm/drm_crtc_helper.h>
+
 #include "ast_drv.h"
 
 static void ast_dirty_update(struct ast_fbdev *afbdev,
drivers/gpu/drm/cirrus/cirrus_fbdev.c +1 -0
index 4dd499c7d1ba..79fea1b8bc14 100644
@@ -10,6 +10,7 @@
  */
 #include <linux/module.h>
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 
drivers/gpu/drm/drm_flip_work.c +1 -0
index 12dea16f22a8..3da3bf5af405 100644
@@ -22,6 +22,7 @@
  */
 
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_flip_work.h>
 
 /**
drivers/gpu/drm/mgag200/mgag200_fb.c +1 -0
index 30726c9fe28c..6893934b26c0 100644
@@ -12,6 +12,7 @@
  */
 #include <linux/module.h>
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +1 -0
index 96c2b828dba4..fa2d1d8995ee 100644
@@ -16,6 +16,7 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <drm/drm_util.h>
 
 #include "mdp5_kms.h"
 #include "mdp5_smp.h"
drivers/gpu/drm/omapdrm/omap_fbdev.c +1 -0
index aee99194499f..851c59f07eb1 100644
@@ -16,6 +16,7 @@
  */
 
 #include <drm/drm_crtc.h>
+#include <drm/drm_util.h>
 #include <drm/drm_fb_helper.h>
 
 #include "omap_drv.h"
drivers/gpu/drm/qxl/qxl_cmd.c +2 -0
index dffc5093ff16..2e100f644236 100644
@@ -25,6 +25,8 @@
 
 /* QXL cmd/ring handling */
 
+#include <drm/drm_util.h>
+
 #include "qxl_drv.h"
 #include "qxl_object.h"
 
drivers/gpu/drm/radeon/atom.c +2 -0
index e55cbeee7a53..ac98ad561870 100644
@@ -27,6 +27,8 @@
 #include <linux/slab.h>
 #include <asm/unaligned.h>
 
+#include <drm/drm_util.h>
+
 #define ATOM_DEBUG
 
 #include "atom.h"
drivers/gpu/drm/radeon/radeon_legacy_encoders.c +1 -0
index 222a1fa41d7c..7e3257e8fd56 100644
@@ -24,6 +24,7 @@
  *          Alex Deucher
  */
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/radeon_drm.h>
 #include "radeon.h"
drivers/gpu/drm/vc4/vc4_drv.h +1 -0
index c24b078f0593..2c635f001c71 100644
@@ -9,6 +9,7 @@
 #include <linux/mm_types.h>
 #include <linux/reservation.h>
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_encoder.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_atomic.h>
include/drm/drmP.h +0 -8
index 9e47c8dc6b87..bc4cb3732407 100644
@@ -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
include/drm/drm_util.h +41 -1

48 lines not on this page · raw message

Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw

Re: [PATCH v3 04/12] drm: move drm_can_sleep() to drm_util.h

Quoted 202 lines · Sam Ravnborg

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.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Alex Deucher <[email protected]>
Cc "Christian König" <[email protected]>
Cc "David (ChunMing) Zhou" <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Rob Clark <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Eric Anholt <[email protected]>
---
 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(-)
drivers/gpu/drm/amd/amdgpu/atom.c +2 -0
index e9934de1b9cf..dd30f4e61a8c 100644
@@ -27,6 +27,8 @@
 #include <linux/slab.h>
 #include <asm/unaligned.h>
 
+#include <drm/drm_util.h>
+
 #define ATOM_DEBUG
 
 #include "atom.h"
drivers/gpu/drm/ast/ast_fb.c +2 -0
index a80bca1a857f..eb66bf7d3e63 100644
@@ -39,7 +39,9 @@
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_util.h>
 #include <drm/drm_crtc_helper.h>
+
 #include "ast_drv.h"
 
 static void ast_dirty_update(struct ast_fbdev *afbdev,
drivers/gpu/drm/cirrus/cirrus_fbdev.c +1 -0
index 4dd499c7d1ba..79fea1b8bc14 100644
@@ -10,6 +10,7 @@
  */
 #include <linux/module.h>
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 
drivers/gpu/drm/drm_flip_work.c +1 -0
index 12dea16f22a8..3da3bf5af405 100644
@@ -22,6 +22,7 @@
  */
 
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_flip_work.h>
 
 /**
drivers/gpu/drm/mgag200/mgag200_fb.c +1 -0
index 30726c9fe28c..6893934b26c0 100644
@@ -12,6 +12,7 @@
  */
 #include <linux/module.h>
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +1 -0
index 96c2b828dba4..fa2d1d8995ee 100644
@@ -16,6 +16,7 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <drm/drm_util.h>
 
 #include "mdp5_kms.h"
 #include "mdp5_smp.h"
drivers/gpu/drm/omapdrm/omap_fbdev.c +1 -0
index aee99194499f..851c59f07eb1 100644
@@ -16,6 +16,7 @@
  */
 
 #include <drm/drm_crtc.h>
+#include <drm/drm_util.h>
 #include <drm/drm_fb_helper.h>
 
 #include "omap_drv.h"
drivers/gpu/drm/qxl/qxl_cmd.c +2 -0
index dffc5093ff16..2e100f644236 100644
@@ -25,6 +25,8 @@
 
 /* QXL cmd/ring handling */
 
+#include <drm/drm_util.h>
+
 #include "qxl_drv.h"
 #include "qxl_object.h"
 
drivers/gpu/drm/radeon/atom.c +2 -0
index e55cbeee7a53..ac98ad561870 100644
@@ -27,6 +27,8 @@
 #include <linux/slab.h>
 #include <asm/unaligned.h>
 
+#include <drm/drm_util.h>
+
 #define ATOM_DEBUG
 
 #include "atom.h"
drivers/gpu/drm/radeon/radeon_legacy_encoders.c +1 -0
index 222a1fa41d7c..7e3257e8fd56 100644
@@ -24,6 +24,7 @@
  *          Alex Deucher
  */
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/radeon_drm.h>
 #include "radeon.h"
drivers/gpu/drm/vc4/vc4_drv.h +1 -0
index c24b078f0593..2c635f001c71 100644
@@ -9,6 +9,7 @@
 #include <linux/mm_types.h>
 #include <linux/reservation.h>
 #include <drm/drmP.h>
+#include <drm/drm_util.h>
 #include <drm/drm_encoder.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_atomic.h>
include/drm/drmP.h +0 -8
index 9e47c8dc6b87..bc4cb3732407 100644
@@ -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
include/drm/drm_util.h +0 -0
index 88abdca89baa..8fda5777471c 100644

include/drm/drm_util.h line 33

Quoted 9 lines
include/drm/drm_util.h +5 -1
@@ -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
+ */

The nice new docs here aren't included anywhere. We already have a "Misc Utilities" in drm-internals.rst, including this there under a "Utilities" subheading makes sense I think - yes I know, not the most creative name :-)

Quoted 4 lines
include/drm/drm_util.h +4 -0
+
+#include <linux/irqflags.h>
+#include <linux/preempt.h>
+#include <linux/kgdb.h>

include/drm/drm_util.h line 47

Quoted 10 lines
include/drm/drm_util.h +10 -0
+#include <linux/smp.h>
+
+/**
+ * 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)

I think the formatting of this in the html output will look off:
Double-colon plus indenting should fix that.

Merged the first 3 patches of this series thus far.

Thanks, Daniel

Quoted 28 lines
include/drm/drm_util.h +22 -0
+ *
+ * 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
Signature · 1 line
2.12.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw

PATCH v3 5/12 drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h

In reply to Sam Ravnborg

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.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 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(-)
drivers/gpu/drm/drm_framebuffer.c +1 -0
index fcaea8f50513..7abcb265a108 100644
@@ -27,6 +27,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_uapi.h>
 #include <drm/drm_print.h>
+#include <drm/drm_util.h>
 
 #include "drm_internal.h"
 #include "drm_crtc_internal.h"
include/drm/drmP.h +6 -5
index bc4cb3732407..3f5c577c9dbd 100644
@@ -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
include/drm/drm_util.h +10 -0
index 8fda5777471c..cd1e4be1dfb3 100644
@@ -37,6 +37,16 @@
 #include <linux/kgdb.h>
 #include <linux/smp.h>
 
+/*
+ * 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
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#7 lore raw

Re: [PATCH v3 05/12] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h

Quoted 4 lines · Sam Ravnborg

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.

Quoted 8 lines

Add a note to drmP.h to avoid further use of it.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>

Skipping this one for now, since it doesn't apply cleanly without patch 4. Seems like none of the later patches requires it.
-Daniel

Quoted 63 lines
---
 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(-)
drivers/gpu/drm/drm_framebuffer.c +1 -0
index fcaea8f50513..7abcb265a108 100644
@@ -27,6 +27,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_uapi.h>
 #include <drm/drm_print.h>
+#include <drm/drm_util.h>
 
 #include "drm_internal.h"
 #include "drm_crtc_internal.h"
include/drm/drmP.h +6 -5
index bc4cb3732407..3f5c577c9dbd 100644
@@ -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
include/drm/drm_util.h +10 -0
index 8fda5777471c..cd1e4be1dfb3 100644
@@ -37,6 +37,16 @@
 #include <linux/kgdb.h>
 #include <linux/smp.h>
 
+/*
+ * 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
Signature · 1 line
2.12.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#8 lore raw

PATCH v3 6/12 drm: remove include of drmP.h from bridge/dw_hdmi.h

In reply to Sam Ravnborg

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)

Cc Archit Taneja <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Kieran Bingham <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Maxime Ripard <[email protected]>
---
 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(-)
drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c +4 -0
index 2228689d9a5e..5cbb71a866d5 100644
@@ -5,6 +5,10 @@
  * Copyright (c) 2017 Renesas Solutions Corp.
  * Kuninori Morimoto <[email protected]>
  */
+
+#include <linux/dma-mapping.h>
+#include <linux/module.h>
+
 #include <drm/bridge/dw_hdmi.h>
 
 #include <sound/hdmi-codec.h>
drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c +1 -0
index 75490a3e0a2a..790d499daa10 100644
@@ -7,6 +7,7 @@
  * Contact: Laurent Pinchart ([email protected])
  */
 
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
include/drm/bridge/dw_hdmi.h +4 -2
index 9c56412bb2cf..9f93895dde88 100644
@@ -10,9 +10,11 @@
 #ifndef __DW_HDMI__
 #define __DW_HDMI__
 
-#include <drm/drmP.h>
-
+struct drm_connector;
+struct drm_display_mode;
+struct drm_encoder;
 struct dw_hdmi;
+struct platform_device;
 
 /**
  * DOC: Supported input formats and encodings
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#9 lore raw

PATCH v3 7/12 drm: remove include of drmP.h from drm_encoder_slave.h

In reply to Sam Ravnborg

No further changes required.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 include/drm/drm_encoder_slave.h | 1 -
 1 file changed, 1 deletion(-)
include/drm/drm_encoder_slave.h +0 -1
index 1107b4b1c599..a09864f6d684 100644
@@ -27,7 +27,6 @@
 #ifndef __DRM_ENCODER_SLAVE_H__
 #define __DRM_ENCODER_SLAVE_H__
 
-#include <drm/drmP.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_encoder.h>
 
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#10 lore raw

PATCH v3 8/12 drm: remove include of drmP.h from drm_modeset_helper.h

In reply to Sam Ravnborg

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)

Cc Alexey Brodkin <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Archit Taneja <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc Kieran Bingham <[email protected]>
---
 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(-)
drivers/gpu/drm/arc/arcpgu_sim.c +1 -0
index 68629e614990..3b7556f62230 100644
@@ -14,6 +14,7 @@
  *
  */
 
+#include <drm/drm_device.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_atomic_helper.h>
 
drivers/gpu/drm/bridge/cdns-dsi.c +2 -0
index ce9496d13986..4b73d0969468 100644
@@ -8,11 +8,13 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_bridge.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_mipi_dsi.h>
 #include <drm/drm_panel.h>
 #include <video/mipi_display.h>
 
 #include <linux/clk.h>
+#include <linux/interrupt.h>
 #include <linux/iopoll.h>
 #include <linux/module.h>
 #include <linux/of_address.h>
drivers/gpu/drm/drm_modeset_helper.c +2 -0
index 9150fa385bba..9bc1ef788c77 100644
@@ -23,8 +23,10 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_modeset_helper.h>
 #include <drm/drm_plane_helper.h>
+#include <drm/drm_print.h>
 
 /**
  * DOC: aux kms helpers
drivers/gpu/drm/rcar-du/rcar_lvds.c +1 -0
index 534a128a869d..8010ed702509 100644
@@ -10,6 +10,7 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/io.h>
+#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_graph.h>
include/drm/drm_modeset_helper.h +5 -1
index efa337f03129..995fd981cab0 100644
@@ -23,7 +23,11 @@
 #ifndef __DRM_KMS_HELPER_H__
 #define __DRM_KMS_HELPER_H__
 
-#include <drm/drmP.h>
+struct drm_crtc;
+struct drm_crtc_funcs;
+struct drm_device;
+struct drm_framebuffer;
+struct drm_mode_fb_cmd2;
 
 void drm_helper_move_panel_connectors_to_head(struct drm_device *);
 
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#11 lore raw

Re: [PATCH v3 08/12] drm: remove include of drmP.h from drm_modeset_helper.h

Quoted 11 lines · Sam Ravnborg

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)

Quoted 11 lines
Cc Alexey Brodkin <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Archit Taneja <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc Kieran Bingham <[email protected]>

This one here breaks tinydrm without the tinydrm patch first. I reorderd while applying. It also breaks kirin (and maybe more, I didn't check), so I've left this one out for now.
-Daniel

Quoted 85 lines
---
 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(-)
drivers/gpu/drm/arc/arcpgu_sim.c +1 -0
index 68629e614990..3b7556f62230 100644
@@ -14,6 +14,7 @@
  *
  */
 
+#include <drm/drm_device.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_atomic_helper.h>
 
drivers/gpu/drm/bridge/cdns-dsi.c +2 -0
index ce9496d13986..4b73d0969468 100644
@@ -8,11 +8,13 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_bridge.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_mipi_dsi.h>
 #include <drm/drm_panel.h>
 #include <video/mipi_display.h>
 
 #include <linux/clk.h>
+#include <linux/interrupt.h>
 #include <linux/iopoll.h>
 #include <linux/module.h>
 #include <linux/of_address.h>
drivers/gpu/drm/drm_modeset_helper.c +2 -0
index 9150fa385bba..9bc1ef788c77 100644
@@ -23,8 +23,10 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_modeset_helper.h>
 #include <drm/drm_plane_helper.h>
+#include <drm/drm_print.h>
 
 /**
  * DOC: aux kms helpers
drivers/gpu/drm/rcar-du/rcar_lvds.c +1 -0
index 534a128a869d..8010ed702509 100644
@@ -10,6 +10,7 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/io.h>
+#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_graph.h>
include/drm/drm_modeset_helper.h +5 -1
index efa337f03129..995fd981cab0 100644
@@ -23,7 +23,11 @@
 #ifndef __DRM_KMS_HELPER_H__
 #define __DRM_KMS_HELPER_H__
 
-#include <drm/drmP.h>
+struct drm_crtc;
+struct drm_crtc_funcs;
+struct drm_device;
+struct drm_framebuffer;
+struct drm_mode_fb_cmd2;
 
 void drm_helper_move_panel_connectors_to_head(struct drm_device *);
 
Signature · 1 line
2.12.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#12 lore raw

Re: [PATCH v3 08/12] drm: remove include of drmP.h from drm_modeset_helper.h

Quoted 24 lines · Daniel Vetter
Quoted 11 lines · Sam Ravnborg

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)

Quoted 11 lines
Cc Alexey Brodkin <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Archit Taneja <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc Kieran Bingham <[email protected]>
Quoted 3 lines

This one here breaks tinydrm without the tinydrm patch first. I reorderd while applying. It also breaks kirin (and maybe more, I didn't check), so I've left this one out for now.

Note that I've just fixed up a large pile of these in i915 because I've been rebasing a patch that removes lots of drm_modeset_helper.h includes.

Getting this all merged will be fun :-/
-Daniel

Quoted 92 lines

-Daniel

Quoted 85 lines
---
 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(-)
drivers/gpu/drm/arc/arcpgu_sim.c +1 -0
index 68629e614990..3b7556f62230 100644
@@ -14,6 +14,7 @@
  *
  */
 
+#include <drm/drm_device.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_atomic_helper.h>
 
drivers/gpu/drm/bridge/cdns-dsi.c +2 -0
index ce9496d13986..4b73d0969468 100644
@@ -8,11 +8,13 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_bridge.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_mipi_dsi.h>
 #include <drm/drm_panel.h>
 #include <video/mipi_display.h>
 
 #include <linux/clk.h>
+#include <linux/interrupt.h>
 #include <linux/iopoll.h>
 #include <linux/module.h>
 #include <linux/of_address.h>
drivers/gpu/drm/drm_modeset_helper.c +2 -0
index 9150fa385bba..9bc1ef788c77 100644
@@ -23,8 +23,10 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_modeset_helper.h>
 #include <drm/drm_plane_helper.h>
+#include <drm/drm_print.h>
 
 /**
  * DOC: aux kms helpers
drivers/gpu/drm/rcar-du/rcar_lvds.c +1 -0
index 534a128a869d..8010ed702509 100644
@@ -10,6 +10,7 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/io.h>
+#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_graph.h>
include/drm/drm_modeset_helper.h +5 -1
index efa337f03129..995fd981cab0 100644
@@ -23,7 +23,11 @@
 #ifndef __DRM_KMS_HELPER_H__
 #define __DRM_KMS_HELPER_H__
 
-#include <drm/drmP.h>
+struct drm_crtc;
+struct drm_crtc_funcs;
+struct drm_device;
+struct drm_framebuffer;
+struct drm_mode_fb_cmd2;
 
 void drm_helper_move_panel_connectors_to_head(struct drm_device *);
 
Signature · 1 line
2.12.0
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#13 lore raw

PATCH v3 9/12 drm/arc: do not reply on drmP.h from drm_gem_cma_helper.h

In reply to Sam Ravnborg

drmP.h was the only header file in the past and a lot of files rely on that drmP.h defines everything. The goal is to one day to delete drmP.h and
as a step towards this it will no longer be included in the headers files in include/drm/

To prepare arc/ for this add dependencies that othwewise was pulled in by drmP.h from drm_gem_cma_helper.h

---
 drivers/gpu/drm/arc/arcpgu_crtc.c | 2 ++
 drivers/gpu/drm/arc/arcpgu_drv.c  | 6 ++++++
 2 files changed, 8 insertions(+)
drivers/gpu/drm/arc/arcpgu_crtc.c +2 -0
index 62f51f70606d..155ab177ce0b 100644
@@ -16,8 +16,10 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_device.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
+#include <drm/drm_vblank.h>
 #include <drm/drm_plane_helper.h>
 #include <linux/clk.h>
 #include <linux/platform_data/simplefb.h>
drivers/gpu/drm/arc/arcpgu_drv.c +6 -0
index 206a76abf771..39a79f5718c4 100644
@@ -16,12 +16,18 @@
 
 #include <linux/clk.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_device.h>
+#include <drm/drm_debugfs.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_atomic_helper.h>
+#include <linux/dma-mapping.h>
+#include <linux/module.h>
 #include <linux/of_reserved_mem.h>
+#include <linux/platform_device.h>
 
 #include "arcpgu.h"
 #include "arcpgu_regs.h"
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#14 lore raw

PATCH v3 10/12 drm/stm: do not reply on drmP.h from drm_gem_cma_helper.h

In reply to Sam Ravnborg

drmP.h was the only header file in the past and a lot of files rely on that drmP.h defines everything. The goal is to one day to delete drmP.h and
as a step towards this it will no longer be included in the headers files in include/drm/

To prepare stm/ for this add dependencies that othwewise was pulled in by drmP.h from drm_gem_cma_helper.h

Sort the include list when we anyway modify it.

---
 drivers/gpu/drm/stm/drv.c  | 6 +++++-
 drivers/gpu/drm/stm/ltdc.c | 9 ++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/stm/drv.c +5 -1
index 8dec001b9d37..9cd6228a18ad 100644
@@ -9,15 +9,19 @@
  */
 
 #include <linux/component.h>
+#include <linux/dma-mapping.h>
+#include <linux/module.h>
 #include <linux/of_platform.h>
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
-#include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
+#include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_vblank.h>
 
 #include "ltdc.h"
 
drivers/gpu/drm/stm/ltdc.c +8 -1
index 61dd661aa0ac..5cce6c7f35d4 100644
@@ -10,17 +10,24 @@
 
 #include <linux/clk.h>
 #include <linux/component.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/of_graph.h>
+#include <linux/platform_device.h>
 #include <linux/reset.h>
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_bridge.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_device.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_of.h>
-#include <drm/drm_bridge.h>
+#include <drm/drm_vblank.h>
 #include <drm/drm_plane_helper.h>
 
 #include <video/videomode.h>
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#15 lore raw

Re: [PATCH v3 10/12] drm/stm: do not reply on drmP.h from drm_gem_cma_helper.h

Le mar. 8 janv. 2019 à 20:30, Sam Ravnborg <[email protected]> a écrit :
I just notice the a typo in the title of the commit message reply ->rely ?

Quoted 87 lines

drmP.h was the only header file in the past and a lot of files rely on that drmP.h defines everything. The goal is to one day to delete drmP.h and
as a step towards this it will no longer be included in the headers files in include/drm/

To prepare stm/ for this add dependencies that othwewise was pulled in by drmP.h from drm_gem_cma_helper.h

Sort the include list when we anyway modify it.

---
 drivers/gpu/drm/stm/drv.c  | 6 +++++-
 drivers/gpu/drm/stm/ltdc.c | 9 ++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/stm/drv.c +5 -1
index 8dec001b9d37..9cd6228a18ad 100644
@@ -9,15 +9,19 @@
  */
 
 #include <linux/component.h>
+#include <linux/dma-mapping.h>
+#include <linux/module.h>
 #include <linux/of_platform.h>
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
-#include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
+#include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_vblank.h>
 
 #include "ltdc.h"
 
drivers/gpu/drm/stm/ltdc.c +8 -2
index 61dd661aa0ac..5cce6c7f35d4 100644
@@ -10,17 +10,24 @@
 
 #include <linux/clk.h>
 #include <linux/component.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/of_graph.h>
+#include <linux/platform_device.h>
 #include <linux/reset.h>
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_bridge.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_device.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_of.h>
-#include <drm/drm_bridge.h>
+#include <drm/drm_vblank.h>
 #include <drm/drm_plane_helper.h>
 
 #include <video/videomode.h>
--

2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#16 lore raw

Re: [PATCH v3 10/12] drm/stm: do not reply on drmP.h from drm_gem_cma_helper.h

Hi Benjamin.

Quoted 2 lines · Benjamin Gaignard

Le mar. 8 janv. 2019 à 20:30, Sam Ravnborg <[email protected]> a écrit :
I just notice the a typo in the title of the commit message reply ->rely ?

Randy already told me this, but I missed that in the update.

Will fix in v4 if this set do not get applied.

Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw

PATCH v3 11/12 drm/tinydrm: do not reply on drmP.h from drm_gem_cma_helper.h

In reply to Sam Ravnborg

drmP.h was the only header file in the past and a lot of files rely on that drmP.h defines everything. The goal is to one day to delete drmP.h and
as a step towards this it will no longer be included in the headers files in include/drm/

To prepare tinydrm/ for this add dependencies that othwewise was pulled in by drmP.h from drm_gem_cma_helper.h

To avoid that tinydrm.h became "include everything", push include files to the individual drivers.

---
 drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 3 +++
 drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 3 +++
 drivers/gpu/drm/tinydrm/hx8357d.c           | 1 +
 drivers/gpu/drm/tinydrm/ili9225.c           | 2 ++
 drivers/gpu/drm/tinydrm/ili9341.c           | 1 +
 drivers/gpu/drm/tinydrm/mi0283qt.c          | 1 +
 drivers/gpu/drm/tinydrm/mipi-dbi.c          | 3 +++
 drivers/gpu/drm/tinydrm/repaper.c           | 1 +
 drivers/gpu/drm/tinydrm/st7586.c            | 1 +
 drivers/gpu/drm/tinydrm/st7735r.c           | 1 +
 10 files changed, 17 insertions(+)
drivers/gpu/drm/tinydrm/core/tinydrm-core.c +3 -0
index 01a6f2d42440..aeb93eadb047 100644
@@ -10,11 +10,14 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
+#include <drm/drm_print.h>
 #include <drm/tinydrm/tinydrm.h>
 #include <linux/device.h>
 #include <linux/dma-buf.h>
+#include <linux/module.h>
 
 /**
  * DOC: overview
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +3 -0
index eacfc0ec8ff1..d4576d6e8ce4 100644
@@ -9,8 +9,11 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_modes.h>
+#include <drm/drm_print.h>
+#include <drm/drm_vblank.h>
 #include <drm/tinydrm/tinydrm.h>
 
 struct tinydrm_connector {
drivers/gpu/drm/tinydrm/hx8357d.c +1 -0
index 81a2bbeb25d4..3ae11aa4b73b 100644
@@ -16,6 +16,7 @@
 #include <linux/property.h>
 #include <linux/spi/spi.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_modeset_helper.h>
drivers/gpu/drm/tinydrm/ili9225.c +2 -0
index 78f7c2d1b449..b0ad58b97227 100644
@@ -20,7 +20,9 @@
 #include <linux/spi/spi.h>
 #include <video/mipi_display.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/tinydrm/mipi-dbi.h>
drivers/gpu/drm/tinydrm/ili9341.c +1 -0
index 51395bdc6ca2..bcdf10906ade 100644
@@ -15,6 +15,7 @@
 #include <linux/property.h>
 #include <linux/spi/spi.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_modeset_helper.h>
drivers/gpu/drm/tinydrm/mi0283qt.c +1 -0
index 3fa62e77c30b..97805ca37a04 100644
@@ -17,6 +17,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/spi/spi.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_modeset_helper.h>
drivers/gpu/drm/tinydrm/mipi-dbi.c +3 -0
index 3a05e56f9b0d..10294e1283dd 100644
@@ -10,14 +10,17 @@
  */
 
 #include <linux/debugfs.h>
+#include <linux/delay.h>
 #include <linux/dma-buf.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/regulator/consumer.h>
 #include <linux/spi/spi.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/tinydrm/mipi-dbi.h>
 #include <drm/tinydrm/tinydrm-helpers.h>
drivers/gpu/drm/tinydrm/repaper.c +1 -0
index 54d6fe0f37ce..b2a8f894946a 100644
@@ -26,6 +26,7 @@
 #include <linux/spi/spi.h>
 #include <linux/thermal.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/tinydrm/st7586.c +1 -0
index a6a8a1081b73..bf518167760a 100644
@@ -17,6 +17,7 @@
 #include <linux/spi/spi.h>
 #include <video/mipi_display.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/tinydrm/st7735r.c +1 -0
index b39779e0dcd8..9bc93d5a0401 100644
@@ -14,6 +14,7 @@
 #include <linux/spi/spi.h>
 #include <video/mipi_display.h>
 
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/tinydrm/mipi-dbi.h>
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#18 lore raw

PATCH v3 12/12 drm: remove drmP.h from drm_gem_cma_helper.h

In reply to Sam Ravnborg

With all dependencies fixed we can now remove drmP.h from drm_gem_cma_helper.h.
It is replaced by the include files required,
or forward declarations as appropritate.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 include/drm/drm_gem_cma_helper.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/drm/drm_gem_cma_helper.h +4 -1
index 07c504940ba1..947ac95eb24a 100644
@@ -2,9 +2,12 @@
 #ifndef __DRM_GEM_CMA_HELPER_H__
 #define __DRM_GEM_CMA_HELPER_H__
 
-#include <drm/drmP.h>
+#include <drm/drm_file.h>
+#include <drm/drm_ioctl.h>
 #include <drm/drm_gem.h>
 
+struct drm_mode_create_dumb;
+
 /**
  * struct drm_gem_cma_object - GEM object backed by CMA memory allocations
  * @base: base GEM object
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#19 lore raw

Re: [PATCH v3 12/12] drm: remove drmP.h from drm_gem_cma_helper.h

Quoted 5 lines · Sam Ravnborg

With all dependencies fixed we can now remove drmP.h from drm_gem_cma_helper.h.
It is replaced by the include files required,
or forward declarations as appropritate.

Quoted 7 lines
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>

Except for the ones I commented on, all patches applied. I also fixed the one typo in the summary.

Thanks, Daniel

Quoted 25 lines
---
 include/drm/drm_gem_cma_helper.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/drm/drm_gem_cma_helper.h +4 -1
index 07c504940ba1..947ac95eb24a 100644
@@ -2,9 +2,12 @@
 #ifndef __DRM_GEM_CMA_HELPER_H__
 #define __DRM_GEM_CMA_HELPER_H__
 
-#include <drm/drmP.h>
+#include <drm/drm_file.h>
+#include <drm/drm_ioctl.h>
 #include <drm/drm_gem.h>
 
+struct drm_mode_create_dumb;
+
 /**
  * struct drm_gem_cma_object - GEM object backed by CMA memory allocations
  * @base: base GEM object
Signature · 1 line
2.12.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#20 lore raw

Re: [PATCH v3 12/12] drm: remove drmP.h from drm_gem_cma_helper.h

Quoted 14 lines · Daniel Vetter
Quoted 5 lines · Sam Ravnborg

With all dependencies fixed we can now remove drmP.h from drm_gem_cma_helper.h.
It is replaced by the include files required,
or forward declarations as appropritate.

Quoted 7 lines
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Quoted 2 lines

Except for the ones I commented on, all patches applied. I also fixed the one typo in the summary.

Thanks, I will rebase, address comments, do a new set of build tests etc. and repost.

Sam