Lines Matching +full:0 +full:xe
190 static const u16 adls_rpls_ids[] = { INTEL_RPLS_IDS(NOP), 0 };
208 static const u16 adlp_rplu_ids[] = { INTEL_RPLU_IDS(NOP), 0 };
254 static const u16 dg2_g10_ids[] = { INTEL_DG2_G10_IDS(NOP), INTEL_ATS_M150_IDS(NOP), 0 };
255 static const u16 dg2_g11_ids[] = { INTEL_DG2_G11_IDS(NOP), INTEL_ATS_M75_IDS(NOP), 0 };
256 static const u16 dg2_g12_ids[] = { INTEL_DG2_G12_IDS(NOP), 0 };
392 if (negative && strcmp(devices, "!*") == 0) in device_id_in_list()
394 if (!negative && strcmp(devices, "*") == 0) in device_id_in_list()
404 if (negative && tok[0] == '!') in device_id_in_list()
406 else if ((negative && tok[0] != '!') || in device_id_in_list()
407 (!negative && tok[0] == '!')) in device_id_in_list()
410 if (kstrtou16(tok, 16, &val) == 0 && val == device_id) { in device_id_in_list()
432 find_subplatform(const struct xe_device *xe, const struct xe_device_desc *desc) in find_subplatform() argument
439 if (*id == xe->info.devid) in find_subplatform()
450 static void read_gmdid(struct xe_device *xe, enum xe_gmdid_type type, u32 *ver, u32 *revid) in read_gmdid() argument
452 struct xe_mmio *mmio = xe_root_tile_mmio(xe); in read_gmdid()
456 KUNIT_STATIC_STUB_REDIRECT(read_gmdid, xe, type, ver, revid); in read_gmdid()
458 if (IS_SRIOV_VF(xe)) { in read_gmdid()
459 struct xe_gt *gt = xe_root_mmio_gt(xe); in read_gmdid()
479 gt->info.id = 0; in read_gmdid()
487 val = xe_gt_sriov_vf_bootstrap(gt) ? 0 : xe_gt_sriov_vf_gmdid(gt); in read_gmdid()
493 gt->info.id = 0; in read_gmdid()
518 for (int i = 0; i < ARRAY_SIZE(graphics_ips); i++) in find_graphics_ip()
528 for (int i = 0; i < ARRAY_SIZE(media_ips); i++) in find_media_ip()
538 static void handle_gmdid(struct xe_device *xe, in handle_gmdid() argument
549 read_gmdid(xe, GMDID_GRAPHICS, &ver, graphics_revid); in handle_gmdid()
553 drm_err(&xe->drm, "Hardware reports unknown graphics version %u.%02u\n", in handle_gmdid()
557 read_gmdid(xe, GMDID_MEDIA, &ver, media_revid); in handle_gmdid()
559 if (ver == 0) in handle_gmdid()
564 drm_err(&xe->drm, "Hardware reports unknown media version %u.%02u\n", in handle_gmdid()
573 static int xe_info_init_early(struct xe_device *xe, in xe_info_init_early() argument
579 xe->info.platform_name = desc->platform_name; in xe_info_init_early()
580 xe->info.platform = desc->platform; in xe_info_init_early()
581 xe->info.subplatform = subplatform_desc ? in xe_info_init_early()
584 xe->info.dma_mask_size = desc->dma_mask_size; in xe_info_init_early()
585 xe->info.is_dgfx = desc->is_dgfx; in xe_info_init_early()
586 xe->info.has_fan_control = desc->has_fan_control; in xe_info_init_early()
587 xe->info.has_mbx_power_limits = desc->has_mbx_power_limits; in xe_info_init_early()
588 xe->info.has_gsc_nvm = desc->has_gsc_nvm; in xe_info_init_early()
589 xe->info.has_heci_gscfi = desc->has_heci_gscfi; in xe_info_init_early()
590 xe->info.has_heci_cscfi = desc->has_heci_cscfi; in xe_info_init_early()
591 xe->info.has_late_bind = desc->has_late_bind; in xe_info_init_early()
592 xe->info.has_llc = desc->has_llc; in xe_info_init_early()
593 xe->info.has_pxp = desc->has_pxp; in xe_info_init_early()
594 xe->info.has_sriov = desc->has_sriov; in xe_info_init_early()
595 xe->info.skip_guc_pc = desc->skip_guc_pc; in xe_info_init_early()
596 xe->info.skip_mtcfg = desc->skip_mtcfg; in xe_info_init_early()
597 xe->info.skip_pcode = desc->skip_pcode; in xe_info_init_early()
598 xe->info.needs_scratch = desc->needs_scratch; in xe_info_init_early()
600 xe->info.probe_display = IS_ENABLED(CONFIG_DRM_XE_DISPLAY) && in xe_info_init_early()
604 xe_assert(xe, desc->max_gt_per_tile > 0); in xe_info_init_early()
605 xe_assert(xe, desc->max_gt_per_tile <= XE_MAX_GT_PER_TILE); in xe_info_init_early()
606 xe->info.max_gt_per_tile = desc->max_gt_per_tile; in xe_info_init_early()
607 xe->info.tile_count = 1 + desc->max_remote_tiles; in xe_info_init_early()
609 err = xe_tile_init_early(xe_device_get_root_tile(xe), xe, 0); in xe_info_init_early()
613 return 0; in xe_info_init_early()
619 static void xe_info_probe_tile_count(struct xe_device *xe) in xe_info_probe_tile_count() argument
625 KUNIT_STATIC_STUB_REDIRECT(xe_info_probe_tile_count, xe); in xe_info_probe_tile_count()
631 if (xe->info.tile_count == 1) in xe_info_probe_tile_count()
634 if (xe->info.skip_mtcfg) in xe_info_probe_tile_count()
637 mmio = xe_root_tile_mmio(xe); in xe_info_probe_tile_count()
647 if (tile_count < xe->info.tile_count) { in xe_info_probe_tile_count()
648 drm_info(&xe->drm, "tile_count: %d, reduced_tile_count %d\n", in xe_info_probe_tile_count()
649 xe->info.tile_count, tile_count); in xe_info_probe_tile_count()
650 xe->info.tile_count = tile_count; in xe_info_probe_tile_count()
660 static int xe_info_init(struct xe_device *xe, in xe_info_init() argument
663 u32 graphics_gmdid_revid = 0, media_gmdid_revid = 0; in xe_info_init()
682 xe->info.step = xe_step_pre_gmdid_get(xe); in xe_info_init()
684 xe_assert(xe, !desc->pre_gmdid_media_ip); in xe_info_init()
685 handle_gmdid(xe, &graphics_ip, &media_ip, in xe_info_init()
687 xe->info.step = xe_step_gmdid_get(xe, in xe_info_init()
700 xe->info.graphics_verx100 = graphics_ip->verx100; in xe_info_init()
701 xe->info.graphics_name = graphics_ip->name; in xe_info_init()
705 xe->info.media_verx100 = media_ip->verx100; in xe_info_init()
706 xe->info.media_name = media_ip->name; in xe_info_init()
709 xe->info.media_name = "none"; in xe_info_init()
713 xe->info.vram_flags = graphics_desc->vram_flags; in xe_info_init()
714 xe->info.va_bits = graphics_desc->va_bits; in xe_info_init()
715 xe->info.vm_max_level = graphics_desc->vm_max_level; in xe_info_init()
716 xe->info.has_asid = graphics_desc->has_asid; in xe_info_init()
717 xe->info.has_atomic_enable_pte_bit = graphics_desc->has_atomic_enable_pte_bit; in xe_info_init()
718 if (xe->info.platform != XE_PVC) in xe_info_init()
719 xe->info.has_device_atomics_on_smem = 1; in xe_info_init()
722 xe->info.has_flat_ccs = graphics_desc->has_flat_ccs; in xe_info_init()
724 xe->info.has_range_tlb_inval = graphics_desc->has_range_tlb_inval; in xe_info_init()
725 xe->info.has_usm = graphics_desc->has_usm; in xe_info_init()
726 xe->info.has_64bit_timestamp = graphics_desc->has_64bit_timestamp; in xe_info_init()
728 xe_info_probe_tile_count(xe); in xe_info_init()
730 for_each_remote_tile(tile, xe, id) { in xe_info_init()
733 err = xe_tile_init_early(tile, xe, id); in xe_info_init()
744 for_each_tile(tile, xe, id) { in xe_info_init()
749 gt->info.id = tile->id * xe->info.max_gt_per_tile; in xe_info_init()
757 if (MEDIA_VER(xe) < 13 && media_desc) in xe_info_init()
760 if (MEDIA_VER(xe) < 13 || !media_desc) in xe_info_init()
773 gt->info.id = tile->id * xe->info.max_gt_per_tile + 1; in xe_info_init()
782 for_each_gt(gt, xe, id) in xe_info_init()
783 xe->info.gt_count++; in xe_info_init()
785 return 0; in xe_info_init()
790 struct xe_device *xe = pdev_to_xe_device(pdev); in xe_pci_remove() local
792 if (IS_SRIOV_PF(xe)) in xe_pci_remove()
793 xe_pci_sriov_configure(pdev, 0); in xe_pci_remove()
795 if (xe_survivability_mode_is_boot_enabled(xe)) in xe_pci_remove()
798 xe_device_remove(xe); in xe_pci_remove()
799 xe_pm_fini(xe); in xe_pci_remove()
825 struct xe_device *xe; in xe_pci_probe() local
833 "by xe driver in this kernel version. To force Xe probe,\n" in xe_pci_probe()
834 "use xe.force_probe='%04x' and i915.force_probe='!%04x'\n" in xe_pci_probe()
855 xe = xe_device_create(pdev, ent); in xe_pci_probe()
856 if (IS_ERR(xe)) in xe_pci_probe()
857 return PTR_ERR(xe); in xe_pci_probe()
859 pci_set_drvdata(pdev, &xe->drm); in xe_pci_probe()
861 xe_pm_assert_unbounded_bridge(xe); in xe_pci_probe()
862 subplatform_desc = find_subplatform(xe, desc); in xe_pci_probe()
866 err = xe_info_init_early(xe, desc, subplatform_desc); in xe_pci_probe()
870 xe_vram_resize_bar(xe); in xe_pci_probe()
872 err = xe_device_probe_early(xe); in xe_pci_probe()
879 if (xe_survivability_mode_is_boot_enabled(xe)) in xe_pci_probe()
880 return 0; in xe_pci_probe()
885 err = xe_info_init(xe, desc); in xe_pci_probe()
889 err = xe_display_probe(xe); in xe_pci_probe()
893 …drm_dbg(&xe->drm, "%s %s %04x:%04x dgfx:%d gfx:%s (%d.%02d) media:%s (%d.%02d) display:%s dma_m_s:… in xe_pci_probe()
896 xe->info.devid, xe->info.revid, in xe_pci_probe()
897 xe->info.is_dgfx, in xe_pci_probe()
898 xe->info.graphics_name, in xe_pci_probe()
899 xe->info.graphics_verx100 / 100, in xe_pci_probe()
900 xe->info.graphics_verx100 % 100, in xe_pci_probe()
901 xe->info.media_name, in xe_pci_probe()
902 xe->info.media_verx100 / 100, in xe_pci_probe()
903 xe->info.media_verx100 % 100, in xe_pci_probe()
904 str_yes_no(xe->info.probe_display), in xe_pci_probe()
905 xe->info.dma_mask_size, xe->info.tile_count, in xe_pci_probe()
906 xe->info.has_heci_gscfi, xe->info.has_heci_cscfi); in xe_pci_probe()
908 drm_dbg(&xe->drm, "Stepping = (G:%s, M:%s, B:%s)\n", in xe_pci_probe()
909 xe_step_name(xe->info.step.graphics), in xe_pci_probe()
910 xe_step_name(xe->info.step.media), in xe_pci_probe()
911 xe_step_name(xe->info.step.basedie)); in xe_pci_probe()
913 drm_dbg(&xe->drm, "SR-IOV support: %s (mode: %s)\n", in xe_pci_probe()
914 str_yes_no(xe_device_has_sriov(xe)), in xe_pci_probe()
915 xe_sriov_mode_to_string(xe_device_sriov_mode(xe))); in xe_pci_probe()
917 err = xe_pm_init_early(xe); in xe_pci_probe()
921 err = xe_device_probe(xe); in xe_pci_probe()
925 err = xe_pm_init(xe); in xe_pci_probe()
929 drm_dbg(&xe->drm, "d3cold: capable=%s\n", in xe_pci_probe()
930 str_yes_no(xe->d3cold.capable)); in xe_pci_probe()
932 return 0; in xe_pci_probe()
947 struct xe_device *xe = pdev_to_xe_device(pdev); in d3cold_toggle() local
950 if (!xe->d3cold.capable) in d3cold_toggle()
970 struct xe_device *xe = pdev_to_xe_device(pdev); in xe_pci_suspend() local
973 if (xe_survivability_mode_is_boot_enabled(xe)) in xe_pci_suspend()
976 err = xe_pm_suspend(xe); in xe_pci_suspend()
991 return 0; in xe_pci_suspend()
1018 return 0; in xe_pci_resume()
1024 struct xe_device *xe = pdev_to_xe_device(pdev); in xe_pci_runtime_suspend() local
1027 err = xe_pm_runtime_suspend(xe); in xe_pci_runtime_suspend()
1033 if (xe->d3cold.allowed) { in xe_pci_runtime_suspend()
1043 return 0; in xe_pci_runtime_suspend()
1049 struct xe_device *xe = pdev_to_xe_device(pdev); in xe_pci_runtime_resume() local
1058 if (xe->d3cold.allowed) { in xe_pci_runtime_resume()
1066 return xe_pm_runtime_resume(xe); in xe_pci_runtime_resume()
1072 struct xe_device *xe = pdev_to_xe_device(pdev); in xe_pci_runtime_idle() local
1074 xe_pm_d3cold_allowed_toggle(xe); in xe_pci_runtime_idle()
1076 return 0; in xe_pci_runtime_idle()