drivers/gpu/drm/nouveau/nouveau_encoder.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nouveau_encoder.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nouveau_encoder.h
Extension
.h
Size
4573 bytes
Lines
178
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 nouveau_encoder {
	struct nouveau_i2c_encoder base;

	struct dcb_output *dcb;
	struct nvif_outp outp;
	int or;

	struct nouveau_connector *conn;

	struct i2c_adapter *i2c;

	/* different to drm_encoder.crtc, this reflects what's
	 * actually programmed on the hw, not the proposed crtc */
	struct drm_crtc *crtc;
	u32 ctrl;

	/* Protected by nouveau_drm.audio.lock */
	struct {
		bool enabled;
	} audio;

	struct drm_display_mode mode;
	int last_dpms;

	struct nv04_output_reg restore;

	struct {
		struct {
			bool enabled;
		} hdmi;

		struct {
			struct nv50_mstm *mstm;

			struct {
				u8 caps[DP_LTTPR_COMMON_CAP_SIZE];
				u8 nr;
			} lttpr;

			u8 dpcd[DP_RECEIVER_CAP_SIZE];

			struct nvif_outp_dp_rate rate[8];
			int rate_nr;

			int link_nr;
			int link_bw;

			struct {
				bool mst;
				u8   nr;
				u32  bw;
			} lt;

			/* Protects DP state that needs to be accessed outside
			 * connector reprobing contexts
			 */
			struct mutex hpd_irq_lock;

			u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS];
			struct drm_dp_desc desc;

			u8 sink_count;
		} dp;
	};

	struct {
		bool dp_interlace : 1;
	} caps;

	void (*enc_save)(struct drm_encoder *encoder);
	void (*enc_restore)(struct drm_encoder *encoder);
	void (*update)(struct nouveau_encoder *, u8 head,
		       struct nv50_head_atom *, u8 proto, u8 depth);
};

struct nv50_mstm {
	struct nouveau_encoder *outp;

	struct drm_dp_mst_topology_mgr mgr;

	/* Protected under nouveau_encoder->dp.hpd_irq_lock */
	bool can_mst;
	bool is_mst;
	bool suspended;

	bool modified;
	bool disabled;
	int links;
};

Annotation

Implementation Notes