drm/msm: Make irq_postinstall optional
authorJordan Crouse <jcrouse@codeaurora.org>
Mon, 3 Dec 2018 22:47:19 +0000 (15:47 -0700)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 18:10:17 +0000 (13:10 -0500)
Allow the KMS operation 'irq_postinstall' to be optional
so that the target display drivers don't need to define
a dummy function if they don't need one.

v3: No changes

Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_drv.c

index 79d1847..6265be8 100644 (file)
@@ -752,7 +752,11 @@ static int msm_irq_postinstall(struct drm_device *dev)
        struct msm_drm_private *priv = dev->dev_private;
        struct msm_kms *kms = priv->kms;
        BUG_ON(!kms);
-       return kms->funcs->irq_postinstall(kms);
+
+       if (kms->funcs->irq_postinstall)
+               return kms->funcs->irq_postinstall(kms);
+
+       return 0;
 }
 
 static void msm_irq_uninstall(struct drm_device *dev)