drm/xe/rtp: Add check for media stepping
Start differentiating the media and graphics stepping as it will be important for MTL. Note that RTP is still not prepared to handle the different types of GT, i.e. checking for graphics version/range/stepping on a media gt or vice versa still matches regardless of the gt being passed as parameter. Changing it to accommodate MTL is left for a future patch. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230526164358.86393-10-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
00a5912c02
commit
ed73d03c08
@ -43,13 +43,16 @@ static bool rule_matches(const struct xe_device *xe,
|
||||
xe->info.subplatform == r->subplatform;
|
||||
break;
|
||||
case XE_RTP_MATCH_GRAPHICS_VERSION:
|
||||
/* TODO: match display */
|
||||
match = xe->info.graphics_verx100 == r->ver_start;
|
||||
break;
|
||||
case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
|
||||
match = xe->info.graphics_verx100 >= r->ver_start &&
|
||||
xe->info.graphics_verx100 <= r->ver_end;
|
||||
break;
|
||||
case XE_RTP_MATCH_GRAPHICS_STEP:
|
||||
match = xe->info.step.graphics >= r->step_start &&
|
||||
xe->info.step.graphics < r->step_end;
|
||||
break;
|
||||
case XE_RTP_MATCH_MEDIA_VERSION:
|
||||
match = xe->info.media_verx100 == r->ver_start;
|
||||
break;
|
||||
@ -57,10 +60,9 @@ static bool rule_matches(const struct xe_device *xe,
|
||||
match = xe->info.media_verx100 >= r->ver_start &&
|
||||
xe->info.media_verx100 <= r->ver_end;
|
||||
break;
|
||||
case XE_RTP_MATCH_GRAPHICS_STEP:
|
||||
/* TODO: match media/display */
|
||||
match = xe->info.step.graphics >= r->step_start &&
|
||||
xe->info.step.graphics < r->step_end;
|
||||
case XE_RTP_MATCH_MEDIA_STEP:
|
||||
match = xe->info.step.media >= r->step_start &&
|
||||
xe->info.step.media < r->step_end;
|
||||
break;
|
||||
case XE_RTP_MATCH_INTEGRATED:
|
||||
match = !xe->info.is_dgfx;
|
||||
|
@ -39,6 +39,10 @@ struct xe_reg_sr;
|
||||
{ .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__) }
|
||||
@ -75,6 +79,19 @@ struct xe_reg_sr;
|
||||
#define XE_RTP_RULE_GRAPHICS_STEP(start_, end_) \
|
||||
_XE_RTP_RULE_GRAPHICS_STEP(STEP_##start_, STEP_##end_)
|
||||
|
||||
/**
|
||||
* XE_RTP_RULE_MEDIA_STEP - Create rule matching media 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.
|
||||
*
|
||||
* Refer to XE_RTP_RULES() for expected usage.
|
||||
*/
|
||||
#define XE_RTP_RULE_MEDIA_STEP(start_, end_) \
|
||||
_XE_RTP_RULE_MEDIA_STEP(STEP_##start_, STEP_##end_)
|
||||
|
||||
/**
|
||||
* XE_RTP_RULE_ENGINE_CLASS - Create rule matching an engine class
|
||||
* @cls_: Engine class to match
|
||||
|
@ -42,6 +42,7 @@ enum {
|
||||
XE_RTP_MATCH_GRAPHICS_STEP,
|
||||
XE_RTP_MATCH_MEDIA_VERSION,
|
||||
XE_RTP_MATCH_MEDIA_VERSION_RANGE,
|
||||
XE_RTP_MATCH_MEDIA_STEP,
|
||||
XE_RTP_MATCH_INTEGRATED,
|
||||
XE_RTP_MATCH_DISCRETE,
|
||||
XE_RTP_MATCH_ENGINE_CLASS,
|
||||
|
Loading…
x
Reference in New Issue
Block a user