All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm: rcar-du: Add missing dependencies
@ 2021-12-15  9:27 ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15  9:27 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
  Cc: Ulrich Hecht, Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc, Geert Uytterhoeven

	Hi Laurent, Kieran, et al,

This patch series adds missing dependencies to Kconfig symbols related
to the R-Car Display Unit.  These dependencies prevent asking the user
about R-Car display drivers when configuring a kernel without Renesas
SoC support, or when the answer wouldn't have any impact on the kernel
build.

Thanks for your comments!

Geert Uytterhoeven (3):
  drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
  drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS

 drivers/gpu/drm/rcar-du/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* [PATCH 0/3] drm: rcar-du: Add missing dependencies
@ 2021-12-15  9:27 ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15  9:27 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
  Cc: Geert Uytterhoeven, Arnd Bergmann, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Ulrich Hecht, LUU HOAI

	Hi Laurent, Kieran, et al,

This patch series adds missing dependencies to Kconfig symbols related
to the R-Car Display Unit.  These dependencies prevent asking the user
about R-Car display drivers when configuring a kernel without Renesas
SoC support, or when the answer wouldn't have any impact on the kernel
build.

Thanks for your comments!

Geert Uytterhoeven (3):
  drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
  drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS

 drivers/gpu/drm/rcar-du/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* [PATCH 1/3] drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
  2021-12-15  9:27 ` Geert Uytterhoeven
@ 2021-12-15  9:27   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15  9:27 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
  Cc: Ulrich Hecht, Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc, Geert Uytterhoeven

The Renesas R-Car Gen3 and RZ/G2 internal HDMI encoder is only present
on Renesas R-Car Gen3 and RZ/G2 SoCs.  Hence add a dependency on
ARCH_RENESAS, to prevent asking the user about this driver when
configuring a kernel without Renesas SoC support.

Fixes: 40d0fa7095d06c73 ("drm: rcar-du: Add Gen3 HDMI encoder support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/gpu/drm/rcar-du/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
index f6e6a6d5d987bf95..65d72be50f46f19e 100644
--- a/drivers/gpu/drm/rcar-du/Kconfig
+++ b/drivers/gpu/drm/rcar-du/Kconfig
@@ -25,6 +25,7 @@ config DRM_RCAR_CMM
 config DRM_RCAR_DW_HDMI
 	tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
 	depends on DRM && OF
+	depends on ARCH_RENESAS || COMPILE_TEST
 	select DRM_DW_HDMI
 	help
 	  Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 1/3] drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
@ 2021-12-15  9:27   ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15  9:27 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
  Cc: Geert Uytterhoeven, Arnd Bergmann, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Ulrich Hecht, LUU HOAI

The Renesas R-Car Gen3 and RZ/G2 internal HDMI encoder is only present
on Renesas R-Car Gen3 and RZ/G2 SoCs.  Hence add a dependency on
ARCH_RENESAS, to prevent asking the user about this driver when
configuring a kernel without Renesas SoC support.

Fixes: 40d0fa7095d06c73 ("drm: rcar-du: Add Gen3 HDMI encoder support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/gpu/drm/rcar-du/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
index f6e6a6d5d987bf95..65d72be50f46f19e 100644
--- a/drivers/gpu/drm/rcar-du/Kconfig
+++ b/drivers/gpu/drm/rcar-du/Kconfig
@@ -25,6 +25,7 @@ config DRM_RCAR_CMM
 config DRM_RCAR_DW_HDMI
 	tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
 	depends on DRM && OF
+	depends on ARCH_RENESAS || COMPILE_TEST
 	select DRM_DW_HDMI
 	help
 	  Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  2021-12-15  9:27 ` Geert Uytterhoeven
@ 2021-12-15  9:27   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15  9:27 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
  Cc: Ulrich Hecht, Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc, Geert Uytterhoeven

The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
disabled doesn't have any impact on the kernel built.  Hence add a
dependency on DRM_RCAR_DU, to prevent asking the user about this driver
when configuring a kernel without R-Car Display Unit support, like is
already done for DRM_RCAR_CMM.

Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
The problem pre-existed before commit 42d95d1b3a9c649b, as the
dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
before.
Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
---
 drivers/gpu/drm/rcar-du/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
index 65d72be50f46f19e..a7aa556e301d1087 100644
--- a/drivers/gpu/drm/rcar-du/Kconfig
+++ b/drivers/gpu/drm/rcar-du/Kconfig
@@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
 
 config DRM_RCAR_USE_LVDS
 	bool "R-Car DU LVDS Encoder Support"
-	depends on DRM_BRIDGE && OF
+	depends on DRM_BRIDGE && OF && DRM_RCAR_DU
 	default DRM_RCAR_DU
 	help
 	  Enable support for the R-Car Display Unit embedded LVDS encoders.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
@ 2021-12-15  9:27   ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15  9:27 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
  Cc: Geert Uytterhoeven, Arnd Bergmann, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Ulrich Hecht, LUU HOAI

The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
disabled doesn't have any impact on the kernel built.  Hence add a
dependency on DRM_RCAR_DU, to prevent asking the user about this driver
when configuring a kernel without R-Car Display Unit support, like is
already done for DRM_RCAR_CMM.

Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
The problem pre-existed before commit 42d95d1b3a9c649b, as the
dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
before.
Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
---
 drivers/gpu/drm/rcar-du/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
index 65d72be50f46f19e..a7aa556e301d1087 100644
--- a/drivers/gpu/drm/rcar-du/Kconfig
+++ b/drivers/gpu/drm/rcar-du/Kconfig
@@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
 
 config DRM_RCAR_USE_LVDS
 	bool "R-Car DU LVDS Encoder Support"
