Re: [PATCH] drm/panel-edp: modify Kconfig to prevent build error

From: Randy Dunlap
Date: Wed Nov 17 2021 - 15:04:49 EST


On 11/16/21 11:58 PM, Arnd Bergmann wrote:
On Wed, Nov 17, 2021 at 7:27 AM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:

When CONFIG_DRM_KMS_HELPER=m and CONFIG_DRM_PANEL_EDP=y,
there is a build error in gpu/drm/panel/panel-edp.o:

arm-linux-gnueabi-ld: drivers/gpu/drm/panel/panel-edp.o: in function `panel_edp_probe':
panel-edp.c:(.text+0xf38): undefined reference to `drm_panel_dp_aux_backlight'

Fix this by limiting DRM_PANEL_DEP by the value of the DRM_KMS_HELPER
symbol.

I think the analysis is correct, but this is not the correct fix since
DRM_KMS_HELPER
is not user-selectable. (Almost) all other drivers that rely on DRM_KMS_HELPER
use 'select' for this, and mixing the two risks running into circular
dependencies.

Oops. Thanks for catching that.

My first (local) version of the patch used select, but that got me
into kconfig circular dependency chain land (ugly).
Maybe your all-at-once patch can take care of that problem.


I see that there are already some 'depends on DRM_KMS_HELPER' in bridge
and panel drivers, so it's possible that we have to fix them all at the same to
do this right. I ran into another problem like this the other day and
I'm currently
testing with the patch below, but I have not posted that yet since I am not
fully convinced that this is the correct fix either.

I'll test some with it also.

thanks.

--
~Randy