Lines Matching +full:function +full:- +full:mask
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
16 #include <media/media-device.h>
17 #include <media/v4l2-device.h>
18 #include <media/v4l2-fwnode.h>
36 * dcmipp_colorimetry_clamp() - Adjust colorimetry parameters
46 if ((fmt)->colorspace == V4L2_COLORSPACE_DEFAULT || \
47 (fmt)->colorspace > V4L2_COLORSPACE_DCI_P3) { \
48 (fmt)->colorspace = DCMIPP_COLORSPACE_DEFAULT; \
49 (fmt)->ycbcr_enc = DCMIPP_YCBCR_ENC_DEFAULT; \
50 (fmt)->quantization = DCMIPP_QUANTIZATION_DEFAULT; \
51 (fmt)->xfer_func = DCMIPP_XFER_FUNC_DEFAULT; \
53 if ((fmt)->ycbcr_enc > V4L2_YCBCR_ENC_SMPTE240M) \
54 (fmt)->ycbcr_enc = DCMIPP_YCBCR_ENC_DEFAULT; \
55 if ((fmt)->quantization > V4L2_QUANTIZATION_LIM_RANGE) \
56 (fmt)->quantization = DCMIPP_QUANTIZATION_DEFAULT; \
57 if ((fmt)->xfer_func > V4L2_XFER_FUNC_SMPTE2084) \
58 (fmt)->xfer_func = DCMIPP_XFER_FUNC_DEFAULT; \
62 * struct dcmipp_ent_device - core struct that represents a node in the topology
98 * dcmipp_pads_init - initialize pads
109 * dcmipp_pads_cleanup - free pads
113 * Helper function to free the pads initialized with dcmipp_pads_init
121 * dcmipp_ent_sd_register - initialize and register a subdev node
126 * @name: name of the sub-device. Please notice that the name must be
128 * @function: media entity function defined by MEDIA_ENT_F_* macros
136 * Helper function initialize and register the struct dcmipp_ent_device and
143 u32 function,
152 * dcmipp_ent_sd_unregister - cleanup and unregister a subdev node
157 * Helper function cleanup and unregister the struct dcmipp_ent_device and
164 (__reg_write((device)->dev, (device)->regs, (reg), (val)))
166 (__reg_read((device)->dev, (device)->regs, (reg)))
167 #define reg_set(device, reg, mask) \ argument
168 (__reg_set((device)->dev, (device)->regs, (reg), (mask)))
169 #define reg_clear(device, reg, mask) \ argument
170 (__reg_clear((device)->dev, (device)->regs, (reg), (mask)))
188 u32 mask) in __reg_set() argument
190 dev_dbg(dev, "SET 0x%x %#10.8x\n", reg, mask); in __reg_set()
191 __reg_write(dev, base, reg, readl_relaxed(base + reg) | mask); in __reg_set()
195 u32 mask) in __reg_clear() argument
197 dev_dbg(dev, "CLR 0x%x %#10.8x\n", reg, mask); in __reg_clear()
198 __reg_write(dev, base, reg, readl_relaxed(base + reg) & ~mask); in __reg_clear()