-	depends on DRM_BRIDGE && OF
+	depends on DRM_BRIDGE && OF && DRM_RCAR_DU
 	default DRM_RCAR_DU
 	help
 	  Enable support for the R-Car Display Unit embedded LVDS encoders.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 3/3] drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS
  2021-12-15  9:27 ` Geert Uytterhoeven
@ 2021-12-15  9:27   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15  9:27 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
  Cc: Ulrich Hecht, Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc, Geert Uytterhoeven

The Renesas R-Car Display Unit embedded MIPI DSI encoder is only present
on Renesas R-Car V3U SoCs.  Hence add a dependency on ARCH_RENESAS, to
prevent asking the user about this driver when configuring a kernel
without Renesas SoC support.

Fixes: 155358310f013c23 ("drm: rcar-du: Add R-Car DSI driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/gpu/drm/rcar-du/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
index a7aa556e301d1087..2f4f6ac5fd4e66b1 100644
--- a/drivers/gpu/drm/rcar-du/Kconfig
+++ b/drivers/gpu/drm/rcar-du/Kconfig
@@ -48,6 +48,7 @@ config DRM_RCAR_LVDS
 config DRM_RCAR_MIPI_DSI
 	tristate "R-Car DU MIPI DSI Encoder Support"
 	depends on DRM && DRM_BRIDGE && OF
+	depends on ARCH_RENESAS || COMPILE_TEST
 	select DRM_MIPI_DSI
 	help
 	  Enable support for the R-Car Display Unit embedded MIPI DSI encoders.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 3/3] drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS
@ 2021-12-15  9:27   ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15  9:27 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
  Cc: Geert Uytterhoeven, Arnd Bergmann, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Ulrich Hecht, LUU HOAI

The Renesas R-Car Display Unit embedded MIPI DSI encoder is only present
on Renesas R-Car V3U SoCs.  Hence add a dependency on ARCH_RENESAS, to
prevent asking the user about this driver when configuring a kernel
without Renesas SoC support.

Fixes: 155358310f013c23 ("drm: rcar-du: Add R-Car DSI driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/gpu/drm/rcar-du/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
index a7aa556e301d1087..2f4f6ac5fd4e66b1 100644
--- a/drivers/gpu/drm/rcar-du/Kconfig
+++ b/drivers/gpu/drm/rcar-du/Kconfig
@@ -48,6 +48,7 @@ config DRM_RCAR_LVDS
 config DRM_RCAR_MIPI_DSI
 	tristate "R-Car DU MIPI DSI Encoder Support"
 	depends on DRM && DRM_BRIDGE && OF
+	depends on ARCH_RENESAS || COMPILE_TEST
 	select DRM_MIPI_DSI
 	help
 	  Enable support for the R-Car Display Unit embedded MIPI DSI encoders.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [PATCH 0/3] drm: rcar-du: Add missing dependencies
  2021-12-15  9:27 ` Geert Uytterhoeven
@ 2021-12-15  9:42   ` Laurent Pinchart
  -1 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15  9:42 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc

Hi Geert,

Thank you for the patches.

On Wed, Dec 15, 2021 at 10:27:44AM +0100, Geert Uytterhoeven wrote:
> 	Hi Laurent, Kieran, et al,
> 
> This patch series adds missing dependencies to Kconfig symbols related
> to the R-Car Display Unit.  These dependencies prevent asking the user
> about R-Car display drivers when configuring a kernel without Renesas
> SoC support, or when the answer wouldn't have any impact on the kernel
> build.

Won't this have an impact when someone will regenerate an ARM64
defconfig, given that we want to keep those options enabled in
arch/arm64/configs/defconfig ?

> Thanks for your comments!
> 
> Geert Uytterhoeven (3):
>   drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
>   drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
>   drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS
> 
>  drivers/gpu/drm/rcar-du/Kconfig | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 0/3] drm: rcar-du: Add missing dependencies
@ 2021-12-15  9:42   ` Laurent Pinchart
  0 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15  9:42 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Geert,

Thank you for the patches.

On Wed, Dec 15, 2021 at 10:27:44AM +0100, Geert Uytterhoeven wrote:
> 	Hi Laurent, Kieran, et al,
> 
> This patch series adds missing dependencies to Kconfig symbols related
> to the R-Car Display Unit.  These dependencies prevent asking the user
> about R-Car display drivers when configuring a kernel without Renesas
> SoC support, or when the answer wouldn't have any impact on the kernel
> build.

Won't this have an impact when someone will regenerate an ARM64
defconfig, given that we want to keep those options enabled in
arch/arm64/configs/defconfig ?

> Thanks for your comments!
> 
> Geert Uytterhoeven (3):
>   drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
>   drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
>   drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS
> 
>  drivers/gpu/drm/rcar-du/Kconfig | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 0/3] drm: rcar-du: Add missing dependencies
  2021-12-15  9:42   ` Laurent Pinchart
@ 2021-12-15 10:12     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 10:12 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, DRI Development,
	Linux-Renesas

Hi Laurent,

On Wed, Dec 15, 2021 at 10:43 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 10:27:44AM +0100, Geert Uytterhoeven wrote:
> > This patch series adds missing dependencies to Kconfig symbols related
> > to the R-Car Display Unit.  These dependencies prevent asking the user
> > about R-Car display drivers when configuring a kernel without Renesas
> > SoC support, or when the answer wouldn't have any impact on the kernel
> > build.
>
> Won't this have an impact when someone will regenerate an ARM64
> defconfig, given that we want to keep those options enabled in
> arch/arm64/configs/defconfig ?

arch/arm64/configs/defconfig has CONFIG_ARCH_RENESAS=y, so it is
not impacted.

> > Geert Uytterhoeven (3):
> >   drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
> >   drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
> >   drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 0/3] drm: rcar-du: Add missing dependencies
@ 2021-12-15 10:12     ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 10:12 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, DRI Development,
	Linux-Renesas, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Laurent,

On Wed, Dec 15, 2021 at 10:43 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 10:27:44AM +0100, Geert Uytterhoeven wrote:
> > This patch series adds missing dependencies to Kconfig symbols related
> > to the R-Car Display Unit.  These dependencies prevent asking the user
> > about R-Car display drivers when configuring a kernel without Renesas
> > SoC support, or when the answer wouldn't have any impact on the kernel
> > build.
>
> Won't this have an impact when someone will regenerate an ARM64
> defconfig, given that we want to keep those options enabled in
> arch/arm64/configs/defconfig ?

arch/arm64/configs/defconfig has CONFIG_ARCH_RENESAS=y, so it is
not impacted.

> > Geert Uytterhoeven (3):
> >   drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
> >   drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
> >   drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  2021-12-15  9:27   ` Geert Uytterhoeven
@ 2021-12-15 10:12     ` Laurent Pinchart
  -1 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:12 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc

Hi Geert,

Thank you for the patch.

On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> disabled doesn't have any impact on the kernel built.  Hence add a
> dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> when configuring a kernel without R-Car Display Unit support, like is
> already done for DRM_RCAR_CMM.
> 
> Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> The problem pre-existed before commit 42d95d1b3a9c649b, as the
> dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> before.
> Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> ---
>  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> index 65d72be50f46f19e..a7aa556e301d1087 100644
> --- a/drivers/gpu/drm/rcar-du/Kconfig
> +++ b/drivers/gpu/drm/rcar-du/Kconfig
> @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
>  
>  config DRM_RCAR_USE_LVDS
>  	bool "R-Car DU LVDS Encoder Support"
> -	depends on DRM_BRIDGE && OF
> +	depends on DRM_BRIDGE && OF && DRM_RCAR_DU

Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.

>  	default DRM_RCAR_DU
>  	help
>  	  Enable support for the R-Car Display Unit embedded LVDS encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
@ 2021-12-15 10:12     ` Laurent Pinchart
  0 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:12 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Geert,

Thank you for the patch.

On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> disabled doesn't have any impact on the kernel built.  Hence add a
> dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> when configuring a kernel without R-Car Display Unit support, like is
> already done for DRM_RCAR_CMM.
> 
> Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> The problem pre-existed before commit 42d95d1b3a9c649b, as the
> dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> before.
> Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> ---
>  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> index 65d72be50f46f19e..a7aa556e301d1087 100644
> --- a/drivers/gpu/drm/rcar-du/Kconfig
> +++ b/drivers/gpu/drm/rcar-du/Kconfig
> @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
>  
>  config DRM_RCAR_USE_LVDS
>  	bool "R-Car DU LVDS Encoder Support"
> -	depends on DRM_BRIDGE && OF
> +	depends on DRM_BRIDGE && OF && DRM_RCAR_DU

Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.

>  	default DRM_RCAR_DU
>  	help
>  	  Enable support for the R-Car Display Unit embedded LVDS encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  2021-12-15 10:12     ` Laurent Pinchart
@ 2021-12-15 10:17       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 10:17 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, DRI Development,
	Linux-Renesas

Hi Laurent,

On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > disabled doesn't have any impact on the kernel built.  Hence add a
> > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > when configuring a kernel without R-Car Display Unit support, like is
> > already done for DRM_RCAR_CMM.
> >
> > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > before.
> > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > ---
> >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> >
> >  config DRM_RCAR_USE_LVDS
> >       bool "R-Car DU LVDS Encoder Support"
> > -     depends on DRM_BRIDGE && OF
> > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
>
> Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could

DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)

> wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.

That might work.  It can be tricky with bool/tristate, as sometimes m
is not properly propagated.

> >       default DRM_RCAR_DU
> >       help
> >         Enable support for the R-Car Display Unit embedded LVDS encoders.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
@ 2021-12-15 10:17       ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 10:17 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, DRI Development,
	Linux-Renesas, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Laurent,

On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > disabled doesn't have any impact on the kernel built.  Hence add a
> > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > when configuring a kernel without R-Car Display Unit support, like is
> > already done for DRM_RCAR_CMM.
> >
> > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > before.
> > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > ---
> >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> >
> >  config DRM_RCAR_USE_LVDS
> >       bool "R-Car DU LVDS Encoder Support"
> > -     depends on DRM_BRIDGE && OF
> > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
>
> Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could

DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)

> wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.

That might work.  It can be tricky with bool/tristate, as sometimes m
is not properly propagated.

> >       default DRM_RCAR_DU
> >       help
> >         Enable support for the R-Car Display Unit embedded LVDS encoders.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  2021-12-15 10:17       ` Geert Uytterhoeven
@ 2021-12-15 10:23         ` Laurent Pinchart
  -1 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:23 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, DRI Development,
	Linux-Renesas

Hi Geert,

On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > when configuring a kernel without R-Car Display Unit support, like is
> > > already done for DRM_RCAR_CMM.
> > >
> > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > ---
> > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > before.
> > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > ---
> > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > >
> > >  config DRM_RCAR_USE_LVDS
> > >       bool "R-Car DU LVDS Encoder Support"
> > > -     depends on DRM_BRIDGE && OF
> > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> >
> > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> 
> DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)

It would seem so indeed, my question is whether that shouldn't be fixed
as well.

> > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> 
> That might work.  It can be tricky with bool/tristate, as sometimes m
> is not properly propagated.

Would you give it a try for a v2 ?

> > >       default DRM_RCAR_DU
> > >       help
> > >         Enable support for the R-Car Display Unit embedded LVDS encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
@ 2021-12-15 10:23         ` Laurent Pinchart
  0 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:23 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, DRI Development,
	Linux-Renesas, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Geert,

On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > when configuring a kernel without R-Car Display Unit support, like is
> > > already done for DRM_RCAR_CMM.
> > >
> > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > ---
> > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > before.
> > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > ---
> > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > >
> > >  config DRM_RCAR_USE_LVDS
> > >       bool "R-Car DU LVDS Encoder Support"
> > > -     depends on DRM_BRIDGE && OF
> > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> >
> > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> 
> DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)

It would seem so indeed, my question is whether that shouldn't be fixed
as well.

> > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> 
> That might work.  It can be tricky with bool/tristate, as sometimes m
> is not properly propagated.

Would you give it a try for a v2 ?

> > >       default DRM_RCAR_DU
> > >       help
> > >         Enable support for the R-Car Display Unit embedded LVDS encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 1/3] drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
  2021-12-15  9:27   ` Geert Uytterhoeven
@ 2021-12-15 10:24     ` Laurent Pinchart
  -1 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:24 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc

Hi Geert,

Thank you for the patch.

On Wed, Dec 15, 2021 at 10:27:45AM +0100, Geert Uytterhoeven wrote:
> The Renesas R-Car Gen3 and RZ/G2 internal HDMI encoder is only present
> on Renesas R-Car Gen3 and RZ/G2 SoCs.  Hence add a dependency on
> ARCH_RENESAS, to prevent asking the user about this driver when
> configuring a kernel without Renesas SoC support.
> 
> Fixes: 40d0fa7095d06c73 ("drm: rcar-du: Add Gen3 HDMI encoder support")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/gpu/drm/rcar-du/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> index f6e6a6d5d987bf95..65d72be50f46f19e 100644
> --- a/drivers/gpu/drm/rcar-du/Kconfig
> +++ b/drivers/gpu/drm/rcar-du/Kconfig
> @@ -25,6 +25,7 @@ config DRM_RCAR_CMM
>  config DRM_RCAR_DW_HDMI
>  	tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
>  	depends on DRM && OF
> +	depends on ARCH_RENESAS || COMPILE_TEST

Let's move this entry first to keep alphabetical order.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	select DRM_DW_HDMI
>  	help
>  	  Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 1/3] drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
@ 2021-12-15 10:24     ` Laurent Pinchart
  0 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:24 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Geert,

Thank you for the patch.

On Wed, Dec 15, 2021 at 10:27:45AM +0100, Geert Uytterhoeven wrote:
> The Renesas R-Car Gen3 and RZ/G2 internal HDMI encoder is only present
> on Renesas R-Car Gen3 and RZ/G2 SoCs.  Hence add a dependency on
> ARCH_RENESAS, to prevent asking the user about this driver when
> configuring a kernel without Renesas SoC support.
> 
> Fixes: 40d0fa7095d06c73 ("drm: rcar-du: Add Gen3 HDMI encoder support")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/gpu/drm/rcar-du/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> index f6e6a6d5d987bf95..65d72be50f46f19e 100644
> --- a/drivers/gpu/drm/rcar-du/Kconfig
> +++ b/drivers/gpu/drm/rcar-du/Kconfig
> @@ -25,6 +25,7 @@ config DRM_RCAR_CMM
>  config DRM_RCAR_DW_HDMI
>  	tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
>  	depends on DRM && OF
> +	depends on ARCH_RENESAS || COMPILE_TEST

Let's move this entry first to keep alphabetical order.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	select DRM_DW_HDMI
>  	help
>  	  Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 3/3] drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS
  2021-12-15  9:27   ` Geert Uytterhoeven
