Re: [PATCH v4 10/11] drm: zynqmp_dp: switch to of_drm_get_bridge_by_endpoint()

Luca Ceresoli
2026-05-05T14:06:01Z

Hi Laurent,

On Mon May 4, 2026 at 5:24 PM CEST, Laurent Pinchart wrote:

[...]

>> @@ -2461,10 +2459,15 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
>> * Acquire the next bridge in the chain. Ignore errors caused by port@5
>> * not being connected for backward-compatibility with older DTs.
>> */
>> - ret = drm_of_find_panel_or_bridge(dp->dev->of_node, 5, 0, NULL,
>> - &dp->next_bridge);
>> - if (ret < 0 && ret != -ENODEV)
>> - goto err_reset;
>> + dp->bridge.next_bridge = of_drm_get_bridge_by_endpoint(dp->dev->of_node, 5, 0);
>> + if (IS_ERR(dp->bridge.next_bridge)) {
>> + if (PTR_ERR(dp->bridge.next_bridge) == -ENODEV) {
>> + dp->bridge.next_bridge = NULL;
>> + } else {
>> + ret = PTR_ERR(dp->bridge.next_bridge);
>> + goto err_reset;
>> + }
>
> I would find
>
> if (PTR_ERR(dp->bridge.next_bridge) != -ENODEV) {
> ret = PTR_ERR(dp->bridge.next_bridge);
> goto err_reset;
> }
>
> dp->bridge.next_bridge = NULL;
>
> easier to read. Up to you.

Makes sense, change queued up for v5.

Thanks for reviewing!

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering