drivers/media/platform/amd/isp4/isp4_interface.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/amd/isp4/isp4_interface.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/amd/isp4/isp4_interface.h- Extension
.h- Size
- 3669 bytes
- Lines
- 145
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm/amd/isp.hlinux/mutex.hlinux/platform_device.hlinux/spinlock.h
Detected Declarations
struct isp4fw_respstruct isp4if_gpu_mem_infostruct isp4if_img_buf_infostruct isp4if_img_buf_nodestruct isp4if_cmd_elementstruct isp4_interfaceenum isp4if_stream_idenum isp4if_statusfunction isp4if_split_addr64function isp4if_join_addr64
Annotated Snippet
struct isp4if_gpu_mem_info {
u64 mem_size;
u64 gpu_mc_addr;
void *sys_addr;
void *mem_handle;
};
struct isp4if_img_buf_info {
struct {
void *sys_addr;
u64 mc_addr;
u32 len;
} planes[3];
};
struct isp4if_img_buf_node {
struct list_head node;
struct isp4if_img_buf_info buf_info;
};
struct isp4if_cmd_element {
struct list_head list;
u32 seq_num;
u32 cmd_id;
struct completion cmd_done;
atomic_t refcnt;
};
struct isp4_interface {
struct device *dev;
void __iomem *mmio;
spinlock_t cmdq_lock; /* used for cmdq access */
spinlock_t bufq_lock; /* used for bufq access */
struct mutex isp4if_mutex; /* used to send fw cmd and read fw log */
struct list_head cmdq; /* commands sent to fw */
struct list_head bufq; /* buffers sent to fw */
enum isp4if_status status;
u32 host2fw_seq_num;
/* ISP fw buffers */
struct isp4if_gpu_mem_info *fw_log_buf;
struct isp4if_gpu_mem_info *fw_cmd_resp_buf;
struct isp4if_gpu_mem_info *fw_mem_pool;
struct isp4if_gpu_mem_info *meta_info_buf[ISP4IF_MAX_STREAM_BUF_COUNT];
};
static inline void isp4if_split_addr64(u64 addr, u32 *lo, u32 *hi)
{
if (lo)
*lo = addr & 0xffffffff;
if (hi)
*hi = addr >> 32;
}
static inline u64 isp4if_join_addr64(u32 lo, u32 hi)
{
return (((u64)hi) << 32) | (u64)lo;
}
int isp4if_f2h_resp(struct isp4_interface *ispif, enum isp4if_stream_id stream,
struct isp4fw_resp *resp);
int isp4if_send_command(struct isp4_interface *ispif, u32 cmd_id,
const void *package, u32 package_size);
int isp4if_send_command_sync(struct isp4_interface *ispif, u32 cmd_id,
const void *package, u32 package_size);
struct isp4if_cmd_element *isp4if_rm_cmd_from_cmdq(struct isp4_interface *ispif,
u32 seq_num, u32 cmd_id);
void isp4if_clear_cmdq(struct isp4_interface *ispif);
void isp4if_clear_bufq(struct isp4_interface *ispif);
void isp4if_dealloc_buffer_node(struct isp4if_img_buf_node *buf_node);
struct isp4if_img_buf_node *
isp4if_alloc_buffer_node(struct isp4if_img_buf_info *buf_info);
struct isp4if_img_buf_node *isp4if_dequeue_buffer(struct isp4_interface *ispif);
int isp4if_queue_buffer(struct isp4_interface *ispif,
struct isp4if_img_buf_node *buf_node);
int isp4if_stop(struct isp4_interface *ispif);
Annotation
- Immediate include surface: `drm/amd/isp.h`, `linux/mutex.h`, `linux/platform_device.h`, `linux/spinlock.h`.
- Detected declarations: `struct isp4fw_resp`, `struct isp4if_gpu_mem_info`, `struct isp4if_img_buf_info`, `struct isp4if_img_buf_node`, `struct isp4if_cmd_element`, `struct isp4_interface`, `enum isp4if_stream_id`, `enum isp4if_status`, `function isp4if_split_addr64`, `function isp4if_join_addr64`.
- 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.