drivers/media/platform/nxp/imx-pxp.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/nxp/imx-pxp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/nxp/imx-pxp.c- Extension
.c- Size
- 55292 bytes
- Lines
- 1948
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/clk.hlinux/delay.hlinux/dma-mapping.hlinux/interrupt.hlinux/io.hlinux/iopoll.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/regmap.hlinux/sched.hlinux/slab.hmedia/media-device.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-event.hmedia/v4l2-ioctl.hmedia/v4l2-mem2mem.hmedia/videobuf2-dma-contig.himx-pxp.h
Detected Declarations
struct pxp_fmtstruct pxp_q_datastruct pxp_ctxstruct pxp_pdatastruct pxp_devstruct pxp_ctxfunction pxp_readfunction pxp_writefunction pxp_v4l2_pix_fmt_to_ps_formatfunction pxp_v4l2_pix_fmt_to_out_formatfunction pxp_v4l2_pix_fmt_is_yuvfunction pxp_setup_cscfunction pxp_imx6ull_data_path_ctrl0function pxp_imx7d_data_path_ctrl0function pxp_set_data_pathfunction pxp_startfunction pxp_job_finishfunction pxp_device_runfunction pxp_job_readyfunction pxp_job_abortfunction pxp_irq_handlerfunction pxp_querycapfunction pxp_enum_fmtfunction pxp_enum_fmt_vid_capfunction pxp_enum_fmt_vid_outfunction pxp_g_fmtfunction pxp_g_fmt_vid_outfunction pxp_g_fmt_vid_capfunction pxp_bytesperlinefunction pxp_sizeimagefunction pxp_try_fmtfunction pxp_fixup_colorimetry_capfunction pxp_try_fmt_vid_capfunction pxp_try_fmt_vid_outfunction pxp_s_fmtfunction pxp_s_fmt_vid_capfunction pxp_s_fmt_vid_outfunction pxp_enum_framesizesfunction pxp_degrees_to_rot_modefunction pxp_s_ctrlfunction pxp_queue_setupfunction pxp_buf_preparefunction pxp_buf_queuefunction pxp_start_streamingfunction pxp_stop_streamingfunction queue_initfunction pxp_openfunction pxp_release
Annotated Snippet
struct pxp_fmt {
u32 fourcc;
int depth;
/* Types the format can be used for */
u32 types;
};
static struct pxp_fmt formats[] = {
{
.fourcc = V4L2_PIX_FMT_XBGR32,
.depth = 32,
/* Both capture and output format */
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_ABGR32,
.depth = 32,
/* Capture-only format */
.types = MEM2MEM_CAPTURE,
}, {
.fourcc = V4L2_PIX_FMT_BGR24,
.depth = 24,
.types = MEM2MEM_CAPTURE,
}, {
.fourcc = V4L2_PIX_FMT_RGB565,
.depth = 16,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_RGB555,
.depth = 16,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_RGB444,
.depth = 16,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_VUYA32,
.depth = 32,
.types = MEM2MEM_CAPTURE,
}, {
.fourcc = V4L2_PIX_FMT_VUYX32,
.depth = 32,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_UYVY,
.depth = 16,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16,
/* Output-only format */
.types = MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_VYUY,
.depth = 16,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_YVYU,
.depth = 16,
.types = MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_GREY,
.depth = 8,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_Y4,
.depth = 4,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_NV16,
.depth = 16,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_NV12,
.depth = 12,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_NV21,
.depth = 12,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_NV61,
.depth = 16,
.types = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_YUV422P,
.depth = 16,
.types = MEM2MEM_OUTPUT,
}, {
.fourcc = V4L2_PIX_FMT_YUV420,
.depth = 12,
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/clk.h`, `linux/delay.h`, `linux/dma-mapping.h`, `linux/interrupt.h`, `linux/io.h`, `linux/iopoll.h`, `linux/module.h`.
- Detected declarations: `struct pxp_fmt`, `struct pxp_q_data`, `struct pxp_ctx`, `struct pxp_pdata`, `struct pxp_dev`, `struct pxp_ctx`, `function pxp_read`, `function pxp_write`, `function pxp_v4l2_pix_fmt_to_ps_format`, `function pxp_v4l2_pix_fmt_to_out_format`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.