1 // SPDX-License-Identifier: MIT
3 * Copyright © 2019 Intel Corporation
6 #include <drm/intel-gtt.h>
8 #include "intel_gt_debugfs.h"
10 #include "gem/i915_gem_lmem.h"
12 #include "intel_context.h"
14 #include "intel_gt_buffer_pool.h"
15 #include "intel_gt_clock_utils.h"
16 #include "intel_gt_pm.h"
17 #include "intel_gt_requests.h"
18 #include "intel_migrate.h"
19 #include "intel_mocs.h"
21 #include "intel_rc6.h"
22 #include "intel_renderstate.h"
23 #include "intel_rps.h"
24 #include "intel_uncore.h"
25 #include "shmem_utils.h"
26 #include "pxp/intel_pxp.h"
28 void __intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915)
30 spin_lock_init(>->irq_lock);
32 INIT_LIST_HEAD(>->closed_vma);
33 spin_lock_init(>->closed_lock);
35 init_llist_head(>->watchdog.list);
36 INIT_WORK(>->watchdog.work, intel_gt_watchdog_work);
38 intel_gt_init_buffer_pool(gt);
39 intel_gt_init_reset(gt);
40 intel_gt_init_requests(gt);
41 intel_gt_init_timelines(gt);
42 intel_gt_pm_init_early(gt);
44 intel_uc_init_early(>->uc);
45 intel_rps_init_early(>->rps);
48 void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915)
51 gt->uncore = &i915->uncore;
54 int intel_gt_probe_lmem(struct intel_gt *gt)
56 struct drm_i915_private *i915 = gt->i915;
57 struct intel_memory_region *mem;
61 mem = intel_gt_setup_lmem(gt);
62 if (mem == ERR_PTR(-ENODEV))
63 mem = intel_gt_setup_fake_lmem(gt);
70 "Failed to setup region(%d) type=%d\n",
71 err, INTEL_MEMORY_LOCAL);
75 id = INTEL_REGION_LMEM;
79 intel_memory_region_set_name(mem, "local%u", mem->instance);
81 GEM_BUG_ON(!HAS_REGION(i915, id));
82 GEM_BUG_ON(i915->mm.regions[id]);
83 i915->mm.regions[id] = mem;
88 void intel_gt_init_hw_early(struct intel_gt *gt, struct i915_ggtt *ggtt)
93 static const struct intel_mmio_range icl_l3bank_steering_table[] = {
94 { 0x00B100, 0x00B3FF },
98 static const struct intel_mmio_range xehpsdv_mslice_steering_table[] = {
99 { 0x004000, 0x004AFF },
100 { 0x00C800, 0x00CFFF },
101 { 0x00DD00, 0x00DDFF },
102 { 0x00E900, 0x00FFFF }, /* 0xEA00 - OxEFFF is unused */
106 static const struct intel_mmio_range xehpsdv_lncf_steering_table[] = {
107 { 0x00B000, 0x00B0FF },
108 { 0x00D800, 0x00D8FF },
112 static const struct intel_mmio_range dg2_lncf_steering_table[] = {
113 { 0x00B000, 0x00B0FF },
114 { 0x00D880, 0x00D8FF },
118 static u16 slicemask(struct intel_gt *gt, int count)
120 u64 dss_mask = intel_sseu_get_subslices(>->info.sseu, 0);
122 return intel_slicemask_from_dssmask(dss_mask, count);
125 int intel_gt_init_mmio(struct intel_gt *gt)
127 struct drm_i915_private *i915 = gt->i915;
129 intel_gt_init_clock_frequency(gt);
131 intel_uc_init_mmio(>->uc);
132 intel_sseu_info_init(gt);
135 * An mslice is unavailable only if both the meml3 for the slice is
136 * disabled *and* all of the DSS in the slice (quadrant) are disabled.
138 if (HAS_MSLICES(i915))
139 gt->info.mslice_mask =
140 slicemask(gt, GEN_DSS_PER_MSLICE) |
141 (intel_uncore_read(gt->uncore, GEN10_MIRROR_FUSE3) &
142 GEN12_MEML3_EN_MASK);
145 gt->steering_table[MSLICE] = xehpsdv_mslice_steering_table;
146 gt->steering_table[LNCF] = dg2_lncf_steering_table;
147 } else if (IS_XEHPSDV(i915)) {
148 gt->steering_table[MSLICE] = xehpsdv_mslice_steering_table;
149 gt->steering_table[LNCF] = xehpsdv_lncf_steering_table;
150 } else if (GRAPHICS_VER(i915) >= 11 &&
151 GRAPHICS_VER_FULL(i915) < IP_VER(12, 50)) {
152 gt->steering_table[L3BANK] = icl_l3bank_steering_table;
153 gt->info.l3bank_mask =
154 ~intel_uncore_read(gt->uncore, GEN10_MIRROR_FUSE3) &
156 } else if (HAS_MSLICES(i915)) {
157 MISSING_CASE(INTEL_INFO(i915)->platform);
160 return intel_engines_init_mmio(gt);
163 static void init_unused_ring(struct intel_gt *gt, u32 base)
165 struct intel_uncore *uncore = gt->uncore;
167 intel_uncore_write(uncore, RING_CTL(base), 0);
168 intel_uncore_write(uncore, RING_HEAD(base), 0);
169 intel_uncore_write(uncore, RING_TAIL(base), 0);
170 intel_uncore_write(uncore, RING_START(base), 0);
173 static void init_unused_rings(struct intel_gt *gt)
175 struct drm_i915_private *i915 = gt->i915;
178 init_unused_ring(gt, PRB1_BASE);
179 init_unused_ring(gt, SRB0_BASE);
180 init_unused_ring(gt, SRB1_BASE);
181 init_unused_ring(gt, SRB2_BASE);
182 init_unused_ring(gt, SRB3_BASE);
183 } else if (GRAPHICS_VER(i915) == 2) {
184 init_unused_ring(gt, SRB0_BASE);
185 init_unused_ring(gt, SRB1_BASE);
186 } else if (GRAPHICS_VER(i915) == 3) {
187 init_unused_ring(gt, PRB1_BASE);
188 init_unused_ring(gt, PRB2_BASE);
192 int intel_gt_init_hw(struct intel_gt *gt)
194 struct drm_i915_private *i915 = gt->i915;
195 struct intel_uncore *uncore = gt->uncore;
198 gt->last_init_time = ktime_get();
200 /* Double layer security blanket, see i915_gem_init() */
201 intel_uncore_forcewake_get(uncore, FORCEWAKE_ALL);
203 if (HAS_EDRAM(i915) && GRAPHICS_VER(i915) < 9)
204 intel_uncore_rmw(uncore, HSW_IDICR, 0, IDIHASHMSK(0xf));
206 if (IS_HASWELL(i915))
207 intel_uncore_write(uncore,
208 MI_PREDICATE_RESULT_2,
210 LOWER_SLICE_ENABLED : LOWER_SLICE_DISABLED);
212 /* Apply the GT workarounds... */
213 intel_gt_apply_workarounds(gt);
214 /* ...and determine whether they are sticking. */
215 intel_gt_verify_workarounds(gt, "init");
217 intel_gt_init_swizzling(gt);
220 * At least 830 can leave some of the unused rings
221 * "active" (ie. head != tail) after resume which
222 * will prevent c3 entry. Makes sure all unused rings
225 init_unused_rings(gt);
227 ret = i915_ppgtt_init_hw(gt);
229 DRM_ERROR("Enabling PPGTT failed (%d)\n", ret);
233 /* We can't enable contexts until all firmware is loaded */
234 ret = intel_uc_init_hw(>->uc);
236 i915_probe_error(i915, "Enabling uc failed (%d)\n", ret);
243 intel_uncore_forcewake_put(uncore, FORCEWAKE_ALL);
247 static void rmw_set(struct intel_uncore *uncore, i915_reg_t reg, u32 set)
249 intel_uncore_rmw(uncore, reg, 0, set);
252 static void rmw_clear(struct intel_uncore *uncore, i915_reg_t reg, u32 clr)
254 intel_uncore_rmw(uncore, reg, clr, 0);
257 static void clear_register(struct intel_uncore *uncore, i915_reg_t reg)
259 intel_uncore_rmw(uncore, reg, 0, 0);
262 static void gen6_clear_engine_error_register(struct intel_engine_cs *engine)
264 GEN6_RING_FAULT_REG_RMW(engine, RING_FAULT_VALID, 0);
265 GEN6_RING_FAULT_REG_POSTING_READ(engine);
269 intel_gt_clear_error_registers(struct intel_gt *gt,
270 intel_engine_mask_t engine_mask)
272 struct drm_i915_private *i915 = gt->i915;
273 struct intel_uncore *uncore = gt->uncore;
276 if (GRAPHICS_VER(i915) != 2)
277 clear_register(uncore, PGTBL_ER);
279 if (GRAPHICS_VER(i915) < 4)
280 clear_register(uncore, IPEIR(RENDER_RING_BASE));
282 clear_register(uncore, IPEIR_I965);
284 clear_register(uncore, EIR);
285 eir = intel_uncore_read(uncore, EIR);
288 * some errors might have become stuck,
291 DRM_DEBUG_DRIVER("EIR stuck: 0x%08x, masking\n", eir);
292 rmw_set(uncore, EMR, eir);
293 intel_uncore_write(uncore, GEN2_IIR,
294 I915_MASTER_ERROR_INTERRUPT);
297 if (GRAPHICS_VER(i915) >= 12) {
298 rmw_clear(uncore, GEN12_RING_FAULT_REG, RING_FAULT_VALID);
299 intel_uncore_posting_read(uncore, GEN12_RING_FAULT_REG);
300 } else if (GRAPHICS_VER(i915) >= 8) {
301 rmw_clear(uncore, GEN8_RING_FAULT_REG, RING_FAULT_VALID);
302 intel_uncore_posting_read(uncore, GEN8_RING_FAULT_REG);
303 } else if (GRAPHICS_VER(i915) >= 6) {
304 struct intel_engine_cs *engine;
305 enum intel_engine_id id;
307 for_each_engine_masked(engine, gt, engine_mask, id)
308 gen6_clear_engine_error_register(engine);
312 static void gen6_check_faults(struct intel_gt *gt)
314 struct intel_engine_cs *engine;
315 enum intel_engine_id id;
318 for_each_engine(engine, gt, id) {
319 fault = GEN6_RING_FAULT_REG_READ(engine);
320 if (fault & RING_FAULT_VALID) {
321 drm_dbg(&engine->i915->drm, "Unexpected fault\n"
323 "\tAddress space: %s\n"
327 fault & RING_FAULT_GTTSEL_MASK ?
329 RING_FAULT_SRCID(fault),
330 RING_FAULT_FAULT_TYPE(fault));
335 static void gen8_check_faults(struct intel_gt *gt)
337 struct intel_uncore *uncore = gt->uncore;
338 i915_reg_t fault_reg, fault_data0_reg, fault_data1_reg;
341 if (GRAPHICS_VER(gt->i915) >= 12) {
342 fault_reg = GEN12_RING_FAULT_REG;
343 fault_data0_reg = GEN12_FAULT_TLB_DATA0;
344 fault_data1_reg = GEN12_FAULT_TLB_DATA1;
346 fault_reg = GEN8_RING_FAULT_REG;
347 fault_data0_reg = GEN8_FAULT_TLB_DATA0;
348 fault_data1_reg = GEN8_FAULT_TLB_DATA1;
351 fault = intel_uncore_read(uncore, fault_reg);
352 if (fault & RING_FAULT_VALID) {
353 u32 fault_data0, fault_data1;
356 fault_data0 = intel_uncore_read(uncore, fault_data0_reg);
357 fault_data1 = intel_uncore_read(uncore, fault_data1_reg);
359 fault_addr = ((u64)(fault_data1 & FAULT_VA_HIGH_BITS) << 44) |
360 ((u64)fault_data0 << 12);
362 drm_dbg(&uncore->i915->drm, "Unexpected fault\n"
363 "\tAddr: 0x%08x_%08x\n"
364 "\tAddress space: %s\n"
368 upper_32_bits(fault_addr), lower_32_bits(fault_addr),
369 fault_data1 & FAULT_GTT_SEL ? "GGTT" : "PPGTT",
370 GEN8_RING_FAULT_ENGINE_ID(fault),
371 RING_FAULT_SRCID(fault),
372 RING_FAULT_FAULT_TYPE(fault));
376 void intel_gt_check_and_clear_faults(struct intel_gt *gt)
378 struct drm_i915_private *i915 = gt->i915;
380 /* From GEN8 onwards we only have one 'All Engine Fault Register' */
381 if (GRAPHICS_VER(i915) >= 8)
382 gen8_check_faults(gt);
383 else if (GRAPHICS_VER(i915) >= 6)
384 gen6_check_faults(gt);
388 intel_gt_clear_error_registers(gt, ALL_ENGINES);
391 void intel_gt_flush_ggtt_writes(struct intel_gt *gt)
393 struct intel_uncore *uncore = gt->uncore;
394 intel_wakeref_t wakeref;
397 * No actual flushing is required for the GTT write domain for reads
398 * from the GTT domain. Writes to it "immediately" go to main memory
399 * as far as we know, so there's no chipset flush. It also doesn't
400 * land in the GPU render cache.
402 * However, we do have to enforce the order so that all writes through
403 * the GTT land before any writes to the device, such as updates to
406 * We also have to wait a bit for the writes to land from the GTT.
407 * An uncached read (i.e. mmio) seems to be ideal for the round-trip
408 * timing. This issue has only been observed when switching quickly
409 * between GTT writes and CPU reads from inside the kernel on recent hw,
410 * and it appears to only affect discrete GTT blocks (i.e. on LLC
411 * system agents we cannot reproduce this behaviour, until Cannonlake
417 if (INTEL_INFO(gt->i915)->has_coherent_ggtt)
420 intel_gt_chipset_flush(gt);
422 with_intel_runtime_pm_if_in_use(uncore->rpm, wakeref) {
425 spin_lock_irqsave(&uncore->lock, flags);
426 intel_uncore_posting_read_fw(uncore,
427 RING_HEAD(RENDER_RING_BASE));
428 spin_unlock_irqrestore(&uncore->lock, flags);
432 void intel_gt_chipset_flush(struct intel_gt *gt)
435 if (GRAPHICS_VER(gt->i915) < 6)
436 intel_gtt_chipset_flush();
439 void intel_gt_driver_register(struct intel_gt *gt)
441 intel_rps_driver_register(>->rps);
443 intel_gt_debugfs_register(gt);
446 static int intel_gt_init_scratch(struct intel_gt *gt, unsigned int size)
448 struct drm_i915_private *i915 = gt->i915;
449 struct drm_i915_gem_object *obj;
450 struct i915_vma *vma;
453 obj = i915_gem_object_create_lmem(i915, size, I915_BO_ALLOC_VOLATILE);
455 obj = i915_gem_object_create_stolen(i915, size);
457 obj = i915_gem_object_create_internal(i915, size);
459 drm_err(&i915->drm, "Failed to allocate scratch page\n");
463 vma = i915_vma_instance(obj, >->ggtt->vm, NULL);
469 ret = i915_ggtt_pin(vma, NULL, 0, PIN_HIGH);
473 gt->scratch = i915_vma_make_unshrinkable(vma);
478 i915_gem_object_put(obj);
482 static void intel_gt_fini_scratch(struct intel_gt *gt)
484 i915_vma_unpin_and_release(>->scratch, 0);
487 static struct i915_address_space *kernel_vm(struct intel_gt *gt)
489 if (INTEL_PPGTT(gt->i915) > INTEL_PPGTT_ALIASING)
490 return &i915_ppgtt_create(gt, I915_BO_ALLOC_PM_EARLY)->vm;
492 return i915_vm_get(>->ggtt->vm);
495 static int __engines_record_defaults(struct intel_gt *gt)
497 struct i915_request *requests[I915_NUM_ENGINES] = {};
498 struct intel_engine_cs *engine;
499 enum intel_engine_id id;
503 * As we reset the gpu during very early sanitisation, the current
504 * register state on the GPU should reflect its defaults values.
505 * We load a context onto the hw (with restore-inhibit), then switch
506 * over to a second context to save that default register state. We
507 * can then prime every new context with that state so they all start
508 * from the same default HW values.
511 for_each_engine(engine, gt, id) {
512 struct intel_renderstate so;
513 struct intel_context *ce;
514 struct i915_request *rq;
516 /* We must be able to switch to something! */
517 GEM_BUG_ON(!engine->kernel_context);
519 ce = intel_context_create(engine);
525 err = intel_renderstate_init(&so, ce);
529 rq = i915_request_create(ce);
535 err = intel_engine_emit_ctx_wa(rq);
539 err = intel_renderstate_emit(&so, rq);
544 requests[id] = i915_request_get(rq);
545 i915_request_add(rq);
547 intel_renderstate_fini(&so, ce);
550 intel_context_put(ce);
555 /* Flush the default context image to memory, and enable powersaving. */
556 if (intel_gt_wait_for_idle(gt, I915_GEM_IDLE_TIMEOUT) == -ETIME) {
561 for (id = 0; id < ARRAY_SIZE(requests); id++) {
562 struct i915_request *rq;
569 if (rq->fence.error) {
574 GEM_BUG_ON(!test_bit(CONTEXT_ALLOC_BIT, &rq->context->flags));
575 if (!rq->context->state)
578 /* Keep a copy of the state's backing pages; free the obj */
579 state = shmem_create_from_object(rq->context->state->obj);
581 err = PTR_ERR(state);
584 rq->engine->default_state = state;
589 * If we have to abandon now, we expect the engines to be idle
590 * and ready to be torn-down. The quickest way we can accomplish
591 * this is by declaring ourselves wedged.
594 intel_gt_set_wedged(gt);
596 for (id = 0; id < ARRAY_SIZE(requests); id++) {
597 struct intel_context *ce;
598 struct i915_request *rq;
605 i915_request_put(rq);
606 intel_context_put(ce);
611 static int __engines_verify_workarounds(struct intel_gt *gt)
613 struct intel_engine_cs *engine;
614 enum intel_engine_id id;
617 if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
620 for_each_engine(engine, gt, id) {
621 if (intel_engine_verify_workarounds(engine, "load"))
625 /* Flush and restore the kernel context for safety */
626 if (intel_gt_wait_for_idle(gt, I915_GEM_IDLE_TIMEOUT) == -ETIME)
632 static void __intel_gt_disable(struct intel_gt *gt)
634 intel_gt_set_wedged_on_fini(gt);
636 intel_gt_suspend_prepare(gt);
637 intel_gt_suspend_late(gt);
639 GEM_BUG_ON(intel_gt_pm_is_awake(gt));
642 int intel_gt_wait_for_idle(struct intel_gt *gt, long timeout)
644 long remaining_timeout;
646 /* If the device is asleep, we have no requests outstanding */
647 if (!intel_gt_pm_is_awake(gt))
650 while ((timeout = intel_gt_retire_requests_timeout(gt, timeout,
651 &remaining_timeout)) > 0) {
653 if (signal_pending(current))
657 return timeout ? timeout : intel_uc_wait_for_idle(>->uc,
661 int intel_gt_init(struct intel_gt *gt)
665 err = i915_inject_probe_error(gt->i915, -ENODEV);
669 intel_gt_init_workarounds(gt);
672 * This is just a security blanket to placate dragons.
673 * On some systems, we very sporadically observe that the first TLBs
674 * used by the CS may be stale, despite us poking the TLB reset. If
675 * we hold the forcewake during initialisation these problems
676 * just magically go away.
678 intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL);
680 err = intel_gt_init_scratch(gt,
681 GRAPHICS_VER(gt->i915) == 2 ? SZ_256K : SZ_4K);
685 intel_gt_pm_init(gt);
687 gt->vm = kernel_vm(gt);
693 intel_set_mocs_index(gt);
695 err = intel_engines_init(gt);
699 err = intel_uc_init(>->uc);
703 err = intel_gt_resume(gt);
707 err = __engines_record_defaults(gt);
711 err = __engines_verify_workarounds(gt);
715 intel_uc_init_late(>->uc);
717 err = i915_inject_probe_error(gt->i915, -EIO);
721 intel_migrate_init(>->migrate, gt);
723 intel_pxp_init(>->pxp);
727 __intel_gt_disable(gt);
728 intel_uc_fini_hw(>->uc);
730 intel_uc_fini(>->uc);
732 intel_engines_release(gt);
733 i915_vm_put(fetch_and_zero(>->vm));
735 intel_gt_pm_fini(gt);
736 intel_gt_fini_scratch(gt);
739 intel_gt_set_wedged_on_init(gt);
740 intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL);
744 void intel_gt_driver_remove(struct intel_gt *gt)
746 __intel_gt_disable(gt);
748 intel_migrate_fini(>->migrate);
749 intel_uc_driver_remove(>->uc);
751 intel_engines_release(gt);
753 intel_gt_flush_buffer_pool(gt);
756 void intel_gt_driver_unregister(struct intel_gt *gt)
758 intel_wakeref_t wakeref;
760 intel_rps_driver_unregister(>->rps);
762 intel_pxp_fini(>->pxp);
765 * Upon unregistering the device to prevent any new users, cancel
766 * all in-flight requests so that we can quickly unbind the active
769 intel_gt_set_wedged_on_fini(gt);
771 /* Scrub all HW state upon release */
772 with_intel_runtime_pm(gt->uncore->rpm, wakeref)
773 __intel_gt_reset(gt, ALL_ENGINES);
776 void intel_gt_driver_release(struct intel_gt *gt)
778 struct i915_address_space *vm;
780 vm = fetch_and_zero(>->vm);
781 if (vm) /* FIXME being called twice on error paths :( */
784 intel_wa_list_free(>->wa_list);
785 intel_gt_pm_fini(gt);
786 intel_gt_fini_scratch(gt);
787 intel_gt_fini_buffer_pool(gt);
790 void intel_gt_driver_late_release(struct intel_gt *gt)
792 /* We need to wait for inflight RCU frees to release their grip */
795 intel_uc_driver_late_release(>->uc);
796 intel_gt_fini_requests(gt);
797 intel_gt_fini_reset(gt);
798 intel_gt_fini_timelines(gt);
799 intel_engines_free(gt);
803 * intel_gt_reg_needs_read_steering - determine whether a register read
804 * requires explicit steering
806 * @reg: the register to check steering requirements for
807 * @type: type of multicast steering to check
809 * Determines whether @reg needs explicit steering of a specific type for
812 * Returns false if @reg does not belong to a register range of the given
813 * steering type, or if the default (subslice-based) steering IDs are suitable
814 * for @type steering too.
816 static bool intel_gt_reg_needs_read_steering(struct intel_gt *gt,
818 enum intel_steering_type type)
820 const u32 offset = i915_mmio_reg_offset(reg);
821 const struct intel_mmio_range *entry;
823 if (likely(!intel_gt_needs_read_steering(gt, type)))
826 for (entry = gt->steering_table[type]; entry->end; entry++) {
827 if (offset >= entry->start && offset <= entry->end)
835 * intel_gt_get_valid_steering - determines valid IDs for a class of MCR steering
837 * @type: multicast register type
838 * @sliceid: Slice ID returned
839 * @subsliceid: Subslice ID returned
841 * Determines sliceid and subsliceid values that will steer reads
842 * of a specific multicast register class to a valid value.
844 static void intel_gt_get_valid_steering(struct intel_gt *gt,
845 enum intel_steering_type type,
846 u8 *sliceid, u8 *subsliceid)
850 GEM_DEBUG_WARN_ON(!gt->info.l3bank_mask); /* should be impossible! */
852 *sliceid = 0; /* unused */
853 *subsliceid = __ffs(gt->info.l3bank_mask);
856 GEM_DEBUG_WARN_ON(!gt->info.mslice_mask); /* should be impossible! */
858 *sliceid = __ffs(gt->info.mslice_mask);
859 *subsliceid = 0; /* unused */
862 GEM_DEBUG_WARN_ON(!gt->info.mslice_mask); /* should be impossible! */
865 * An LNCF is always present if its mslice is present, so we
866 * can safely just steer to LNCF 0 in all cases.
868 *sliceid = __ffs(gt->info.mslice_mask) << 1;
869 *subsliceid = 0; /* unused */
879 * intel_gt_read_register_fw - reads a GT register with support for multicast
881 * @reg: register to read
883 * This function will read a GT register. If the register is a multicast
884 * register, the read will be steered to a valid instance (i.e., one that
885 * isn't fused off or powered down by power gating).
887 * Returns the value from a valid instance of @reg.
889 u32 intel_gt_read_register_fw(struct intel_gt *gt, i915_reg_t reg)
892 u8 sliceid, subsliceid;
894 for (type = 0; type < NUM_STEERING_TYPES; type++) {
895 if (intel_gt_reg_needs_read_steering(gt, reg, type)) {
896 intel_gt_get_valid_steering(gt, type, &sliceid,
898 return intel_uncore_read_with_mcr_steering_fw(gt->uncore,
905 return intel_uncore_read_fw(gt->uncore, reg);
908 void intel_gt_info_print(const struct intel_gt_info *info,
909 struct drm_printer *p)
911 drm_printf(p, "available engines: %x\n", info->engine_mask);
913 intel_sseu_dump(&info->sseu, p);