Lines Matching refs:gt
431 const struct sseu_dev_info *sseu = &ee->engine->gt->info.sseu; in error_print_instdone()
507 const u32 period = m->i915->gt.clock_period_ns; in error_print_context()
703 struct intel_gt_coredump *gt) in err_print_gt_info() argument
707 intel_gt_info_print(>->info, &p); in err_print_gt_info()
708 intel_sseu_print_topology(>->info.sseu, &p); in err_print_gt_info()
712 struct intel_gt_coredump *gt) in err_print_gt() argument
717 err_printf(m, "GT awake: %s\n", yesno(gt->awake)); in err_print_gt()
718 err_printf(m, "EIR: 0x%08x\n", gt->eir); in err_print_gt()
719 err_printf(m, "IER: 0x%08x\n", gt->ier); in err_print_gt()
720 for (i = 0; i < gt->ngtier; i++) in err_print_gt()
721 err_printf(m, "GTIER[%d]: 0x%08x\n", i, gt->gtier[i]); in err_print_gt()
722 err_printf(m, "PGTBL_ER: 0x%08x\n", gt->pgtbl_er); in err_print_gt()
723 err_printf(m, "FORCEWAKE: 0x%08x\n", gt->forcewake); in err_print_gt()
724 err_printf(m, "DERRMR: 0x%08x\n", gt->derrmr); in err_print_gt()
726 for (i = 0; i < gt->nfence; i++) in err_print_gt()
727 err_printf(m, " fence[%d] = %08llx\n", i, gt->fence[i]); in err_print_gt()
730 err_printf(m, "ERROR: 0x%08x\n", gt->error); in err_print_gt()
731 err_printf(m, "DONE_REG: 0x%08x\n", gt->done_reg); in err_print_gt()
736 gt->fault_data1, gt->fault_data0); in err_print_gt()
739 err_printf(m, "ERR_INT: 0x%08x\n", gt->err_int); in err_print_gt()
742 err_printf(m, "GTT_CACHE_EN: 0x%08x\n", gt->gtt_cache); in err_print_gt()
745 err_printf(m, "AUX_ERR_DBG: 0x%08x\n", gt->aux_err); in err_print_gt()
756 if ((gt->_gt->info.sfc_mask & BIT(i)) == 0 || in err_print_gt()
757 !HAS_ENGINE(gt->_gt, _VCS(i * 2))) in err_print_gt()
761 gt->sfc_done[i]); in err_print_gt()
764 err_printf(m, " GAM_DONE: 0x%08x\n", gt->gam_done); in err_print_gt()
767 for (ee = gt->engine; ee; ee = ee->next) { in err_print_gt()
775 if (gt->uc) in err_print_gt()
776 err_print_uc(m, gt->uc); in err_print_gt()
778 err_print_gt_info(m, gt); in err_print_gt()
805 for (ee = error->gt ? error->gt->engine : NULL; ee; ee = ee->next) in __err_print_to_sgl()
834 if (error->gt) in __err_print_to_sgl()
835 err_print_gt(m, error->gt); in __err_print_to_sgl()
973 static void cleanup_gt(struct intel_gt_coredump *gt) in cleanup_gt() argument
975 while (gt->engine) { in cleanup_gt()
976 struct intel_engine_coredump *ee = gt->engine; in cleanup_gt()
978 gt->engine = ee->next; in cleanup_gt()
984 if (gt->uc) in cleanup_gt()
985 cleanup_uc(gt->uc); in cleanup_gt()
987 kfree(gt); in cleanup_gt()
995 while (error->gt) { in __i915_gpu_coredump_free()
996 struct intel_gt_coredump *gt = error->gt; in __i915_gpu_coredump_free() local
998 error->gt = gt->next; in __i915_gpu_coredump_free()
999 cleanup_gt(gt); in __i915_gpu_coredump_free()
1011 i915_vma_coredump_create(const struct intel_gt *gt, in i915_vma_coredump_create() argument
1016 struct i915_ggtt *ggtt = gt->ggtt; in i915_vma_coredump_create()
1119 static void gt_record_fences(struct intel_gt_coredump *gt) in gt_record_fences() argument
1121 struct i915_ggtt *ggtt = gt->_gt->ggtt; in gt_record_fences()
1122 struct intel_uncore *uncore = gt->_gt->uncore; in gt_record_fences()
1127 gt->fence[i] = in gt_record_fences()
1132 gt->fence[i] = in gt_record_fences()
1137 gt->fence[i] = in gt_record_fences()
1140 gt->nfence = i; in gt_record_fences()
1433 i915_vma_coredump_create(engine->gt, in intel_engine_coredump_add_vma()
1444 i915_vma_coredump_create(engine->gt, in intel_engine_coredump_add_vma()
1450 i915_vma_coredump_create(engine->gt, in intel_engine_coredump_add_vma()
1481 if (!intel_uc_uses_guc_submission(&engine->gt->uc)) { in capture_engine()
1503 gt_record_engines(struct intel_gt_coredump *gt, in gt_record_engines() argument
1510 for_each_engine(engine, gt->_gt, id) { in gt_record_engines()
1522 gt->simulated |= ee->simulated; in gt_record_engines()
1528 ee->next = gt->engine; in gt_record_engines()
1529 gt->engine = ee; in gt_record_engines()
1534 gt_record_uc(struct intel_gt_coredump *gt, in gt_record_uc() argument
1537 const struct intel_uc *uc = >->_gt->uc; in gt_record_uc()
1554 i915_vma_coredump_create(gt->_gt, in gt_record_uc()
1562 static void gt_record_regs(struct intel_gt_coredump *gt) in gt_record_regs() argument
1564 struct intel_uncore *uncore = gt->_gt->uncore; in gt_record_regs()
1579 gt->gtier[0] = intel_uncore_read(uncore, GTIER); in gt_record_regs()
1580 gt->ier = intel_uncore_read(uncore, VLV_IER); in gt_record_regs()
1581 gt->forcewake = intel_uncore_read_fw(uncore, FORCEWAKE_VLV); in gt_record_regs()
1585 gt->err_int = intel_uncore_read(uncore, GEN7_ERR_INT); in gt_record_regs()
1588 gt->fault_data0 = intel_uncore_read(uncore, in gt_record_regs()
1590 gt->fault_data1 = intel_uncore_read(uncore, in gt_record_regs()
1593 gt->fault_data0 = intel_uncore_read(uncore, in gt_record_regs()
1595 gt->fault_data1 = intel_uncore_read(uncore, in gt_record_regs()
1600 gt->forcewake = intel_uncore_read_fw(uncore, FORCEWAKE); in gt_record_regs()
1601 gt->gab_ctl = intel_uncore_read(uncore, GAB_CTL); in gt_record_regs()
1602 gt->gfx_mode = intel_uncore_read(uncore, GFX_MODE); in gt_record_regs()
1607 gt->forcewake = intel_uncore_read_fw(uncore, FORCEWAKE_MT); in gt_record_regs()
1610 gt->derrmr = intel_uncore_read(uncore, DERRMR); in gt_record_regs()
1612 gt->error = intel_uncore_read(uncore, ERROR_GEN6); in gt_record_regs()
1613 gt->done_reg = intel_uncore_read(uncore, DONE_REG); in gt_record_regs()
1619 gt->gam_ecochk = intel_uncore_read(uncore, GAM_ECOCHK); in gt_record_regs()
1620 gt->gac_eco = intel_uncore_read(uncore, GAC_ECO_BITS); in gt_record_regs()
1624 gt->gtt_cache = intel_uncore_read(uncore, HSW_GTT_CACHE_EN); in gt_record_regs()
1627 gt->aux_err = intel_uncore_read(uncore, GEN12_AUX_ERR_DBG); in gt_record_regs()
1636 if ((gt->_gt->info.sfc_mask & BIT(i)) == 0 || in gt_record_regs()
1637 !HAS_ENGINE(gt->_gt, _VCS(i * 2))) in gt_record_regs()
1640 gt->sfc_done[i] = in gt_record_regs()
1644 gt->gam_done = intel_uncore_read(uncore, GEN12_GAM_DONE); in gt_record_regs()
1649 gt->ier = intel_uncore_read(uncore, GEN8_DE_MISC_IER); in gt_record_regs()
1650 gt->gtier[0] = in gt_record_regs()
1653 gt->gtier[1] = in gt_record_regs()
1655 gt->gtier[2] = in gt_record_regs()
1657 gt->gtier[3] = in gt_record_regs()
1660 gt->gtier[4] = in gt_record_regs()
1663 gt->gtier[5] = in gt_record_regs()
1666 gt->ngtier = 6; in gt_record_regs()
1668 gt->ier = intel_uncore_read(uncore, GEN8_DE_MISC_IER); in gt_record_regs()
1670 gt->gtier[i] = in gt_record_regs()
1672 gt->ngtier = 4; in gt_record_regs()
1674 gt->ier = intel_uncore_read(uncore, DEIER); in gt_record_regs()
1675 gt->gtier[0] = intel_uncore_read(uncore, GTIER); in gt_record_regs()
1676 gt->ngtier = 1; in gt_record_regs()
1678 gt->ier = intel_uncore_read16(uncore, GEN2_IER); in gt_record_regs()
1680 gt->ier = intel_uncore_read(uncore, GEN2_IER); in gt_record_regs()
1682 gt->eir = intel_uncore_read(uncore, EIR); in gt_record_regs()
1683 gt->pgtbl_er = intel_uncore_read(uncore, PGTBL_ER); in gt_record_regs()
1686 static void gt_record_info(struct intel_gt_coredump *gt) in gt_record_info() argument
1688 memcpy(>->info, >->_gt->info, sizeof(struct intel_gt_info)); in gt_record_info()
1716 struct intel_gt_coredump *gt; in error_msg() local
1719 for (gt = error->gt; gt; gt = gt->next) { in error_msg()
1722 for (cs = gt->engine; cs; cs = cs->next) { in error_msg()
1787 error->uptime = ktime_sub(ktime_get(), i915->gt.last_init_time); in i915_gpu_coredump_alloc()
1798 intel_gt_coredump_alloc(struct intel_gt *gt, gfp_t gfp) in intel_gt_coredump_alloc() argument
1806 gc->_gt = gt; in intel_gt_coredump_alloc()
1807 gc->awake = intel_gt_pm_is_awake(gt); in intel_gt_coredump_alloc()
1816 i915_vma_capture_prepare(struct intel_gt_coredump *gt) in i915_vma_capture_prepare() argument
1832 void i915_vma_capture_finish(struct intel_gt_coredump *gt, in i915_vma_capture_finish() argument
1843 i915_gpu_coredump(struct intel_gt *gt, intel_engine_mask_t engine_mask) in i915_gpu_coredump() argument
1845 struct drm_i915_private *i915 = gt->i915; in i915_gpu_coredump()
1857 error->gt = intel_gt_coredump_alloc(gt, ALLOW_FAIL); in i915_gpu_coredump()
1858 if (error->gt) { in i915_gpu_coredump()
1861 compress = i915_vma_capture_prepare(error->gt); in i915_gpu_coredump()
1863 kfree(error->gt); in i915_gpu_coredump()
1868 gt_record_info(error->gt); in i915_gpu_coredump()
1869 gt_record_engines(error->gt, engine_mask, compress); in i915_gpu_coredump()
1872 error->gt->uc = gt_record_uc(error->gt, compress); in i915_gpu_coredump()
1874 i915_vma_capture_finish(error->gt, compress); in i915_gpu_coredump()
1876 error->simulated |= error->gt->simulated; in i915_gpu_coredump()
1924 void i915_capture_error_state(struct intel_gt *gt, in i915_capture_error_state() argument
1929 error = i915_gpu_coredump(gt, engine_mask); in i915_capture_error_state()
1931 cmpxchg(>->i915->gpu_error.first_error, NULL, error); in i915_capture_error_state()