drivers/gpu/drm/nouveau/include/nvif/outp.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/include/nvif/outp.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/include/nvif/outp.h
Extension
.h
Size
3129 bytes
Lines
117
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 nvif_outp {
	struct nvif_object object;
	u32 id;

	struct {
		enum {
			NVIF_OUTP_DAC,
			NVIF_OUTP_SOR,
			NVIF_OUTP_PIOR,
		} type;

		enum {
			NVIF_OUTP_RGB_CRT,
			NVIF_OUTP_TMDS,
			NVIF_OUTP_LVDS,
			NVIF_OUTP_DP,
		} proto;

		u8 heads;
#define NVIF_OUTP_DDC_INVALID 0xff
		u8 ddc;
		u8 conn;

		union {
			struct {
				u32 freq_max;
			} rgb_crt;
			struct {
				bool dual;
			} tmds;
			struct {
				bool acpi_edid;
			} lvds;
			struct {
				u8   aux;
				bool mst;
				bool increased_wm;
				u8   link_nr;
				u32  link_bw;
			} dp;
		};
	} info;

	struct {
		int id;
		int link;
	} or;
};

int nvif_outp_ctor(struct nvif_disp *, const char *name, int id, struct nvif_outp *);
void nvif_outp_dtor(struct nvif_outp *);

enum nvif_outp_detect_status {
	NOT_PRESENT,
	PRESENT,
	UNKNOWN,
};

enum nvif_outp_detect_status nvif_outp_detect(struct nvif_outp *);
int nvif_outp_edid_get(struct nvif_outp *, u8 **pedid);

int nvif_outp_load_detect(struct nvif_outp *, u32 loadval);
int nvif_outp_acquire_dac(struct nvif_outp *);
int nvif_outp_acquire_sor(struct nvif_outp *, bool hda);
int nvif_outp_acquire_pior(struct nvif_outp *);
int nvif_outp_inherit_rgb_crt(struct nvif_outp *outp, u8 *proto_out);
int nvif_outp_inherit_lvds(struct nvif_outp *outp, u8 *proto_out);
int nvif_outp_inherit_tmds(struct nvif_outp *outp, u8 *proto_out);
int nvif_outp_inherit_dp(struct nvif_outp *outp, u8 *proto_out);

void nvif_outp_release(struct nvif_outp *);

static inline bool
nvif_outp_acquired(struct nvif_outp *outp)
{
	return outp->or.id >= 0;
}

int nvif_outp_bl_get(struct nvif_outp *);
int nvif_outp_bl_set(struct nvif_outp *, int level);

int nvif_outp_lvds(struct nvif_outp *, bool dual, bool bpc8);

int nvif_outp_hdmi(struct nvif_outp *, int head, bool enable, u8 max_ac_packet, u8 rekey, u32 khz,
		   bool scdc, bool scdc_scrambling, bool scdc_low_rates);

int nvif_outp_infoframe(struct nvif_outp *, u8 type, struct nvif_outp_infoframe_v0 *, u32 size);
int nvif_outp_hda_eld(struct nvif_outp *, int head, void *data, u32 size);

int nvif_outp_dp_aux_pwr(struct nvif_outp *, bool enable);

Annotation

Implementation Notes