mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS
@ 2023-04-03  9:33 AngeloGioacchino Del Regno
  2023-04-07 14:40 ` Alexandre Mergnat
  2023-04-11 15:16 ` Matthias Brugger
  0 siblings, 2 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-03  9:33 UTC (permalink / raw)
  To: matthias.bgg
  Cc: angelogioacchino.delregno, linux-kernel, linux-arm-kernel,
	linux-mediatek, kernel

The mtk-mmsys and mutex drivers do have a dependency on MTK_CMDQ,
even though both can work with *or* without it: since CMDQ support
can be enabled either as module or as built-in, it is necessary to
add a depends rule in Kconfig, so that we disallow building both
mtk-mmsys and mtk-mutex as built-in if mtk-cmdq-helper is built as
a module, otherwise obvious linker issues appear.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---

This has no Fixes tag because the commit that can produce the issue that gets
prevented in this commit is already in the maintainer's tree.

 drivers/soc/mediatek/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
index d6b83a5508ca..a88cf04fc803 100644
--- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig
@@ -76,6 +76,7 @@ config MTK_MMSYS
 	tristate "MediaTek MMSYS Support"
 	default ARCH_MEDIATEK
 	depends on HAS_IOMEM
+	depends on MTK_CMDQ || MTK_CMDQ=n
 	help
 	  Say yes here to add support for the MediaTek Multimedia
 	  Subsystem (MMSYS).
-- 
2.40.0


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

* Re: [PATCH] soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS
  2023-04-03  9:33 [PATCH] soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS AngeloGioacchino Del Regno
@ 2023-04-07 14:40 ` Alexandre Mergnat
  2023-04-11 15:16 ` Matthias Brugger
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Mergnat @ 2023-04-07 14:40 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, matthias.bgg
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, kernel

On 03/04/2023 11:33, AngeloGioacchino Del Regno wrote:
> The mtk-mmsys and mutex drivers do have a dependency on MTK_CMDQ,
> even though both can work with *or* without it: since CMDQ support
> can be enabled either as module or as built-in, it is necessary to
> add a depends rule in Kconfig, so that we disallow building both
> mtk-mmsys and mtk-mutex as built-in if mtk-cmdq-helper is built as
> a module, otherwise obvious linker issues appear.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> 
> This has no Fixes tag because the commit that can produce the issue that gets
> prevented in this commit is already in the maintainer's tree.
> 
>   drivers/soc/mediatek/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
> index d6b83a5508ca..a88cf04fc803 100644
> --- a/drivers/soc/mediatek/Kconfig
> +++ b/drivers/soc/mediatek/Kconfig
> @@ -76,6 +76,7 @@ config MTK_MMSYS
>   	tristate "MediaTek MMSYS Support"
>   	default ARCH_MEDIATEK
>   	depends on HAS_IOMEM
> +	depends on MTK_CMDQ || MTK_CMDQ=n
>   	help
>   	  Say yes here to add support for the MediaTek Multimedia
>   	  Subsystem (MMSYS).

Hi Angelo

I guess it should also be done for DRM_MEDIATEK, if I refer to the lsmod 
result:

Module                  Size  Used by
mtk_cmdq_helper        20480  1 mediatek_drm
mtk_cmdq_mailbox       20480  1 mtk_cmdq_helper

Or is it maybe enough to protect the call of the dependent driver with 
IS_REACHABLE or IS_ENABLED helpers ?

What do you think ?

Regards,
Alexandre


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

* Re: [PATCH] soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS
  2023-04-03  9:33 [PATCH] soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS AngeloGioacchino Del Regno
  2023-04-07 14:40 ` Alexandre Mergnat
@ 2023-04-11 15:16 ` Matthias Brugger
  1 sibling, 0 replies; 3+ messages in thread
From: Matthias Brugger @ 2023-04-11 15:16 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, kernel



On 03/04/2023 11:33, AngeloGioacchino Del Regno wrote:
> The mtk-mmsys and mutex drivers do have a dependency on MTK_CMDQ,
> even though both can work with *or* without it: since CMDQ support
> can be enabled either as module or as built-in, it is necessary to
> add a depends rule in Kconfig, so that we disallow building both
> mtk-mmsys and mtk-mutex as built-in if mtk-cmdq-helper is built as
> a module, otherwise obvious linker issues appear.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Applied, thanks!
Matthias

> ---
> 
> This has no Fixes tag because the commit that can produce the issue that gets
> prevented in this commit is already in the maintainer's tree.
> 
>   drivers/soc/mediatek/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
> index d6b83a5508ca..a88cf04fc803 100644
> --- a/drivers/soc/mediatek/Kconfig
> +++ b/drivers/soc/mediatek/Kconfig
> @@ -76,6 +76,7 @@ config MTK_MMSYS
>   	tristate "MediaTek MMSYS Support"
>   	default ARCH_MEDIATEK
>   	depends on HAS_IOMEM
> +	depends on MTK_CMDQ || MTK_CMDQ=n
>   	help
>   	  Say yes here to add support for the MediaTek Multimedia
>   	  Subsystem (MMSYS).

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

end of thread, other threads:[~2023-04-11 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03  9:33 [PATCH] soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS AngeloGioacchino Del Regno
2023-04-07 14:40 ` Alexandre Mergnat
2023-04-11 15:16 ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®