Re: [PATCH 1/2] media: atomisp: Don't enumerate frame sizes the preview pipe can't output
From: Andy Shevchenko
Date: Wed Nov 18 2026 - 04:51:44 EST
On Tue, Nov 17, 2026 at 05:56:35PM +0000, Volodymyr Chapman wrote:
> On Tue, Nov 17, 2026 at 12:31:31PM +0200, Andy Shevchenko wrote:
> > So, what makes us stop implementing the crop support there?
>
> atomisp only uses its crop path for sensors whose driver supports the
> NATIVE_SIZE, CROP_DEFAULT and CROP selection targets
> (atomisp_init_sensor()). The IMX175 driver does not yet: in his review of
> it, Dave Stevenson suggested that binning, and possibly cropping, should
> wait for the Common Raw Sensor Model. Once the sensor supports cropping,
> atomisp takes the atomisp_enum_framesizes_crop() path and this code
> is not used for it.
Personally to me the above sounds like "we don't accept more raw sensors until
CRSM will be implemented". Because I don't see the point in implementing this
hack just because something is pending. Perhaps we need to push people to tell
what the estimations are for that to appear?
> Even with crop support, preview mode would list nothing larger than
> 1920x1440: that is the largest entry in the frame_sizes table of
> atomisp_enum_framesizes_crop_inner(). This patch applies the same limit
> to the non-crop path.
This confuses me. Would this code be still in use after CRSM be implemented?
> > No need to repeat these two paragraphs, make sure they are in the cover letter.
>
> Of course. I will keep them in the cover letter only in v2.
>
> > TBH, this feels like a hack, but I'm not v4l2/media reviewer/maintainer,
> > so I don't know if this approach is legit.
>
> The intent is to make VIDIOC_ENUM_FRAMESIZES match what
> atomisp_try_fmt() returns, which already clamps the size to 1920x1440 in
> preview mode. Without this patch the IMX175 lists 3264x2448 and
> 1624x1216, and TRY_FMT for 3264x2448 returns 1624x1216. With it, the
> IMX175 lists only 1624x1216 and the OV2722 lists 1916x1076, 1616x1076
> and 1436x1076. Every listed size is returned unchanged by TRY_FMT, and
> for the other sizes I tried (640x480 up to 3264x2448) TRY_FMT
> returned only listed sizes.
>
> Hans, Sakari, would you prefer this, or a different approach for the
> non-crop path?
--
With Best Regards,
Andy Shevchenko