diff mbox series

[84/86] drm/drm_atomic_helper: Minimize include footprint

Message ID 20230113-drm-include-v1-v1-84-c5cf72d8a5a2@ravnborg.org (mailing list archive)
State New, archived
Headers show
Series drm: Header file maintenance | expand

Commit Message

Sam Ravnborg via B4 Relay Jan. 21, 2023, 8:09 p.m. UTC
From: Sam Ravnborg <sam@ravnborg.org>

Reduce drm_atomic_helper.h to include or forward the minimal set of
files/symbols - to minimize the impact of the files that includes this
header file.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 include/drm/drm_atomic_helper.h | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

Comments

Thomas Zimmermann Jan. 23, 2023, 7:59 a.m. UTC | #1
Hi,

in the subject line, I'd use 'dependencies' instead of 'footprint'. Your 
choice.

Am 21.01.23 um 21:09 schrieb Sam Ravnborg via B4 Submission Endpoint:
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> Reduce drm_atomic_helper.h to include or forward the minimal set of
> files/symbols - to minimize the impact of the files that includes this
> header file.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>   include/drm/drm_atomic_helper.h | 21 ++++++++++++++-------
>   1 file changed, 14 insertions(+), 7 deletions(-)
> 
> diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
> index 33f982cd1a27..c7f2bc46bd24 100644
> --- a/include/drm/drm_atomic_helper.h
> +++ b/include/drm/drm_atomic_helper.h
> @@ -28,11 +28,9 @@
>   #ifndef DRM_ATOMIC_HELPER_H_
>   #define DRM_ATOMIC_HELPER_H_
>   
> -#include <drm/drm_crtc.h>
> -#include <drm/drm_modeset_helper_vtables.h>
> -#include <drm/drm_modeset_helper.h>
> -#include <drm/drm_atomic_state_helper.h>
> -#include <drm/drm_util.h>
> +#include <linux/types.h>
> +
> +#include <drm/drm_plane.h>
>   
>   /*
>    * Drivers that don't allow primary plane scaling may pass this macro in place
> @@ -44,8 +42,17 @@
>   #define DRM_PLANE_NO_SCALING (1<<16)
>   
>   struct drm_atomic_state;
> -struct drm_private_obj;
> -struct drm_private_state;
> +struct drm_bridge;
> +struct drm_bridge_state;
> +struct drm_connector_state;
> +struct drm_crtc_state;
> +struct drm_device;
> +struct drm_encoder;
> +struct drm_framebuffer;
> +struct drm_mode_set;
> +struct drm_modeset_acquire_ctx;
> +struct drm_pending_vblank_event;
> +

No extra newline here.

>   
>   int drm_atomic_helper_check_modeset(struct drm_device *dev,
>   				struct drm_atomic_state *state);
>
diff mbox series

Patch

diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index 33f982cd1a27..c7f2bc46bd24 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -28,11 +28,9 @@ 
 #ifndef DRM_ATOMIC_HELPER_H_
 #define DRM_ATOMIC_HELPER_H_
 
-#include <drm/drm_crtc.h>
-#include <drm/drm_modeset_helper_vtables.h>
-#include <drm/drm_modeset_helper.h>
-#include <drm/drm_atomic_state_helper.h>
-#include <drm/drm_util.h>
+#include <linux/types.h>
+
+#include <drm/drm_plane.h>
 
 /*
  * Drivers that don't allow primary plane scaling may pass this macro in place
@@ -44,8 +42,17 @@ 
 #define DRM_PLANE_NO_SCALING (1<<16)
 
 struct drm_atomic_state;
-struct drm_private_obj;
-struct drm_private_state;
+struct drm_bridge;
+struct drm_bridge_state;
+struct drm_connector_state;
+struct drm_crtc_state;
+struct drm_device;
+struct drm_encoder;
+struct drm_framebuffer;
+struct drm_mode_set;
+struct drm_modeset_acquire_ctx;
+struct drm_pending_vblank_event;
+
 
 int drm_atomic_helper_check_modeset(struct drm_device *dev,
 				struct drm_atomic_state *state);