Lines Matching refs:xe

27 static bool has_samedia(const struct xe_device *xe)  in has_samedia()  argument
29 return xe->info.media_verx100 >= 1300; in has_samedia()
32 static bool rule_matches(const struct xe_device *xe, in rule_matches() argument
52 match = xe->info.platform == r->platform; in rule_matches()
55 match = xe->info.platform == r->platform && in rule_matches()
56 xe->info.subplatform == r->subplatform; in rule_matches()
59 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
62 match = xe->info.graphics_verx100 == r->ver_start && in rule_matches()
63 (!has_samedia(xe) || !xe_gt_is_media_type(gt)); in rule_matches()
66 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
69 match = xe->info.graphics_verx100 >= r->ver_start && in rule_matches()
70 xe->info.graphics_verx100 <= r->ver_end && in rule_matches()
71 (!has_samedia(xe) || !xe_gt_is_media_type(gt)); in rule_matches()
74 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
77 match = xe->info.graphics_verx100 == r->ver_start; in rule_matches()
80 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
83 match = xe->info.step.graphics >= r->step_start && in rule_matches()
84 xe->info.step.graphics < r->step_end && in rule_matches()
85 (!has_samedia(xe) || !xe_gt_is_media_type(gt)); in rule_matches()
88 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
91 match = xe->info.media_verx100 == r->ver_start && in rule_matches()
92 (!has_samedia(xe) || xe_gt_is_media_type(gt)); in rule_matches()
95 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
98 match = xe->info.media_verx100 >= r->ver_start && in rule_matches()
99 xe->info.media_verx100 <= r->ver_end && in rule_matches()
100 (!has_samedia(xe) || xe_gt_is_media_type(gt)); in rule_matches()
103 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
106 match = xe->info.step.media >= r->step_start && in rule_matches()
107 xe->info.step.media < r->step_end && in rule_matches()
108 (!has_samedia(xe) || xe_gt_is_media_type(gt)); in rule_matches()
111 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
114 match = xe->info.media_verx100 == r->ver_start; in rule_matches()
117 match = !xe->info.is_dgfx; in rule_matches()
120 match = xe->info.is_dgfx; in rule_matches()
123 if (drm_WARN_ON(&xe->drm, !hwe)) in rule_matches()
129 if (drm_WARN_ON(&xe->drm, !hwe)) in rule_matches()
135 if (drm_WARN_ON(&xe->drm, !gt)) in rule_matches()
141 drm_warn(&xe->drm, "Invalid RTP match %u\n", in rule_matches()
164 if (drm_WARN_ON(&xe->drm, !rcount)) in rule_matches()
187 struct xe_device *xe, struct xe_gt *gt, in rtp_process_one_sr() argument
194 if (!rule_matches(xe, gt, hwe, entry->rules, entry->n_rules)) in rtp_process_one_sr()
213 struct xe_device **xe) in rtp_get_context() argument
219 *xe = ctx->xe; in rtp_get_context()
224 *xe = gt_to_xe(*gt); in rtp_get_context()
229 *xe = gt_to_xe(*gt); in rtp_get_context()
254 static void rtp_mark_active(struct xe_device *xe, in rtp_mark_active() argument
261 if (drm_WARN_ON(&xe->drm, idx >= ctx->n_entries)) in rtp_mark_active()
289 struct xe_device *xe = NULL; in xe_rtp_process_to_sr() local
291 rtp_get_context(ctx, &hwe, &gt, &xe); in xe_rtp_process_to_sr()
293 xe_assert(xe, entries); in xe_rtp_process_to_sr()
303 match |= rtp_process_one_sr(entry, xe, gt, in xe_rtp_process_to_sr()
306 match = rtp_process_one_sr(entry, xe, gt, hwe, sr); in xe_rtp_process_to_sr()
310 rtp_mark_active(xe, ctx, entry - entries); in xe_rtp_process_to_sr()
332 struct xe_device *xe; in xe_rtp_process() local
334 rtp_get_context(ctx, &hwe, &gt, &xe); in xe_rtp_process()
337 if (!rule_matches(xe, gt, hwe, entry->rules, entry->n_rules)) in xe_rtp_process()
340 rtp_mark_active(xe, ctx, entry - entries); in xe_rtp_process()