Lines Matching +full:layer +full:- +full:buffer +full:- +full:offset
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * TI Camera Access Layer (CAL)
5 * Copyright (c) 2015-2020 Texas Instruments Inc.
22 #include <media/media-device.h>
23 #include <media/v4l2-async.h>
24 #include <media/v4l2-ctrls.h>
25 #include <media/v4l2-dev.h>
26 #include <media/v4l2-device.h>
27 #include <media/v4l2-fwnode.h>
28 #include <media/v4l2-subdev.h>
29 #include <media/videobuf2-v4l2.h>
94 /* buffer for one video frame */
96 /* common v4l buffer stuff -- must be first */
102 * struct cal_dmaqueue - Queue of DMA buffers
117 * @pending: Buffer provided to the hardware to DMA the next frame.
122 * @active: Buffer being DMA'ed to for the current frame. Will be
124 * a @pending buffer has been scheduled to replace it.
149 * The Camera Adaptation Layer (CAL) module is paired with one or more complex
150 * I/O PHYs (CAMERARX). It contains multiple instances of CSI-2, processing and
160 * The cal_ctx structure represents the combination of one CSI-2 context, one
260 dev_printk(KERN_DEBUG, (cal)->dev, fmt, ##arg); \
263 dev_info((cal)->dev, fmt, ##arg)
265 dev_err((cal)->dev, fmt, ##arg)
268 cal_dbg(level, (ctx)->cal, "ctx%u: " fmt, (ctx)->dma_ctx, ##arg)
270 cal_info((ctx)->cal, "ctx%u: " fmt, (ctx)->dma_ctx, ##arg)
272 cal_err((ctx)->cal, "ctx%u: " fmt, (ctx)->dma_ctx, ##arg)
275 cal_dbg(level, (phy)->cal, "phy%u: " fmt, (phy)->instance, ##arg)
277 cal_info((phy)->cal, "phy%u: " fmt, (phy)->instance, ##arg)
279 cal_err((phy)->cal, "phy%u: " fmt, (phy)->instance, ##arg)
281 static inline u32 cal_read(struct cal_dev *cal, u32 offset) in cal_read() argument
283 return ioread32(cal->base + offset); in cal_read()
286 static inline void cal_write(struct cal_dev *cal, u32 offset, u32 val) in cal_write() argument
288 iowrite32(val, cal->base + offset); in cal_write()
291 static __always_inline u32 cal_read_field(struct cal_dev *cal, u32 offset, u32 mask) in cal_read_field() argument
293 return FIELD_GET(mask, cal_read(cal, offset)); in cal_read_field()
296 static inline void cal_write_field(struct cal_dev *cal, u32 offset, u32 value, in cal_write_field() argument
299 u32 val = cal_read(cal, offset); in cal_write_field()
303 cal_write(cal, offset, val); in cal_write_field()