linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: imx: imx-mipi-csis: Fix active format initialization on source pad
@ 2022-03-21 15:30 Laurent Pinchart
  2022-03-21 18:49 ` Rui Miguel Silva
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2022-03-21 15:30 UTC (permalink / raw)
  To: linux-media; +Cc: Jacopo Mondi, Rui Miguel Silva, kernel, linux-imx

Commit 52f69bc5f8c0 ("media: imx: csis: Store pads format separately")
broke initialization of the active format on the source pad, as it
forgot to update the .init_cfg() handler. Fix it.

Fixes: 52f69bc5f8c0 ("media: imx: csis: Store pads format separately")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/platform/imx/imx-mipi-csis.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/media/platform/imx/imx-mipi-csis.c b/drivers/media/platform/imx/imx-mipi-csis.c
index 6d03d89fb5d8..9da105d37987 100644
--- a/drivers/media/platform/imx/imx-mipi-csis.c
+++ b/drivers/media/platform/imx/imx-mipi-csis.c
@@ -1014,14 +1014,6 @@ static int mipi_csis_init_cfg(struct v4l2_subdev *sd,
 		V4L2_MAP_QUANTIZATION_DEFAULT(false, fmt_sink->colorspace,
 					      fmt_sink->ycbcr_enc);
 
-	/*
-	 * When called from mipi_csis_subdev_init() to initialize the active
-	 * configuration, cfg is NULL, which indicates there's no source pad
-	 * configuration to set.
-	 */
-	if (!sd_state)
-		return 0;
-
 	fmt_source = mipi_csis_get_format(csis, sd_state, which,
 					  CSIS_PAD_SOURCE);
 	*fmt_source = *fmt_sink;
-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: imx: imx-mipi-csis: Fix active format initialization on source pad
  2022-03-21 15:30 [PATCH] media: imx: imx-mipi-csis: Fix active format initialization on source pad Laurent Pinchart
@ 2022-03-21 18:49 ` Rui Miguel Silva
  0 siblings, 0 replies; 2+ messages in thread
From: Rui Miguel Silva @ 2022-03-21 18:49 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media, Jacopo Mondi, kernel, linux-imx

Hey Laurent,
Many thanks for the fix.

On Mon, Mar 21, 2022 at 05:30:20PM +0200, Laurent Pinchart wrote:
> Commit 52f69bc5f8c0 ("media: imx: csis: Store pads format separately")
> broke initialization of the active format on the source pad, as it
> forgot to update the .init_cfg() handler. Fix it.
> 
> Fixes: 52f69bc5f8c0 ("media: imx: csis: Store pads format separately")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

LGTM.

Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>

Cheers,
     Rui

> ---
>  drivers/media/platform/imx/imx-mipi-csis.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/media/platform/imx/imx-mipi-csis.c b/drivers/media/platform/imx/imx-mipi-csis.c
> index 6d03d89fb5d8..9da105d37987 100644
> --- a/drivers/media/platform/imx/imx-mipi-csis.c
> +++ b/drivers/media/platform/imx/imx-mipi-csis.c
> @@ -1014,14 +1014,6 @@ static int mipi_csis_init_cfg(struct v4l2_subdev *sd,
>  		V4L2_MAP_QUANTIZATION_DEFAULT(false, fmt_sink->colorspace,
>  					      fmt_sink->ycbcr_enc);
>  
> -	/*
> -	 * When called from mipi_csis_subdev_init() to initialize the active
> -	 * configuration, cfg is NULL, which indicates there's no source pad
> -	 * configuration to set.
> -	 */
> -	if (!sd_state)
> -		return 0;
> -
>  	fmt_source = mipi_csis_get_format(csis, sd_state, which,
>  					  CSIS_PAD_SOURCE);
>  	*fmt_source = *fmt_sink;
> -- 
> Regards,
> 
> Laurent Pinchart
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-21 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 15:30 [PATCH] media: imx: imx-mipi-csis: Fix active format initialization on source pad Laurent Pinchart
2022-03-21 18:49 ` Rui Miguel Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).