[Freedreno] [PATCH RESEND 07/10] drm/msm: Populate kms->irq for dpu

Sean Paul seanpaul at chromium.org
Wed Feb 21 15:18:35 UTC 2018


The irq wasn't actually getting installed b/c kms->irq was vacant. Fill
it in.

Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 24eb4683ae62..fb4de59d8ed1 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -2047,14 +2047,22 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
 
 struct msm_kms *dpu_kms_init(struct drm_device *dev)
 {
+	struct platform_device *pdev = to_platform_device(dev->dev);
 	struct msm_drm_private *priv;
 	struct dpu_kms *dpu_kms;
+	int irq;
 
 	if (!dev || !dev->dev_private) {
 		DPU_ERROR("drm device node invalid\n");
 		return ERR_PTR(-EINVAL);
 	}
 
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
+		DPU_ERROR("failed to get irq: %d\n", irq);
+		return irq;
+	}
+
 	priv = dev->dev_private;
 
 	dpu_kms = kzalloc(sizeof(*dpu_kms), GFP_KERNEL);
@@ -2065,6 +2073,7 @@ struct msm_kms *dpu_kms_init(struct drm_device *dev)
 
 	msm_kms_init(&dpu_kms->base, &kms_funcs);
 	dpu_kms->dev = dev;
+	dpu_kms->base.irq = irq;
 
 	return &dpu_kms->base;
 }
-- 
2.16.1.291.g4437f3f132-goog



More information about the Freedreno mailing list