[PATCH v2] drm/shmobile: Convert to Linux IRQ interfaces

Geert Uytterhoeven geert at linux-m68k.org
Thu Jul 15 10:16:27 UTC 2021


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) {

> +               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

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


More information about the dri-devel mailing list