diff mbox series

drm/imx: move IPUv3 driver into separate subdirectory

Message ID 20221125112519.3849636-1-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series drm/imx: move IPUv3 driver into separate subdirectory | expand

Commit Message

Lucas Stach Nov. 25, 2022, 11:25 a.m. UTC
The IPUv3 and DCSS driver are two totally separate DRM drivers. Having
one of them live in the drivers/gpu/drm/imx toplevel directory and the
other one in the dcss/ subdirectory is confusing. Move the IPUv3 driver
into its own subdirectory to make the separation more clear.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 MAINTAINERS                                   |  2 +-
 drivers/gpu/drm/imx/Kconfig                   | 41 +-----------------
 drivers/gpu/drm/imx/Makefile                  | 10 +----
 drivers/gpu/drm/imx/ipuv3/Kconfig             | 42 +++++++++++++++++++
 drivers/gpu/drm/imx/ipuv3/Makefile            | 11 +++++
 drivers/gpu/drm/imx/{ => ipuv3}/dw_hdmi-imx.c |  0
 .../gpu/drm/imx/{ => ipuv3}/imx-drm-core.c    |  0
 drivers/gpu/drm/imx/{ => ipuv3}/imx-drm.h     |  0
 drivers/gpu/drm/imx/{ => ipuv3}/imx-ldb.c     |  0
 drivers/gpu/drm/imx/{ => ipuv3}/imx-tve.c     |  0
 drivers/gpu/drm/imx/{ => ipuv3}/ipuv3-crtc.c  |  0
 drivers/gpu/drm/imx/{ => ipuv3}/ipuv3-plane.c |  0
 drivers/gpu/drm/imx/{ => ipuv3}/ipuv3-plane.h |  0
 .../drm/imx/{ => ipuv3}/parallel-display.c    |  0
 14 files changed, 56 insertions(+), 50 deletions(-)
 create mode 100644 drivers/gpu/drm/imx/ipuv3/Kconfig
 create mode 100644 drivers/gpu/drm/imx/ipuv3/Makefile
 rename drivers/gpu/drm/imx/{ => ipuv3}/dw_hdmi-imx.c (100%)
 rename drivers/gpu/drm/imx/{ => ipuv3}/imx-drm-core.c (100%)
 rename drivers/gpu/drm/imx/{ => ipuv3}/imx-drm.h (100%)
 rename drivers/gpu/drm/imx/{ => ipuv3}/imx-ldb.c (100%)
 rename drivers/gpu/drm/imx/{ => ipuv3}/imx-tve.c (100%)
 rename drivers/gpu/drm/imx/{ => ipuv3}/ipuv3-crtc.c (100%)
 rename drivers/gpu/drm/imx/{ => ipuv3}/ipuv3-plane.c (100%)
 rename drivers/gpu/drm/imx/{ => ipuv3}/ipuv3-plane.h (100%)
 rename drivers/gpu/drm/imx/{ => ipuv3}/parallel-display.c (100%)

Comments

Uwe Kleine-König Dec. 16, 2022, 12:03 p.m. UTC | #1
On Fri, Nov 25, 2022 at 12:25:19PM +0100, Lucas Stach wrote:
> diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile
> index b644deffe948..909622864716 100644
> --- a/drivers/gpu/drm/imx/Makefile
> +++ b/drivers/gpu/drm/imx/Makefile
> @@ -1,12 +1,4 @@
> [...]
>  obj-$(CONFIG_DRM_IMX_DCSS) += dcss/
> +obj-$(CONFIG_DRM_IMX) += ipuv3/

I wonder if it would make sense to rename DRM_IMX to DRM_IMX_IPUV3 ?!

> diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig
> new file mode 100644
> index 000000000000..f518eb47a18e
> --- /dev/null
> +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig
> [...]
> +config DRM_IMX_HDMI
> +	tristate "Freescale i.MX DRM HDMI"
> +	select DRM_DW_HDMI
> +	depends on DRM_IMX && OF
> +	help
> +	  Choose this if you want to use HDMI on i.MX6.
> +

Trailing empty line could be dropped.

Best regards
Uwe
Lucas Stach Dec. 16, 2022, 12:59 p.m. UTC | #2
Am Freitag, dem 16.12.2022 um 13:03 +0100 schrieb Uwe Kleine-König:
> On Fri, Nov 25, 2022 at 12:25:19PM +0100, Lucas Stach wrote:
> > diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile
> > index b644deffe948..909622864716 100644
> > --- a/drivers/gpu/drm/imx/Makefile
> > +++ b/drivers/gpu/drm/imx/Makefile
> > @@ -1,12 +1,4 @@
> > [...]
> >  obj-$(CONFIG_DRM_IMX_DCSS) += dcss/
> > +obj-$(CONFIG_DRM_IMX) += ipuv3/
> 
> I wonder if it would make sense to rename DRM_IMX to DRM_IMX_IPUV3 ?!

