drivers/gpu/drm/xe/xe_rtp.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_rtp.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/xe/xe_rtp.h
Extension
.h
Size
18084 bytes
Lines
573
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

#ifndef _XE_RTP_H_
#define _XE_RTP_H_

#include <linux/types.h>
#include <linux/xarray.h>

#define _XE_RTP_INCLUDE_PRIVATE_HELPERS

#include "xe_rtp_helpers.h"
#include "xe_rtp_types.h"

#undef _XE_RTP_INCLUDE_PRIVATE_HELPERS

/*
 * Register table poke infrastructure
 */

struct xe_hw_engine;
struct xe_gt;
struct xe_reg_sr;

/*
 * Macros to encode rules to match against platform, IP version, stepping, etc.
 * Shouldn't be used directly - see XE_RTP_RULES()
 */
#define _XE_RTP_RULE_PLATFORM(plat__)						\
	{ .match_type = XE_RTP_MATCH_PLATFORM, .platform = plat__ }

#define _XE_RTP_RULE_SUBPLATFORM(plat__, sub__)					\
	{ .match_type = XE_RTP_MATCH_SUBPLATFORM,				\
	  .platform = plat__, .subplatform = sub__ }

#define _XE_RTP_RULE_PLATFORM_STEP(start__, end__)				\
	{ .match_type = XE_RTP_MATCH_PLATFORM_STEP,				\
	  .step_start = start__, .step_end = end__ }

#define _XE_RTP_RULE_GRAPHICS_STEP(start__, end__)				\
	{ .match_type = XE_RTP_MATCH_GRAPHICS_STEP,				\
	  .step_start = start__, .step_end = end__ }

#define _XE_RTP_RULE_MEDIA_STEP(start__, end__)					\
	{ .match_type = XE_RTP_MATCH_MEDIA_STEP,				\
	  .step_start = start__, .step_end = end__ }

#define _XE_RTP_RULE_ENGINE_CLASS(cls__)					\
	{ .match_type = XE_RTP_MATCH_ENGINE_CLASS,				\
	  .engine_class = (cls__) }

/**
 * XE_RTP_RULE_PLATFORM - Create rule matching platform
 * @plat_: platform to match
 *
 * Refer to XE_RTP_RULES() for expected usage.
 */
#define XE_RTP_RULE_PLATFORM(plat_)						\
	_XE_RTP_RULE_PLATFORM(XE_##plat_)

/**
 * XE_RTP_RULE_SUBPLATFORM - Create rule matching platform and sub-platform
 * @plat_: platform to match
 * @sub_: sub-platform to match
 *
 * Refer to XE_RTP_RULES() for expected usage.
 */
#define XE_RTP_RULE_SUBPLATFORM(plat_, sub_)					\
	_XE_RTP_RULE_SUBPLATFORM(XE_##plat_, XE_SUBPLATFORM_##plat_##_##sub_)

/**
 * XE_RTP_RULE_PLATFORM_STEP - Create rule matching platform-level stepping
 * @start_: First stepping matching the rule
 * @end_: First stepping that does not match the rule
 *
 * Note that the range matching this rule is [ @start_, @end_ ), i.e. inclusive
 * on the left, exclusive on the right.
 *
 * You need to make sure that proper support for reading platform-level stepping
 * information is present for the target platform before using this rule.
 *
 * Refer to XE_RTP_RULES() for expected usage.
 */
#define XE_RTP_RULE_PLATFORM_STEP(start_, end_)					\
	_XE_RTP_RULE_PLATFORM_STEP(STEP_##start_, STEP_##end_)

/**
 * XE_RTP_RULE_GRAPHICS_STEP - Create rule matching graphics stepping
 * @start_: First stepping matching the rule
 * @end_: First stepping that does not match the rule
 *
 * Note that the range matching this rule is [ @start_, @end_ ), i.e. inclusive
 * on the left, exclusive on the right.

Annotation

Implementation Notes