All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Maurizio Casciano <mauriziocasciano7@gmail.com>
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
	sakari.ailus@linux.intel.com, bingbu.cao@amd.com,
	jacopo.mondi@ideasonboard.com, nicholas@rothemail.net,
	andy@kernel.org, hansg@kernel.org, gregkh@linuxfoundation.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 15/16] media: atomisp: allow raw Bayer capture
Date: Thu, 3 Sep 2026 10:12:32 +0300	[thread overview]
Message-ID: <apkd4NkKNXFX-aGy@ashevche-desk.local> (raw)
In-Reply-To: <5a163a69a3cb3b139f2c7ba5eee5b32bac575d27.1788360629.git.mauriziocasciano7@gmail.com>

On Wed, Sep 02, 2026 at 04:53:44PM +0200, Maurizio Casciano wrote:
> AtomISP currently rejects all raw formats and silently substitutes
> YUV420. This prevents userspace camera processing stacks from obtaining
> unprocessed sensor frames.
> 
> Enumerate only the raw format matching the sensor media-bus code and
> reconcile raw requests with the code selected by the sensor. Userspace
> opts in by selecting that raw V4L2 pixel format with VIDIOC_S_FMT.
> 
> Raw formats expose the full sensor transport frame so ISP2401 can use
> its copy pipeline. Processed formats retain the existing global padding
> behavior; selecting a smaller receiver crop remains a userspace pipeline
> decision.

...

> +	const struct atomisp_format_bridge *format;
>  	struct v4l2_subdev_state *act_sd_state;

> +	struct v4l2_area padding = {
> +		.width = pad_w,
> +		.height = pad_h,
> +	};

Hmm... We use them only once. See below.

>  	int ret;

...

> +	if (format->sh_fmt == IA_CSS_FRAME_FORMAT_RAW)
> +		padding = (struct v4l2_area) { };

>  	fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
> -	fsize->discrete.width = fse.max_width - pad_w;
> -	fsize->discrete.height = fse.max_height - pad_h;
> +	fsize->discrete.width = fse.max_width - padding.width;
> +	fsize->discrete.height = fse.max_height - padding.height;

padding is not used as a stuct here, so instead you can simply convert the
above to if-else

	if (format->sh_fmt == IA_CSS_FRAME_FORMAT_RAW) {
		fsize->discrete.width = fse.max_width;
		fsize->discrete.height = fse.max_height;
	} else {
		fsize->discrete.width = fse.max_width - pad_w;
		fsize->discrete.height = fse.max_height - pad_h;
	}

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-09-03  7:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 14:53 [PATCH v7 00/16] media: Add Yoga Book camera support Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 01/16] media: ov8858: Extract digital gain programming Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 02/16] media: ov8858: support 19.2 MHz clock and CHT gain setup Maurizio Casciano
2026-09-03  4:42   ` Andy Shevchenko
2026-09-02 14:53 ` [PATCH v7 03/16] media: ov2740: Use C99 initializers for ACPI IDs Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 04/16] media: ov2740: Add OVTI2740 ACPI ID Maurizio Casciano
2026-09-03  5:35   ` Andy Shevchenko
2026-09-02 14:53 ` [PATCH v7 05/16] media: ov8858: Add INT3477 " Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 06/16] media: intel: ipu-bridge: Add Yoga Book camera sensors Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 07/16] media: atomisp: Add Yoga Book camera configuration Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 08/16] media: ov2740: support 288 MHz link frequency Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 09/16] media: intel: ipu-bridge: allow sensor-specific link frequencies Maurizio Casciano
2026-09-03  7:01   ` Andy Shevchenko
2026-09-02 14:53 ` [PATCH v7 10/16] media: atomisp: derive CSI-2 timing from sensor link frequency Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 11/16] media: atomisp: provide Yoga Book OV2740 " Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 12/16] media: ov2740: release group hold after gain write errors Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 13/16] media: ov2740: add manual white balance controls Maurizio Casciano
2026-09-02 14:53 ` [PATCH v7 14/16] media: atomisp: Use struct v4l2_area for padding Maurizio Casciano
2026-09-03  7:04   ` Andy Shevchenko
2026-09-02 14:53 ` [PATCH v7 15/16] media: atomisp: allow raw Bayer capture Maurizio Casciano
2026-09-03  7:12   ` Andy Shevchenko [this message]
2026-09-02 14:53 ` [PATCH v7 16/16] media: i2c: Add WV517S lens actuator driver Maurizio Casciano
2026-09-03  4:44 ` [PATCH v7 00/16] media: Add Yoga Book camera support Andy Shevchenko
2026-09-03  5:37   ` Andy Shevchenko

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=apkd4NkKNXFX-aGy@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=bingbu.cao@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mauriziocasciano7@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=nicholas@rothemail.net \
    --cc=sakari.ailus@linux.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.