All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cao, Bingbu" <bingbu.cao@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Cc: Tsuchiya Yuto <kitakar@gmail.com>,
	"Zhi, Yong" <yong.zhi@intel.com>,
	"Qiu, Tian Shu" <tian.shu.qiu@intel.com>,
	"laurent.pinchart@ideasonboard.com" 
	<laurent.pinchart@ideasonboard.com>
Subject: RE: [PATCH 1/5] ipu3-cio2: Return actual subdev format
Date: Mon, 12 Oct 2020 01:50:03 +0000	[thread overview]
Message-ID: <DM6PR11MB3995F16A01902354A7C098AA99070@DM6PR11MB3995.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201009150756.3397-2-sakari.ailus@linux.intel.com>

Sakari, thanks for your patch.

Reviewed-by: Bingbu Cao <Bingbu.cao@intel.com>

________________________
BRs,  
Bingbu Cao                          


> -----Original Message-----
> From: Sakari Ailus <sakari.ailus@linux.intel.com>
> Sent: Friday, October 9, 2020 11:08 PM
> To: linux-media@vger.kernel.org
> Cc: Tsuchiya Yuto <kitakar@gmail.com>; Cao, Bingbu <bingbu.cao@intel.com>;
> Zhi, Yong <yong.zhi@intel.com>; Qiu, Tian Shu <tian.shu.qiu@intel.com>;
> laurent.pinchart@ideasonboard.com
> Subject: [PATCH 1/5] ipu3-cio2: Return actual subdev format
> 
> Return actual subdev format on ipu3-cio2 subdev pads. The earlier
> implementation was based on an infinite recursion that exhausted the stack.
> 
> Reported-by: Tsuchiya Yuto <kitakar@gmail.com>
> Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/pci/intel/ipu3/ipu3-cio2.c | 24 +++---------------------
>  1 file changed, 3 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
> b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
> index 4e598e937dfe..afa472026ba4 100644
> --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
> +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
> @@ -1232,29 +1232,11 @@ static int cio2_subdev_get_fmt(struct v4l2_subdev
> *sd,
>  			       struct v4l2_subdev_format *fmt)  {
>  	struct cio2_queue *q = container_of(sd, struct cio2_queue, subdev);
> -	struct v4l2_subdev_format format;
> -	int ret;
> 
> -	if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
> +	if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
>  		fmt->format = *v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
> -		return 0;
> -	}
> -
> -	if (fmt->pad == CIO2_PAD_SINK) {
> -		format.which = V4L2_SUBDEV_FORMAT_ACTIVE;
> -		ret = v4l2_subdev_call(sd, pad, get_fmt, NULL,
> -				       &format);
> -
> -		if (ret)
> -			return ret;
> -		/* update colorspace etc */
> -		q->subdev_fmt.colorspace = format.format.colorspace;
> -		q->subdev_fmt.ycbcr_enc = format.format.ycbcr_enc;
> -		q->subdev_fmt.quantization = format.format.quantization;
> -		q->subdev_fmt.xfer_func = format.format.xfer_func;
> -	}
> -
> -	fmt->format = q->subdev_fmt;
> +	else
> +		fmt->format = q->subdev_fmt;
> 
>  	return 0;
>  }
> --
> 2.27.0


  reply	other threads:[~2020-10-12  1:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 15:07 [PATCH 0/5] ipu3-cio2 format fixes Sakari Ailus
2020-10-09 15:07 ` [PATCH 1/5] ipu3-cio2: Return actual subdev format Sakari Ailus
2020-10-12  1:50   ` Cao, Bingbu [this message]
2020-10-09 15:07 ` [PATCH 2/5] ipu3-cio2: Serialise access to pad format Sakari Ailus
2020-10-09 16:19   ` Andy Shevchenko
2020-10-12  1:34   ` Cao, Bingbu
2020-10-09 15:07 ` [PATCH 3/5] ipu3-cio2: Use unsigned values where appropriate Sakari Ailus
2020-10-09 17:16   ` Laurent Pinchart
2020-10-12  9:02     ` Sakari Ailus
2020-10-09 15:07 ` [PATCH 4/5] ipu3-cio2: Validate mbus format in setting subdev format Sakari Ailus
2020-10-09 16:22   ` Andy Shevchenko
2020-10-12  9:26     ` Sakari Ailus
2020-10-09 17:14   ` Laurent Pinchart
2020-10-09 15:07 ` [PATCH 5/5] ipu3-cio2: Make the field on subdev format V4L2_FIELD_NONE Sakari Ailus
2020-10-09 17:10   ` Laurent Pinchart
2020-10-12  1:44   ` Cao, Bingbu
2020-10-09 15:08 ` [PATCH 0/5] ipu3-cio2 format fixes Sakari Ailus
2020-10-09 16:23   ` Andy Shevchenko
2020-10-12  8:13     ` Sakari Ailus

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=DM6PR11MB3995F16A01902354A7C098AA99070@DM6PR11MB3995.namprd11.prod.outlook.com \
    --to=bingbu.cao@intel.com \
    --cc=kitakar@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tian.shu.qiu@intel.com \
    --cc=yong.zhi@intel.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.