[PATCH v2 2/2] drm/bridge: drop drmP.h usage
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sun May 19 21:22:35 UTC 2019
Hi Sam,
Thank you for the patch.
On Sun, May 19, 2019 at 08:36:36PM +0200, Sam Ravnborg wrote:
> Drop use of the deprecated drmP.h header file.
>
> While touching the list of include files:
> - Divide include files in blocks of linux/* drm/* etc.
> - Sort individual blocks of include files
> - Remove duplicated header file
>
> v2:
> - Be consistent in the order of the include blocks (Laurent)
>
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Cc: Andrzej Hajda <a.hajda at samsung.com>
> Cc: Laurent Pinchart <Laurent.pinchart at ideasonboard.com>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: Peter Senna Tschudin <peter.senna at gmail.com>
> Cc: Martin Donnelly <martin.donnelly at ge.com>
> Cc: Martyn Welch <martyn.welch at collabora.co.uk>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
By the way, on a side note, I came across a neat trick recently to help
making headers self-contained. By including the header related to a C
file as the very first header, the compiler will throw an error if the
header is not self-contained. It would be a bit of an intrusive change
in DRM, but maybe something to keep in mind.
> ---
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 8 +++---
> drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 +++---
> .../drm/bridge/analogix/analogix_dp_core.c | 18 ++++++-------
> drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +-
> drivers/gpu/drm/bridge/lvds-encoder.c | 10 ++++---
> .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 3 ++-
> drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 ++-
> drivers/gpu/drm/bridge/panel.c | 5 ++--
> drivers/gpu/drm/bridge/parade-ps8622.c | 3 ++-
> drivers/gpu/drm/bridge/sii902x.c | 3 ++-
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 27 ++++++++++---------
> drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 9 ++++---
> drivers/gpu/drm/bridge/tc358764.c | 14 ++++++----
> drivers/gpu/drm/bridge/thc63lvd1024.c | 10 ++++---
> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 18 +++++++------
> drivers/gpu/drm/bridge/ti-tfp410.c | 4 +--
> 16 files changed, 81 insertions(+), 64 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index ec2ca71e1323..6d5a40aa52aa 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -6,21 +6,21 @@
> * Licensed under the GPL-2.
> */
>
> +#include <linux/clk.h>
> #include <linux/device.h>
> #include <linux/gpio/consumer.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
> #include <linux/slab.h>
> -#include <linux/clk.h>
>
> -#include <drm/drmP.h>
> +#include <media/cec.h>
> +
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_edid.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
>
> -#include <media/cec.h>
> -
> #include "adv7511.h"
>
> /* ADI recommended values for proper operation. */
> diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix-anx78xx.c
> index c09aaf93ae1b..479ce3642a79 100644
> --- a/drivers/gpu/drm/bridge/analogix-anx78xx.c
> +++ b/drivers/gpu/drm/bridge/analogix-anx78xx.c
> @@ -16,23 +16,23 @@
> */
> #include <linux/delay.h>
> #include <linux/err.h>
> -#include <linux/interrupt.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/i2c.h>
> +#include <linux/interrupt.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/of_gpio.h>
> #include <linux/of_irq.h>
> #include <linux/of_platform.h>
> #include <linux/regmap.h>
> -#include <linux/types.h>
> -#include <linux/gpio/consumer.h>
> #include <linux/regulator/consumer.h>
> +#include <linux/types.h>
>
> -#include <drm/drmP.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_dp_helper.h>
> #include <drm/drm_edid.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
>
> #include "analogix-anx78xx.h"
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 225f5e5dd69b..53b1393c3dd2 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -10,27 +10,27 @@
> * option) any later version.
> */
>
> -#include <linux/module.h>
> -#include <linux/platform_device.h>
> -#include <linux/err.h>
> #include <linux/clk.h>
> +#include <linux/component.h>
> +#include <linux/err.h>
> +#include <linux/gpio.h>
> +#include <linux/interrupt.h>
> #include <linux/io.h>
> #include <linux/iopoll.h>
> -#include <linux/interrupt.h>
> +#include <linux/module.h>
> #include <linux/of.h>
> #include <linux/of_gpio.h>
> -#include <linux/gpio.h>
> -#include <linux/component.h>
> #include <linux/phy/phy.h>
> +#include <linux/platform_device.h>
>
> -#include <drm/drmP.h>
> +#include <drm/bridge/analogix_dp.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc.h>
> +#include <drm/drm_device.h>
> #include <drm/drm_panel.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
>
> -#include <drm/bridge/analogix_dp.h>
> -
> #include "analogix_dp_core.h"
> #include "analogix_dp_reg.h"
>
> diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c
> index e64736c39a9f..1a3800a58aaf 100644
> --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c
> +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c
> @@ -15,9 +15,9 @@
> #include <linux/of_graph.h>
> #include <linux/regulator/consumer.h>
>
> -#include <drm/drmP.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
>
> struct dumb_vga {
> diff --git a/drivers/gpu/drm/bridge/lvds-encoder.c b/drivers/gpu/drm/bridge/lvds-encoder.c
> index ae8fc597eb38..6eaaa76970b1 100644
> --- a/drivers/gpu/drm/bridge/lvds-encoder.c
> +++ b/drivers/gpu/drm/bridge/lvds-encoder.c
> @@ -7,12 +7,14 @@
> * the License, or (at your option) any later version.
> */
>
> -#include <drm/drmP.h>
> -#include <drm/drm_bridge.h>
> -#include <drm/drm_panel.h>
> -
> #include <linux/gpio/consumer.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/of_graph.h>
> +#include <linux/platform_device.h>
> +
> +#include <drm/drm_bridge.h>
> +#include <drm/drm_panel.h>
>
> struct lvds_encoder {
> struct drm_bridge bridge;
> diff --git a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
> index a01028ec4de6..1644d281558a 100644
> --- a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
> +++ b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
> @@ -34,11 +34,12 @@
> #include <linux/i2c.h>
> #include <linux/module.h>
> #include <linux/of.h>
> +
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_edid.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
> -#include <drm/drmP.h>
>
> #define EDID_EXT_BLOCK_CNT 0x7E
>
> diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c
> index fb335afea4cf..3f4d4aef19e1 100644
> --- a/drivers/gpu/drm/bridge/nxp-ptn3460.c
> +++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c
> @@ -20,13 +20,14 @@
> #include <linux/module.h>
> #include <linux/of.h>
> #include <linux/of_gpio.h>
> +
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_edid.h>
> #include <drm/drm_of.h>
> #include <drm/drm_panel.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
> -#include <drm/drmP.h>
>
> #define PTN3460_EDID_ADDR 0x0
> #define PTN3460_EDID_EMULATION_ADDR 0x84
> diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
> index 38eeaf8ba959..08517740e6a0 100644
> --- a/drivers/gpu/drm/bridge/panel.c
> +++ b/drivers/gpu/drm/bridge/panel.c
> @@ -8,14 +8,13 @@
> * the License, or (at your option) any later version.
> */
>
> -#include <drm/drmP.h>
> -#include <drm/drm_panel.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_connector.h>
> #include <drm/drm_encoder.h>
> #include <drm/drm_modeset_helper_vtables.h>
> -#include <drm/drm_probe_helper.h>
> #include <drm/drm_panel.h>
> +#include <drm/drm_print.h>
> +#include <drm/drm_probe_helper.h>
>
> struct panel_bridge {
> struct drm_bridge bridge;
> diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c
> index fda1395b7481..05b9da6284f0 100644
> --- a/drivers/gpu/drm/bridge/parade-ps8622.c
> +++ b/drivers/gpu/drm/bridge/parade-ps8622.c
> @@ -24,12 +24,13 @@
> #include <linux/of_device.h>
> #include <linux/pm.h>
> #include <linux/regulator/consumer.h>
> +
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_of.h>
> #include <drm/drm_panel.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
> -#include <drm/drmP.h>
>
> /* Brightness scale on the Parade chip */
> #define PS8622_MAX_BRIGHTNESS 0xff
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index 08e12fef1349..cdb8dfdb2dff 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -28,9 +28,10 @@
> #include <linux/module.h>
> #include <linux/regmap.h>
>
> -#include <drm/drmP.h>
> #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_drv.h>
> #include <drm/drm_edid.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
>
> #define SII902X_TPI_VIDEO_DATA 0x0
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index db761329a1e3..e745c2fecb17 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -11,34 +11,35 @@
> * (at your option) any later version.
> *
> */
> -#include <linux/module.h>
> -#include <linux/irq.h>
> +#include <linux/clk.h>
> #include <linux/delay.h>
> #include <linux/err.h>
> -#include <linux/clk.h>
> #include <linux/hdmi.h>
> +#include <linux/irq.h>
> +#include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/of_device.h>
> #include <linux/regmap.h>
> +#include <linux/dma-mapping.h>
> #include <linux/spinlock.h>
>
> -#include <drm/drm_of.h>
> -#include <drm/drmP.h>
> +#include <media/cec-notifier.h>
> +
> +#include <uapi/linux/media-bus-format.h>
> +#include <uapi/linux/videodev2.h>
> +
> +#include <drm/bridge/dw_hdmi.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_edid.h>
> #include <drm/drm_encoder_slave.h>
> -#include <drm/drm_scdc_helper.h>
> +#include <drm/drm_of.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
> -#include <drm/bridge/dw_hdmi.h>
> -
> -#include <uapi/linux/media-bus-format.h>
> -#include <uapi/linux/videodev2.h>
> +#include <drm/drm_scdc_helper.h>
>
> -#include "dw-hdmi.h"
> #include "dw-hdmi-audio.h"
> #include "dw-hdmi-cec.h"
> -
> -#include <media/cec-notifier.h>
> +#include "dw-hdmi.h"
>
> #define DDC_SEGMENT_ADDR 0x30
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> index e915ae8c9a92..a79c87bd0147 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> @@ -15,15 +15,18 @@
> #include <linux/of_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/reset.h>
> -#include <drm/drmP.h>
> +
> +#include <video/mipi_display.h>
> +
> +#include <drm/bridge/dw_mipi_dsi.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_bridge.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_modes.h>
> #include <drm/drm_of.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
> -#include <drm/bridge/dw_mipi_dsi.h>
> -#include <video/mipi_display.h>
>
> #define HWVER_131 0x31333100 /* IP version 1.31 */
>
> diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
> index a20e454ddd64..170f162ffa55 100644
> --- a/drivers/gpu/drm/bridge/tc358764.c
> +++ b/drivers/gpu/drm/bridge/tc358764.c
> @@ -7,18 +7,22 @@
> * Maciej Purski <m.purski at samsung.com>
> */
>
> +#include <linux/delay.h>
> +#include <linux/gpio/consumer.h>
> +#include <linux/module.h>
> +#include <linux/of_graph.h>
> +#include <linux/regulator/consumer.h>
> +
> +#include <video/mipi_display.h>
> +
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_fb_helper.h>
> #include <drm/drm_mipi_dsi.h>
> #include <drm/drm_of.h>
> #include <drm/drm_panel.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
> -#include <drm/drmP.h>
> -#include <linux/gpio/consumer.h>
> -#include <linux/of_graph.h>
> -#include <linux/regulator/consumer.h>
> -#include <video/mipi_display.h>
>
> #define FLD_MASK(start, end) (((1 << ((start) - (end) + 1)) - 1) << (end))
> #define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end))
> diff --git a/drivers/gpu/drm/bridge/thc63lvd1024.c b/drivers/gpu/drm/bridge/thc63lvd1024.c
> index b083a740565c..fd597f58f4e6 100644
> --- a/drivers/gpu/drm/bridge/thc63lvd1024.c
> +++ b/drivers/gpu/drm/bridge/thc63lvd1024.c
> @@ -5,15 +5,17 @@
> * Copyright (C) 2018 Jacopo Mondi <jacopo+renesas at jmondi.org>
> */
>
> -#include <drm/drmP.h>
> -#include <drm/drm_bridge.h>
> -#include <drm/drm_panel.h>
> -
> #include <linux/gpio/consumer.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/of_graph.h>
> +#include <linux/platform_device.h>
> #include <linux/regulator/consumer.h>
> #include <linux/slab.h>
>
> +#include <drm/drm_bridge.h>
> +#include <drm/drm_panel.h>
> +
> enum thc63_ports {
> THC63_LVDS_IN0,
> THC63_LVDS_IN1,
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index f72ee137e5f1..b77a52d05061 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -3,23 +3,25 @@
> * Copyright (c) 2018, The Linux Foundation. All rights reserved.
> */
>
> -#include <drm/drmP.h>
> -#include <drm/drm_atomic.h>
> -#include <drm/drm_atomic_helper.h>
> -#include <drm/drm_dp_helper.h>
> -#include <drm/drm_mipi_dsi.h>
> -#include <drm/drm_of.h>
> -#include <drm/drm_panel.h>
> -#include <drm/drm_probe_helper.h>
> #include <linux/clk.h>
> #include <linux/gpio/consumer.h>
> #include <linux/i2c.h>
> #include <linux/iopoll.h>
> +#include <linux/module.h>
> #include <linux/of_graph.h>
> #include <linux/pm_runtime.h>
> #include <linux/regmap.h>
> #include <linux/regulator/consumer.h>
>
> +#include <drm/drm_atomic.h>
> +#include <drm/drm_atomic_helper.h>
> +#include <drm/drm_dp_helper.h>
> +#include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_of.h>
> +#include <drm/drm_panel.h>
> +#include <drm/drm_print.h>
> +#include <drm/drm_probe_helper.h>
> +
> #define SN_DEVICE_REV_REG 0x08
> #define SN_DPPLL_SRC_REG 0x0A
> #define DPPLL_CLK_SRC_DSICLK BIT(0)
> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
> index 8b0e71bd3ca7..bfb21b5eefe1 100644
> --- a/drivers/gpu/drm/bridge/ti-tfp410.c
> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
> @@ -11,15 +11,15 @@
> #include <linux/delay.h>
> #include <linux/fwnode.h>
> #include <linux/gpio/consumer.h>
> +#include <linux/i2c.h>
> #include <linux/irq.h>
> #include <linux/module.h>
> #include <linux/of_graph.h>
> #include <linux/platform_device.h>
> -#include <linux/i2c.h>
>
> -#include <drm/drmP.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
>
> #define HOTPLUG_DEBOUNCE_MS 1100
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list