diff mbox series

[07/11] drm/msm: Make irq_postinstall optional

Message ID 20181018195836.15885-8-jcrouse@codeaurora.org (mailing list archive)
State Not Applicable, archived
Headers show
Series DPU cleanups | expand

Commit Message

Jordan Crouse Oct. 18, 2018, 7:58 p.m. UTC
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.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---
 drivers/gpu/drm/msm/msm_drv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Bruce Wang Oct. 19, 2018, 1:56 p.m. UTC | #1
On Thu, Oct 18, 2018 at 3:58 PM Jordan Crouse <jcrouse@codeaurora.org> wrote:
>
> 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.
>
> Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Reviewed-by: Bruce Wang <bzwang@chromium.org>

> ---
>  drivers/gpu/drm/msm/msm_drv.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 107e976be55e..8ce6992dbdff 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -724,7 +724,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)
> --
> 2.18.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 107e976be55e..8ce6992dbdff 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -724,7 +724,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)