All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: hyun.kwon@xilinx.com, airlied@gmail.com, daniel@ffwll.ch,
	michal.simek@amd.com, dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Subject: Re: [PATCH] drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
Date: Wed, 7 Jun 2023 08:07:05 +0300	[thread overview]
Message-ID: <20230607050705.GF14101@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230607020529.22934-1-jiasheng@iscas.ac.cn>

Hello Jiasheng,

Thank you for the patch.

On Wed, Jun 07, 2023 at 10:05:29AM +0800, Jiasheng Jiang wrote:
> Add check for dma_set_mask() and return the error if it fails.
> 
> Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
>  drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> index bab862484d42..068413be6527 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> @@ -227,7 +227,9 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
>  	dpsub->dev = &pdev->dev;
>  	platform_set_drvdata(pdev, dpsub);
>  
> -	dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
> +	ret = dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
> +	if (ret)
> +		return ret;

This seems reasonable.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Tomi, would you be able to quickly test this ?

>  
>  	/* Try the reserved memory. Proceed if there's none. */
>  	of_reserved_mem_device_init(&pdev->dev);

-- 
Regards,

Laurent Pinchart

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: hyun.kwon@xilinx.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	michal.simek@amd.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
Date: Wed, 7 Jun 2023 08:07:05 +0300	[thread overview]
Message-ID: <20230607050705.GF14101@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230607020529.22934-1-jiasheng@iscas.ac.cn>

Hello Jiasheng,

Thank you for the patch.

On Wed, Jun 07, 2023 at 10:05:29AM +0800, Jiasheng Jiang wrote:
> Add check for dma_set_mask() and return the error if it fails.
> 
> Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
>  drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> index bab862484d42..068413be6527 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> @@ -227,7 +227,9 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
>  	dpsub->dev = &pdev->dev;
>  	platform_set_drvdata(pdev, dpsub);
>  
> -	dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
> +	ret = dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
> +	if (ret)
> +		return ret;

This seems reasonable.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Tomi, would you be able to quickly test this ?

>  
>  	/* Try the reserved memory. Proceed if there's none. */
>  	of_reserved_mem_device_init(&pdev->dev);

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: hyun.kwon@xilinx.com, airlied@gmail.com, daniel@ffwll.ch,
	michal.simek@amd.com, dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Subject: Re: [PATCH] drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
Date: Wed, 7 Jun 2023 08:07:05 +0300	[thread overview]
Message-ID: <20230607050705.GF14101@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230607020529.22934-1-jiasheng@iscas.ac.cn>

Hello Jiasheng,

Thank you for the patch.

On Wed, Jun 07, 2023 at 10:05:29AM +0800, Jiasheng Jiang wrote:
> Add check for dma_set_mask() and return the error if it fails.
> 
> Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
>  drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> index bab862484d42..068413be6527 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
> @@ -227,7 +227,9 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
>  	dpsub->dev = &pdev->dev;
>  	platform_set_drvdata(pdev, dpsub);
>  
> -	dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
> +	ret = dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
> +	if (ret)
> +		return ret;

This seems reasonable.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Tomi, would you be able to quickly test this ?

>  
>  	/* Try the reserved memory. Proceed if there's none. */
>  	of_reserved_mem_device_init(&pdev->dev);

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-06-07  5:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07  2:05 [PATCH] drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask Jiasheng Jiang
2023-06-07  2:05 ` Jiasheng Jiang
2023-06-07  2:05 ` Jiasheng Jiang
2023-06-07  5:07 ` Laurent Pinchart [this message]
2023-06-07  5:07   ` Laurent Pinchart
2023-06-07  5:07   ` Laurent Pinchart
2023-06-07  9:38   ` Tomi Valkeinen
2023-06-07  9:38     ` Tomi Valkeinen
2023-06-07  9:38     ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230607050705.GF14101@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hyun.kwon@xilinx.com \
    --cc=jiasheng@iscas.ac.cn \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.