[PATCH v3 1/3] drm/v3d: Add support for V3D v4.2.

Eric Anholt eric at anholt.net
Fri Mar 8 16:51:29 UTC 2019


Dave Emett <david.emett at broadcom.com> writes:

> Sorry, a few things I thought of after sending the Reviewed-by email...
>
>> +       v3d->reset = devm_reset_control_get_exclusive(dev, NULL);
>> +       if (IS_ERR(v3d->reset)) {
>> +               ret = PTR_ERR(v3d->reset);
>> +
>> +               if (ret == -EPROBE_DEFER)
>> +                       goto dev_free;
> Might be preferable to make this explicitly check against the
> not-found error code (whatever that is)? As in if (not found)
> <fallback to bridge> else <return error code>. Similarly...

You won't have both a bridge and an external reset controller in the DT,
so I'm not clear on what functional change you're looking for.  You're
just concerned about what the return code from this function is?
-EPROBE_DEFER is the only one that matters from a probe, really.

>> +       if (platform_get_irq(v3d->pdev, 1) < 0) {
> This should probably explicitly check for not-found rather than any
> error. As-is, we might silently go down the single-interrupt-line path
> on a platform with 2 interrupt lines if platform_get_irq(v3d->pdev, 1)
> hits some other error.

If I do the -EPROBE_DEFER check here, will that be good enough for you?

>> +               ret = devm_request_irq(v3d->dev, platform_get_irq(v3d->pdev, 0),
>> +                                      v3d_hub_irq, IRQF_SHARED,
>> +                                      "v3d_hub", v3d);
>> +               ret = devm_request_irq(v3d->dev, platform_get_irq(v3d->pdev, 1),
>> +                                      v3d_irq, IRQF_SHARED,
>> +                                      "v3d_core0", v3d);
> Not introduced by this change, but return value from first
> devm_request_irq ignored here?

True, but let's handle separate bugs separately.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190308/04e169bc/attachment.sig>


More information about the dri-devel mailing list