[PATCH 03/22] drm/amdgpu: Remove unnecessary include statements for drm_crtc_helper.h
Sam Ravnborg
sam at ravnborg.org
Tue Jan 17 07:18:20 AEDT 2023
On Mon, Jan 16, 2023 at 02:12:16PM +0100, Thomas Zimmermann wrote:
> Several source files include drm_crtc_helper.h without needing it or
> only to get its transitive include statements; leading to unnecessary
> compile-time dependencies.
>
> Directly include required headers and drop drm_crtc_helper.h where
> possible.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 ++
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | 1 -
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 -
> drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 -
> drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 1 -
> drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 1 -
> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 ++
> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 ++
> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 ++
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 ++
> 12 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> index 2ebbc6382a06..3c962d0214cc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> @@ -25,7 +25,9 @@
> */
>
> #include <drm/display/drm_dp_helper.h>
> +#include <drm/drm_crtc_helper.h>
> #include <drm/drm_edid.h>
> +#include <drm/drm_modeset_helper_vtables.h>
> #include <drm/drm_probe_helper.h>
> #include <drm/amdgpu_drm.h>
> #include "amdgpu.h"
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 0993ee91fe18..63122482208d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -39,6 +39,7 @@
> #include <drm/drm_aperture.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_fb_helper.h>
> +#include <drm/drm_crtc_helper.h>
Move it one line up to keep the sorting.
With this fixed:
Reviewed-by: Sam Ravnborg <sam at ravnborg.org>
> #include <drm/drm_probe_helper.h>
> #include <drm/amdgpu_drm.h>
> #include <linux/vgaarb.h>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> index b22471b3bd63..c5b98e9a69e9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> @@ -42,6 +42,7 @@
> #include <drm/drm_fb_helper.h>
> #include <drm/drm_gem_framebuffer_helper.h>
> #include <drm/drm_fourcc.h>
> +#include <drm/drm_modeset_helper.h>
> #include <drm/drm_vblank.h>
>
> /**
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
> index c96e458ed088..27a782a9dc72 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
> @@ -24,7 +24,6 @@
> * Alex Deucher
> */
>
> -#include <drm/drm_crtc_helper.h>
> #include <drm/amdgpu_drm.h>
> #include "amdgpu.h"
> #include "amdgpu_connectors.h"
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index a6aef488a822..d0a1cc88832c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -45,7 +45,6 @@
> #include <linux/irq.h>
> #include <linux/pci.h>
>
> -#include <drm/drm_crtc_helper.h>
> #include <drm/drm_vblank.h>
> #include <drm/amdgpu_drm.h>
> #include <drm/drm_drv.h>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> index 8a39300b1a84..cf4b6e8d7d1e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> @@ -35,7 +35,6 @@
> #include <drm/drm_edid.h>
> #include <drm/drm_encoder.h>
> #include <drm/drm_fixed.h>
> -#include <drm/drm_crtc_helper.h>
> #include <drm/drm_framebuffer.h>
> #include <drm/drm_probe_helper.h>
> #include <linux/i2c.h>
> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c b/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
> index afad094f84c2..10098fdd33fc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
> @@ -24,7 +24,6 @@
> * Alex Deucher
> */
>
> -#include <drm/drm_crtc_helper.h>
> #include <drm/amdgpu_drm.h>
> #include <drm/drm_fixed.h>
> #include "amdgpu.h"
> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> index 18ae9433e463..d95b2dc78063 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> @@ -28,7 +28,6 @@
>
> #include <acpi/video.h>
>
> -#include <drm/drm_crtc_helper.h>
> #include <drm/amdgpu_drm.h>
> #include "amdgpu.h"
> #include "amdgpu_connectors.h"
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> index a2452fc304c5..01d1e2a631be 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> @@ -22,6 +22,8 @@
> */
>
> #include <drm/drm_fourcc.h>
> +#include <drm/drm_modeset_helper.h>
> +#include <drm/drm_modeset_helper_vtables.h>
> #include <drm/drm_vblank.h>
>
> #include "amdgpu.h"
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index 6ac680c4c6e2..973abe989ebe 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -22,6 +22,8 @@
> */
>
> #include <drm/drm_fourcc.h>
> +#include <drm/drm_modeset_helper.h>
> +#include <drm/drm_modeset_helper_vtables.h>
> #include <drm/drm_vblank.h>
>
> #include "amdgpu.h"
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> index 354ae09cc9a2..86e95b1c9d0e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> @@ -24,6 +24,8 @@
> #include <linux/pci.h>
>
> #include <drm/drm_fourcc.h>
> +#include <drm/drm_modeset_helper.h>
> +#include <drm/drm_modeset_helper_vtables.h>
> #include <drm/drm_vblank.h>
>
> #include "amdgpu.h"
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index 33977b0ba19d..f81f1d5d3e8a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -22,6 +22,8 @@
> */
>
> #include <drm/drm_fourcc.h>
> +#include <drm/drm_modeset_helper.h>
> +#include <drm/drm_modeset_helper_vtables.h>
> #include <drm/drm_vblank.h>
>
> #include "amdgpu.h"
> --
> 2.39.0
More information about the Linux-aspeed
mailing list