@ 2021-12-15 10:25     ` Laurent Pinchart
  -1 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:25 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc

Hi Geert,

Thank you for the patch.

On Wed, Dec 15, 2021 at 10:27:47AM +0100, Geert Uytterhoeven wrote:
> The Renesas R-Car Display Unit embedded MIPI DSI encoder is only present
> on Renesas R-Car V3U SoCs.  Hence add a dependency on ARCH_RENESAS, to
> prevent asking the user about this driver when configuring a kernel
> without Renesas SoC support.
> 
> Fixes: 155358310f013c23 ("drm: rcar-du: Add R-Car DSI driver")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/gpu/drm/rcar-du/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> index a7aa556e301d1087..2f4f6ac5fd4e66b1 100644
> --- a/drivers/gpu/drm/rcar-du/Kconfig
> +++ b/drivers/gpu/drm/rcar-du/Kconfig
> @@ -48,6 +48,7 @@ config DRM_RCAR_LVDS
>  config DRM_RCAR_MIPI_DSI
>  	tristate "R-Car DU MIPI DSI Encoder Support"
>  	depends on DRM && DRM_BRIDGE && OF
> +	depends on ARCH_RENESAS || COMPILE_TEST

Same as for 1/3, let's move this entry first. I can handle this when
applying the patches, I'll take 1/3 and 3/3 in my tree already.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	select DRM_MIPI_DSI
>  	help
>  	  Enable support for the R-Car Display Unit embedded MIPI DSI encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 3/3] drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS
@ 2021-12-15 10:25     ` Laurent Pinchart
  0 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:25 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Geert,

Thank you for the patch.

On Wed, Dec 15, 2021 at 10:27:47AM +0100, Geert Uytterhoeven wrote:
> The Renesas R-Car Display Unit embedded MIPI DSI encoder is only present
> on Renesas R-Car V3U SoCs.  Hence add a dependency on ARCH_RENESAS, to
> prevent asking the user about this driver when configuring a kernel
> without Renesas SoC support.
> 
> Fixes: 155358310f013c23 ("drm: rcar-du: Add R-Car DSI driver")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/gpu/drm/rcar-du/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> index a7aa556e301d1087..2f4f6ac5fd4e66b1 100644
> --- a/drivers/gpu/drm/rcar-du/Kconfig
> +++ b/drivers/gpu/drm/rcar-du/Kconfig
> @@ -48,6 +48,7 @@ config DRM_RCAR_LVDS
>  config DRM_RCAR_MIPI_DSI
>  	tristate "R-Car DU MIPI DSI Encoder Support"
>  	depends on DRM && DRM_BRIDGE && OF
> +	depends on ARCH_RENESAS || COMPILE_TEST

Same as for 1/3, let's move this entry first. I can handle this when
applying the patches, I'll take 1/3 and 3/3 in my tree already.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	select DRM_MIPI_DSI
>  	help
>  	  Enable support for the R-Car Display Unit embedded MIPI DSI encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 3/3] drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS
  2021-12-15 10:25     ` Laurent Pinchart
@ 2021-12-15 10:29       ` Laurent Pinchart
  -1 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:29 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, dri-devel,
	linux-renesas-soc

On Wed, Dec 15, 2021 at 12:25:26PM +0200, Laurent Pinchart wrote:
> Hi Geert,
> 
> Thank you for the patch.
> 
> On Wed, Dec 15, 2021 at 10:27:47AM +0100, Geert Uytterhoeven wrote:
> > The Renesas R-Car Display Unit embedded MIPI DSI encoder is only present
> > on Renesas R-Car V3U SoCs.  Hence add a dependency on ARCH_RENESAS, to
> > prevent asking the user about this driver when configuring a kernel
> > without Renesas SoC support.
> > 
> > Fixes: 155358310f013c23 ("drm: rcar-du: Add R-Car DSI driver")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> >  drivers/gpu/drm/rcar-du/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > index a7aa556e301d1087..2f4f6ac5fd4e66b1 100644
> > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > @@ -48,6 +48,7 @@ config DRM_RCAR_LVDS
> >  config DRM_RCAR_MIPI_DSI
> >  	tristate "R-Car DU MIPI DSI Encoder Support"
> >  	depends on DRM && DRM_BRIDGE && OF
> > +	depends on ARCH_RENESAS || COMPILE_TEST
> 
> Same as for 1/3, let's move this entry first. I can handle this when
> applying the patches, I'll take 1/3 and 3/3 in my tree already.

Actually, if we wrap all subdrivers in 'if DRM_RCAR_DU', we won't need
1/3 and 3/3. Let's reach a conclusion on that topic first.

> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >  	select DRM_MIPI_DSI
> >  	help
> >  	  Enable support for the R-Car Display Unit embedded MIPI DSI encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 3/3] drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS
@ 2021-12-15 10:29       ` Laurent Pinchart
  0 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:29 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, dri-devel,
	linux-renesas-soc, Kieran Bingham, Ulrich Hecht, LUU HOAI

On Wed, Dec 15, 2021 at 12:25:26PM +0200, Laurent Pinchart wrote:
> Hi Geert,
> 
> Thank you for the patch.
> 
> On Wed, Dec 15, 2021 at 10:27:47AM +0100, Geert Uytterhoeven wrote:
> > The Renesas R-Car Display Unit embedded MIPI DSI encoder is only present
> > on Renesas R-Car V3U SoCs.  Hence add a dependency on ARCH_RENESAS, to
> > prevent asking the user about this driver when configuring a kernel
> > without Renesas SoC support.
> > 
> > Fixes: 155358310f013c23 ("drm: rcar-du: Add R-Car DSI driver")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> >  drivers/gpu/drm/rcar-du/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > index a7aa556e301d1087..2f4f6ac5fd4e66b1 100644
> > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > @@ -48,6 +48,7 @@ config DRM_RCAR_LVDS
> >  config DRM_RCAR_MIPI_DSI
> >  	tristate "R-Car DU MIPI DSI Encoder Support"
> >  	depends on DRM && DRM_BRIDGE && OF
> > +	depends on ARCH_RENESAS || COMPILE_TEST
> 
> Same as for 1/3, let's move this entry first. I can handle this when
> applying the patches, I'll take 1/3 and 3/3 in my tree already.

Actually, if we wrap all subdrivers in 'if DRM_RCAR_DU', we won't need
1/3 and 3/3. Let's reach a conclusion on that topic first.

> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >  	select DRM_MIPI_DSI
> >  	help
> >  	  Enable support for the R-Car Display Unit embedded MIPI DSI encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  2021-12-15 10:23         ` Laurent Pinchart
@ 2021-12-15 10:30           ` Laurent Pinchart
  -1 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:30 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, DRI Development,
	Linux-Renesas

Hi Geert,

On Wed, Dec 15, 2021 at 12:23:39PM +0200, Laurent Pinchart wrote:
> On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> > On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > > when configuring a kernel without R-Car Display Unit support, like is
> > > > already done for DRM_RCAR_CMM.
> > > >
> > > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > ---
> > > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > > before.
> > > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > > ---
> > > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > > >
> > > >  config DRM_RCAR_USE_LVDS
> > > >       bool "R-Car DU LVDS Encoder Support"
> > > > -     depends on DRM_BRIDGE && OF
> > > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> > >
> > > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> > 
> > DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> > and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)
> 
> It would seem so indeed, my question is whether that shouldn't be fixed
> as well.
> 
> > > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> > 
> > That might work.  It can be tricky with bool/tristate, as sometimes m
> > is not properly propagated.
> 
> Would you give it a try for a v2 ?

Another option is to introduce DRM_RCAR_USE_HDMI and DRM_RCAR_USE_DSI.
I'd like to keep Kconfig consistent, with the same method to handle all
subdrivers if no specific reason requires doing otherwise.

> > > >       default DRM_RCAR_DU
> > > >       help
> > > >         Enable support for the R-Car Display Unit embedded LVDS encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
@ 2021-12-15 10:30           ` Laurent Pinchart
  0 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 10:30 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, DRI Development,
	Linux-Renesas, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Geert,

On Wed, Dec 15, 2021 at 12:23:39PM +0200, Laurent Pinchart wrote:
> On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> > On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > > when configuring a kernel without R-Car Display Unit support, like is
> > > > already done for DRM_RCAR_CMM.
> > > >
> > > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > ---
> > > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > > before.
> > > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > > ---
> > > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > > >
> > > >  config DRM_RCAR_USE_LVDS
> > > >       bool "R-Car DU LVDS Encoder Support"
> > > > -     depends on DRM_BRIDGE && OF
> > > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> > >
> > > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> > 
> > DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> > and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)
> 
> It would seem so indeed, my question is whether that shouldn't be fixed
> as well.
> 
> > > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> > 
> > That might work.  It can be tricky with bool/tristate, as sometimes m
> > is not properly propagated.
> 
> Would you give it a try for a v2 ?

Another option is to introduce DRM_RCAR_USE_HDMI and DRM_RCAR_USE_DSI.
I'd like to keep Kconfig consistent, with the same method to handle all
subdrivers if no specific reason requires doing otherwise.

> > > >       default DRM_RCAR_DU
> > > >       help
> > > >         Enable support for the R-Car Display Unit embedded LVDS encoders.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  2021-12-15 10:30           ` Laurent Pinchart
@ 2021-12-15 10:47             ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 10:47 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, DRI Development,
	Linux-Renesas

Hi Laurent,

On Wed, Dec 15, 2021 at 11:30 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 12:23:39PM +0200, Laurent Pinchart wrote:
> > On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> > > On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > > > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > > > when configuring a kernel without R-Car Display Unit support, like is
> > > > > already done for DRM_RCAR_CMM.
> > > > >
> > > > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > ---
> > > > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > > > before.
> > > > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > > > ---
> > > > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > > > >
> > > > >  config DRM_RCAR_USE_LVDS
> > > > >       bool "R-Car DU LVDS Encoder Support"
> > > > > -     depends on DRM_BRIDGE && OF
> > > > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> > > >
> > > > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> > >
> > > DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> > > and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)
> >
> > It would seem so indeed, my question is whether that shouldn't be fixed
> > as well.

What is there to fix? You can build the HDMI fine without the DU driver,
when compile-testing.

> > > > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> > >
> > > That might work.  It can be tricky with bool/tristate, as sometimes m
> > > is not properly propagated.
> >
> > Would you give it a try for a v2 ?
>
> Another option is to introduce DRM_RCAR_USE_HDMI and DRM_RCAR_USE_DSI.
> I'd like to keep Kconfig consistent, with the same method to handle all
> subdrivers if no specific reason requires doing otherwise.

The HDMI and DSI drivers are separate drivers that can be (test)compiled,
regardless of DRM_RCAR_DU is enabled or not.

The DRM_RCAR_USE_LVDS symbol is different: enabling it does not
have any impact on the kernel build when DRM_RCAR_DU=y.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
@ 2021-12-15 10:47             ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 10:47 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, DRI Development,
	Linux-Renesas, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Laurent,

On Wed, Dec 15, 2021 at 11:30 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 12:23:39PM +0200, Laurent Pinchart wrote:
> > On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> > > On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > > > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > > > when configuring a kernel without R-Car Display Unit support, like is
> > > > > already done for DRM_RCAR_CMM.
> > > > >
> > > > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > ---
> > > > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > > > before.
> > > > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > > > ---
> > > > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > > > >
> > > > >  config DRM_RCAR_USE_LVDS
> > > > >       bool "R-Car DU LVDS Encoder Support"
> > > > > -     depends on DRM_BRIDGE && OF
> > > > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> > > >
> > > > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> > >
> > > DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> > > and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)
> >
> > It would seem so indeed, my question is whether that shouldn't be fixed
> > as well.

What is there to fix? You can build the HDMI fine without the DU driver,
when compile-testing.

> > > > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> > >
> > > That might work.  It can be tricky with bool/tristate, as sometimes m
> > > is not properly propagated.
> >
> > Would you give it a try for a v2 ?
>
> Another option is to introduce DRM_RCAR_USE_HDMI and DRM_RCAR_USE_DSI.
> I'd like to keep Kconfig consistent, with the same method to handle all
> subdrivers if no specific reason requires doing otherwise.

The HDMI and DSI drivers are separate drivers that can be (test)compiled,
regardless of DRM_RCAR_DU is enabled or not.

The DRM_RCAR_USE_LVDS symbol is different: enabling it does not
have any impact on the kernel build when DRM_RCAR_DU=y.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 1/3] drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
  2021-12-15 10:24     ` Laurent Pinchart
@ 2021-12-15 10:48       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 10:48 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, DRI Development,
	Linux-Renesas

Hi Laurent,

