Hi Luca,
Le mardi 29 septembre 2026 à 15:39 +0200, Luca Ceresoli a écrit :
> drmm_of_get_bridge() is deprecated, switch to
> of_drm_get_bridge_by_endpoint(). As of_drm_get_bridge_by_endpoint() returns
> a refcounted bridge, ensure it is put.
>
> drm_panel.h becomes unused, drop the include.
>
> Also remove a comment that is now obvious: now panels are just bridges.
>
> Signed-off-by: Luca Ceresoli <[email protected]>
> ---
> drivers/gpu/drm/vc4/vc4_dpi.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
> index 53f36626a50d..5060eb463704 100644
> --- a/drivers/gpu/drm/vc4/vc4_dpi.c
> +++ b/drivers/gpu/drm/vc4/vc4_dpi.c
> @@ -16,7 +16,6 @@
> #include <drm/drm_drv.h>
> #include <drm/drm_edid.h>
> #include <drm/drm_of.h>
> -#include <drm/drm_panel.h>
> #include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
> #include <drm/drm_simple_kms_helper.h>
> @@ -279,16 +278,12 @@ static const struct of_device_id vc4_dpi_dt_match[] = {
> {}
> };
>
> -/* Sets up the next link in the display chain, whether it's a panel or
> - * a bridge.
> - */
The first part of the comment is not wrong, I would keep "Sets up the next link
in the display chain".
> static int vc4_dpi_init_bridge(struct vc4_dpi *dpi)
> {
> - struct drm_device *drm = dpi->encoder.base.dev;
> struct device *dev = &dpi->pdev->dev;
> - struct drm_bridge *bridge;
>
> - bridge = drmm_of_get_bridge(drm, dev->of_node, 0, 0);
> + struct drm_bridge *bridge __free(drm_bridge_put) =
> + of_drm_get_bridge_by_endpoint(dev->of_node, 0, 0);
> if (IS_ERR(bridge)) {
> /* If nothing was connected in the DT, that's not an
> * error.
It could make sense to go the extra mile and just move that code back into the
caller function, I don't see much benefit in having it in a static function
here.
Cheers,
-Paul