include/drm/intel/display_member.h

Source file repositories/reference/linux-study-clean/include/drm/intel/display_member.h

File Facts

System
Linux kernel
Corpus path
include/drm/intel/display_member.h
Extension
.h
Size
1496 bytes
Lines
43
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct __intel_generic_device {
	struct drm_device drm;
	struct intel_display *display;
};

/**
 * INTEL_DISPLAY_MEMBER_STATIC_ASSERT() - ensure correct placing of drm and display members
 * @type: The struct to check
 * @drm_member: Name of the struct drm_device member
 * @display_member: Name of the struct intel_display * member.
 *
 * Use this static assert macro to ensure the struct drm_i915_private and struct
 * xe_device struct drm_device and struct intel_display * members are at the
 * same relative offsets.
 */
#define INTEL_DISPLAY_MEMBER_STATIC_ASSERT(type, drm_member, display_member) \
	static_assert( \
		offsetof(struct __intel_generic_device, display) - offsetof(struct __intel_generic_device, drm) == \
		offsetof(type, display_member) - offsetof(type, drm_member), \
		__stringify(type) " " __stringify(drm_member) " and " __stringify(display_member) " members at invalid offsets")

#endif

Annotation

Implementation Notes