drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
Extension
.h
Size
7341 bytes
Lines
210
Domain
Driver Families
Bucket
drivers/gpu
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 nvkm_ior {
	const struct nvkm_ior_func *func;
	struct nvkm_disp *disp;
	enum nvkm_ior_type {
		DAC,
		SOR,
		PIOR,
	} type;
	int id;
	bool hda;
	char name[8];

	struct list_head head;
	bool identity;

	struct nvkm_ior_state {
		struct nvkm_outp *outp;
		unsigned rgdiv;
		unsigned proto_evo:4;
		enum nvkm_ior_proto {
			CRT,
			TV,
			TMDS,
			LVDS,
			DP,
			UNKNOWN
		} proto:3;
		unsigned link:2;
		unsigned head:8;
	} arm, asy;

	/* Armed DP state. */
	struct {
		bool mst;
		bool ef;
		u8 nr;
		u8 bw;
	} dp;

	/* Armed TMDS state. */
	struct {
		bool high_speed;
	} tmds;
};

struct nvkm_ior_func {
	struct {
		int (*get)(struct nvkm_outp *, int *link);
		void (*set)(struct nvkm_outp *, struct nvkm_ior *);
	} route;

	void (*state)(struct nvkm_ior *, struct nvkm_ior_state *);
	void (*power)(struct nvkm_ior *, bool normal, bool pu,
		      bool data, bool vsync, bool hsync);
	int (*sense)(struct nvkm_ior *, u32 loadval);
	void (*clock)(struct nvkm_ior *);
	void (*war_2)(struct nvkm_ior *);
	void (*war_3)(struct nvkm_ior *);

	const struct nvkm_ior_func_bl {
		int (*get)(struct nvkm_ior *);
		int (*set)(struct nvkm_ior *, int lvl);
	} *bl;

	const struct nvkm_ior_func_hdmi {
		void (*ctrl)(struct nvkm_ior *, int head, bool enable, u8 max_ac_packet, u8 rekey);
		void (*scdc)(struct nvkm_ior *, u32 khz, bool support, bool scrambling,
			     bool scrambling_low_rates);
		void (*infoframe_avi)(struct nvkm_ior *, int head, void *data, u32 size);
		void (*infoframe_vsi)(struct nvkm_ior *, int head, void *data, u32 size);
		void (*audio)(struct nvkm_ior *, int head, bool enable);
	} *hdmi;

	const struct nvkm_ior_func_dp {
		u8 lanes[4];
		int (*links)(struct nvkm_ior *, struct nvkm_i2c_aux *);
		void (*power)(struct nvkm_ior *, int nr);
		void (*pattern)(struct nvkm_ior *, int pattern);
		void (*drive)(struct nvkm_ior *, int ln, int pc,
			      int dc, int pe, int tx_pu);
		int (*sst)(struct nvkm_ior *, int head, bool ef,
			   u32 watermark, u32 hblanksym, u32 vblanksym);
		void (*vcpi)(struct nvkm_ior *, int head, u8 slot,
			     u8 slot_nr, u16 pbn, u16 aligned);
		void (*audio)(struct nvkm_ior *, int head, bool enable);
		void (*audio_sym)(struct nvkm_ior *, int head, u16 h, u32 v);
		void (*activesym)(struct nvkm_ior *, int head,
				  u8 TU, u8 VTUa, u8 VTUf, u8 VTUi);
		void (*watermark)(struct nvkm_ior *, int head, u8 watermark);
	} *dp;

Annotation

Implementation Notes