On Wed, Dec 15, 2021 at 11:24 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 10:27:45AM +0100, Geert Uytterhoeven wrote:
> > The Renesas R-Car Gen3 and RZ/G2 internal HDMI encoder is only present
> > on Renesas R-Car Gen3 and RZ/G2 SoCs.  Hence add a dependency on
> > ARCH_RENESAS, to prevent asking the user about this driver when
> > configuring a kernel without Renesas SoC support.
> >
> > Fixes: 40d0fa7095d06c73 ("drm: rcar-du: Add Gen3 HDMI encoder support")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

> > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > @@ -25,6 +25,7 @@ config DRM_RCAR_CMM
> >  config DRM_RCAR_DW_HDMI
> >       tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
> >       depends on DRM && OF
> > +     depends on ARCH_RENESAS || COMPILE_TEST
>
> Let's move this entry first to keep alphabetical order.

I tend to keep the "hard" and "soft" dependencies separate, with the
"hard" dependencies listed first.

> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thank you!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 1/3] drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS
@ 2021-12-15 10:48       ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 10:48 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, DRI Development,
	Linux-Renesas, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Laurent,

On Wed, Dec 15, 2021 at 11:24 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 10:27:45AM +0100, Geert Uytterhoeven wrote:
> > The Renesas R-Car Gen3 and RZ/G2 internal HDMI encoder is only present
> > on Renesas R-Car Gen3 and RZ/G2 SoCs.  Hence add a dependency on
> > ARCH_RENESAS, to prevent asking the user about this driver when
> > configuring a kernel without Renesas SoC support.
> >
> > Fixes: 40d0fa7095d06c73 ("drm: rcar-du: Add Gen3 HDMI encoder support")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

> > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > @@ -25,6 +25,7 @@ config DRM_RCAR_CMM
> >  config DRM_RCAR_DW_HDMI
> >       tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
> >       depends on DRM && OF
> > +     depends on ARCH_RENESAS || COMPILE_TEST
>
> Let's move this entry first to keep alphabetical order.

I tend to keep the "hard" and "soft" dependencies separate, with the
"hard" dependencies listed first.

> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thank you!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  2021-12-15 10:47             ` Geert Uytterhoeven
@ 2021-12-15 11:02               ` Laurent Pinchart
  -1 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 11:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, DRI Development,
	Linux-Renesas

Hi Geert,

On Wed, Dec 15, 2021 at 11:47:27AM +0100, Geert Uytterhoeven wrote:
> On Wed, Dec 15, 2021 at 11:30 AM Laurent Pinchart wrote:
> > On Wed, Dec 15, 2021 at 12:23:39PM +0200, Laurent Pinchart wrote:
> > > On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> > > > On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > > > > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > > > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > > > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > > > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > > > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > > > > when configuring a kernel without R-Car Display Unit support, like is
> > > > > > already done for DRM_RCAR_CMM.
> > > > > >
> > > > > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > > ---
> > > > > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > > > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > > > > before.
> > > > > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > > > > ---
> > > > > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > > > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > > > > >
> > > > > >  config DRM_RCAR_USE_LVDS
> > > > > >       bool "R-Car DU LVDS Encoder Support"
> > > > > > -     depends on DRM_BRIDGE && OF
> > > > > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> > > > >
> > > > > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> > > >
> > > > DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> > > > and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)
> > >
> > > It would seem so indeed, my question is whether that shouldn't be fixed
> > > as well.
> 
> What is there to fix? You can build the HDMI fine without the DU driver,
> when compile-testing.

But it polutes the kernel config by asking a question that is irrelevant
to users who don't have DRM_RCAR_DU enabled. Other patches in this
series address this relevance issue with a dependency on ARCH_RENESAS,
while for CMM and LVDS the dependency is on DRM_RCAR_DU.

> > > > > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> > > >
> > > > That might work.  It can be tricky with bool/tristate, as sometimes m
> > > > is not properly propagated.
> > >
> > > Would you give it a try for a v2 ?
> >
> > Another option is to introduce DRM_RCAR_USE_HDMI and DRM_RCAR_USE_DSI.
> > I'd like to keep Kconfig consistent, with the same method to handle all
> > subdrivers if no specific reason requires doing otherwise.
> 
> The HDMI and DSI drivers are separate drivers that can be (test)compiled,
> regardless of DRM_RCAR_DU is enabled or not.
> 
> The DRM_RCAR_USE_LVDS symbol is different: enabling it does not
> have any impact on the kernel build when DRM_RCAR_DU=y.

That's only caused by how Kconfig is structured, the LVDS encoder is
also a separate kernel module, like the HDMI and DSI encoders. The
difference is caused by the fact that the DU driver needs to call
functions exported by the LVDS driver, which caused requires preventing
a configuration where DRM_RCAR_DU would be built-in and DRM_RCAR_LVDS
would be built as a module.

Patches 1/3 and 3/3 in this series address the fact that the user
shouldn't be asked about the DSI and HDMI encoders if ARCH_RENESAS isn't
set, as those options are meaningless in that case (except when
compile-testing, which is enabled through COMPILE_TEST). The same
happens with this patch due to the dependency on DRM_RCAR_DU, which
itself depends on ARCH_RENESAS. I don't like how we end up doing similar
things in different ways, that makes Kconfig harder to understand and
maintain. I'd like to see all this fixed in a cleaner way, and I think a
'if DRM_RCAR_DU' would address the config "polution" issue in one go for
all subdrivers.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
@ 2021-12-15 11:02               ` Laurent Pinchart
  0 siblings, 0 replies; 34+ messages in thread
From: Laurent Pinchart @ 2021-12-15 11:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, DRI Development,
	Linux-Renesas, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Geert,

On Wed, Dec 15, 2021 at 11:47:27AM +0100, Geert Uytterhoeven wrote:
> On Wed, Dec 15, 2021 at 11:30 AM Laurent Pinchart wrote:
> > On Wed, Dec 15, 2021 at 12:23:39PM +0200, Laurent Pinchart wrote:
> > > On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> > > > On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > > > > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > > > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > > > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > > > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > > > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > > > > when configuring a kernel without R-Car Display Unit support, like is
> > > > > > already done for DRM_RCAR_CMM.
> > > > > >
> > > > > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > > ---
> > > > > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > > > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > > > > before.
> > > > > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > > > > ---
> > > > > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > > > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > > > > >
> > > > > >  config DRM_RCAR_USE_LVDS
> > > > > >       bool "R-Car DU LVDS Encoder Support"
> > > > > > -     depends on DRM_BRIDGE && OF
> > > > > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> > > > >
> > > > > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> > > >
> > > > DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> > > > and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)
> > >
> > > It would seem so indeed, my question is whether that shouldn't be fixed
> > > as well.
> 
> What is there to fix? You can build the HDMI fine without the DU driver,
> when compile-testing.

But it polutes the kernel config by asking a question that is irrelevant
to users who don't have DRM_RCAR_DU enabled. Other patches in this
series address this relevance issue with a dependency on ARCH_RENESAS,
while for CMM and LVDS the dependency is on DRM_RCAR_DU.

> > > > > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> > > >
> > > > That might work.  It can be tricky with bool/tristate, as sometimes m
> > > > is not properly propagated.
> > >
> > > Would you give it a try for a v2 ?
> >
> > Another option is to introduce DRM_RCAR_USE_HDMI and DRM_RCAR_USE_DSI.
> > I'd like to keep Kconfig consistent, with the same method to handle all
> > subdrivers if no specific reason requires doing otherwise.
> 
> The HDMI and DSI drivers are separate drivers that can be (test)compiled,
> regardless of DRM_RCAR_DU is enabled or not.
> 
> The DRM_RCAR_USE_LVDS symbol is different: enabling it does not
> have any impact on the kernel build when DRM_RCAR_DU=y.

That's only caused by how Kconfig is structured, the LVDS encoder is
also a separate kernel module, like the HDMI and DSI encoders. The
difference is caused by the fact that the DU driver needs to call
functions exported by the LVDS driver, which caused requires preventing
a configuration where DRM_RCAR_DU would be built-in and DRM_RCAR_LVDS
would be built as a module.

Patches 1/3 and 3/3 in this series address the fact that the user
shouldn't be asked about the DSI and HDMI encoders if ARCH_RENESAS isn't
set, as those options are meaningless in that case (except when
compile-testing, which is enabled through COMPILE_TEST). The same
happens with this patch due to the dependency on DRM_RCAR_DU, which
itself depends on ARCH_RENESAS. I don't like how we end up doing similar
things in different ways, that makes Kconfig harder to understand and
maintain. I'd like to see all this fixed in a cleaner way, and I think a
'if DRM_RCAR_DU' would address the config "polution" issue in one go for
all subdrivers.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
  2021-12-15 11:02               ` Laurent Pinchart
