drivers/media/platform/arm/mali-c55/mali-c55-core.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/arm/mali-c55/mali-c55-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/arm/mali-c55/mali-c55-core.c- Extension
.c- Size
- 25864 bytes
- Lines
- 893
- 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/bitops.hlinux/cleanup.hlinux/clk.hlinux/delay.hlinux/device.hlinux/interrupt.hlinux/iopoll.hlinux/ioport.hlinux/mod_devicetable.hlinux/of.hlinux/of_reserved_mem.hlinux/platform_device.hlinux/pm_runtime.hlinux/reset.hlinux/slab.hlinux/string.hmedia/media-entity.hmedia/v4l2-device.hmedia/v4l2-mc.hmedia/videobuf2-core.hmedia/videobuf2-dma-contig.hmali-c55-common.hmali-c55-registers.h
Detected Declarations
function mali_c55_writefunction mali_c55_readfunction mali_c55_update_bitsfunction __mali_c55_ctx_writefunction mali_c55_ctx_writefunction __mali_c55_ctx_readfunction mali_c55_ctx_readfunction mali_c55_ctx_update_bitsfunction mali_c55_config_writefunction mali_c55_remove_linksfunction mali_c55_create_linksfunction mali_c55_unregister_entitiesfunction mali_c55_swap_next_configfunction mali_c55_register_entitiesfunction mali_c55_notifier_boundfunction mali_c55_notifier_completefunction mali_c55_parse_endpointfunction mali_c55_media_frameworks_initfunction mali_c55_media_frameworks_deinitfunction mali_c55_pipeline_readyfunction mali_c55_check_hwcfgfunction mali_c55_isrfunction for_each_set_bitfunction mali_c55_init_contextfunction __mali_c55_power_offfunction mali_c55_runtime_suspendfunction __mali_c55_power_onfunction mali_c55_runtime_resumefunction mali_c55_probefunction mali_c55_remove
Annotated Snippet
if (ret) {
dev_err(mali_c55->dev,
"failed to link ISP and DS resizer\n");
goto err_remove_links;
}
ret = media_create_pad_link(&mali_c55->resizers[1].sd.entity,
MALI_C55_RSZ_SOURCE_PAD,
&mali_c55->cap_devs[MALI_C55_CAP_DEV_DS].vdev.entity,
0, MEDIA_LNK_FL_ENABLED);
if (ret) {
dev_err(mali_c55->dev,
"failed to link DS resizer and video device\n");
goto err_remove_links;
}
}
ret = media_create_pad_link(&mali_c55->isp.sd.entity,
MALI_C55_ISP_PAD_SOURCE_STATS,
&mali_c55->stats.vdev.entity, 0,
MEDIA_LNK_FL_ENABLED);
if (ret) {
dev_err(mali_c55->dev,
"failed to link ISP and 3a stats node\n");
goto err_remove_links;
}
ret = media_create_pad_link(&mali_c55->params.vdev.entity, 0,
&mali_c55->isp.sd.entity,
MALI_C55_ISP_PAD_SINK_PARAMS,
MEDIA_LNK_FL_ENABLED);
if (ret) {
dev_err(mali_c55->dev,
"failed to link ISP and parameters video node\n");
goto err_remove_links;
}
return 0;
err_remove_links:
mali_c55_remove_links(mali_c55);
return ret;
}
static void mali_c55_unregister_entities(struct mali_c55 *mali_c55)
{
mali_c55_remove_links(mali_c55);
mali_c55_unregister_tpg(mali_c55);
mali_c55_unregister_isp(mali_c55);
mali_c55_unregister_resizers(mali_c55);
mali_c55_unregister_capture_devs(mali_c55);
mali_c55_unregister_params(mali_c55);
mali_c55_unregister_stats(mali_c55);
}
static void mali_c55_swap_next_config(struct mali_c55 *mali_c55)
{
struct mali_c55_context *ctx = mali_c55_get_active_context(mali_c55);
mali_c55_config_write(ctx, mali_c55->next_config ?
MALI_C55_CONFIG_PING : MALI_C55_CONFIG_PONG,
false);
mali_c55_update_bits(mali_c55, MALI_C55_REG_MCU_CONFIG,
MALI_C55_REG_MCU_CONFIG_WRITE_MASK,
MALI_C55_MCU_CONFIG_WRITE(mali_c55->next_config));
}
static int mali_c55_register_entities(struct mali_c55 *mali_c55)
{
int ret;
ret = mali_c55_register_tpg(mali_c55);
if (ret)
return ret;
ret = mali_c55_register_isp(mali_c55);
if (ret)
goto err_unregister_entities;
ret = mali_c55_register_resizers(mali_c55);
if (ret)
goto err_unregister_entities;
ret = mali_c55_register_capture_devs(mali_c55);
if (ret)
goto err_unregister_entities;
ret = mali_c55_register_params(mali_c55);
if (ret)
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/cleanup.h`, `linux/clk.h`, `linux/delay.h`, `linux/device.h`, `linux/interrupt.h`, `linux/iopoll.h`, `linux/ioport.h`.
- Detected declarations: `function mali_c55_write`, `function mali_c55_read`, `function mali_c55_update_bits`, `function __mali_c55_ctx_write`, `function mali_c55_ctx_write`, `function __mali_c55_ctx_read`, `function mali_c55_ctx_read`, `function mali_c55_ctx_update_bits`, `function mali_c55_config_write`, `function mali_c55_remove_links`.
- 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.