drivers/gpu/drm/nouveau/nouveau_connector.h

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

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nouveau_connector.h
Extension
.h
Size
7160 bytes
Lines
255
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_backlight {
	struct backlight_device *dev;

	struct drm_edp_backlight_info edp_info;
	bool uses_dpcd : 1;

	int id;
};
#endif

#define nouveau_conn_atom(p)                                                   \
	container_of((p), struct nouveau_conn_atom, state)

struct nouveau_conn_atom {
	struct drm_connector_state state;

	struct {
		/* The enum values specifically defined here match nv50/gf119
		 * hw values, and the code relies on this.
		 */
		enum {
			DITHERING_MODE_OFF =
				NVDEF(NV507D, HEAD_SET_DITHER_CONTROL, ENABLE, DISABLE),
			DITHERING_MODE_ON =
				NVDEF(NV507D, HEAD_SET_DITHER_CONTROL, ENABLE, ENABLE),
			DITHERING_MODE_DYNAMIC2X2 = DITHERING_MODE_ON |
				NVDEF(NV507D, HEAD_SET_DITHER_CONTROL, MODE, DYNAMIC_2X2),
			DITHERING_MODE_STATIC2X2 = DITHERING_MODE_ON |
				NVDEF(NV507D, HEAD_SET_DITHER_CONTROL, MODE, STATIC_2X2),
			DITHERING_MODE_TEMPORAL = DITHERING_MODE_ON |
				NVDEF(NV907D, HEAD_SET_DITHER_CONTROL, MODE, TEMPORAL),
			DITHERING_MODE_AUTO
		} mode;
		enum {
			DITHERING_DEPTH_6BPC =
				NVDEF(NV507D, HEAD_SET_DITHER_CONTROL, BITS, DITHER_TO_6_BITS),
			DITHERING_DEPTH_8BPC =
				NVDEF(NV507D, HEAD_SET_DITHER_CONTROL, BITS, DITHER_TO_8_BITS),
			DITHERING_DEPTH_AUTO
		} depth;
	} dither;

	struct {
		int mode;	/* DRM_MODE_SCALE_* */
		struct {
			enum {
				UNDERSCAN_OFF,
				UNDERSCAN_ON,
				UNDERSCAN_AUTO,
			} mode;
			u32 hborder;
			u32 vborder;
		} underscan;
		bool full;
	} scaler;

	struct {
		int color_vibrance;
		int vibrant_hue;
	} procamp;

	union {
		struct {
			bool dither:1;
			bool scaler:1;
			bool procamp:1;
		};
		u8 mask;
	} set;
};

struct nouveau_connector {
	struct drm_connector base;
	enum dcb_connector_type type;
	u8 index;

	struct nvif_conn conn;
	u64 hpd_pending;
	struct nvif_event hpd;
	struct nvif_event irq;
	struct work_struct irq_work;

	struct drm_dp_aux aux;

	/* The fixed DP encoder for this connector, if there is one */
	struct nouveau_encoder *dp_encoder;

	int dithering_mode;
	int scaling_mode;

Annotation

Implementation Notes