@ 2021-12-15 13:34                 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 13:34 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Ulrich Hecht,
	Koji Matsuoka, Arnd Bergmann, LUU HOAI, DRI Development,
	Linux-Renesas

Hi Laurent,

On Wed, Dec 15, 2021 at 12:02 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 11:47:27AM +0100, Geert Uytterhoeven wrote:
> > On Wed, Dec 15, 2021 at 11:30 AM Laurent Pinchart wrote:
> > > On Wed, Dec 15, 2021 at 12:23:39PM +0200, Laurent Pinchart wrote:
> > > > On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> > > > > On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > > > > > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > > > > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > > > > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > > > > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > > > > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > > > > > when configuring a kernel without R-Car Display Unit support, like is
> > > > > > > already done for DRM_RCAR_CMM.
> > > > > > >
> > > > > > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > > > ---
> > > > > > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > > > > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > > > > > before.
> > > > > > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > > > > > ---
> > > > > > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > > > > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > > > > > >
> > > > > > >  config DRM_RCAR_USE_LVDS
> > > > > > >       bool "R-Car DU LVDS Encoder Support"
> > > > > > > -     depends on DRM_BRIDGE && OF
> > > > > > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> > > > > >
> > > > > > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> > > > >
> > > > > DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> > > > > and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)
> > > >
> > > > It would seem so indeed, my question is whether that shouldn't be fixed
> > > > as well.
> >
> > What is there to fix? You can build the HDMI fine without the DU driver,
> > when compile-testing.
>
> But it polutes the kernel config by asking a question that is irrelevant
> to users who don't have DRM_RCAR_DU enabled. Other patches in this
> series address this relevance issue with a dependency on ARCH_RENESAS,
> while for CMM and LVDS the dependency is on DRM_RCAR_DU.
>
> > > > > > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> > > > >
> > > > > That might work.  It can be tricky with bool/tristate, as sometimes m
> > > > > is not properly propagated.
> > > >
> > > > Would you give it a try for a v2 ?
> > >
> > > Another option is to introduce DRM_RCAR_USE_HDMI and DRM_RCAR_USE_DSI.
> > > I'd like to keep Kconfig consistent, with the same method to handle all
> > > subdrivers if no specific reason requires doing otherwise.
> >
> > The HDMI and DSI drivers are separate drivers that can be (test)compiled,
> > regardless of DRM_RCAR_DU is enabled or not.
> >
> > The DRM_RCAR_USE_LVDS symbol is different: enabling it does not
> > have any impact on the kernel build when DRM_RCAR_DU=y.
>
> That's only caused by how Kconfig is structured, the LVDS encoder is
> also a separate kernel module, like the HDMI and DSI encoders. The
> difference is caused by the fact that the DU driver needs to call
> functions exported by the LVDS driver, which caused requires preventing
> a configuration where DRM_RCAR_DU would be built-in and DRM_RCAR_LVDS
> would be built as a module.
>
> Patches 1/3 and 3/3 in this series address the fact that the user
> shouldn't be asked about the DSI and HDMI encoders if ARCH_RENESAS isn't
> set, as those options are meaningless in that case (except when
> compile-testing, which is enabled through COMPILE_TEST). The same
> happens with this patch due to the dependency on DRM_RCAR_DU, which
> itself depends on ARCH_RENESAS. I don't like how we end up doing similar
> things in different ways, that makes Kconfig harder to understand and
> maintain. I'd like to see all this fixed in a cleaner way, and I think a
> 'if DRM_RCAR_DU' would address the config "polution" issue in one go for
> all subdrivers.

If you prefer the big "if", fine for me.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU
@ 2021-12-15 13:34                 ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2021-12-15 13:34 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Arnd Bergmann, David Airlie, Koji Matsuoka, DRI Development,
	Linux-Renesas, Kieran Bingham, Ulrich Hecht, LUU HOAI

Hi Laurent,

