drivers/staging/media/atomisp/pci/sh_css_struct.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/sh_css_struct.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/sh_css_struct.h
Extension
.h
Size
2615 bytes
Lines
77
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct sh_css {
	struct ia_css_pipe            *active_pipes[IA_CSS_PIPELINE_NUM_MAX];
	/* All of the pipes created at any point of time. At this moment there can
	 * be no more than MAX_SP_THREADS of them because pipe_num is reused as SP
	 * thread_id to which a pipe's pipeline is associated. At a later point, if
	 * we support more pipe objects, we should add test code to test that
	 * possibility. Also, active_pipes[] should be able to hold only
	 * SH_CSS_MAX_SP_THREADS objects. Anything else is misleading. */
	struct ia_css_pipe            *all_pipes[IA_CSS_PIPELINE_NUM_MAX];
	void *(*malloc)(size_t bytes, bool zero_mem);
	void (*free)(void *ptr);
	void (*flush)(struct ia_css_acc_fw *fw);

/* ISP2401 */
	void *(*malloc_ex)(size_t bytes, bool zero_mem, const char *caller_func,
			   int caller_line);
	void (*free_ex)(void *ptr, const char *caller_func, int caller_line);

/* ISP2400 */
	bool stop_copy_preview;

	bool                           check_system_idle;
	unsigned int                   num_cont_raw_frames;
	unsigned int                   num_mipi_frames[N_CSI_PORTS];
	struct ia_css_frame
		*mipi_frames[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
	struct ia_css_metadata
		*mipi_metadata[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
	unsigned int
	mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
	unsigned int                   mipi_frame_size[N_CSI_PORTS];
	ia_css_ptr                   sp_bin_addr;
	hrt_data                       page_table_base_index;

	unsigned int
	size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/
	enum ia_css_irq_type           irq_type;
	unsigned int                   pipe_counter;

	unsigned int		type;	/* 2400 or 2401 for now */
};

#define IPU_2400		1
#define IPU_2401		2

#define IS_2400()		(my_css.type == IPU_2400)
#define IS_2401()		(my_css.type == IPU_2401)

extern struct sh_css my_css;

#endif /* __SH_CSS_STRUCT_H */

Annotation

Implementation Notes