drivers/media/platform/arm/mali-c55/mali-c55-isp.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/arm/mali-c55/mali-c55-isp.c- Extension
.c- Size
- 18216 bytes
- Lines
- 647
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/media/arm/mali-c55-config.hlinux/delay.hlinux/iopoll.hlinux/property.hlinux/string.huapi/linux/media/arm/mali-c55-config.hmedia/media-entity.hmedia/v4l2-common.hmedia/v4l2-ctrls.hmedia/v4l2-event.hmedia/v4l2-mc.hmedia/v4l2-subdev.hmali-c55-common.hmali-c55-registers.h
Detected Declarations
function mali_c55_isp_get_mbus_config_by_indexfunction mali_c55_isp_get_mbus_config_by_codefunction mali_c55_isp_get_mbus_config_by_shifted_codefunction mali_c55_isp_stopfunction mali_c55_isp_startfunction mali_c55_isp_enum_mbus_codefunction mali_c55_isp_enum_frame_sizefunction mali_c55_isp_set_fmtfunction mali_c55_isp_get_selectionfunction mali_c55_isp_set_selectionfunction mali_c55_isp_enable_streamsfunction mali_c55_isp_disable_streamsfunction mali_c55_isp_queue_event_soffunction mali_c55_isp_subscribe_eventfunction mali_c55_isp_init_statefunction mali_c55_subdev_link_validatefunction mali_c55_isp_s_ctrlfunction mali_c55_isp_init_controlsfunction mali_c55_register_ispfunction mali_c55_unregister_isp
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* ARM Mali-C55 ISP Driver - Image signal processor
*
* Copyright (C) 2025 Ideas on Board Oy
*/
#include <linux/media/arm/mali-c55-config.h>
#include <linux/delay.h>
#include <linux/iopoll.h>
#include <linux/property.h>
#include <linux/string.h>
#include <uapi/linux/media/arm/mali-c55-config.h>
#include <media/media-entity.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/v4l2-mc.h>
#include <media/v4l2-subdev.h>
#include "mali-c55-common.h"
#include "mali-c55-registers.h"
static const struct mali_c55_isp_format_info mali_c55_isp_fmts[] = {
{
.code = MEDIA_BUS_FMT_SRGGB20_1X20,
.shifted_code = MEDIA_BUS_FMT_SRGGB16_1X16,
.order = MALI_C55_BAYER_ORDER_RGGB,
.bypass = false,
},
{
.code = MEDIA_BUS_FMT_SGRBG20_1X20,
.shifted_code = MEDIA_BUS_FMT_SGRBG16_1X16,
.order = MALI_C55_BAYER_ORDER_GRBG,
.bypass = false,
},
{
.code = MEDIA_BUS_FMT_SGBRG20_1X20,
.shifted_code = MEDIA_BUS_FMT_SGBRG16_1X16,
.order = MALI_C55_BAYER_ORDER_GBRG,
.bypass = false,
},
{
.code = MEDIA_BUS_FMT_SBGGR20_1X20,
.shifted_code = MEDIA_BUS_FMT_SBGGR16_1X16,
.order = MALI_C55_BAYER_ORDER_BGGR,
.bypass = false,
},
{
.code = MEDIA_BUS_FMT_RGB202020_1X60,
.shifted_code = 0, /* Not relevant for this format */
.order = 0, /* Not relevant for this format */
.bypass = true,
}
/*
* TODO: Support MEDIA_BUS_FMT_YUV20_1X60 here. This is so that we can
* also support YUV input from a sensor passed-through to the output. At
* present we have no mechanism to test that though so it may have to
* wait a while...
*/
};
const struct mali_c55_isp_format_info *
mali_c55_isp_get_mbus_config_by_index(u32 index)
{
if (index < ARRAY_SIZE(mali_c55_isp_fmts))
return &mali_c55_isp_fmts[index];
return NULL;
}
const struct mali_c55_isp_format_info *
mali_c55_isp_get_mbus_config_by_code(u32 code)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE(mali_c55_isp_fmts); i++) {
if (mali_c55_isp_fmts[i].code == code)
return &mali_c55_isp_fmts[i];
}
return NULL;
}
const struct mali_c55_isp_format_info *
mali_c55_isp_get_mbus_config_by_shifted_code(u32 code)
{
Annotation
- Immediate include surface: `linux/media/arm/mali-c55-config.h`, `linux/delay.h`, `linux/iopoll.h`, `linux/property.h`, `linux/string.h`, `uapi/linux/media/arm/mali-c55-config.h`, `media/media-entity.h`, `media/v4l2-common.h`.
- Detected declarations: `function mali_c55_isp_get_mbus_config_by_index`, `function mali_c55_isp_get_mbus_config_by_code`, `function mali_c55_isp_get_mbus_config_by_shifted_code`, `function mali_c55_isp_stop`, `function mali_c55_isp_start`, `function mali_c55_isp_enum_mbus_code`, `function mali_c55_isp_enum_frame_size`, `function mali_c55_isp_set_fmt`, `function mali_c55_isp_get_selection`, `function mali_c55_isp_set_selection`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.