drivers/gpu/drm/i915/gvt/display.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gvt/display.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/i915/gvt/display.h
Extension
.h
Size
4156 bytes
Lines
170
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 intel_vgpu_sbi_register {
	unsigned int offset;
	u32 value;
};

struct intel_vgpu_sbi {
	int number;
	struct intel_vgpu_sbi_register registers[SBI_REG_MAX];
};

enum intel_gvt_plane_type {
	PRIMARY_PLANE = 0,
	CURSOR_PLANE,
	SPRITE_PLANE,
	MAX_PLANE
};

struct intel_vgpu_dpcd_data {
	bool data_valid;
	u8 data[DPCD_SIZE];
};

enum intel_vgpu_port_type {
	GVT_CRT = 0,
	GVT_DP_A,
	GVT_DP_B,
	GVT_DP_C,
	GVT_DP_D,
	GVT_HDMI_B,
	GVT_HDMI_C,
	GVT_HDMI_D,
	GVT_PORT_MAX
};

enum intel_vgpu_edid {
	GVT_EDID_1024_768,
	GVT_EDID_1920_1200,
	GVT_EDID_NUM,
};

#define GVT_DEFAULT_REFRESH_RATE 60
struct intel_vgpu_port {
	/* per display EDID information */
	struct intel_vgpu_edid_data *edid;
	/* per display DPCD information */
	struct intel_vgpu_dpcd_data *dpcd;
	int type;
	enum intel_vgpu_edid id;
	/* x1000 to get accurate 59.94, 24.976, 29.94, etc. in timing std. */
	u32 vrefresh_k;
};

struct intel_vgpu_vblank_timer {
	struct hrtimer timer;
	u32 vrefresh_k;
	u64 period;
};

static inline char *vgpu_edid_str(enum intel_vgpu_edid id)
{
	switch (id) {
	case GVT_EDID_1024_768:
		return "1024x768";
	case GVT_EDID_1920_1200:
		return "1920x1200";
	default:
		return "";
	}
}

static inline unsigned int vgpu_edid_xres(enum intel_vgpu_edid id)
{
	switch (id) {
	case GVT_EDID_1024_768:
		return 1024;
	case GVT_EDID_1920_1200:
		return 1920;
	default:
		return 0;
	}
}

static inline unsigned int vgpu_edid_yres(enum intel_vgpu_edid id)
{
	switch (id) {
	case GVT_EDID_1024_768:
		return 768;
	case GVT_EDID_1920_1200:
		return 1200;
	default:

Annotation

Implementation Notes