media: staging: media: imx: imx7-media-csi: Reorganize imx7_csi structure

The struct imx7_csi fields are in a random order, reorganize them
logically to prepare for adding new fields.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Laurent Pinchart 2022-05-09 23:32:33 +01:00 committed by Mauro Carvalho Chehab
parent 42bfdc8249
commit 356345aaed

View File

@ -169,37 +169,41 @@ enum imx_csi_model {
struct imx7_csi {
struct device *dev;
struct v4l2_subdev sd;
struct v4l2_async_notifier notifier;
struct imx_media_video_dev *vdev;
struct imx_media_dev *imxmd;
struct media_pad pad[IMX7_CSI_PADS_NUM];
/* lock to protect members below */
struct mutex lock;
/* lock to protect irq handler when stop streaming */
spinlock_t irqlock;
struct v4l2_subdev *src_sd;
struct v4l2_mbus_framefmt format_mbus[IMX7_CSI_PADS_NUM];
const struct imx_media_pixfmt *cc[IMX7_CSI_PADS_NUM];
/* Resources and locks */
void __iomem *regbase;
int irq;
struct clk *mclk;
/* active vb2 buffers to send to video dev sink */
struct mutex lock; /* Protects is_streaming, format_mbus, cc */
spinlock_t irqlock; /* Protects last_eof */
/* Media and V4L2 device */
struct imx_media_dev *imxmd;
struct v4l2_async_notifier notifier;
struct v4l2_subdev *src_sd;
bool is_csi2;
/* V4L2 subdev */
struct v4l2_subdev sd;
struct media_pad pad[IMX7_CSI_PADS_NUM];
struct v4l2_mbus_framefmt format_mbus[IMX7_CSI_PADS_NUM];
const struct imx_media_pixfmt *cc[IMX7_CSI_PADS_NUM];
/* Video device */
struct imx_media_video_dev *vdev;
/* Buffers and streaming state */
struct imx_media_buffer *active_vb2_buf[2];
struct imx_media_dma_buf underrun_buf;
bool is_streaming;
int buf_num;
u32 frame_sequence;
bool last_eof;
bool is_streaming;
bool is_csi2;
struct completion last_eof_completion;
enum imx_csi_model model;