[PATCH 5.18 0309/1095] drm/panel: Fix build error when CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m

Greg Kroah-Hartman posted 1095 patches 3 years, 2 months ago
[PATCH 5.18 0309/1095] drm/panel: Fix build error when CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m
Posted by Greg Kroah-Hartman 3 years, 2 months ago
From: Gao Chao <gaochao49@huawei.com>

[ Upstream commit a67664860f7833015a683ea295f7c79ac2901332 ]

If CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m,
bulding fails:

drivers/gpu/drm/panel/panel-samsung-atna33xc20.o: In function `atana33xc20_probe':
panel-samsung-atna33xc20.c:(.text+0x744): undefined reference to
 `drm_panel_dp_aux_backlight'
make: *** [vmlinux] Error 1

Let CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 select DRM_DISPLAY_DP_HELPER and
CONFIG_DRM_DISPLAY_HELPER to fix this error.

Fixes: 32ce3b320343 ("drm/panel: atna33xc20: Introduce the Samsung ATNA33XC20 panel")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Gao Chao <gaochao49@huawei.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220524024551.539-1-gaochao49@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/panel/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index ddf5f38e8731..abc5271af4eb 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -428,6 +428,8 @@ config DRM_PANEL_SAMSUNG_ATNA33XC20
 	depends on OF
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on PM
+	select DRM_DISPLAY_DP_HELPER
+	select DRM_DISPLAY_HELPER
 	select DRM_DP_AUX_BUS
 	help
 	  DRM panel driver for the Samsung ATNA33XC20 panel. This panel can't
-- 
2.35.1
Re: [PATCH 5.18 0309/1095] drm/panel: Fix build error when CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m
Posted by Doug Anderson 3 years, 2 months ago
Hi,

On Mon, Aug 15, 2022 at 12:09 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> From: Gao Chao <gaochao49@huawei.com>
>
> [ Upstream commit a67664860f7833015a683ea295f7c79ac2901332 ]
>
> If CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m,
> bulding fails:
>
> drivers/gpu/drm/panel/panel-samsung-atna33xc20.o: In function `atana33xc20_probe':
> panel-samsung-atna33xc20.c:(.text+0x744): undefined reference to
>  `drm_panel_dp_aux_backlight'
> make: *** [vmlinux] Error 1
>
> Let CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 select DRM_DISPLAY_DP_HELPER and
> CONFIG_DRM_DISPLAY_HELPER to fix this error.
>
> Fixes: 32ce3b320343 ("drm/panel: atna33xc20: Introduce the Samsung ATNA33XC20 panel")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Gao Chao <gaochao49@huawei.com>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> Link: https://patchwork.freedesktop.org/patch/msgid/20220524024551.539-1-gaochao49@huawei.com
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>  drivers/gpu/drm/panel/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)

While it doesn't hurt to land this patch as-is on 5.18 and older
kernels, it's not quite right. The symbols that this patch 'select'
don't actually exist on 5.18. ;-) Doing a `git grep` of
`DRM_DISPLAY_DP_HELPER` shows no hits except the one introduced in
this patch...

If you want the equivalent fix for v5.18 and older, I believe you'd want:

select DRM_DP_HELPER
select DRM_KMS_HELPER

See commit 3755d35ee1d2 ("drm/panel: Select DRM_DP_HELPER for
DRM_PANEL_EDP") and commit 3c3384050d68 ("drm: Don't make
DRM_PANEL_BRIDGE dependent on DRM_KMS_HELPERS") which added those for
the (very similar) panel-edp.

The first of those is what got changed in v5.19 in commit 1e0f66420b13
("drm/display: Introduce a DRM display-helper module")

So I guess the tl;dr:

* If you leave this patch in 5.18 (and 5.15), nothing bad will happen
but the broken "randconfig" won't be fixed.

* If you revert this patch in 5.18 (and 5.15) also nothing bad will
happen but also the broken "randconfig" won't be fixed.

* If someone cares about the randconfig on 5.15 / 5.18, we need a
backport that adapts what's selected to the old symbol names.
Re: [PATCH 5.18 0309/1095] drm/panel: Fix build error when CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m
Posted by Greg Kroah-Hartman 3 years, 2 months ago
On Wed, Aug 17, 2022 at 02:33:32PM -0700, Doug Anderson wrote:
> Hi,
> 
> On Mon, Aug 15, 2022 at 12:09 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > From: Gao Chao <gaochao49@huawei.com>
> >
> > [ Upstream commit a67664860f7833015a683ea295f7c79ac2901332 ]
> >
> > If CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m,
> > bulding fails:
> >
> > drivers/gpu/drm/panel/panel-samsung-atna33xc20.o: In function `atana33xc20_probe':
> > panel-samsung-atna33xc20.c:(.text+0x744): undefined reference to
> >  `drm_panel_dp_aux_backlight'
> > make: *** [vmlinux] Error 1
> >
> > Let CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 select DRM_DISPLAY_DP_HELPER and
> > CONFIG_DRM_DISPLAY_HELPER to fix this error.
> >
> > Fixes: 32ce3b320343 ("drm/panel: atna33xc20: Introduce the Samsung ATNA33XC20 panel")
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Gao Chao <gaochao49@huawei.com>
> > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > Link: https://patchwork.freedesktop.org/patch/msgid/20220524024551.539-1-gaochao49@huawei.com
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
> > ---
> >  drivers/gpu/drm/panel/Kconfig | 2 ++
> >  1 file changed, 2 insertions(+)
> 
> While it doesn't hurt to land this patch as-is on 5.18 and older
> kernels, it's not quite right. The symbols that this patch 'select'
> don't actually exist on 5.18. ;-) Doing a `git grep` of
> `DRM_DISPLAY_DP_HELPER` shows no hits except the one introduced in
> this patch...
> 
> If you want the equivalent fix for v5.18 and older, I believe you'd want:
> 
> select DRM_DP_HELPER
> select DRM_KMS_HELPER
> 
> See commit 3755d35ee1d2 ("drm/panel: Select DRM_DP_HELPER for
> DRM_PANEL_EDP") and commit 3c3384050d68 ("drm: Don't make
> DRM_PANEL_BRIDGE dependent on DRM_KMS_HELPERS") which added those for
> the (very similar) panel-edp.
> 
> The first of those is what got changed in v5.19 in commit 1e0f66420b13
> ("drm/display: Introduce a DRM display-helper module")
> 
> So I guess the tl;dr:
> 
> * If you leave this patch in 5.18 (and 5.15), nothing bad will happen
> but the broken "randconfig" won't be fixed.
> 
> * If you revert this patch in 5.18 (and 5.15) also nothing bad will
> happen but also the broken "randconfig" won't be fixed.
> 
> * If someone cares about the randconfig on 5.15 / 5.18, we need a
> backport that adapts what's selected to the old symbol names.

Thanks for letting us know, I'll leave it alone for now and see if
anyone has problems.

greg k-h