mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
drm/xe/rtp: Add support for matching platform-level stepping
Add support for matching platform-level stepping, which will be used for an upcoming NVL-P workaround. As support for reading platform-level stepping information is added only as needed in the driver, add a warning when the rule finds a STEP_NONE value, which is an indication that the driver is missing such a support. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patch.msgid.link/20260309-extra-nvl-p-enabling-patches-v5-4-be9c902ee34e@intel.com Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
This commit is contained in:
parent
19da26bce0
commit
557c05034f
|
|
@ -55,6 +55,13 @@ static bool rule_matches(const struct xe_device *xe,
|
|||
match = xe->info.platform == r->platform &&
|
||||
xe->info.subplatform == r->subplatform;
|
||||
break;
|
||||
case XE_RTP_MATCH_PLATFORM_STEP:
|
||||
if (drm_WARN_ON(&xe->drm, xe->info.step.platform == STEP_NONE))
|
||||
return false;
|
||||
|
||||
match = xe->info.step.platform >= r->step_start &&
|
||||
xe->info.step.platform < r->step_end;
|
||||
break;
|
||||
case XE_RTP_MATCH_GRAPHICS_VERSION:
|
||||
if (drm_WARN_ON(&xe->drm, !gt))
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ struct xe_reg_sr;
|
|||
{ .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__ }
|
||||
|
|
@ -66,6 +70,22 @@ struct xe_reg_sr;
|
|||
#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
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ struct xe_rtp_action {
|
|||
enum {
|
||||
XE_RTP_MATCH_PLATFORM,
|
||||
XE_RTP_MATCH_SUBPLATFORM,
|
||||
XE_RTP_MATCH_PLATFORM_STEP,
|
||||
XE_RTP_MATCH_GRAPHICS_VERSION,
|
||||
XE_RTP_MATCH_GRAPHICS_VERSION_RANGE,
|
||||
XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user