[PATCH 09/12] drm/bridge: imx8qxp-ldb: convert to of_drm_find_and_get_bridge()
Luca Ceresoli
luca.ceresoli at bootlin.com
Wed Jan 7 06:45:24 PST 2026
Hi Maxime,
Thanks for the blazingly fast review of the entire series!
On Wed Jan 7, 2026 at 3:08 PM CET, Maxime Ripard wrote:
> Hi,
>
> On Wed, Jan 07, 2026 at 02:13:00PM +0100, Luca Ceresoli wrote:
>> of_drm_find_bridge() is deprecated. Move to its replacement
>> of_drm_find_and_get_bridge() which gets a bridge reference, and ensure it
>> is put when done.
>>
>> Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
>> ---
>> drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
>> index 122502968927..6b80d798b27a 100644
>> --- a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
>> +++ b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
>> @@ -552,7 +552,7 @@ static int imx8qxp_ldb_parse_dt_companion(struct imx8qxp_ldb *imx8qxp_ldb)
>> goto out;
>> }
>>
>> - imx8qxp_ldb->companion = of_drm_find_bridge(companion_port);
>> + imx8qxp_ldb->companion = of_drm_find_and_get_bridge(companion_port);
>> if (!imx8qxp_ldb->companion) {
>> ret = -EPROBE_DEFER;
>> DRM_DEV_DEBUG_DRIVER(dev,
>> @@ -679,6 +679,7 @@ static void imx8qxp_ldb_remove(struct platform_device *pdev)
>> struct ldb *ldb = &imx8qxp_ldb->base;
>>
>> ldb_remove_bridge_helper(ldb);
>> + drm_bridge_put(imx8qxp_ldb->companion);
>
> the companion bridge is used in pretty much every KMS hook, we need to
> put the reference in destroy.
Ouch, indeed! Will fix in v2.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-arm-kernel
mailing list