The driver will still called imx-drm in the DRM driver name. We can not
change this without breaking the UAPI. Even though in hindsight imx-drm
was a way too generic name, I don't think renaming the Kconfig symbol
or even the driver is worth it as it would lead to more confusion in
the end.

Regards,
Lucas

> 
> > diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig
> > new file mode 100644
> > index 000000000000..f518eb47a18e
> > --- /dev/null
> > +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig
> > [...]
> > +config DRM_IMX_HDMI
> > +	tristate "Freescale i.MX DRM HDMI"
> > +	select DRM_DW_HDMI
> > +	depends on DRM_IMX && OF
> > +	help
> > +	  Choose this if you want to use HDMI on i.MX6.
> > +
> 
> Trailing empty line could be dropped.
> 
> Best regards
> Uwe
>
Philipp Zabel Dec. 16, 2022, 5:20 p.m. UTC | #3
On Fr, 2022-11-25 at 12:25 +0100, Lucas Stach wrote:
> The IPUv3 and DCSS driver are two totally separate DRM drivers. Having
> one of them live in the drivers/gpu/drm/imx toplevel directory and the
> other one in the dcss/ subdirectory is confusing. Move the IPUv3 driver
> into its own subdirectory to make the separation more clear.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp
Philipp Zabel Dec. 16, 2022, 5:21 p.m. UTC | #4
On Fr, 2022-12-16 at 13:03 +0100, Uwe Kleine-König wrote:
> On Fri, Nov 25, 2022 at 12:25:19PM +0100, Lucas Stach wrote:
> > diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile
> > index b644deffe948..909622864716 100644
> > --- a/drivers/gpu/drm/imx/Makefile
> > +++ b/drivers/gpu/drm/imx/Makefile
> > @@ -1,12 +1,4 @@
> > [...]
> >  obj-$(CONFIG_DRM_IMX_DCSS) += dcss/
> > +obj-$(CONFIG_DRM_IMX) += ipuv3/
> 
> I wonder if it would make sense to rename DRM_IMX to DRM_IMX_IPUV3 ?!
> 
> > diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig
> > new file mode 100644
> > index 000000000000..f518eb47a18e
> > --- /dev/null
> > +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig
> > [...]
> > +config DRM_IMX_HDMI
> > +	tristate "Freescale i.MX DRM HDMI"
> > +	select DRM_DW_HDMI
> > +	depends on DRM_IMX && OF
> > +	help
> > +	  Choose this if you want to use HDMI on i.MX6.
> > +
> 
> Trailing empty line could be dropped.

I'll do that when applying.

regards
Philipp
Philipp Zabel Dec. 16, 2022, 6:06 p.m. UTC | #5
On Fr, 2022-11-25 at 12:25 +0100, Lucas Stach wrote:
> The IPUv3 and DCSS driver are two totally separate DRM drivers. Having
> one of them live in the drivers/gpu/drm/imx toplevel directory and the
> other one in the dcss/ subdirectory is confusing. Move the IPUv3 driver
> into its own subdirectory to make the separation more clear.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Applied to drm-misc-next.

regards
Philipp
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 2585e7edc335..7a2ff684b4df 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6896,7 +6896,7 @@  M:	Philipp Zabel <p.zabel@pengutronix.de>
 L:	dri-devel@lists.freedesktop.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/display/imx/
-F:	drivers/gpu/drm/imx/
+F:	drivers/gpu/drm/imx/ipuv3/
 F:	drivers/gpu/ipu-v3/
 
 DRM DRIVERS FOR FREESCALE IMX BRIDGE
diff --git a/drivers/gpu/drm/imx/Kconfig b/drivers/gpu/drm/imx/Kconfig
index fd5b2471fdf0..e5749927fd6c 100644
--- a/drivers/gpu/drm/imx/Kconfig
+++ b/drivers/gpu/drm/imx/Kconfig
@@ -1,43 +1,4 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
-config DRM_IMX
-	tristate "DRM Support for Freescale i.MX"
-	select DRM_KMS_HELPER
-	select VIDEOMODE_HELPERS
-	select DRM_GEM_DMA_HELPER
-	depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM || COMPILE_TEST)
-	depends on IMX_IPUV3_CORE
-	help
-	  enable i.MX graphics support
-
-config DRM_IMX_PARALLEL_DISPLAY
-	tristate "Support for parallel displays"
-	select DRM_PANEL
-	depends on DRM_IMX
-	select VIDEOMODE_HELPERS
-
-config DRM_IMX_TVE
-	tristate "Support for TV and VGA displays"
-	depends on DRM_IMX
-	depends on COMMON_CLK
-	select REGMAP_MMIO
-	help
-	  Choose this to enable the internal Television Encoder (TVe)
-	  found on i.MX53 processors.
-
-config DRM_IMX_LDB
-	tristate "Support for LVDS displays"
-	depends on DRM_IMX && MFD_SYSCON
-	depends on COMMON_CLK
-	select DRM_PANEL
-	help
-	  Choose this to enable the internal LVDS Display Bridge (LDB)
-	  found on i.MX53 and i.MX6 processors.
-
-config DRM_IMX_HDMI
-	tristate "Freescale i.MX DRM HDMI"
-	select DRM_DW_HDMI
-	depends on DRM_IMX && OF
-	help
-	  Choose this if you want to use HDMI on i.MX6.
 
 source "drivers/gpu/drm/imx/dcss/Kconfig"
