Skip to content

Commit 88f870f

Browse files
pinchartlHans Verkuil
authored andcommitted
media: rkisp1: resizer: 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_resizer structure, but also by replacing the ops_lock with the state lock. 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 fa6df85 commit 88f870f

2 files changed

Lines changed: 66 additions & 124 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
@@ -390,21 +390,15 @@ struct rkisp1_params {
390390
* @id: id of the resizer, one of RKISP1_SELFPATH, RKISP1_MAINPATH
391391
* @rkisp1: pointer to the rkisp1 device
392392
* @pads: media pads
393-
* @pad_cfg: configurations for the pads
394393
* @config: the set of registers to configure the resizer
395-
* @pixel_enc: pixel encoding of the resizer
396-
* @ops_lock: a lock for the subdev ops
397394
*/
398395
struct rkisp1_resizer {
399396
struct v4l2_subdev sd;
400397
u32 regs_base;
401398
enum rkisp1_stream_id id;
402399
struct rkisp1_device *rkisp1;
403400
struct media_pad pads[RKISP1_RSZ_PAD_MAX];
404-
struct v4l2_subdev_pad_config pad_cfg[RKISP1_RSZ_PAD_MAX];
405401
const struct rkisp1_rsz_config *config;
406-
enum v4l2_pixel_encoding pixel_enc;
407-
struct mutex ops_lock; /* serialize the subdevice ops */
408402
};
409403

410404
/*

0 commit comments

Comments
 (0)