drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c- Extension
.c- Size
- 17545 bytes
- Lines
- 678
- 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.
- 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/clk.hlinux/delay.hlinux/init.hlinux/module.hlinux/pinctrl/consumer.hlinux/platform_device.hlinux/pm_runtime.hlinux/property.hlinux/reset.hmedia/media-device.hmedia/v4l2-device.hmedia/v4l2-fwnode.hdcmipp-common.h
Detected Declarations
struct dcmipp_devicestruct dcmipp_ent_configstruct dcmipp_ent_linkstruct dcmipp_pipeline_configfunction Copyrightfunction notifier_to_dcmippfunction dcmipp_create_linksfunction dcmipp_create_subdevsfunction dcmipp_irq_threadfunction dcmipp_irq_callbackfunction dcmipp_graph_notify_boundfunction dcmipp_graph_notify_unbindfunction dcmipp_graph_notify_completefunction dcmipp_graph_initfunction dcmipp_probefunction dcmipp_removefunction dcmipp_runtime_suspendfunction dcmipp_runtime_resumefunction dcmipp_suspendfunction dcmipp_resume
Annotated Snippet
struct dcmipp_device {
/* The platform device */
struct platform_device pdev;
struct device *dev;
/* Hardware resources */
void __iomem *regs;
struct clk *mclk;
struct clk *kclk;
/* The pipeline configuration */
const struct dcmipp_pipeline_config *pipe_cfg;
/* The Associated media_device parent */
struct media_device mdev;
/* Internal v4l2 parent device*/
struct v4l2_device v4l2_dev;
/* Entities */
struct dcmipp_ent_device **entity;
struct v4l2_async_notifier notifier;
};
static inline struct dcmipp_device *
notifier_to_dcmipp(struct v4l2_async_notifier *n)
{
return container_of(n, struct dcmipp_device, notifier);
}
/* Structure which describes individual configuration for each entity */
struct dcmipp_ent_config {
const char *name;
struct dcmipp_ent_device *(*init)
(struct device *dev, const char *entity_name,
struct v4l2_device *v4l2_dev, void __iomem *regs);
void (*release)(struct dcmipp_ent_device *ved);
};
/* Structure which describes links between entities */
struct dcmipp_ent_link {
unsigned int src_ent;
u16 src_pad;
unsigned int sink_ent;
u16 sink_pad;
u32 flags;
};
/* Structure which describes the whole topology */
struct dcmipp_pipeline_config {
const struct dcmipp_ent_config *ents;
size_t num_ents;
const struct dcmipp_ent_link *links;
size_t num_links;
u32 hw_revision;
bool has_csi2;
bool needs_mclk;
};
/* --------------------------------------------------------------------------
* Topology Configuration
*/
static const struct dcmipp_ent_config stm32mp13_ent_config[] = {
{
.name = "dcmipp_input",
.init = dcmipp_inp_ent_init,
.release = dcmipp_inp_ent_release,
},
{
.name = "dcmipp_dump_postproc",
.init = dcmipp_byteproc_ent_init,
.release = dcmipp_byteproc_ent_release,
},
{
.name = "dcmipp_dump_capture",
.init = dcmipp_bytecap_ent_init,
.release = dcmipp_bytecap_ent_release,
},
};
#define ID_INPUT 0
#define ID_DUMP_BYTEPROC 1
#define ID_DUMP_CAPTURE 2
static const struct dcmipp_ent_link stm32mp13_ent_links[] = {
DCMIPP_ENT_LINK(ID_INPUT, 1, ID_DUMP_BYTEPROC, 0,
MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE),
DCMIPP_ENT_LINK(ID_DUMP_BYTEPROC, 1, ID_DUMP_CAPTURE, 0,
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/init.h`, `linux/module.h`, `linux/pinctrl/consumer.h`, `linux/platform_device.h`, `linux/pm_runtime.h`, `linux/property.h`.
- Detected declarations: `struct dcmipp_device`, `struct dcmipp_ent_config`, `struct dcmipp_ent_link`, `struct dcmipp_pipeline_config`, `function Copyright`, `function notifier_to_dcmipp`, `function dcmipp_create_links`, `function dcmipp_create_subdevs`, `function dcmipp_irq_thread`, `function dcmipp_irq_callback`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- 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.