/* * The width is limited by the size of the CAL_WR_DMA_XSIZE_j.XSIZE field, * expressed in multiples of 64 bits. The height is limited by the size of the * CAL_CSI2_CTXi_j.CTXi_LINES and CAL_WR_DMA_CTRL_j.YSIZE fields, expressed in * lines.
*/ #define CAL_MIN_WIDTH_BYTES 16 #define CAL_MAX_WIDTH_BYTES (8192 * 8) #define CAL_MIN_HEIGHT_LINES 1 #define CAL_MAX_HEIGHT_LINES 16383
staticinlinebool cal_rx_pad_is_sink(u32 pad)
{ /* Camera RX has 1 sink pad, and N source pads */ return pad == 0;
}
staticinlinebool cal_rx_pad_is_source(u32 pad)
{ /* Camera RX has 1 sink pad, and N source pads */ return pad >= CAL_CAMERARX_PAD_FIRST_SOURCE &&
pad <= CAL_CAMERARX_NUM_SOURCE_PADS;
}
/* buffer for one video frame */ struct cal_buffer { /* common v4l buffer stuff -- must be first */ struct vb2_v4l2_buffer vb; struct list_head list;
};
/** * struct cal_dmaqueue - Queue of DMA buffers
*/ struct cal_dmaqueue { /** * @lock: Protects all fields in the cal_dmaqueue.
*/
spinlock_t lock;
/** * @queue: Buffers queued to the driver and waiting for DMA processing. * Buffers are added to the list by the vb2 .buffer_queue() operation, * and move to @pending when they are scheduled for the next frame.
*/ struct list_head queue; /** * @pending: Buffer provided to the hardware to DMA the next frame. * Will move to @active at the end of the current frame.
*/ struct cal_buffer *pending; /** * @active: Buffer being DMA'ed to for the current frame. Will be * retired and given back to vb2 at the end of the current frame if * a @pending buffer has been scheduled to replace it.
*/ struct cal_buffer *active;
/** @state: State of the DMA engine. */ enum cal_dma_state state; /** @wait: Wait queue to signal a @state transition to CAL_DMA_STOPPED. */ struct wait_queue_head wait;
};
/* * The Camera Adaptation Layer (CAL) module is paired with one or more complex * I/O PHYs (CAMERARX). It contains multiple instances of CSI-2, processing and * DMA contexts. * * The cal_dev structure represents the whole subsystem, including the CAL and * the CAMERARX instances. Instances of struct cal_dev are named cal through the * driver. * * The cal_camerarx structure represents one CAMERARX instance. Instances of * cal_camerarx are named phy through the driver. * * The cal_ctx structure represents the combination of one CSI-2 context, one * processing context and one DMA context. Instance of struct cal_ctx are named * ctx through the driver.
*/
/* * There is one cal_ctx structure for each camera core context.
*/ struct cal_ctx { struct v4l2_ctrl_handler ctrl_handler; struct video_device vdev; struct media_pad pad;
struct cal_dev *cal; struct cal_camerarx *phy;
/* v4l2_ioctl mutex */ struct mutex mutex;
struct cal_dmaqueue dma;
/* video capture */ conststruct cal_format_info *fmtinfo; /* Used to store current pixel format */ struct v4l2_format v_fmt;
/* Current subdev enumerated format (legacy) */ conststruct cal_format_info **active_fmt; unsignedint num_active_fmt;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.