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

Jeykumar Sankaran jsanka at codeaurora.org
Thu Mar 8 22:36:11 UTC 2018


On 2018-02-21 07:18, Sean Paul wrote:
> 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>

Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.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;

msm_drv.c uses
> 
>  	return &dpu_kms->base;
>  }

-- 
Jeykumar S


More information about the Freedreno mailing list