drivers/media/platform/amd/isp4/isp4_subdev.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/amd/isp4/isp4_subdev.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/amd/isp4/isp4_subdev.h- Extension
.h- Size
- 3198 bytes
- Lines
- 128
- 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/debugfs.hlinux/delay.hlinux/firmware.hlinux/pm_runtime.hlinux/types.hlinux/uaccess.hmedia/v4l2-device.hisp4_fw_cmd_resp.hisp4_hw_reg.hisp4_interface.hisp4_video.h
Detected Declarations
struct isp4sd_img_buf_nodestruct isp4sd_output_infostruct isp4sd_sensor_infostruct isp4sd_thread_handlerstruct isp4_subdev_thread_paramstruct isp4_subdevenum isp4sd_statusenum isp4sd_start_status
Annotated Snippet
struct isp4sd_img_buf_node {
struct list_head node;
struct isp4if_img_buf_info buf_info;
};
/* This is ISP output after processing Bayer raw sensor input */
struct isp4sd_output_info {
enum isp4sd_start_status start_status;
u32 image_size;
};
/*
* Struct for sensor info used as ISP input or source.
* status: sensor status.
* output_info: ISP output after processing the sensor input.
* start_stream_cmd_sent: indicates if ISP4FW_CMD_ID_START_STREAM was sent
* to firmware.
* buf_sent_cnt: number of buffers sent to receive images.
*/
struct isp4sd_sensor_info {
struct isp4sd_output_info output_info;
enum isp4sd_start_status status;
bool start_stream_cmd_sent;
u32 buf_sent_cnt;
};
/*
* The thread is created by the driver to handle firmware responses which will
* be waken up when a firmware-to-driver response interrupt occurs.
*/
struct isp4sd_thread_handler {
struct task_struct *thread;
wait_queue_head_t waitq;
bool resp_ready;
};
struct isp4_subdev_thread_param {
u32 idx;
struct isp4_subdev *isp_subdev;
};
struct isp4_subdev {
struct v4l2_subdev sdev;
struct isp4_interface ispif;
struct isp4vid_dev isp_vdev;
struct media_pad sdev_pad;
enum isp4sd_status isp_status;
/* mutex used to synchronize the operation with firmware */
struct mutex ops_mutex;
struct isp4sd_thread_handler
fw_resp_thread[ISP4SD_MAX_FW_RESP_STREAM_NUM];
u32 host2fw_seq_num;
struct isp4sd_sensor_info sensor_info;
/* gpio descriptor */
struct gpio_desc *enable_gpio;
struct device *dev;
void __iomem *mmio;
struct isp4_subdev_thread_param
isp_resp_para[ISP4SD_MAX_FW_RESP_STREAM_NUM];
int irq[ISP4SD_MAX_FW_RESP_STREAM_NUM];
bool irq_enabled;
/* spin lock to access ISP_SYS_INT0_EN exclusively */
spinlock_t irq_lock;
#ifdef CONFIG_DEBUG_FS
bool enable_fw_log;
struct dentry *debugfs_dir;
char *fw_log_output;
#endif
};
int isp4sd_init(struct isp4_subdev *isp_subdev, struct v4l2_device *v4l2_dev,
int irq[ISP4SD_MAX_FW_RESP_STREAM_NUM]);
void isp4sd_deinit(struct isp4_subdev *isp_subdev);
int isp4sd_ioc_send_img_buf(struct v4l2_subdev *sd,
struct isp4if_img_buf_info *buf_info);
int isp4sd_pwron_and_init(struct v4l2_subdev *sd);
int isp4sd_pwroff_and_deinit(struct v4l2_subdev *sd);
#endif /* _ISP4_SUBDEV_H_ */
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/delay.h`, `linux/firmware.h`, `linux/pm_runtime.h`, `linux/types.h`, `linux/uaccess.h`, `media/v4l2-device.h`, `isp4_fw_cmd_resp.h`.
- Detected declarations: `struct isp4sd_img_buf_node`, `struct isp4sd_output_info`, `struct isp4sd_sensor_info`, `struct isp4sd_thread_handler`, `struct isp4_subdev_thread_param`, `struct isp4_subdev`, `enum isp4sd_status`, `enum isp4sd_start_status`.
- 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.