drivers/media/platform/amd/isp4/isp4_interface.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/amd/isp4/isp4_interface.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/amd/isp4/isp4_interface.c- Extension
.c- Size
- 21240 bytes
- Lines
- 833
- 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.
- 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/iopoll.hisp4_debug.hisp4_fw_cmd_resp.hisp4_hw_reg.hisp4_interface.h
Detected Declarations
struct isp4if_rb_configfunction isp4if_gpu_mem_allocfunction isp4if_gpu_mem_freefunction isp4if_dealloc_fw_gpumemfunction isp4if_alloc_fw_gpumemfunction isp4if_compute_check_sumfunction isp4if_clear_cmdqfunction isp4if_is_cmdq_rb_fullfunction list_for_each_entryfunction isp4if_insert_isp_fw_cmdfunction isp4if_get_fw_streamfunction isp4if_send_fw_cmdfunction scoped_guardfunction isp4if_send_bufferfunction isp4if_init_rb_configfunction isp4if_fw_initfunction isp4if_wait_fw_readyfunction isp4if_enable_ccpufunction isp4if_disable_ccpufunction isp4if_fw_bootfunction isp4if_f2h_respfunction isp4if_send_commandfunction isp4if_send_command_syncfunction isp4if_clear_bufqfunction isp4if_dealloc_buffer_nodefunction isp4if_alloc_buffer_nodefunction isp4if_queue_bufferfunction isp4if_stopfunction isp4if_startfunction isp4if_deinitfunction isp4if_init
Annotated Snippet
struct isp4if_rb_config {
const char *name;
u32 index;
u32 reg_rptr;
u32 reg_wptr;
u32 reg_base_lo;
u32 reg_base_hi;
u32 reg_size;
u32 val_size;
u64 base_mc_addr;
void *base_sys_addr;
};
/* FW cmd ring buffer configuration */
static struct isp4if_rb_config isp4if_cmd_rb_config[ISP4IF_STREAM_ID_MAX] = {
{
.name = "CMD_RB_GBL0",
.index = 3,
.reg_rptr = ISP_RB_RPTR4,
.reg_wptr = ISP_RB_WPTR4,
.reg_base_lo = ISP_RB_BASE_LO4,
.reg_base_hi = ISP_RB_BASE_HI4,
.reg_size = ISP_RB_SIZE4,
},
{
.name = "CMD_RB_STR1",
.index = 0,
.reg_rptr = ISP_RB_RPTR1,
.reg_wptr = ISP_RB_WPTR1,
.reg_base_lo = ISP_RB_BASE_LO1,
.reg_base_hi = ISP_RB_BASE_HI1,
.reg_size = ISP_RB_SIZE1,
},
{
.name = "CMD_RB_STR2",
.index = 1,
.reg_rptr = ISP_RB_RPTR2,
.reg_wptr = ISP_RB_WPTR2,
.reg_base_lo = ISP_RB_BASE_LO2,
.reg_base_hi = ISP_RB_BASE_HI2,
.reg_size = ISP_RB_SIZE2,
},
{
.name = "CMD_RB_STR3",
.index = 2,
.reg_rptr = ISP_RB_RPTR3,
.reg_wptr = ISP_RB_WPTR3,
.reg_base_lo = ISP_RB_BASE_LO3,
.reg_base_hi = ISP_RB_BASE_HI3,
.reg_size = ISP_RB_SIZE3,
},
};
/* FW resp ring buffer configuration */
static struct isp4if_rb_config isp4if_resp_rb_config[ISP4IF_STREAM_ID_MAX] = {
{
.name = "RES_RB_GBL0",
.index = 3,
.reg_rptr = ISP_RB_RPTR12,
.reg_wptr = ISP_RB_WPTR12,
.reg_base_lo = ISP_RB_BASE_LO12,
.reg_base_hi = ISP_RB_BASE_HI12,
.reg_size = ISP_RB_SIZE12,
},
{
.name = "RES_RB_STR1",
.index = 0,
.reg_rptr = ISP_RB_RPTR9,
.reg_wptr = ISP_RB_WPTR9,
.reg_base_lo = ISP_RB_BASE_LO9,
.reg_base_hi = ISP_RB_BASE_HI9,
.reg_size = ISP_RB_SIZE9,
},
{
.name = "RES_RB_STR2",
.index = 1,
.reg_rptr = ISP_RB_RPTR10,
.reg_wptr = ISP_RB_WPTR10,
.reg_base_lo = ISP_RB_BASE_LO10,
.reg_base_hi = ISP_RB_BASE_HI10,
.reg_size = ISP_RB_SIZE10,
},
{
.name = "RES_RB_STR3",
.index = 2,
.reg_rptr = ISP_RB_RPTR11,
.reg_wptr = ISP_RB_WPTR11,
.reg_base_lo = ISP_RB_BASE_LO11,
.reg_base_hi = ISP_RB_BASE_HI11,
.reg_size = ISP_RB_SIZE11,
Annotation
- Immediate include surface: `linux/iopoll.h`, `isp4_debug.h`, `isp4_fw_cmd_resp.h`, `isp4_hw_reg.h`, `isp4_interface.h`.
- Detected declarations: `struct isp4if_rb_config`, `function isp4if_gpu_mem_alloc`, `function isp4if_gpu_mem_free`, `function isp4if_dealloc_fw_gpumem`, `function isp4if_alloc_fw_gpumem`, `function isp4if_compute_check_sum`, `function isp4if_clear_cmdq`, `function isp4if_is_cmdq_rb_full`, `function list_for_each_entry`, `function isp4if_insert_isp_fw_cmd`.
- 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.
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.