+source "drivers/gpu/drm/imx/ipuv3/Kconfig"
diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile
index b644deffe948..909622864716 100644
--- a/drivers/gpu/drm/imx/Makefile
+++ b/drivers/gpu/drm/imx/Makefile
@@ -1,12 +1,4 @@ 
 # SPDX-License-Identifier: GPL-2.0
 
-imxdrm-objs := imx-drm-core.o ipuv3-crtc.o ipuv3-plane.o
-
-obj-$(CONFIG_DRM_IMX) += imxdrm.o
-
-obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o
-obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o
-obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o
-
-obj-$(CONFIG_DRM_IMX_HDMI) += dw_hdmi-imx.o
 obj-$(CONFIG_DRM_IMX_DCSS) += dcss/
+obj-$(CONFIG_DRM_IMX) += ipuv3/
diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig
new file mode 100644
index 000000000000..f518eb47a18e
--- /dev/null
+++ b/drivers/gpu/drm/imx/ipuv3/Kconfig
@@ -0,0 +1,42 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+config DRM_IMX
+	tristate "DRM Support for Freescale i.MX"
+	select DRM_KMS_HELPER
+	select VIDEOMODE_HELPERS
+	select DRM_GEM_DMA_HELPER
+	depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM || COMPILE_TEST)
+	depends on IMX_IPUV3_CORE
+	help
+	  enable i.MX graphics support
+
+config DRM_IMX_PARALLEL_DISPLAY
+	tristate "Support for parallel displays"
+	select DRM_PANEL
+	depends on DRM_IMX
+	select VIDEOMODE_HELPERS
+
+config DRM_IMX_TVE
+	tristate "Support for TV and VGA displays"
+	depends on DRM_IMX
+	depends on COMMON_CLK
+	select REGMAP_MMIO
+	help
+	  Choose this to enable the internal Television Encoder (TVe)
+	  found on i.MX53 processors.
+
+config DRM_IMX_LDB
+	tristate "Support for LVDS displays"
+	depends on DRM_IMX && MFD_SYSCON
+	depends on COMMON_CLK
+	select DRM_PANEL
+	help
+	  Choose this to enable the internal LVDS Display Bridge (LDB)
+	  found on i.MX53 and i.MX6 processors.
+
+config DRM_IMX_HDMI
+	tristate "Freescale i.MX DRM HDMI"
+	select DRM_DW_HDMI
+	depends on DRM_IMX && OF
+	help
+	  Choose this if you want to use HDMI on i.MX6.
+
diff --git a/drivers/gpu/drm/imx/ipuv3/Makefile b/drivers/gpu/drm/imx/ipuv3/Makefile
new file mode 100644
index 000000000000..21cdcc2faabc
--- /dev/null
+++ b/drivers/gpu/drm/imx/ipuv3/Makefile
@@ -0,0 +1,11 @@ 
+# SPDX-License-Identifier: GPL-2.0
+
+imxdrm-objs := imx-drm-core.o ipuv3-crtc.o ipuv3-plane.o
+
+obj-$(CONFIG_DRM_IMX) += imxdrm.o
+
+obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o
+obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o
+obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o
+
+obj-$(CONFIG_DRM_IMX_HDMI) += dw_hdmi-imx.o
diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c
similarity index 100%
rename from drivers/gpu/drm/imx/dw_hdmi-imx.c
rename to drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
similarity index 100%
rename from drivers/gpu/drm/imx/imx-drm-core.c
rename to drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
diff --git a/drivers/gpu/drm/imx/imx-drm.h b/drivers/gpu/drm/imx/ipuv3/imx-drm.h
similarity index 100%
rename from drivers/gpu/drm/imx/imx-drm.h
rename to drivers/gpu/drm/imx/ipuv3/imx-drm.h
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c
similarity index 100%
rename from drivers/gpu/drm/imx/imx-ldb.c
rename to drivers/gpu/drm/imx/ipuv3/imx-ldb.c
diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/ipuv3/imx-tve.c
similarity index 100%
rename from drivers/gpu/drm/imx/imx-tve.c
rename to drivers/gpu/drm/imx/ipuv3/imx-tve.c
diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
similarity index 100%
rename from drivers/gpu/drm/imx/ipuv3-crtc.c
rename to drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
similarity index 100%
rename from drivers/gpu/drm/imx/ipuv3-plane.c
rename to drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.h b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.h
similarity index 100%
rename from drivers/gpu/drm/imx/ipuv3-plane.h
rename to drivers/gpu/drm/imx/ipuv3/ipuv3-plane.h
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/ipuv3/parallel-display.c
similarity index 100%
rename from drivers/gpu/drm/imx/parallel-display.c
rename to drivers/gpu/drm/imx/ipuv3/parallel-display.c