diff mbox series

[-next] drm/mediatek: Fix Kconfig warning

Message ID 20200420135045.27984-1-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] drm/mediatek: Fix Kconfig warning | expand

Commit Message

Yue Haibing April 20, 2020, 1:50 p.m. UTC
WARNING: unmet direct dependencies detected for MTK_MMSYS
  Depends on [n]: (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && COMMON_CLK_MT8173_MMSYS [=n]
  Selected by [y]:
  - DRM_MEDIATEK [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_MEDIATEK [=y] || ARM && COMPILE_TEST [=n]) && COMMON_CLK [=y] && HAVE_ARM_SMCCC [=y] && OF [=y]

Add missing dependcy COMMON_CLK_MT8173_MMSYS to fix this.

Fixes: 2c758e301ed9 ("soc / drm: mediatek: Move routing control to mmsys device")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/mediatek/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Chun-Kuang Hu April 26, 2020, 8:20 a.m. UTC | #1
Hi, YueHaibing:

YueHaibing <yuehaibing@huawei.com> 於 2020年4月20日 週一 下午10:04寫道:
>
> WARNING: unmet direct dependencies detected for MTK_MMSYS
>   Depends on [n]: (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && COMMON_CLK_MT8173_MMSYS [=n]
>   Selected by [y]:
>   - DRM_MEDIATEK [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_MEDIATEK [=y] || ARM && COMPILE_TEST [=n]) && COMMON_CLK [=y] && HAVE_ARM_SMCCC [=y] && OF [=y]
>
> Add missing dependcy COMMON_CLK_MT8173_MMSYS to fix this.

From the code relationship, mediatek drm has relation with mediatek
mmsys, and mediatek mmsys has relation with medaitek clock.
So I think it's better that CONFIG_MTK_MMSYS select
CONFIG_COMMON_CLK_MT8173_MMSYS.

Regards,
Chun-Kuang.

>
> Fixes: 2c758e301ed9 ("soc / drm: mediatek: Move routing control to mmsys device")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/gpu/drm/mediatek/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
> index c420f5a3d33b..4d9b5540de68 100644
> --- a/drivers/gpu/drm/mediatek/Kconfig
> +++ b/drivers/gpu/drm/mediatek/Kconfig
> @@ -6,6 +6,7 @@ config DRM_MEDIATEK
>         depends on COMMON_CLK
>         depends on HAVE_ARM_SMCCC
>         depends on OF
> +       depends on COMMON_CLK_MT8173_MMSYS
>         select DRM_GEM_CMA_HELPER
>         select DRM_KMS_HELPER
>         select DRM_MIPI_DSI
> --
> 2.17.1
>
>
Daniel Vetter April 28, 2020, 2:55 p.m. UTC | #2
On Sun, Apr 26, 2020 at 04:20:39PM +0800, Chun-Kuang Hu wrote:
> Hi, YueHaibing:
> 
> YueHaibing <yuehaibing@huawei.com> 於 2020年4月20日 週一 下午10:04寫道:
> >
> > WARNING: unmet direct dependencies detected for MTK_MMSYS
> >   Depends on [n]: (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && COMMON_CLK_MT8173_MMSYS [=n]
> >   Selected by [y]:
> >   - DRM_MEDIATEK [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_MEDIATEK [=y] || ARM && COMPILE_TEST [=n]) && COMMON_CLK [=y] && HAVE_ARM_SMCCC [=y] && OF [=y]
> >
> > Add missing dependcy COMMON_CLK_MT8173_MMSYS to fix this.
> 
> From the code relationship, mediatek drm has relation with mediatek
> mmsys, and mediatek mmsys has relation with medaitek clock.
> So I think it's better that CONFIG_MTK_MMSYS select
> CONFIG_COMMON_CLK_MT8173_MMSYS.

select is very strongly discouraged and should only be used for Kconfig
symbols not visible to users.
-Daniel

> 
> Regards,
> Chun-Kuang.
> 
> >
> > Fixes: 2c758e301ed9 ("soc / drm: mediatek: Move routing control to mmsys device")
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> >  drivers/gpu/drm/mediatek/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
> > index c420f5a3d33b..4d9b5540de68 100644
> > --- a/drivers/gpu/drm/mediatek/Kconfig
> > +++ b/drivers/gpu/drm/mediatek/Kconfig
> > @@ -6,6 +6,7 @@ config DRM_MEDIATEK
> >         depends on COMMON_CLK
> >         depends on HAVE_ARM_SMCCC
> >         depends on OF
> > +       depends on COMMON_CLK_MT8173_MMSYS
> >         select DRM_GEM_CMA_HELPER
> >         select DRM_KMS_HELPER
> >         select DRM_MIPI_DSI
> > --
> > 2.17.1
> >
> >
Chun-Kuang Hu April 28, 2020, 4:05 p.m. UTC | #3
Daniel Vetter <daniel@ffwll.ch> 於 2020年4月28日 週二 下午10:55寫道:
>
> On Sun, Apr 26, 2020 at 04:20:39PM +0800, Chun-Kuang Hu wrote:
> > Hi, YueHaibing:
> >
> > YueHaibing <yuehaibing@huawei.com> 於 2020年4月20日 週一 下午10:04寫道:
> > >
> > > WARNING: unmet direct dependencies detected for MTK_MMSYS
> > >   Depends on [n]: (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && COMMON_CLK_MT8173_MMSYS [=n]
> > >   Selected by [y]:
> > >   - DRM_MEDIATEK [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_MEDIATEK [=y] || ARM && COMPILE_TEST [=n]) && COMMON_CLK [=y] && HAVE_ARM_SMCCC [=y] && OF [=y]
> > >
> > > Add missing dependcy COMMON_CLK_MT8173_MMSYS to fix this.
> >
> > From the code relationship, mediatek drm has relation with mediatek
> > mmsys, and mediatek mmsys has relation with medaitek clock.
> > So I think it's better that CONFIG_MTK_MMSYS select
> > CONFIG_COMMON_CLK_MT8173_MMSYS.
>
> select is very strongly discouraged and should only be used for Kconfig
> symbols not visible to users.

Okay, maybe the better solution is that DRM_MEDIATEK depend on MTK_MMSYS.

Regards,
Chun-Kuang.

> -Daniel
>
> >
> > Regards,
> > Chun-Kuang.
> >
> > >
> > > Fixes: 2c758e301ed9 ("soc / drm: mediatek: Move routing control to mmsys device")
> > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > > ---
> > >  drivers/gpu/drm/mediatek/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
> > > index c420f5a3d33b..4d9b5540de68 100644
> > > --- a/drivers/gpu/drm/mediatek/Kconfig
> > > +++ b/drivers/gpu/drm/mediatek/Kconfig
> > > @@ -6,6 +6,7 @@ config DRM_MEDIATEK
> > >         depends on COMMON_CLK
> > >         depends on HAVE_ARM_SMCCC
> > >         depends on OF
> > > +       depends on COMMON_CLK_MT8173_MMSYS
> > >         select DRM_GEM_CMA_HELPER
> > >         select DRM_KMS_HELPER
> > >         select DRM_MIPI_DSI
> > > --
> > > 2.17.1
> > >
> > >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
Chun-Kuang Hu April 29, 2020, 2:15 p.m. UTC | #4
Hi, YueHaibing:

YueHaibing <yuehaibing@huawei.com> 於 2020年4月29日 週三 下午3:14寫道:
>
> WARNING: unmet direct dependencies detected for MTK_MMSYS
>   Depends on [n]: (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && COMMON_CLK_MT8173_MMSYS [=n]
>   Selected by [y]:
>   - DRM_MEDIATEK [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_MEDIATEK [=y] || ARM && COMPILE_TEST [=n]) && COMMON_CLK [=y] && HAVE_ARM_SMCCC [=y] && OF [=y]
>
> Make DRM_MEDIATEK depend on MTK_MMSYS to fix this.

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Fixes: 2c758e301ed9 ("soc / drm: mediatek: Move routing control to mmsys device")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v3: make DRM_MEDIATEK depends on MTK_MMSYS
> v2: select COMMON_CLK_MT8173_MMSYS instead of adding DRM_MEDIATEK dependency
> ---
>  drivers/gpu/drm/mediatek/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
> index c420f5a3d33b..aa74aac3cbcc 100644
> --- a/drivers/gpu/drm/mediatek/Kconfig
> +++ b/drivers/gpu/drm/mediatek/Kconfig
> @@ -6,12 +6,12 @@ config DRM_MEDIATEK
>         depends on COMMON_CLK
>         depends on HAVE_ARM_SMCCC
>         depends on OF
> +       depends on MTK_MMSYS
>         select DRM_GEM_CMA_HELPER
>         select DRM_KMS_HELPER
>         select DRM_MIPI_DSI
>         select DRM_PANEL
>         select MEMORY
> -       select MTK_MMSYS
>         select MTK_SMI
>         select VIDEOMODE_HELPERS
>         help
> --
> 2.17.1
>
>
Chun-Kuang Hu May 6, 2020, 12:28 a.m. UTC | #5
Hi, YueHaibing:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年4月29日 週三 下午10:15寫道:
>
> Hi, YueHaibing:
>
> YueHaibing <yuehaibing@huawei.com> 於 2020年4月29日 週三 下午3:14寫道:
> >
> > WARNING: unmet direct dependencies detected for MTK_MMSYS
> >   Depends on [n]: (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && COMMON_CLK_MT8173_MMSYS [=n]
> >   Selected by [y]:
> >   - DRM_MEDIATEK [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_MEDIATEK [=y] || ARM && COMPILE_TEST [=n]) && COMMON_CLK [=y] && HAVE_ARM_SMCCC [=y] && OF [=y]
> >
> > Make DRM_MEDIATEK depend on MTK_MMSYS to fix this.
>
> Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
>

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

> >
> > Fixes: 2c758e301ed9 ("soc / drm: mediatek: Move routing control to mmsys device")
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> > v3: make DRM_MEDIATEK depends on MTK_MMSYS
> > v2: select COMMON_CLK_MT8173_MMSYS instead of adding DRM_MEDIATEK dependency
> > ---
> >  drivers/gpu/drm/mediatek/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
> > index c420f5a3d33b..aa74aac3cbcc 100644
> > --- a/drivers/gpu/drm/mediatek/Kconfig
> > +++ b/drivers/gpu/drm/mediatek/Kconfig
> > @@ -6,12 +6,12 @@ config DRM_MEDIATEK
> >         depends on COMMON_CLK
> >         depends on HAVE_ARM_SMCCC
> >         depends on OF
> > +       depends on MTK_MMSYS
> >         select DRM_GEM_CMA_HELPER
> >         select DRM_KMS_HELPER
> >         select DRM_MIPI_DSI
> >         select DRM_PANEL
> >         select MEMORY
> > -       select MTK_MMSYS
> >         select MTK_SMI
> >         select VIDEOMODE_HELPERS
> >         help
> > --
> > 2.17.1
> >
> >
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index c420f5a3d33b..4d9b5540de68 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -6,6 +6,7 @@  config DRM_MEDIATEK
 	depends on COMMON_CLK
 	depends on HAVE_ARM_SMCCC
 	depends on OF
+	depends on COMMON_CLK_MT8173_MMSYS
 	select DRM_GEM_CMA_HELPER
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI