drm: rcar_du: DRM_RCAR_DU optionally depends on RCAR_MIPI_DSI
Subsystems (3)
PATCH 1/1 drm: rcar_du: DRM_RCAR_DU optionally depends on RCAR_MIPI_DSI
When CONFIG_DRM_RCAR_DU=y and CONFIG_DRM_RCAR_MIPI_DSI=m, calls from the builtin driver to the mipi driver fail due to linker errors.
Since the RCAR_MIPI_DSI driver is not always required, fix the build error by making DRM_RCAR_DU optionally depend on the RCAR_MIPI_DSI Kconfig symbol. This prevents the problematic kconfig combination without requiring that RCAR_MIPI_DSI always be enabled.
aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
rcar_du_crtc.c:(.text+0x3a18): undefined reference to `rcar_mipi_dsi_pclk_enable'
aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
rcar_du_crtc.c:(.text+0x47cc): undefined reference to `rcar_mipi_dsi_pclk_disable'
--- drivers/gpu/drm/rcar-du/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/rcar-du/Kconfig +1 -0
@@ -4,6 +4,7 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST + depends on DRM_RCAR_MIPI_DSI || DRM_RCAR_MIPI_DSI=n select DRM_KMS_HELPER select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS
ping. I have verified (on linux-next-20221103) that this is still needed. Thanks.
Quoted 39 lines · Randy Dunlap
When
CONFIG_DRM_RCAR_DU=yandCONFIG_DRM_RCAR_MIPI_DSI=m, calls from the builtin driver to the mipi driver fail due to linker errors.
Since theRCAR_MIPI_DSIdriver is not always required, fix the build error by makingDRM_RCAR_DUoptionally depend on theRCAR_MIPI_DSIKconfigsymbol. This prevents the problematic kconfig combination without requiring thatRCAR_MIPI_DSIalways be enabled.aarch64-linux-ld:
drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
rcar_du_crtc.c:(.text+0x3a18): undefined reference to `rcar_mipi_dsi_pclk_enable'
aarch64-linux-ld:drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
rcar_du_crtc.c:(.text+0x47cc): undefined reference to `rcar_mipi_dsi_pclk_disable'Fixes 957fe62d7d15 ("drm: rcar-du: Fix DSI enable & disable sequence")Signed-off-by Randy Dunlap <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Kieran Bingham <[email protected]>Cc LUU HOAI <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/rcar-du/Kconfig | 1 + 1 file changed, 1 insertion(+)diff -- a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
drivers/gpu/drm/rcar-du/Kconfig +1
-0@@ -4,6 +4,7 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST + depends on DRM_RCAR_MIPI_DSI || DRM_RCAR_MIPI_DSI=n select DRM_KMS_HELPER select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS
Signature · 1 line
~Randy
Hi Randy,
Quoting Randy Dunlap (2022-11-03 06:06:45)
Quoted 32 lines
ping. I have verified (on linux-next-20221103) that this is still needed. Thanks.
Quoted 28 lines · Randy Dunlap
When
CONFIG_DRM_RCAR_DU=yandCONFIG_DRM_RCAR_MIPI_DSI=m, calls from the builtin driver to the mipi driver fail due to linker errors.
Since theRCAR_MIPI_DSIdriver is not always required, fix the build error by makingDRM_RCAR_DUoptionally depend on theRCAR_MIPI_DSIKconfigsymbol. This prevents the problematic kconfig combination without requiring thatRCAR_MIPI_DSIalways be enabled.aarch64-linux-ld:
drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
rcar_du_crtc.c:(.text+0x3a18): undefined reference to `rcar_mipi_dsi_pclk_enable'
aarch64-linux-ld:drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
rcar_du_crtc.c:(.text+0x47cc): undefined reference to `rcar_mipi_dsi_pclk_disable'Fixes 957fe62d7d15 ("drm: rcar-du: Fix DSI enable & disable sequence")Signed-off-by Randy Dunlap <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Kieran Bingham <[email protected]>Cc LUU HOAI <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/rcar-du/Kconfig | 1 + 1 file changed, 1 insertion(+)
Quoted 8 lines
drivers/gpu/drm/rcar-du/Kconfig config DRM_RCAR_DU · line 7
Quoted 8 lines
diff -- a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
drivers/gpu/drm/rcar-du/Kconfig +1
-0@@ -4,6 +4,7 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST + depends on DRM_RCAR_MIPI_DSI || DRM_RCAR_MIPI_DSI=n
Please forgive my ignorance, but I don't understand how this works. Could you explain what this is doing please?
I know you've explained above that it fixes it to optionally depend on DRM_RCAR_MIPI_DSI ... but it's not making sense to me.
To me - this is saying we depend on DRM_RCAR_MIPI_DSI being enabled, or not being enabled ... ? Which is like saying if (0 || 1) ?
I'm guessing I'm missing something obvious :-S
--
Kieran
Quoted 6 lines
Quoted 3 lines
drivers/gpu/drm/rcar-du/Kconfig +0
-0select DRM_KMS_HELPER select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERSSignature · 1 line
~Randy
Hello Kieran,
Quoted 47 lines · Kieran Bingham
Hi Randy,
Quoting Randy Dunlap (2022-11-03 06:06:45)
Quoted 32 lines
ping. I have verified (on linux-next-20221103) that this is still needed. Thanks.
Quoted 28 lines · Randy Dunlap
When
CONFIG_DRM_RCAR_DU=yandCONFIG_DRM_RCAR_MIPI_DSI=m, calls from the builtin driver to the mipi driver fail due to linker errors.
Since theRCAR_MIPI_DSIdriver is not always required, fix the build error by makingDRM_RCAR_DUoptionally depend on theRCAR_MIPI_DSIKconfigsymbol. This prevents the problematic kconfig combination without requiring thatRCAR_MIPI_DSIalways be enabled.aarch64-linux-ld:
drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
rcar_du_crtc.c:(.text+0x3a18): undefined reference to `rcar_mipi_dsi_pclk_enable'
aarch64-linux-ld:drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
rcar_du_crtc.c:(.text+0x47cc): undefined reference to `rcar_mipi_dsi_pclk_disable'Fixes 957fe62d7d15 ("drm: rcar-du: Fix DSI enable & disable sequence")Signed-off-by Randy Dunlap <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Kieran Bingham <[email protected]>Cc LUU HOAI <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/rcar-du/Kconfig | 1 + 1 file changed, 1 insertion(+)Quoted 8 lines
drivers/gpu/drm/rcar-du/Kconfig config DRM_RCAR_DU · line 7
Quoted 8 lines
diff -- a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
drivers/gpu/drm/rcar-du/Kconfig +1
-0@@ -4,6 +4,7 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST + depends on DRM_RCAR_MIPI_DSI || DRM_RCAR_MIPI_DSI=nPlease forgive my ignorance, but I don't understand how this works. Could you explain what this is doing please?
Quoted 8 lines
I know you've explained above that it fixes it to optionally depend on
DRM_RCAR_MIPI_DSI... but it's not making sense to me.To me - this is saying we depend on
DRM_RCAR_MIPI_DSIbeing enabled, or not being enabled ... ? Which is like saying if (0 || 1) ?I'm guessing I'm missing something obvious :-S
What this Kconfig expression is saying is that it depends on DRM_RCAR_MIPI_DSI=y if DRM_RCAR_DU=y and DRM_RCAR_MIPI_DSI=m if DRM_RCAR_DU=m. But that the it can also be satisfied if is not set DRM_RCAR_MIPI_DSI.
This is usually used to make sure that you don't end with a configuration where DRM_RCAR_MIPI_DSI=y and DRM_RCAR_DU=m or DRM_RCAR_MIPI_DSI=m and DRM_RCAR_DU=y.
Randy, I think that it's more idiomatic though to it express as following:
depends on DRM_RCAR_MIPI_DSI || !DRM_RCAR_MIPI_DSI
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
On 11/3/22 12:53, Javier Martinez Canillas wrote:
[...]
Quoted 4 lines
Quoted 1 line
What this
Kconfigexpression is saying is that it depends on DRM_RCAR_MIPI_DSI=y if DRM_RCAR_DU=y and DRM_RCAR_MIPI_DSI=m if DRM_RCAR_DU=m. But that the it can
It should had been s/and/or here but you get the idea.
Quoted 9 lines
also be satisfied if is not set
DRM_RCAR_MIPI_DSI.This is usually used to make sure that you don't end with a configuration where DRM_RCAR_MIPI_DSI=y and DRM_RCAR_DU=m or DRM_RCAR_MIPI_DSI=m and DRM_RCAR_DU=y.
Randy, I think that it's more idiomatic though to it express as following:
depends on
DRM_RCAR_MIPI_DSI|| !DRM_RCAR_MIPI_DSI
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Kieran Bingham
Reviewed-byQuoting Javier Martinez Canillas (2022-11-03 11:53:14)
Quoted 63 lines
Hello Kieran,
Quoted 47 lines · Kieran Bingham
Hi Randy,
Quoting Randy Dunlap (2022-11-03 06:06:45)
Quoted 32 lines
ping. I have verified (on linux-next-20221103) that this is still needed. Thanks.
Quoted 28 lines · Randy Dunlap
When
CONFIG_DRM_RCAR_DU=yandCONFIG_DRM_RCAR_MIPI_DSI=m, calls from the builtin driver to the mipi driver fail due to linker errors.
Since theRCAR_MIPI_DSIdriver is not always required, fix the build error by makingDRM_RCAR_DUoptionally depend on theRCAR_MIPI_DSIKconfigsymbol. This prevents the problematic kconfig combination without requiring thatRCAR_MIPI_DSIalways be enabled.aarch64-linux-ld:
drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
rcar_du_crtc.c:(.text+0x3a18): undefined reference to `rcar_mipi_dsi_pclk_enable'
aarch64-linux-ld:drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
rcar_du_crtc.c:(.text+0x47cc): undefined reference to `rcar_mipi_dsi_pclk_disable'Fixes 957fe62d7d15 ("drm: rcar-du: Fix DSI enable & disable sequence")Signed-off-by Randy Dunlap <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Kieran Bingham <[email protected]>Cc LUU HOAI <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/rcar-du/Kconfig | 1 + 1 file changed, 1 insertion(+)Quoted 8 lines
drivers/gpu/drm/rcar-du/Kconfig config DRM_RCAR_DU · line 7
Quoted 8 lines
diff -- a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
drivers/gpu/drm/rcar-du/Kconfig +1
-0@@ -4,6 +4,7 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST + depends on DRM_RCAR_MIPI_DSI || DRM_RCAR_MIPI_DSI=nPlease forgive my ignorance, but I don't understand how this works. Could you explain what this is doing please?
Quoted 8 lines
I know you've explained above that it fixes it to optionally depend on
DRM_RCAR_MIPI_DSI... but it's not making sense to me.To me - this is saying we depend on
DRM_RCAR_MIPI_DSIbeing enabled, or not being enabled ... ? Which is like saying if (0 || 1) ?I'm guessing I'm missing something obvious :-S
What this
Kconfigexpression is saying is that it depends on DRM_RCAR_MIPI_DSI=y if DRM_RCAR_DU=y and DRM_RCAR_MIPI_DSI=m if DRM_RCAR_DU=m. But that the it can also be satisfied if is not setDRM_RCAR_MIPI_DSI.
Quoted 6 lines
This is usually used to make sure that you don't end with a configuration where DRM_RCAR_MIPI_DSI=y and DRM_RCAR_DU=m or DRM_RCAR_MIPI_DSI=m and DRM_RCAR_DU=y.
Randy, I think that it's more idiomatic though to it express as following:
depends on
DRM_RCAR_MIPI_DSI|| !DRM_RCAR_MIPI_DSI
Ok - thanks, so it's the module part that breaks. I never build modules, always builtin - so it doesn't hit me ;-)
Anyway - it certainly makes sense now I think so either as posted, or with the idiomatic proposal from Javier:
Quoted 8 lines
Signature · 6 lines
-- Best regards, Javier Martinez Canillas Core Platforms Red Hat
Hi,
Quoted 57 lines · Javier Martinez Canillas
Hello Kieran,
Quoted 54 lines · Kieran Bingham
Hi Randy,
Quoting Randy Dunlap (2022-11-03 06:06:45)
Quoted 32 lines
ping. I have verified (on linux-next-20221103) that this is still needed. Thanks.
Quoted 28 lines · Randy Dunlap
When
CONFIG_DRM_RCAR_DU=yandCONFIG_DRM_RCAR_MIPI_DSI=m, calls from the builtin driver to the mipi driver fail due to linker errors.
Since theRCAR_MIPI_DSIdriver is not always required, fix the build error by makingDRM_RCAR_DUoptionally depend on theRCAR_MIPI_DSIKconfigsymbol. This prevents the problematic kconfig combination without requiring thatRCAR_MIPI_DSIalways be enabled.aarch64-linux-ld:
drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
rcar_du_crtc.c:(.text+0x3a18): undefined reference to `rcar_mipi_dsi_pclk_enable'
aarch64-linux-ld:drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
rcar_du_crtc.c:(.text+0x47cc): undefined reference to `rcar_mipi_dsi_pclk_disable'Fixes 957fe62d7d15 ("drm: rcar-du: Fix DSI enable & disable sequence")Signed-off-by Randy Dunlap <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Kieran Bingham <[email protected]>Cc LUU HOAI <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/rcar-du/Kconfig | 1 + 1 file changed, 1 insertion(+)Quoted 8 lines
drivers/gpu/drm/rcar-du/Kconfig config DRM_RCAR_DU · line 7
Quoted 8 lines
diff -- a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
drivers/gpu/drm/rcar-du/Kconfig +1
-0@@ -4,6 +4,7 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST + depends on DRM_RCAR_MIPI_DSI || DRM_RCAR_MIPI_DSI=nPlease forgive my ignorance, but I don't understand how this works. Could you explain what this is doing please?
I know you've explained above that it fixes it to optionally depend on
DRM_RCAR_MIPI_DSI... but it's not making sense to me.To me - this is saying we depend on
DRM_RCAR_MIPI_DSIbeing enabled, or not being enabled ... ? Which is like saying if (0 || 1) ?I'm guessing I'm missing something obvious :-S
It's kconfig tristate symbols (y/n/m), not boolean. :)
Quoted 10 lines
What this
Kconfigexpression is saying is that it depends on DRM_RCAR_MIPI_DSI=y if DRM_RCAR_DU=y and DRM_RCAR_MIPI_DSI=m if DRM_RCAR_DU=m. But that the it can also be satisfied if is not setDRM_RCAR_MIPI_DSI.This is usually used to make sure that you don't end with a configuration where DRM_RCAR_MIPI_DSI=y and DRM_RCAR_DU=m or DRM_RCAR_MIPI_DSI=m and DRM_RCAR_DU=y.
Randy, I think that it's more idiomatic though to it express as following:
depends on
DRM_RCAR_MIPI_DSI|| !DRM_RCAR_MIPI_DSI
I count just over 200 of each idiom (but my grep strings could be too crude). I guess that you want a v2 with that change?
Thanks.
Signature · 1 line
~Randy
On 11/3/22 17:26, Randy Dunlap wrote:
[...]
Quoted 8 lines
Quoted 4 lines
Randy, I think that it's more idiomatic though to it express as following:
depends on
DRM_RCAR_MIPI_DSI|| !DRM_RCAR_MIPI_DSII count just over 200 of each idiom (but my grep strings could be too crude). I guess that you want a v2 with that change?
I believe Kieran was happy with either so no objections from me. I don't have a strong opinion, I just thought the latter was more idiomatic but you said that both are used alike.
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Hi Randy,
Thank you for the patch.
Quoted 9 lines · Randy Dunlap
When
CONFIG_DRM_RCAR_DU=yandCONFIG_DRM_RCAR_MIPI_DSI=m, calls from the builtin driver to the mipi driver fail due to linker errors.
Since theRCAR_MIPI_DSIdriver is not always required, fix the build error by makingDRM_RCAR_DUoptionally depend on theRCAR_MIPI_DSIKconfigsymbol. This prevents the problematic kconfig combination without requiring thatRCAR_MIPI_DSIalways be enabled.
Quoted 4 lines
aarch64-linux-ld:
drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
rcar_du_crtc.c:(.text+0x3a18): undefined reference to `rcar_mipi_dsi_pclk_enable'
aarch64-linux-ld:drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
rcar_du_crtc.c:(.text+0x47cc): undefined reference to `rcar_mipi_dsi_pclk_disable'
I've already posted a fix, see
https://lore.kernel.org/dri-devel/[email protected]/
It aligns with how the LVDS encoder driver is handled, so I would prefer that. I will send a pull request shortly, as a v6.1 fix.
Quoted 25 lines
Fixes 957fe62d7d15 ("drm: rcar-du: Fix DSI enable & disable sequence")Signed-off-by Randy Dunlap <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Kieran Bingham <[email protected]>Cc LUU HOAI <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/rcar-du/Kconfig | 1 + 1 file changed, 1 insertion(+)diff -- a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
drivers/gpu/drm/rcar-du/Kconfig +1
-0@@ -4,6 +4,7 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST + depends on DRM_RCAR_MIPI_DSI || DRM_RCAR_MIPI_DSI=n select DRM_KMS_HELPER select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS
Signature · 3 lines
Regards, Laurent Pinchart