drivers/staging/media/ipu7/ipu7-fw-isys.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/ipu7/ipu7-fw-isys.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/ipu7/ipu7-fw-isys.c- Extension
.c- Size
- 9455 bytes
- Lines
- 302
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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.
- 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/cacheflush.hlinux/device.hlinux/dma-mapping.hlinux/kernel.hlinux/string.hlinux/types.habi/ipu7_fw_insys_config_abi.habi/ipu7_fw_isys_abi.hipu7.hipu7-boot.hipu7-bus.hipu7-dma.hipu7-fw-isys.hipu7-isys.hipu7-platform-regs.hipu7-syscom.h
Detected Declarations
function ipu7_fw_isys_complex_cmdfunction ipu7_fw_isys_simple_cmdfunction ipu7_fw_isys_initfunction ipu7_fw_isys_releasefunction ipu7_fw_isys_openfunction ipu7_fw_isys_closefunction ipu7_fw_isys_put_respfunction ipu7_fw_isys_dump_stream_cfgfunction ipu7_fw_isys_dump_frame_buff_set
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 - 2025 Intel Corporation
*/
#include <linux/cacheflush.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>
#include "abi/ipu7_fw_insys_config_abi.h"
#include "abi/ipu7_fw_isys_abi.h"
#include "ipu7.h"
#include "ipu7-boot.h"
#include "ipu7-bus.h"
#include "ipu7-dma.h"
#include "ipu7-fw-isys.h"
#include "ipu7-isys.h"
#include "ipu7-platform-regs.h"
#include "ipu7-syscom.h"
static const char * const send_msg_types[N_IPU_INSYS_SEND_TYPE] = {
"STREAM_OPEN",
"STREAM_START_AND_CAPTURE",
"STREAM_CAPTURE",
"STREAM_ABORT",
"STREAM_FLUSH",
"STREAM_CLOSE"
};
int ipu7_fw_isys_complex_cmd(struct ipu7_isys *isys,
const unsigned int stream_handle,
void *cpu_mapped_buf,
dma_addr_t dma_mapped_buf,
size_t size, u16 send_type)
{
struct ipu7_syscom_context *ctx = isys->adev->syscom;
struct device *dev = &isys->adev->auxdev.dev;
struct ipu7_insys_send_queue_token *token;
if (send_type >= N_IPU_INSYS_SEND_TYPE)
return -EINVAL;
dev_dbg(dev, "send_token: %s\n", send_msg_types[send_type]);
/*
* Time to flush cache in case we have some payload. Not all messages
* have that
*/
if (cpu_mapped_buf)
clflush_cache_range(cpu_mapped_buf, size);
token = ipu7_syscom_get_token(ctx, stream_handle +
IPU_INSYS_INPUT_MSG_QUEUE);
if (!token)
return -EBUSY;
token->addr = dma_mapped_buf;
token->buf_handle = (unsigned long)cpu_mapped_buf;
token->send_type = send_type;
token->stream_id = stream_handle;
token->flag = IPU_INSYS_SEND_QUEUE_TOKEN_FLAG_NONE;
ipu7_syscom_put_token(ctx, stream_handle + IPU_INSYS_INPUT_MSG_QUEUE);
/* now wakeup FW */
ipu_buttress_wakeup_is_uc(isys->adev->isp);
return 0;
}
int ipu7_fw_isys_simple_cmd(struct ipu7_isys *isys,
const unsigned int stream_handle, u16 send_type)
{
return ipu7_fw_isys_complex_cmd(isys, stream_handle, NULL, 0, 0,
send_type);
}
int ipu7_fw_isys_init(struct ipu7_isys *isys)
{
struct syscom_queue_config *queue_configs;
struct ipu7_bus_device *adev = isys->adev;
struct device *dev = &adev->auxdev.dev;
struct ipu7_insys_config *isys_config;
struct ipu7_syscom_context *syscom;
dma_addr_t isys_config_dma_addr;
unsigned int i, num_queues;
u32 freq;
Annotation
- Immediate include surface: `linux/cacheflush.h`, `linux/device.h`, `linux/dma-mapping.h`, `linux/kernel.h`, `linux/string.h`, `linux/types.h`, `abi/ipu7_fw_insys_config_abi.h`, `abi/ipu7_fw_isys_abi.h`.
- Detected declarations: `function ipu7_fw_isys_complex_cmd`, `function ipu7_fw_isys_simple_cmd`, `function ipu7_fw_isys_init`, `function ipu7_fw_isys_release`, `function ipu7_fw_isys_open`, `function ipu7_fw_isys_close`, `function ipu7_fw_isys_put_resp`, `function ipu7_fw_isys_dump_stream_cfg`, `function ipu7_fw_isys_dump_frame_buff_set`.
- Atlas domain: Driver Families / drivers/staging.
- 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.