media: rkisp1: Support devices lacking dual crop
authorPaul Elder <paul.elder@ideasonboard.com>
Fri, 16 Feb 2024 09:54:50 +0000 (18:54 +0900)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 23 Feb 2024 12:23:20 +0000 (14:23 +0200)
commit2db6cad8c13a476efaee23c9209ee3de29bf9427
tree05a38fcb47f2283528c35a3dcd428ac4cc2414ea
parent82754080edbaf3f756c0efc3a9b153565e791bdd
media: rkisp1: Support devices lacking dual crop

Some versions of the ISP supported by the rkisp1 driver, such as the ISP
in the i.MX8MP, lack the dual crop registers and don't support cropping
at the resizer input. They instead rely on cropping in the Image
Stabilization module, at the output of the ISP, to modify the resizer
input size and implement digital zoom.

Add a dual crop feature flag to distinguish the versions of the ISP that
support dual crop from those that don't, and make sure that the sink
crop is set to the sink format when dual crop is not supported.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Tested-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c