Re: [PATCH 34/57] media: atomisp: ov2680: Fix window settings and enable window for all resolutions

Andy Shevchenko
2023-01-23T18:48:35Z

On Mon, Jan 23, 2023 at 01:51:42PM +0100, Hans de Goede wrote:
> By default the ov2680 automatically sets the window to match the outputsize
> and automatically adjusts it to keep the bayer pattern stable when enabling
> hflip/vflip.
>
> This does not work for the 1616x1216 mode because there is no room to
> adjust the window there. To make flipping work in the 1616 wide modes the
> register lists for those modes set bit 0 of 0x5708 (manual_win_en) to 1 and
> ov2680_set_bayer_order() updates the bayer-order on the pad to match.
>
> But ov2680_set_bayer_order() is always called, so when enabling flipping
> on modes with a width of less then 1616 now results in the wrong bayer
> order being reported on the pad since the sensor is auto-adjusting
> the window in this case.
>
> Specify the correct (== output-size) window-size in all resolutions
> register-list and always set the manual_win_en bit, so that the bayer order
> is changed on hflip/vflip enable on all resolutions.

...

> + {0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11

While at it, perhaps replace // with proper /* comment */?
Same to the rest of the similar cases.

--
With Best Regards,
Andy Shevchenko