[PATCH v2] drm/shmobile: Convert to Linux IRQ interfaces
Thomas Zimmermann
tzimmermann at suse.de
Thu Jul 15 10:34:01 UTC 2021
Am 15.07.21 um 12:16 schrieb Geert Uytterhoeven:
> Hi Thomas,
>
> On Thu, Jul 15, 2021 at 11:57 AM Thomas Zimmermann <tzimmermann at suse.de> wrote:
>> Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's
>> IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers
>> don't benefit from using it.
>>
>> v2:
>> * handle errors in platform_get_irq() (Geert, Sergei)
>> * store IRQ number in struct shmob_drm_device (Laurent)
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>
> Thanks for the update!
>
>> --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
>> +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
>> @@ -258,7 +256,15 @@ static int shmob_drm_probe(struct platform_device *pdev)
>> goto err_modeset_cleanup;
>> }
>>
>> - ret = drm_irq_install(ddev, platform_get_irq(pdev, 0));
>> + ret = platform_get_irq(pdev, 0);
>> + if (ret) {
>
> if (ret < 0) {
Indeed :/
>
>> + dev_err(&pdev->dev, "failed to get IRQ number\n");
>
> platform_get_irq() already prints an error message, so no need to
> repeat it.
>
>> + goto err_modeset_cleanup;
>> + }
>> + sdev->irq = ret;
>> +
>> + ret = request_irq(sdev->irq, shmob_drm_irq, 0, ddev->driver->name,
>> + ddev);
>> if (ret < 0) {
>> dev_err(&pdev->dev, "failed to install IRQ handler\n");
>> goto err_modeset_cleanup;
>
> Gr{oetje,eeting}s,
>
> Geert
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210715/a82dfc31/attachment.sig>
More information about the dri-devel
mailing list