drivers/gpu/drm/i915/display/intel_fb.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_fb.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/i915/display/intel_fb.c
Extension
.c
Size
73273 bytes
Lines
2408
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_modifier_desc {
	u64 modifier;
	struct {
		u8 from;
		u8 until;
	} display_ver;
#define DISPLAY_VER_ALL		{ 0, -1 }

	const struct drm_format_info *formats;
	int format_count;
#define FORMAT_OVERRIDE(format_list) \
	.formats = format_list, \
	.format_count = ARRAY_SIZE(format_list)

	u8 plane_caps;

	struct {
		u8 cc_planes:3;
		u8 packed_aux_planes:4;
		u8 planar_aux_planes:4;
	} ccs;
};

#define INTEL_PLANE_CAP_CCS_MASK	(INTEL_PLANE_CAP_CCS_RC | \
					 INTEL_PLANE_CAP_CCS_RC_CC | \
					 INTEL_PLANE_CAP_CCS_MC)
#define INTEL_PLANE_CAP_TILING_MASK	(INTEL_PLANE_CAP_TILING_X | \
					 INTEL_PLANE_CAP_TILING_Y | \
					 INTEL_PLANE_CAP_TILING_Yf | \
					 INTEL_PLANE_CAP_TILING_4)
#define INTEL_PLANE_CAP_TILING_NONE	0

static const struct intel_modifier_desc intel_modifiers[] = {
	{
		.modifier = I915_FORMAT_MOD_4_TILED_LNL_CCS,
		.display_ver = { 20, -1 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4,
	}, {
		.modifier = I915_FORMAT_MOD_4_TILED_BMG_CCS,
		.display_ver = { 14, -1 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_NEED64K_PHYS,
	}, {
		.modifier = I915_FORMAT_MOD_4_TILED_MTL_MC_CCS,
		.display_ver = { 14, 14 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_CCS_MC,

		.ccs.packed_aux_planes = BIT(1),
		.ccs.planar_aux_planes = BIT(2) | BIT(3),

		FORMAT_OVERRIDE(gen12_ccs_formats),
	}, {
		.modifier = I915_FORMAT_MOD_4_TILED_MTL_RC_CCS,
		.display_ver = { 14, 14 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_CCS_RC,

		.ccs.packed_aux_planes = BIT(1),

		FORMAT_OVERRIDE(gen12_ccs_formats),
	}, {
		.modifier = I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC,
		.display_ver = { 14, 14 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_CCS_RC_CC,

		.ccs.cc_planes = BIT(2),
		.ccs.packed_aux_planes = BIT(1),

		FORMAT_OVERRIDE(gen12_ccs_cc_formats),
	}, {
		.modifier = I915_FORMAT_MOD_4_TILED_DG2_MC_CCS,
		.display_ver = { 13, 13 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_CCS_MC,
	}, {
		.modifier = I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC,
		.display_ver = { 13, 13 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_CCS_RC_CC,

		.ccs.cc_planes = BIT(1),

		FORMAT_OVERRIDE(gen12_flat_ccs_cc_formats),
	}, {
		.modifier = I915_FORMAT_MOD_4_TILED_DG2_RC_CCS,
		.display_ver = { 13, 13 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_CCS_RC,
	}, {
		.modifier = I915_FORMAT_MOD_4_TILED,
		.display_ver = { 13, -1 },
		.plane_caps = INTEL_PLANE_CAP_TILING_4,
	}, {
		.modifier = I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS,
		.display_ver = { 12, 13 },

Annotation

Implementation Notes