Re: [PATCH RFC v2 01/19] drm: of: move drm_of_find_panel_or_bridge() from drm_of.c to bridge/panel.c
From: Maxime Ripard
Date: Thu Sep 03 2026 - 05:59:06 EST
Hi,
On Thu, Sep 03, 2026 at 10:11:04AM +0200, Luca Ceresoli wrote:
> We want to move drm_panel.o from the main drm module to a new drm_panel
> module, but there is one function in the drm module that calls into
> drm_panel.c code:
>
> drm_of_find_panel_or_bridge() (in drm_of.c, drm module)
> -> calls of_drm_find_panel (in drm_panel.c, would-be the new drm_panel module)
>
> Avoid this issue by moving drm_of_find_panel_or_bridge() to bridge/panel.c
> (which is currently in the drm_kms_helper module).
>
> As a result drm_kms_helper will depend on the new drm_panel module, which
> is fine because there is no dependency of drm_panel on drm_kms_helper.
>
> After this change, all drivers using drm_of_find_panel_or_bridge() will
> have to select DRM_PANEL_BRIDGE (and DRM_PANEL, recursively). Add that for
> affected drivers. While there, also add DRM_PANEL on drivers selecting
> DRM_PANEL_BRIDGE.
>
> No functional changes, just moving code around.
>
> [AI used to add 'select DRM_PANEL[_BRIDGE]' for affected drivers]
> Assisted-by: opencode:deepseek-v4-flash-0731
> Signed-off-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
In the previous discussion, I suggested to move it to drm_panel.c
because it's not really related to the panel_bridge stuff, like, at all.
And both drm_panel.c and drm_bridge.c are in drm.ko at this point so you
shouldn't have any issue there.
Also, you don't have to select DRM_PANEL_BRIDGE anymore.
Maxime
Attachment:
signature.asc
Description: PGP signature