drivers/media/platform/intel/pxa_camera.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/intel/pxa_camera.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/intel/pxa_camera.c- Extension
.c- Size
- 66887 bytes
- Lines
- 2471
- 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/init.hlinux/module.hlinux/io.hlinux/delay.hlinux/device.hlinux/dma-mapping.hlinux/err.hlinux/errno.hlinux/fs.hlinux/interrupt.hlinux/kernel.hlinux/mm.hlinux/moduleparam.hlinux/of.hlinux/of_graph.hlinux/time.hlinux/platform_device.hlinux/clk.hlinux/sched.hlinux/slab.hlinux/dmaengine.hlinux/dma/pxa-dma.hmedia/v4l2-async.hmedia/v4l2-common.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-event.hmedia/v4l2-ioctl.hmedia/v4l2-fwnode.hmedia/videobuf2-dma-sg.hlinux/videodev2.hlinux/platform_data/media/camera-pxa.h
Detected Declarations
struct pxa_mbus_pixelfmtstruct pxa_mbus_lookupstruct pxa_camera_format_xlatestruct pxa_bufferstruct pxa_camera_devstruct pxa_camenum pxa_mbus_packingenum pxa_mbus_orderenum pxa_mbus_layoutenum pxa_camera_active_dmafunction pxa_mbus_bytes_per_linefunction pxa_mbus_image_sizefunction pxa_camera_dma_irq_yfunction pxa_camera_dma_irq_ufunction pxa_camera_dma_irq_vfunction pxa_init_dma_channelfunction pxa_video_buf_set_actdmafunction pxa_dma_start_channelsfunction pxa_dma_stop_channelsfunction pxa_dma_add_tail_buffunction pxa_camera_start_capturefunction pxa_camera_stop_capturefunction pxa_camera_wakeupfunction pxa_camera_check_link_missfunction pxa_camera_dma_irqfunction mclk_get_divisorfunction recalculate_fifo_timeoutfunction pxa_camera_activatefunction pxa_camera_deactivatefunction pxa_camera_eof_bh_workfunction pxa_camera_irqfunction pxa_camera_setup_cicrfunction pxa_buffer_cleanupfunction pxa_buffer_initfunction pxac_vb2_cleanupfunction pxac_vb2_queuefunction pxa_camera_check_link_missfunction pxac_vb2_initfunction pxac_vb2_queue_setupfunction pxac_vb2_start_streamingfunction pxac_vb2_stop_streamingfunction pxa_camera_init_videobuf2function pxa_camera_set_bus_paramfunction pxa_camera_packing_supportedfunction pxa_camera_get_formatsfunction pxa_camera_build_formatsfunction pxa_camera_destroy_formatsfunction pxa_camera_check_frame
Annotated Snippet
struct pxa_mbus_pixelfmt {
const char *name;
u32 fourcc;
enum pxa_mbus_packing packing;
enum pxa_mbus_order order;
enum pxa_mbus_layout layout;
u8 bits_per_sample;
};
/**
* struct pxa_mbus_lookup - Lookup FOURCC IDs by mediabus codes for pass-through
* @code: mediabus pixel-code
* @fmt: pixel format description
*/
struct pxa_mbus_lookup {
u32 code;
struct pxa_mbus_pixelfmt fmt;
};
static const struct pxa_mbus_lookup mbus_fmt[] = {
{
.code = MEDIA_BUS_FMT_YUYV8_2X8,
.fmt = {
.fourcc = V4L2_PIX_FMT_YUYV,
.name = "YUYV",
.bits_per_sample = 8,
.packing = PXA_MBUS_PACKING_2X8_PADHI,
.order = PXA_MBUS_ORDER_LE,
.layout = PXA_MBUS_LAYOUT_PACKED,
},
}, {
.code = MEDIA_BUS_FMT_YVYU8_2X8,
.fmt = {
.fourcc = V4L2_PIX_FMT_YVYU,
.name = "YVYU",
.bits_per_sample = 8,
.packing = PXA_MBUS_PACKING_2X8_PADHI,
.order = PXA_MBUS_ORDER_LE,
.layout = PXA_MBUS_LAYOUT_PACKED,
},
}, {
.code = MEDIA_BUS_FMT_UYVY8_2X8,
.fmt = {
.fourcc = V4L2_PIX_FMT_UYVY,
.name = "UYVY",
.bits_per_sample = 8,
.packing = PXA_MBUS_PACKING_2X8_PADHI,
.order = PXA_MBUS_ORDER_LE,
.layout = PXA_MBUS_LAYOUT_PACKED,
},
}, {
.code = MEDIA_BUS_FMT_VYUY8_2X8,
.fmt = {
.fourcc = V4L2_PIX_FMT_VYUY,
.name = "VYUY",
.bits_per_sample = 8,
.packing = PXA_MBUS_PACKING_2X8_PADHI,
.order = PXA_MBUS_ORDER_LE,
.layout = PXA_MBUS_LAYOUT_PACKED,
},
}, {
.code = MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE,
.fmt = {
.fourcc = V4L2_PIX_FMT_RGB555,
.name = "RGB555",
.bits_per_sample = 8,
.packing = PXA_MBUS_PACKING_2X8_PADHI,
.order = PXA_MBUS_ORDER_LE,
.layout = PXA_MBUS_LAYOUT_PACKED,
},
}, {
.code = MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE,
.fmt = {
.fourcc = V4L2_PIX_FMT_RGB555X,
.name = "RGB555X",
.bits_per_sample = 8,
.packing = PXA_MBUS_PACKING_2X8_PADHI,
.order = PXA_MBUS_ORDER_BE,
.layout = PXA_MBUS_LAYOUT_PACKED,
},
}, {
.code = MEDIA_BUS_FMT_RGB565_2X8_LE,
.fmt = {
.fourcc = V4L2_PIX_FMT_RGB565,
.name = "RGB565",
.bits_per_sample = 8,
.packing = PXA_MBUS_PACKING_2X8_PADHI,
.order = PXA_MBUS_ORDER_LE,
.layout = PXA_MBUS_LAYOUT_PACKED,
},
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/io.h`, `linux/delay.h`, `linux/device.h`, `linux/dma-mapping.h`, `linux/err.h`, `linux/errno.h`.
- Detected declarations: `struct pxa_mbus_pixelfmt`, `struct pxa_mbus_lookup`, `struct pxa_camera_format_xlate`, `struct pxa_buffer`, `struct pxa_camera_dev`, `struct pxa_cam`, `enum pxa_mbus_packing`, `enum pxa_mbus_order`, `enum pxa_mbus_layout`, `enum pxa_camera_active_dma`.
- 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.