[PATCH v1 1/1] drm/sti: drop use of drmP.h

Benjamin Gaignard benjamin.gaignard at linaro.org
Thu Jun 6 15:17:23 UTC 2019


Le mer. 5 juin 2019 à 15:48, Sam Ravnborg <sam at ravnborg.org> a écrit :
>
> Stop using the deprecated drmP.h header file.
> Replaced with relevant forwards or headers files.
> Header files sorted in all files touched.
>
> Build tested with allyesconfig, allmodconfig for a number of
> architectures.

Applied on drm-misc-next,

Thanks,
Benjamin

>
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Cc: Benjamin Gaignard <benjamin.gaignard at linaro.org>
> Cc: Vincent Abriou <vincent.abriou at st.com>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> ---
>  drivers/gpu/drm/sti/sti_awg_utils.c        |  2 ++
>  drivers/gpu/drm/sti/sti_awg_utils.h        |  2 +-
>  drivers/gpu/drm/sti/sti_compositor.c       |  5 ++++-
>  drivers/gpu/drm/sti/sti_crtc.c             |  4 +++-
>  drivers/gpu/drm/sti/sti_crtc.h             |  6 ++++--
>  drivers/gpu/drm/sti/sti_cursor.c           |  2 ++
>  drivers/gpu/drm/sti/sti_cursor.h           |  3 +++
>  drivers/gpu/drm/sti/sti_drv.c              | 11 ++++++-----
>  drivers/gpu/drm/sti/sti_drv.h              |  5 +++--
>  drivers/gpu/drm/sti/sti_dvo.c              |  3 ++-
>  drivers/gpu/drm/sti/sti_gdp.c              |  4 ++++
>  drivers/gpu/drm/sti/sti_gdp.h              |  5 +++++
>  drivers/gpu/drm/sti/sti_hda.c              |  6 +++++-
>  drivers/gpu/drm/sti/sti_hdmi.c             |  5 ++++-
>  drivers/gpu/drm/sti/sti_hdmi.h             |  4 +++-
>  drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c |  2 ++
>  drivers/gpu/drm/sti/sti_hqvdp.c            |  8 +++++++-
>  drivers/gpu/drm/sti/sti_mixer.c            |  4 ++++
>  drivers/gpu/drm/sti/sti_mixer.h            |  7 ++++++-
>  drivers/gpu/drm/sti/sti_plane.c            |  4 +++-
>  drivers/gpu/drm/sti/sti_plane.h            |  1 -
>  drivers/gpu/drm/sti/sti_tvout.c            |  6 +++++-
>  drivers/gpu/drm/sti/sti_vid.c              |  4 +++-
>  drivers/gpu/drm/sti/sti_vtg.c              |  4 +++-
>  drivers/gpu/drm/sti/sti_vtg.h              |  1 +
>  25 files changed, 85 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/sti/sti_awg_utils.c b/drivers/gpu/drm/sti/sti_awg_utils.c
> index 7c5a7830b6e8..5ff87a4a1c4c 100644
> --- a/drivers/gpu/drm/sti/sti_awg_utils.c
> +++ b/drivers/gpu/drm/sti/sti_awg_utils.c
> @@ -4,6 +4,8 @@
>   * Author: Vincent Abriou <vincent.abriou at st.com> for STMicroelectronics.
>   */
>
> +#include <drm/drm_print.h>
> +
>  #include "sti_awg_utils.h"
>
>  #define AWG_DELAY (-5)
> diff --git a/drivers/gpu/drm/sti/sti_awg_utils.h b/drivers/gpu/drm/sti/sti_awg_utils.h
> index 258a568f050b..8ddfdc049b10 100644
> --- a/drivers/gpu/drm/sti/sti_awg_utils.h
> +++ b/drivers/gpu/drm/sti/sti_awg_utils.h
> @@ -7,7 +7,7 @@
>  #ifndef _STI_AWG_UTILS_H_
>  #define _STI_AWG_UTILS_H_
>
> -#include <drm/drmP.h>
> +#include <linux/types.h>
>
>  #define AWG_MAX_INST 64
>
> diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
> index 021b8fcaa0b9..c7652584255d 100644
> --- a/drivers/gpu/drm/sti/sti_compositor.c
> +++ b/drivers/gpu/drm/sti/sti_compositor.c
> @@ -7,11 +7,14 @@
>   */
>
>  #include <linux/component.h>
> +#include <linux/io.h>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset.h>
>
> -#include <drm/drmP.h>
> +#include <drm/drm_device.h>
> +#include <drm/drm_print.h>
> +#include <drm/drm_vblank.h>
>
>  #include "sti_compositor.h"
>  #include "sti_crtc.h"
> diff --git a/drivers/gpu/drm/sti/sti_crtc.c b/drivers/gpu/drm/sti/sti_crtc.c
> index 387f0bed6c1c..dc64fbfc4e61 100644
> --- a/drivers/gpu/drm/sti/sti_crtc.c
> +++ b/drivers/gpu/drm/sti/sti_crtc.c
> @@ -8,11 +8,13 @@
>
>  #include <linux/clk.h>
>
> -#include <drm/drmP.h>
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_device.h>
>  #include <drm/drm_plane_helper.h>
> +#include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_vblank.h>
>
>  #include "sti_compositor.h"
>  #include "sti_crtc.h"
> diff --git a/drivers/gpu/drm/sti/sti_crtc.h b/drivers/gpu/drm/sti/sti_crtc.h
> index d87c488212d6..df489ab14e2b 100644
> --- a/drivers/gpu/drm/sti/sti_crtc.h
> +++ b/drivers/gpu/drm/sti/sti_crtc.h
> @@ -7,8 +7,10 @@
>  #ifndef _STI_CRTC_H_
>  #define _STI_CRTC_H_
>
> -#include <drm/drmP.h>
> -
> +struct drm_crtc;
> +struct drm_device;
> +struct drm_plane;
> +struct notifier_block;
>  struct sti_mixer;
>
>  int sti_crtc_init(struct drm_device *drm_dev, struct sti_mixer *mixer,
> diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c
> index bc908453ffb3..0bf7c332cf0b 100644
> --- a/drivers/gpu/drm/sti/sti_cursor.c
> +++ b/drivers/gpu/drm/sti/sti_cursor.c
> @@ -6,9 +6,11 @@
>   *          for STMicroelectronics.
>   */
>
> +#include <linux/dma-mapping.h>
>  #include <linux/seq_file.h>
>
>  #include <drm/drm_atomic.h>
> +#include <drm/drm_device.h>
>  #include <drm/drm_fb_cma_helper.h>
>  #include <drm/drm_gem_cma_helper.h>
>
> diff --git a/drivers/gpu/drm/sti/sti_cursor.h b/drivers/gpu/drm/sti/sti_cursor.h
> index 067feda5226c..25ebeb3f6bbc 100644
> --- a/drivers/gpu/drm/sti/sti_cursor.h
> +++ b/drivers/gpu/drm/sti/sti_cursor.h
> @@ -7,6 +7,9 @@
>  #ifndef _STI_CURSOR_H_
>  #define _STI_CURSOR_H_
>
> +struct drm_device;
> +struct device;
> +
>  struct drm_plane *sti_cursor_create(struct drm_device *drm_dev,
>                                     struct device *dev, int desc,
>                                     void __iomem *baseaddr,
> diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
> index a525fd899f68..730ab226ceb4 100644
> --- a/drivers/gpu/drm/sti/sti_drv.c
> +++ b/drivers/gpu/drm/sti/sti_drv.c
> @@ -4,25 +4,26 @@
>   * Author: Benjamin Gaignard <benjamin.gaignard at st.com> for STMicroelectronics.
>   */
>
> -#include <drm/drmP.h>
> -
>  #include <linux/component.h>
> -#include <linux/debugfs.h>
> +#include <linux/dma-mapping.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of_platform.h>
>
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.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_fb_helper.h>
> -#include <drm/drm_fb_cma_helper.h>
>  #include <drm/drm_of.h>
>  #include <drm/drm_probe_helper.h>
>
>  #include "sti_crtc.h"
>  #include "sti_drv.h"
> +#include "sti_drv.h"
>  #include "sti_plane.h"
>
>  #define DRIVER_NAME    "sti"
> diff --git a/drivers/gpu/drm/sti/sti_drv.h b/drivers/gpu/drm/sti/sti_drv.h
> index 4b41142a22e4..b5b2dd560bae 100644
> --- a/drivers/gpu/drm/sti/sti_drv.h
> +++ b/drivers/gpu/drm/sti/sti_drv.h
> @@ -7,10 +7,11 @@
>  #ifndef _STI_DRV_H_
>  #define _STI_DRV_H_
>
> -#include <drm/drmP.h>
> +#include <linux/platform_device.h>
>
> +struct drm_device;
> +struct drm_property;
>  struct sti_compositor;
> -struct sti_tvout;
>
>  /**
>   * STI drm private structure
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index b31cc2672d36..9e6d5d8b7030 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -11,9 +11,10 @@
>  #include <linux/of_gpio.h>
>  #include <linux/platform_device.h>
>
> -#include <drm/drmP.h>
>  #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_device.h>
>  #include <drm/drm_panel.h>
> +#include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
>
>  #include "sti_awg_utils.h"
> diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
> index cff7b2b5ee9e..8e926cd6a1c8 100644
> --- a/drivers/gpu/drm/sti/sti_gdp.c
> +++ b/drivers/gpu/drm/sti/sti_gdp.c
> @@ -5,10 +5,14 @@
>   *          Fabien Dessenne <fabien.dessenne at st.com>
>   *          for STMicroelectronics.
>   */
> +
> +#include <linux/dma-mapping.h>
>  #include <linux/seq_file.h>
>
>  #include <drm/drm_atomic.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 "sti_compositor.h"
> diff --git a/drivers/gpu/drm/sti/sti_gdp.h b/drivers/gpu/drm/sti/sti_gdp.h
> index d3e8ebfe2e66..deb07e34173d 100644
> --- a/drivers/gpu/drm/sti/sti_gdp.h
> +++ b/drivers/gpu/drm/sti/sti_gdp.h
> @@ -11,6 +11,11 @@
>
>  #include <linux/types.h>
>
> +#include <drm/drm_plane.h>
> +
> +struct drm_device;
> +struct device;
> +
>  struct drm_plane *sti_gdp_create(struct drm_device *drm_dev,
>                                  struct device *dev, int desc,
>                                  void __iomem *baseaddr,
> diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
> index ff9256673fc8..94e404f13234 100644
> --- a/drivers/gpu/drm/sti/sti_hda.c
> +++ b/drivers/gpu/drm/sti/sti_hda.c
> @@ -6,12 +6,16 @@
>
>  #include <linux/clk.h>
>  #include <linux/component.h>
> +#include <linux/io.h>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/seq_file.h>
>
> -#include <drm/drmP.h>
>  #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_debugfs.h>
> +#include <drm/drm_device.h>
> +#include <drm/drm_file.h>
> +#include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
>
>  /* HDformatter registers */
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
> index 6000df624980..f03d617edc4c 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.c
> +++ b/drivers/gpu/drm/sti/sti_hdmi.c
> @@ -13,9 +13,12 @@
>  #include <linux/platform_device.h>
>  #include <linux/reset.h>
>
> -#include <drm/drmP.h>
>  #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_debugfs.h>
> +#include <drm/drm_drv.h>
>  #include <drm/drm_edid.h>
> +#include <drm/drm_file.h>
> +#include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
>
>  #include <sound/hdmi-codec.h>
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.h b/drivers/gpu/drm/sti/sti_hdmi.h
> index 63a24941db3b..1f6dc90b5d83 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.h
> +++ b/drivers/gpu/drm/sti/sti_hdmi.h
> @@ -10,9 +10,11 @@
>  #include <linux/hdmi.h>
>  #include <linux/platform_device.h>
>
> -#include <drm/drmP.h>
>  #include <media/cec-notifier.h>
>
> +#include <drm/drm_modes.h>
> +#include <drm/drm_property.h>
> +
>  #define HDMI_STA           0x0010
>  #define HDMI_STA_DLL_LCK   BIT(5)
>  #define HDMI_STA_HOT_PLUG  BIT(4)
> diff --git a/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c b/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
> index 01699af6a768..d5f94dca0d32 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
> +++ b/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
> @@ -4,6 +4,8 @@
>   * Author: Vincent Abriou <vincent.abriou at st.com> for STMicroelectronics.
>   */
>
> +#include <drm/drm_print.h>
> +
>  #include "sti_hdmi_tx3g4c28phy.h"
>
>  #define HDMI_SRZ_CFG                             0x504
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index 23565f52dd71..1015abe0ce08 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -5,19 +5,25 @@
>   */
>
>  #include <linux/component.h>
> +#include <linux/delay.h>
> +#include <linux/dma-mapping.h>
>  #include <linux/firmware.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
>  #include <linux/reset.h>
>  #include <linux/seq_file.h>
>
>  #include <drm/drm_atomic.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 "sti_compositor.h"
> +#include "sti_drv.h"
>  #include "sti_hqvdp_lut.h"
>  #include "sti_plane.h"
>  #include "sti_vtg.h"
> -#include "sti_drv.h"
>
>  /* Firmware name */
>  #define HQVDP_FMW_NAME          "hqvdp-stih407.bin"
> diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
> index a4f45c74d678..c3a3e1e5fc8a 100644
> --- a/drivers/gpu/drm/sti/sti_mixer.c
> +++ b/drivers/gpu/drm/sti/sti_mixer.c
> @@ -5,8 +5,12 @@
>   *          Fabien Dessenne <fabien.dessenne at st.com>
>   *          for STMicroelectronics.
>   */
> +
> +#include <linux/moduleparam.h>
>  #include <linux/seq_file.h>
>
> +#include <drm/drm_print.h>
> +
>  #include "sti_compositor.h"
>  #include "sti_mixer.h"
>  #include "sti_vtg.h"
> diff --git a/drivers/gpu/drm/sti/sti_mixer.h b/drivers/gpu/drm/sti/sti_mixer.h
> index 4cb3cfddc03a..d9544246913a 100644
> --- a/drivers/gpu/drm/sti/sti_mixer.h
> +++ b/drivers/gpu/drm/sti/sti_mixer.h
> @@ -9,10 +9,15 @@
>  #ifndef _STI_MIXER_H_
>  #define _STI_MIXER_H_
>
> -#include <drm/drmP.h>
> +#include <drm/drm_crtc.h>
> +
> +#include <drm/drm_debugfs.h>
> +#include <drm/drm_file.h>
>
>  #include "sti_plane.h"
>
> +struct device;
> +
>  #define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
>
>  enum sti_mixer_status {
> diff --git a/drivers/gpu/drm/sti/sti_plane.c b/drivers/gpu/drm/sti/sti_plane.c
> index b48cd86e0250..3da4a46df2f2 100644
> --- a/drivers/gpu/drm/sti/sti_plane.c
> +++ b/drivers/gpu/drm/sti/sti_plane.c
> @@ -6,8 +6,10 @@
>   *          for STMicroelectronics.
>   */
>
> -#include <drm/drmP.h>
> +#include <linux/types.h>
> +
>  #include <drm/drm_fb_cma_helper.h>
> +#include <drm/drm_fourcc.h>
>  #include <drm/drm_gem_cma_helper.h>
>
>  #include "sti_compositor.h"
> diff --git a/drivers/gpu/drm/sti/sti_plane.h b/drivers/gpu/drm/sti/sti_plane.h
> index b8d7fae2a014..065ffffbfb4a 100644
> --- a/drivers/gpu/drm/sti/sti_plane.h
> +++ b/drivers/gpu/drm/sti/sti_plane.h
> @@ -7,7 +7,6 @@
>  #ifndef _STI_PLANE_H_
>  #define _STI_PLANE_H_
>
> -#include <drm/drmP.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_plane_helper.h>
>
> diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
> index c42f2fa7053c..e1b3c8cb7287 100644
> --- a/drivers/gpu/drm/sti/sti_tvout.c
> +++ b/drivers/gpu/drm/sti/sti_tvout.c
> @@ -8,14 +8,18 @@
>
>  #include <linux/clk.h>
>  #include <linux/component.h>
> +#include <linux/io.h>
>  #include <linux/module.h>
>  #include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset.h>
>  #include <linux/seq_file.h>
>
> -#include <drm/drmP.h>
>  #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_debugfs.h>
> +#include <drm/drm_device.h>
> +#include <drm/drm_file.h>
> +#include <drm/drm_print.h>
>
>  #include "sti_crtc.h"
>  #include "sti_drv.h"
> diff --git a/drivers/gpu/drm/sti/sti_vid.c b/drivers/gpu/drm/sti/sti_vid.c
> index 2aac36c95835..2d4230410464 100644
> --- a/drivers/gpu/drm/sti/sti_vid.c
> +++ b/drivers/gpu/drm/sti/sti_vid.c
> @@ -5,7 +5,9 @@
>   */
>  #include <linux/seq_file.h>
>
> -#include <drm/drmP.h>
> +#include <drm/drm_debugfs.h>
> +#include <drm/drm_file.h>
> +#include <drm/drm_print.h>
>
>  #include "sti_plane.h"
>  #include "sti_vid.h"
> diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
> index 6c421644de18..ef4009f11396 100644
> --- a/drivers/gpu/drm/sti/sti_vtg.c
> +++ b/drivers/gpu/drm/sti/sti_vtg.c
> @@ -8,11 +8,13 @@
>   */
>
>  #include <linux/module.h>
> +#include <linux/io.h>
>  #include <linux/notifier.h>
>  #include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>
> -#include <drm/drmP.h>
> +#include <drm/drm_modes.h>
> +#include <drm/drm_print.h>
>
>  #include "sti_drv.h"
>  #include "sti_vtg.h"
> diff --git a/drivers/gpu/drm/sti/sti_vtg.h b/drivers/gpu/drm/sti/sti_vtg.h
> index d177129e5bcb..46faf141b2d9 100644
> --- a/drivers/gpu/drm/sti/sti_vtg.h
> +++ b/drivers/gpu/drm/sti/sti_vtg.h
> @@ -16,6 +16,7 @@
>  #define VTG_SYNC_ID_DVO         4
>
>  struct sti_vtg;
> +struct drm_crtc;
>  struct drm_display_mode;
>  struct notifier_block;
>
> --
> 2.20.1
>


More information about the dri-devel mailing list