Skip to content

Commit 2cce0a3

Browse files
pinchartlHans Verkuil
authored andcommitted
media: rkisp1: isp: Use V4L2 subdev active state
Use the V4L2 subdev active state API to store the active format and crop rectangle. This simplifies the driver not only by dropping the state stored in the rkisp1_isp structure, but also by replacing the ops_lock with the state lock. The rkisp1_isp.sink_fmt field needs to be kept, as it is accessed from the stats interrupt handler. To simplify the rkisp1_isp_set_sink_fmt() implementation, the field is now set when starting the ISP, instead of when setting the format. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
1 parent 88f870f commit 2cce0a3

2 files changed

Lines changed: 102 additions & 165 deletions

File tree

drivers/media/platform/rockchip/rkisp1/rkisp1-common.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,20 +190,14 @@ struct rkisp1_csi {
190190
* @sd: v4l2_subdev variable
191191
* @rkisp1: pointer to rkisp1_device
192192
* @pads: media pads
193-
* @pad_cfg: pads configurations
194193
* @sink_fmt: input format
195-
* @src_fmt: output format
196-
* @ops_lock: ops serialization
197194
* @frame_sequence: used to synchronize frame_id between video devices.
198195
*/
199196
struct rkisp1_isp {
200197
struct v4l2_subdev sd;
201198
struct rkisp1_device *rkisp1;
202199
struct media_pad pads[RKISP1_ISP_PAD_MAX];
203-
struct v4l2_subdev_pad_config pad_cfg[RKISP1_ISP_PAD_MAX];
204200
const struct rkisp1_mbus_info *sink_fmt;
205-
const struct rkisp1_mbus_info *src_fmt;
206-
struct mutex ops_lock; /* serialize the subdevice ops */
207201
__u32 frame_sequence;
208202
};
209203

0 commit comments

Comments
 (0)