On Wed, Dec 15, 2021 at 12:02 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wed, Dec 15, 2021 at 11:47:27AM +0100, Geert Uytterhoeven wrote:
> > On Wed, Dec 15, 2021 at 11:30 AM Laurent Pinchart wrote:
> > > On Wed, Dec 15, 2021 at 12:23:39PM +0200, Laurent Pinchart wrote:
> > > > On Wed, Dec 15, 2021 at 11:17:37AM +0100, Geert Uytterhoeven wrote:
> > > > > On Wed, Dec 15, 2021 at 11:12 AM Laurent Pinchart wrote:
> > > > > > On Wed, Dec 15, 2021 at 10:27:46AM +0100, Geert Uytterhoeven wrote:
> > > > > > > The Renesas R-Car LVDS encoder driver is a subdriver of the R-Car
> > > > > > > Display Unit driver, and enabling DRM_RCAR_USE_LVDS while DRM_RCAR_DU is
> > > > > > > disabled doesn't have any impact on the kernel built.  Hence add a
> > > > > > > dependency on DRM_RCAR_DU, to prevent asking the user about this driver
> > > > > > > when configuring a kernel without R-Car Display Unit support, like is
> > > > > > > already done for DRM_RCAR_CMM.
> > > > > > >
> > > > > > > Fixes: 42d95d1b3a9c649b ("drm/rcar: stop using 'imply' for dependencies")
> > > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > > > ---
> > > > > > > The problem pre-existed before commit 42d95d1b3a9c649b, as the
> > > > > > > dependency of DRM_RCAR_LVDS on DRM_RCAR_DU was accidentally removed
> > > > > > > before.
> > > > > > > Fixes: c6a27fa41fabb35f ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
> > > > > > > ---
> > > > > > >  drivers/gpu/drm/rcar-du/Kconfig | 2 +-
> > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > > index 65d72be50f46f19e..a7aa556e301d1087 100644
> > > > > > > --- a/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > > +++ b/drivers/gpu/drm/rcar-du/Kconfig
> > > > > > > @@ -32,7 +32,7 @@ config DRM_RCAR_DW_HDMI
> > > > > > >
> > > > > > >  config DRM_RCAR_USE_LVDS
> > > > > > >       bool "R-Car DU LVDS Encoder Support"
> > > > > > > -     depends on DRM_BRIDGE && OF
> > > > > > > +     depends on DRM_BRIDGE && OF && DRM_RCAR_DU
> > > > > >
> > > > > > Shouldn't the same be done for DRM_RCAR_DW_HDMI ? Even better, we could
> > > > >
> > > > > DRM_RCAR_DW_HDMI can be enabled and built with CONFIG_COMPILE_TEST=y
> > > > > and CONFIG_DRM_RCAR_DU=n (yes I've tried on RISC-V ;-)
> > > >
> > > > It would seem so indeed, my question is whether that shouldn't be fixed
> > > > as well.
> >
> > What is there to fix? You can build the HDMI fine without the DU driver,
> > when compile-testing.
>
> But it polutes the kernel config by asking a question that is irrelevant
> to users who don't have DRM_RCAR_DU enabled. Other patches in this
> series address this relevance issue with a dependency on ARCH_RENESAS,
> while for CMM and LVDS the dependency is on DRM_RCAR_DU.
>
> > > > > > wrap all the entries for the subdrivers in a 'if DRM_RCAR_DU'.
> > > > >
> > > > > That might work.  It can be tricky with bool/tristate, as sometimes m
> > > > > is not properly propagated.
> > > >
> > > > Would you give it a try for a v2 ?
> > >
> > > Another option is to introduce DRM_RCAR_USE_HDMI and DRM_RCAR_USE_DSI.
> > > I'd like to keep Kconfig consistent, with the same method to handle all
> > > subdrivers if no specific reason requires doing otherwise.
> >
> > The HDMI and DSI drivers are separate drivers that can be (test)compiled,
> > regardless of DRM_RCAR_DU is enabled or not.
> >
> > The DRM_RCAR_USE_LVDS symbol is different: enabling it does not
> > have any impact on the kernel build when DRM_RCAR_DU=y.
>
> That's only caused by how Kconfig is structured, the LVDS encoder is
> also a separate kernel module, like the HDMI and DSI encoders. The
> difference is caused by the fact that the DU driver needs to call
> functions exported by the LVDS driver, which caused requires preventing
> a configuration where DRM_RCAR_DU would be built-in and DRM_RCAR_LVDS
> would be built as a module.
>
> Patches 1/3 and 3/3 in this series address the fact that the user
> shouldn't be asked about the DSI and HDMI encoders if ARCH_RENESAS isn't
> set, as those options are meaningless in that case (except when
> compile-testing, which is enabled through COMPILE_TEST). The same
> happens with this patch due to the dependency on DRM_RCAR_DU, which
> itself depends on ARCH_RENESAS. I don't like how we end up doing similar
> things in different ways, that makes Kconfig harder to understand and
> maintain. I'd like to see all this fixed in a cleaner way, and I think a
> 'if DRM_RCAR_DU' would address the config "polution" issue in one go for
> all subdrivers.

If you prefer the big "if", fine for me.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2021-12-15 13:34 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15  9:27 [PATCH 0/3] drm: rcar-du: Add missing dependencies Geert Uytterhoeven
2021-12-15  9:27 ` Geert Uytterhoeven
2021-12-15  9:27 ` [PATCH 1/3] drm: rcar-du: DRM_RCAR_DW_HDMI should depend on ARCH_RENESAS Geert Uytterhoeven
2021-12-15  9:27   ` Geert Uytterhoeven
2021-12-15 10:24   ` Laurent Pinchart
2021-12-15 10:24     ` Laurent Pinchart
2021-12-15 10:48     ` Geert Uytterhoeven
2021-12-15 10:48       ` Geert Uytterhoeven
2021-12-15  9:27 ` [PATCH 2/3] drm: rcar-du: DRM_RCAR_USE_LVDS should depend on DRM_RCAR_DU Geert Uytterhoeven
2021-12-15  9:27   ` Geert Uytterhoeven
2021-12-15 10:12   ` Laurent Pinchart
2021-12-15 10:12     ` Laurent Pinchart
2021-12-15 10:17     ` Geert Uytterhoeven
2021-12-15 10:17       ` Geert Uytterhoeven
2021-12-15 10:23       ` Laurent Pinchart
2021-12-15 10:23         ` Laurent Pinchart
2021-12-15 10:30         ` Laurent Pinchart
2021-12-15 10:30           ` Laurent Pinchart
2021-12-15 10:47           ` Geert Uytterhoeven
2021-12-15 10:47             ` Geert Uytterhoeven
2021-12-15 11:02             ` Laurent Pinchart
2021-12-15 11:02               ` Laurent Pinchart
2021-12-15 13:34               ` Geert Uytterhoeven
2021-12-15 13:34                 ` Geert Uytterhoeven
2021-12-15  9:27 ` [PATCH 3/3] drm: rcar-du: DRM_RCAR_MIPI_DSI should depend on ARCH_RENESAS Geert Uytterhoeven
2021-12-15  9:27   ` Geert Uytterhoeven
2021-12-15 10:25   ` Laurent Pinchart
2021-12-15 10:25     ` Laurent Pinchart
2021-12-15 10:29     ` Laurent Pinchart
2021-12-15 10:29       ` Laurent Pinchart
2021-12-15  9:42 ` [PATCH 0/3] drm: rcar-du: Add missing dependencies Laurent Pinchart
2021-12-15  9:42   ` Laurent Pinchart
2021-12-15 10:12   ` Geert Uytterhoeven
2021-12-15 10:12     ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.