drivers/media/platform/qcom/venus/hfi_platform.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/venus/hfi_platform.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/qcom/venus/hfi_platform.h
Extension
.h
Size
2263 bytes
Lines
78
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct raw_formats {
	u32 buftype;
	u32 fmt;
};

struct hfi_plat_caps {
	u32 codec;
	u32 domain;
	bool cap_bufs_mode_dynamic;
	unsigned int num_caps;
	struct hfi_capability caps[MAX_CAP_ENTRIES];
	unsigned int num_pl;
	struct hfi_profile_level pl[HFI_MAX_PROFILE_COUNT];
	unsigned int num_fmts;
	struct raw_formats fmts[MAX_FMT_ENTRIES];
	bool valid;	/* used only for Venus v1xx */
};

struct hfi_platform_codec_freq_data {
	u32 pixfmt;
	u32 session_type;
	unsigned long vpp_freq;
	unsigned long vsp_freq;
	unsigned long low_power_freq;
};

struct hfi_platform {
	unsigned long (*codec_vpp_freq)(struct venus_core *core,
					u32 session_type, u32 codec);
	unsigned long (*codec_vsp_freq)(struct venus_core *core,
					u32 session_type, u32 codec);
	unsigned long (*codec_lp_freq)(struct venus_core *core,
				       u32 session_type, u32 codec);
	void (*codecs)(struct venus_core *core, u32 *enc_codecs,
		       u32 *dec_codecs, u32 *count);
	const struct hfi_plat_caps *(*capabilities)(struct venus_core *core,
						    unsigned int *entries);
	int (*bufreq)(struct hfi_plat_buffers_params *params, u32 session_type,
		      u32 buftype, struct hfi_buffer_requirements *bufreq);
};

extern const struct hfi_platform hfi_plat_v4;
extern const struct hfi_platform hfi_plat_v6;

const struct hfi_platform *hfi_platform_get(enum hfi_version version);
unsigned long hfi_platform_get_codec_vpp_freq(struct venus_core *core,
					      enum hfi_version version,
					      u32 codec, u32 session_type);
unsigned long hfi_platform_get_codec_vsp_freq(struct venus_core *core,
					      enum hfi_version version,
					      u32 codec, u32 session_type);
unsigned long hfi_platform_get_codec_lp_freq(struct venus_core *core,
					     enum hfi_version version,
					     u32 codec, u32 session_type);
#endif

Annotation

Implementation Notes