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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Am 15.07.21 um 12:16 schrieb Geert Uytterhoeven:
Hi Thomas,

On Thu, Jul 15, 2021 at 11:57 AM Thomas Zimmermann <tzimmermann@xxxxxxx> 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@xxxxxxx>

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

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux