Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'drm-xe-next-2025-01-10' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

Driver Changes:
- SRIOV VF: Avoid reading inaccessible registers (Jakub, Marcin)
- Introduce RPa frequency information (Rodrigo)
- Remove unnecessary force wakes on SLPC code (Vinay)
- Fix all typos in xe (Nitin)
- Adding steering info support for GuC register lists (Jesus)
- Remove unused xe_pciids.h harder, add missing PCI ID (Jani)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Z4E0tlTAA6MZ7PF2@intel.com

+162 -302
+2 -2
drivers/gpu/drm/xe/Kconfig.debug
··· 66 66 bool "Enable passing SYS/VRAM addresses to user space" 67 67 default n 68 68 help 69 - Pass object location trough uapi. Intended for extended 69 + Pass object location through uapi. Intended for extended 70 70 testing and development only. 71 71 72 72 Recommended for driver developers only. ··· 104 104 Choose this option when debugging error paths that 105 105 are hit during checks for userptr invalidations. 106 106 107 - Recomended for driver developers only. 107 + Recommended for driver developers only. 108 108 If in doubt, say "N".
+1 -1
drivers/gpu/drm/xe/abi/guc_capture_abi.h
··· 25 25 26 26 #define GUC_STATE_CAPTURE_TYPE_MAX (GUC_STATE_CAPTURE_TYPE_ENGINE_INSTANCE + 1) 27 27 28 - /* Class indecies for capture_class and capture_instance arrays */ 28 + /* Class indices for capture_class and capture_instance arrays */ 29 29 enum guc_capture_list_class_type { 30 30 GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE = 0, 31 31 GUC_CAPTURE_LIST_CLASS_VIDEO = 1,
+3 -3
drivers/gpu/drm/xe/abi/guc_klvs_abi.h
··· 132 132 * _`GUC_KLV_VGT_POLICY_SCHED_IF_IDLE` : 0x8001 133 133 * This config sets whether strict scheduling is enabled whereby any VF 134 134 * that doesn’t have work to submit is still allocated a fixed execution 135 - * time-slice to ensure active VFs execution is always consitent even 135 + * time-slice to ensure active VFs execution is always consistent even 136 136 * during other VF reprovisiong / rebooting events. Changing this KLV 137 137 * impacts all VFs and takes effect on the next VF-Switch event. 138 138 * ··· 207 207 * of and this will never be perfectly-exact (accumulated nano-second 208 208 * granularity) since the GPUs clock time runs off a different crystal 209 209 * from the CPUs clock. Changing this KLV on a VF that is currently 210 - * running a context wont take effect until a new context is scheduled in. 210 + * running a context won't take effect until a new context is scheduled in. 211 211 * That said, when the PF is changing this value from 0x0 to 212 212 * a non-zero value, it might never take effect if the VF is running an 213 213 * infinitely long compute or shader kernel. In such a scenario, the ··· 227 227 * HW is capable and this will never be perfectly-exact (accumulated 228 228 * nano-second granularity) since the GPUs clock time runs off a 229 229 * different crystal from the CPUs clock. Changing this KLV on a VF 230 - * that is currently running a context wont take effect until a new 230 + * that is currently running a context won't take effect until a new 231 231 * context is scheduled in. 232 232 * That said, when the PF is changing this value from 0x0 to 233 233 * a non-zero value, it might never take effect if the VF is running an
+1 -1
drivers/gpu/drm/xe/regs/xe_reg_defs.h
··· 13 13 /** 14 14 * struct xe_reg - Register definition 15 15 * 16 - * Register defintion to be used by the individual register. Although the same 16 + * Register definition to be used by the individual register. Although the same 17 17 * definition is used for xe_reg and xe_reg_mcr, they use different internal 18 18 * APIs for accesses. 19 19 */
+4
drivers/gpu/drm/xe/regs/xe_regs.h
··· 44 44 45 45 #define MTL_RP_STATE_CAP XE_REG(0x138000) 46 46 47 + #define MTL_GT_RPA_FREQUENCY XE_REG(0x138008) 47 48 #define MTL_GT_RPE_FREQUENCY XE_REG(0x13800c) 48 49 49 50 #define MTL_MEDIAP_STATE_CAP XE_REG(0x138020) 50 51 #define MTL_RPN_CAP_MASK REG_GENMASK(24, 16) 51 52 #define MTL_RP0_CAP_MASK REG_GENMASK(8, 0) 53 + 54 + #define MTL_MPA_FREQUENCY XE_REG(0x138028) 55 + #define MTL_RPA_MASK REG_GENMASK(8, 0) 52 56 53 57 #define MTL_MPE_FREQUENCY XE_REG(0x13802c) 54 58 #define MTL_RPE_MASK REG_GENMASK(8, 0)
+1 -1
drivers/gpu/drm/xe/tests/xe_mocs.c
··· 58 58 59 59 mocs_dbg(gt, "reg_val=0x%x\n", reg_val); 60 60 } else { 61 - /* Just re-use value read on previous iteration */ 61 + /* Just reuse value read on previous iteration */ 62 62 reg_val >>= 16; 63 63 } 64 64
+1 -1
drivers/gpu/drm/xe/xe_bb.c
··· 41 41 /* 42 42 * We need to allocate space for the requested number of dwords, 43 43 * one additional MI_BATCH_BUFFER_END dword, and additional buffer 44 - * space to accomodate the platform-specific hardware prefetch 44 + * space to accommodate the platform-specific hardware prefetch 45 45 * requirements. 46 46 */ 47 47 bb->bo = xe_sa_bo_new(!usm ? tile->mem.kernel_bb_pool : gt->usm.bb_pool,
+4 -4
drivers/gpu/drm/xe/xe_bo.c
··· 786 786 * / resume, some of the pinned memory is required for the 787 787 * device to resume / use the GPU to move other evicted memory 788 788 * (user memory) around. This likely could be optimized a bit 789 - * futher where we find the minimum set of pinned memory 789 + * further where we find the minimum set of pinned memory 790 790 * required for resume but for simplity doing a memcpy for all 791 791 * pinned memory. 792 792 */ ··· 875 875 * xe_bo_evict_pinned() - Evict a pinned VRAM object to system memory 876 876 * @bo: The buffer object to move. 877 877 * 878 - * On successful completion, the object memory will be moved to sytem memory. 878 + * On successful completion, the object memory will be moved to system memory. 879 879 * 880 880 * This is needed to for special handling of pinned VRAM object during 881 881 * suspend-resume. ··· 1370 1370 /** 1371 1371 * xe_bo_alloc - Allocate storage for a struct xe_bo 1372 1372 * 1373 - * This funcition is intended to allocate storage to be used for input 1373 + * This function is intended to allocate storage to be used for input 1374 1374 * to __xe_bo_create_locked(), in the case a pointer to the bo to be 1375 1375 * created is needed before the call to __xe_bo_create_locked(). 1376 1376 * If __xe_bo_create_locked ends up never to be called, then the ··· 2412 2412 * @force_alloc: Set force_alloc in ttm_operation_ctx 2413 2413 * 2414 2414 * On successful completion, the object memory will be moved to evict 2415 - * placement. Ths function blocks until the object has been fully moved. 2415 + * placement. This function blocks until the object has been fully moved. 2416 2416 * 2417 2417 * Return: 0 on success. Negative error code on failure. 2418 2418 */
+1 -1
drivers/gpu/drm/xe/xe_bo_doc.h
··· 41 41 * created the BO can be mmap'd (via DRM_IOCTL_XE_GEM_MMAP_OFFSET) for user 42 42 * access and it can be bound for GPU access (via DRM_IOCTL_XE_VM_BIND). All 43 43 * user BOs are evictable and user BOs are never pinned by XE. The allocation of 44 - * the backing store can be defered from creation time until first use which is 44 + * the backing store can be deferred from creation time until first use which is 45 45 * either mmap, bind, or pagefault. 46 46 * 47 47 * Private BOs
+1 -1
drivers/gpu/drm/xe/xe_devcoredump.c
··· 48 48 * 49 49 * **Coredump release**: 50 50 * After a coredump is generated, it stays in kernel memory until released by 51 - * userpace by writing anything to it, or after an internal timer expires. The 51 + * userspace by writing anything to it, or after an internal timer expires. The 52 52 * exact timeout may vary and should not be relied upon. Example to release 53 53 * a coredump: 54 54 *
+2 -2
drivers/gpu/drm/xe/xe_device.c
··· 606 606 u32 reg; 607 607 608 608 /* Always enabled/disabled, no runtime check to do */ 609 - if (GRAPHICS_VER(xe) < 20 || !xe->info.has_flat_ccs) 609 + if (GRAPHICS_VER(xe) < 20 || !xe->info.has_flat_ccs || IS_SRIOV_VF(xe)) 610 610 return 0; 611 611 612 612 gt = xe_root_mmio_gt(xe); ··· 999 999 * xe_device_declare_wedged - Declare device wedged 1000 1000 * @xe: xe device instance 1001 1001 * 1002 - * This is a final state that can only be cleared with a mudule 1002 + * This is a final state that can only be cleared with a module 1003 1003 * re-probe (unbind + bind). 1004 1004 * In this state every IOCTL will be blocked so the GT cannot be used. 1005 1005 * In general it will be called upon any critical error such as gt reset
+1 -1
drivers/gpu/drm/xe/xe_drm_client.c
··· 385 385 * @p: The drm_printer ptr 386 386 * @file: The drm_file ptr 387 387 * 388 - * This is callabck for drm fdinfo interface. Register this callback 388 + * This is callback for drm fdinfo interface. Register this callback 389 389 * in drm driver ops for show_fdinfo. 390 390 * 391 391 * Return: void
+1 -1
drivers/gpu/drm/xe/xe_exec.c
··· 33 33 * 34 34 * In XE we avoid all of this complication by not allowing a BO list to be 35 35 * passed into an exec, using the dma-buf implicit sync uAPI, have binds as 36 - * seperate operations, and using the DRM scheduler to flow control the ring. 36 + * separate operations, and using the DRM scheduler to flow control the ring. 37 37 * Let's deep dive on each of these. 38 38 * 39 39 * We can get away from a BO list by forcing the user to use in / out fences on
+1 -1
drivers/gpu/drm/xe/xe_ggtt.c
··· 362 362 363 363 /* 364 364 * So we don't need to worry about 64K GGTT layout when dealing with 365 - * scratch entires, rather keep the scratch page in system memory on 365 + * scratch entries, rather keep the scratch page in system memory on 366 366 * platforms where 64K pages are needed for VRAM. 367 367 */ 368 368 flags = XE_BO_FLAG_PINNED;
+1 -1
drivers/gpu/drm/xe/xe_gt.h
··· 37 37 38 38 /** 39 39 * xe_gt_record_user_engines - save data related to engines available to 40 - * usersapce 40 + * userspace 41 41 * @gt: GT structure 42 42 * 43 43 * Walk the available HW engines from gt->info.engine_mask and calculate data
+15
drivers/gpu/drm/xe/xe_gt_freq.c
··· 115 115 } 116 116 static DEVICE_ATTR_RO(rpe_freq); 117 117 118 + static ssize_t rpa_freq_show(struct device *dev, 119 + struct device_attribute *attr, char *buf) 120 + { 121 + struct xe_guc_pc *pc = dev_to_pc(dev); 122 + u32 freq; 123 + 124 + xe_pm_runtime_get(dev_to_xe(dev)); 125 + freq = xe_guc_pc_get_rpa_freq(pc); 126 + xe_pm_runtime_put(dev_to_xe(dev)); 127 + 128 + return sysfs_emit(buf, "%d\n", freq); 129 + } 130 + static DEVICE_ATTR_RO(rpa_freq); 131 + 118 132 static ssize_t rpn_freq_show(struct device *dev, 119 133 struct device_attribute *attr, char *buf) 120 134 { ··· 216 202 &dev_attr_act_freq.attr, 217 203 &dev_attr_cur_freq.attr, 218 204 &dev_attr_rp0_freq.attr, 205 + &dev_attr_rpa_freq.attr, 219 206 &dev_attr_rpe_freq.attr, 220 207 &dev_attr_rpn_freq.attr, 221 208 &dev_attr_min_freq.attr,
+4 -4
drivers/gpu/drm/xe/xe_gt_mcr.c
··· 371 371 * @group: steering group ID 372 372 * @instance: steering instance ID 373 373 * 374 - * Return: the coverted DSS id. 374 + * Return: the converted DSS id. 375 375 */ 376 376 u32 xe_gt_mcr_steering_info_to_dss_id(struct xe_gt *gt, u16 group, u16 instance) 377 377 { ··· 550 550 * Returns true if the caller should steer to the @group/@instance values 551 551 * returned. Returns false if the caller need not perform any steering 552 552 */ 553 - static bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt, 554 - struct xe_reg_mcr reg_mcr, 555 - u8 *group, u8 *instance) 553 + bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt, 554 + struct xe_reg_mcr reg_mcr, 555 + u8 *group, u8 *instance) 556 556 { 557 557 const struct xe_reg reg = to_xe_reg(reg_mcr); 558 558 const struct xe_mmio_range *implicit_ranges;
+4
drivers/gpu/drm/xe/xe_gt_mcr.h
··· 26 26 void xe_gt_mcr_multicast_write(struct xe_gt *gt, struct xe_reg_mcr mcr_reg, 27 27 u32 value); 28 28 29 + bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt, 30 + struct xe_reg_mcr reg_mcr, 31 + u8 *group, u8 *instance); 32 + 29 33 void xe_gt_mcr_steering_dump(struct xe_gt *gt, struct drm_printer *p); 30 34 void xe_gt_mcr_get_dss_steering(struct xe_gt *gt, unsigned int dss, u16 *group, u16 *instance); 31 35 u32 xe_gt_mcr_steering_info_to_dss_id(struct xe_gt *gt, u16 group, u16 instance);
+1 -1
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
··· 2161 2161 * 2162 2162 * This function can only be called on PF. 2163 2163 * 2164 - * Return: mininum size of the buffer or the number of bytes saved, 2164 + * Return: minimum size of the buffer or the number of bytes saved, 2165 2165 * or a negative error code on failure. 2166 2166 */ 2167 2167 ssize_t xe_gt_sriov_pf_config_save(struct xe_gt *gt, unsigned int vfid, void *buf, size_t size)
+15
drivers/gpu/drm/xe/xe_guc_ads.c
··· 29 29 #include "xe_platform_types.h" 30 30 #include "xe_uc_fw.h" 31 31 #include "xe_wa.h" 32 + #include "xe_gt_mcr.h" 32 33 33 34 /* Slack of a few additional entries per engine */ 34 35 #define ADS_REGSET_EXTRA_MAX 8 ··· 696 695 .offset = reg.addr, 697 696 .flags = reg.masked ? GUC_REGSET_MASKED : 0, 698 697 }; 698 + 699 + if (reg.mcr) { 700 + struct xe_reg_mcr mcr_reg = XE_REG_MCR(reg.addr); 701 + u8 group, instance; 702 + 703 + bool steer = xe_gt_mcr_get_nonterminated_steering(ads_to_gt(ads), mcr_reg, 704 + &group, &instance); 705 + 706 + if (steer) { 707 + entry.flags |= FIELD_PREP(GUC_REGSET_STEERING_GROUP, group); 708 + entry.flags |= FIELD_PREP(GUC_REGSET_STEERING_INSTANCE, instance); 709 + entry.flags |= GUC_REGSET_STEERING_NEEDED; 710 + } 711 + } 699 712 700 713 xe_map_memcpy_to(ads_to_xe(ads), regset_map, n_entry * sizeof(entry), 701 714 &entry, sizeof(entry));
+1 -1
drivers/gpu/drm/xe/xe_guc_capture.c
··· 1955 1955 } 1956 1956 1957 1957 /* 1958 - * xe_guc_capture_put_matched_nodes - Cleanup macthed nodes 1958 + * xe_guc_capture_put_matched_nodes - Cleanup matched nodes 1959 1959 * @guc: The GuC object 1960 1960 * 1961 1961 * Free matched node and all nodes with the equal guc_id from
+2 -2
drivers/gpu/drm/xe/xe_guc_capture_types.h
··· 22 22 * struct __guc_mmio_reg_descr - GuC mmio register descriptor 23 23 * 24 24 * xe_guc_capture module uses these structures to define a register 25 - * (offsets, names, flags,...) that are used at the ADS regisration 25 + * (offsets, names, flags,...) that are used at the ADS registration 26 26 * time as well as during runtime processing and reporting of error- 27 27 * capture states generated by GuC just prior to engine reset events. 28 28 */ ··· 48 48 * 49 49 * xe_guc_capture module uses these structures to maintain static 50 50 * tables (per unique platform) that consists of lists of registers 51 - * (offsets, names, flags,...) that are used at the ADS regisration 51 + * (offsets, names, flags,...) that are used at the ADS registration 52 52 * time as well as during runtime processing and reporting of error- 53 53 * capture states generated by GuC just prior to engine reset events. 54 54 */
+2 -2
drivers/gpu/drm/xe/xe_guc_ct.c
··· 710 710 --len; 711 711 ++action; 712 712 713 - /* Write H2G ensuring visable before descriptor update */ 713 + /* Write H2G ensuring visible before descriptor update */ 714 714 xe_map_memcpy_to(xe, &map, 0, cmd, H2G_CT_HEADERS * sizeof(u32)); 715 715 xe_map_memcpy_to(xe, &map, H2G_CT_HEADERS * sizeof(u32), action, len * sizeof(u32)); 716 716 xe_device_wmb(xe); ··· 1383 1383 * this function and nowhere else. Hence, they cannot be different 1384 1384 * unless two g2h_read calls are running concurrently. Which is not 1385 1385 * possible because it is guarded by ct->fast_lock. And yet, some 1386 - * discrete platforms are reguarly hitting this error :(. 1386 + * discrete platforms are regularly hitting this error :(. 1387 1387 * 1388 1388 * desc_head rolling backwards shouldn't cause any noticeable 1389 1389 * problems - just a delay in GuC being allowed to proceed past that
+58 -21
drivers/gpu/drm/xe/xe_guc_pc.c
··· 38 38 39 39 #define FREQ_INFO_REC XE_REG(MCHBAR_MIRROR_BASE_SNB + 0x5ef0) 40 40 #define RPE_MASK REG_GENMASK(15, 8) 41 + #define RPA_MASK REG_GENMASK(31, 16) 41 42 42 43 #define GT_PERF_STATUS XE_REG(0x1381b4) 43 44 #define CAGF_MASK REG_GENMASK(19, 11) ··· 329 328 freq); 330 329 } 331 330 331 + static void mtl_update_rpa_value(struct xe_guc_pc *pc) 332 + { 333 + struct xe_gt *gt = pc_to_gt(pc); 334 + u32 reg; 335 + 336 + if (xe_gt_is_media_type(gt)) 337 + reg = xe_mmio_read32(&gt->mmio, MTL_MPA_FREQUENCY); 338 + else 339 + reg = xe_mmio_read32(&gt->mmio, MTL_GT_RPA_FREQUENCY); 340 + 341 + pc->rpa_freq = decode_freq(REG_FIELD_GET(MTL_RPA_MASK, reg)); 342 + } 343 + 332 344 static void mtl_update_rpe_value(struct xe_guc_pc *pc) 333 345 { 334 346 struct xe_gt *gt = pc_to_gt(pc); ··· 353 339 reg = xe_mmio_read32(&gt->mmio, MTL_GT_RPE_FREQUENCY); 354 340 355 341 pc->rpe_freq = decode_freq(REG_FIELD_GET(MTL_RPE_MASK, reg)); 342 + } 343 + 344 + static void tgl_update_rpa_value(struct xe_guc_pc *pc) 345 + { 346 + struct xe_gt *gt = pc_to_gt(pc); 347 + struct xe_device *xe = gt_to_xe(gt); 348 + u32 reg; 349 + 350 + /* 351 + * For PVC we still need to use fused RP1 as the approximation for RPe 352 + * For other platforms than PVC we get the resolved RPe directly from 353 + * PCODE at a different register 354 + */ 355 + if (xe->info.platform == XE_PVC) 356 + reg = xe_mmio_read32(&gt->mmio, PVC_RP_STATE_CAP); 357 + else 358 + reg = xe_mmio_read32(&gt->mmio, FREQ_INFO_REC); 359 + 360 + pc->rpa_freq = REG_FIELD_GET(RPA_MASK, reg) * GT_FREQUENCY_MULTIPLIER; 356 361 } 357 362 358 363 static void tgl_update_rpe_value(struct xe_guc_pc *pc) ··· 398 365 struct xe_gt *gt = pc_to_gt(pc); 399 366 struct xe_device *xe = gt_to_xe(gt); 400 367 401 - if (GRAPHICS_VERx100(xe) >= 1270) 368 + if (GRAPHICS_VERx100(xe) >= 1270) { 369 + mtl_update_rpa_value(pc); 402 370 mtl_update_rpe_value(pc); 403 - else 371 + } else { 372 + tgl_update_rpa_value(pc); 404 373 tgl_update_rpe_value(pc); 374 + } 405 375 406 376 /* 407 377 * RPe is decided at runtime by PCODE. In the rare case where that's ··· 457 421 * GuC SLPC plays with cur freq request when GuCRC is enabled 458 422 * Block RC6 for a more reliable read. 459 423 */ 460 - fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL); 461 - if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) { 424 + fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT); 425 + if (!xe_force_wake_ref_has_domain(fw_ref, XE_FW_GT)) { 462 426 xe_force_wake_put(gt_to_fw(gt), fw_ref); 463 427 return -ETIMEDOUT; 464 428 } ··· 481 445 u32 xe_guc_pc_get_rp0_freq(struct xe_guc_pc *pc) 482 446 { 483 447 return pc->rp0_freq; 448 + } 449 + 450 + /** 451 + * xe_guc_pc_get_rpa_freq - Get the RPa freq 452 + * @pc: The GuC PC 453 + * 454 + * Returns: RPa freq. 455 + */ 456 + u32 xe_guc_pc_get_rpa_freq(struct xe_guc_pc *pc) 457 + { 458 + pc_update_rp_values(pc); 459 + 460 + return pc->rpa_freq; 484 461 } 485 462 486 463 /** ··· 530 481 */ 531 482 int xe_guc_pc_get_min_freq(struct xe_guc_pc *pc, u32 *freq) 532 483 { 533 - struct xe_gt *gt = pc_to_gt(pc); 534 - unsigned int fw_ref; 535 484 int ret; 485 + 486 + xe_device_assert_mem_access(pc_to_xe(pc)); 536 487 537 488 mutex_lock(&pc->freq_lock); 538 489 if (!pc->freq_ready) { ··· 541 492 goto out; 542 493 } 543 494 544 - /* 545 - * GuC SLPC plays with min freq request when GuCRC is enabled 546 - * Block RC6 for a more reliable read. 547 - */ 548 - fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL); 549 - if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) { 550 - ret = -ETIMEDOUT; 551 - goto fw; 552 - } 553 - 554 495 ret = pc_action_query_task_state(pc); 555 496 if (ret) 556 - goto fw; 497 + goto out; 557 498 558 499 *freq = pc_get_min_freq(pc); 559 500 560 - fw: 561 - xe_force_wake_put(gt_to_fw(gt), fw_ref); 562 501 out: 563 502 mutex_unlock(&pc->freq_lock); 564 503 return ret; ··· 1006 969 1007 970 xe_gt_assert(gt, xe_device_uc_enabled(xe)); 1008 971 1009 - fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL); 1010 - if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) { 972 + fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT); 973 + if (!xe_force_wake_ref_has_domain(fw_ref, XE_FW_GT)) { 1011 974 xe_force_wake_put(gt_to_fw(gt), fw_ref); 1012 975 return -ETIMEDOUT; 1013 976 }
+1
drivers/gpu/drm/xe/xe_guc_pc.h
··· 21 21 u32 xe_guc_pc_get_act_freq(struct xe_guc_pc *pc); 22 22 int xe_guc_pc_get_cur_freq(struct xe_guc_pc *pc, u32 *freq); 23 23 u32 xe_guc_pc_get_rp0_freq(struct xe_guc_pc *pc); 24 + u32 xe_guc_pc_get_rpa_freq(struct xe_guc_pc *pc); 24 25 u32 xe_guc_pc_get_rpe_freq(struct xe_guc_pc *pc); 25 26 u32 xe_guc_pc_get_rpn_freq(struct xe_guc_pc *pc); 26 27 int xe_guc_pc_get_min_freq(struct xe_guc_pc *pc, u32 *freq);
+2
drivers/gpu/drm/xe/xe_guc_pc_types.h
··· 17 17 struct xe_bo *bo; 18 18 /** @rp0_freq: HW RP0 frequency - The Maximum one */ 19 19 u32 rp0_freq; 20 + /** @rpa_freq: HW RPa frequency - The Achievable one */ 21 + u32 rpa_freq; 20 22 /** @rpe_freq: HW RPe frequency - The Efficient one */ 21 23 u32 rpe_freq; 22 24 /** @rpn_freq: HW RPN frequency - The Minimum one */
+1 -1
drivers/gpu/drm/xe/xe_guc_submit.c
··· 1226 1226 enable_scheduling(q); 1227 1227 rearm: 1228 1228 /* 1229 - * XXX: Ideally want to adjust timeout based on current exection time 1229 + * XXX: Ideally want to adjust timeout based on current execution time 1230 1230 * but there is not currently an easy way to do in DRM scheduler. With 1231 1231 * some thought, do this in a follow up. 1232 1232 */
+1 -1
drivers/gpu/drm/xe/xe_hmm.c
··· 159 159 * This function allocates the storage of the userptr sg table. 160 160 * It is caller's responsibility to free it calling sg_free_table. 161 161 * 162 - * returns: 0 for succuss; negative error no on failure 162 + * returns: 0 for success; negative error no on failure 163 163 */ 164 164 int xe_hmm_userptr_populate_range(struct xe_userptr_vma *uvma, 165 165 bool is_mm_mmap_locked)
+1 -1
drivers/gpu/drm/xe/xe_migrate.c
··· 1506 1506 * using the default engine for the updates, they will be performed in the 1507 1507 * order they grab the job_mutex. If different engines are used, external 1508 1508 * synchronization is needed for overlapping updates to maintain page-table 1509 - * consistency. Note that the meaing of "overlapping" is that the updates 1509 + * consistency. Note that the meaning of "overlapping" is that the updates 1510 1510 * touch the same page-table, which might be a higher-level page-directory. 1511 1511 * If no pipelining is needed, then updates may be performed by the cpu. 1512 1512 *
+2 -2
drivers/gpu/drm/xe/xe_pci.c
··· 490 490 * least basic xe_gt and xe_guc initialization. 491 491 * 492 492 * Since to obtain the value of GMDID_MEDIA we need to use the 493 - * media GuC, temporarly tweak the gt type. 493 + * media GuC, temporarily tweak the gt type. 494 494 */ 495 495 xe_gt_assert(gt, gt->info.type == XE_GT_TYPE_UNINITIALIZED); 496 496 ··· 781 781 * error injectable functions is proper handling of the error code by the 782 782 * caller for recovery, which is always the case here. The second 783 783 * requirement is that no state is changed before the first error return. 784 - * It is not strictly fullfilled for all initialization functions using the 784 + * It is not strictly fulfilled for all initialization functions using the 785 785 * ALLOW_ERROR_INJECTION() macro but this is acceptable because for those 786 786 * error cases at probe time, the error code is simply propagated up by the 787 787 * caller. Therefore there is no consequence on those specific callers when
+1 -1
drivers/gpu/drm/xe/xe_pcode.c
··· 217 217 * 218 218 * It returns 0 on success, and -ERROR number on failure, -EINVAL if max 219 219 * frequency is higher then the minimal, and other errors directly translated 220 - * from the PCODE Error returs: 220 + * from the PCODE Error returns: 221 221 * - -ENXIO: "Illegal Command" 222 222 * - -ETIMEDOUT: "Timed out" 223 223 * - -EINVAL: "Illegal Data"
+1 -1
drivers/gpu/drm/xe/xe_pm.c
··· 391 391 392 392 /* 393 393 * Applying lock for entire list op as xe_ttm_bo_destroy and xe_bo_move_notify 394 - * also checks and delets bo entry from user fault list. 394 + * also checks and deletes bo entry from user fault list. 395 395 */ 396 396 mutex_lock(&xe->mem_access.vram_userfault.lock); 397 397 list_for_each_entry_safe(bo, on,
+1 -1
drivers/gpu/drm/xe/xe_pt.c
··· 276 276 /* Also input, but is updated during the walk*/ 277 277 /** @curs: The DMA address cursor. */ 278 278 struct xe_res_cursor *curs; 279 - /** @va_curs_start: The Virtual address coresponding to @curs->start */ 279 + /** @va_curs_start: The Virtual address corresponding to @curs->start */ 280 280 u64 va_curs_start; 281 281 282 282 /* Output */
+5
drivers/gpu/drm/xe/xe_rtp.c
··· 340 340 return dss >= dss_per_gslice; 341 341 } 342 342 343 + bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt, 344 + const struct xe_hw_engine *hwe) 345 + { 346 + return !IS_SRIOV_VF(gt_to_xe(gt)); 347 + }
+13 -2
drivers/gpu/drm/xe/xe_rtp.h
··· 131 131 * @ver_end__: Last graphics IP version to match 132 132 * 133 133 * Note that the range matching this rule is [ @ver_start__, @ver_end__ ], i.e. 134 - * inclusive on boths sides 134 + * inclusive on both sides 135 135 * 136 136 * Refer to XE_RTP_RULES() for expected usage. 137 137 */ ··· 169 169 * @ver_end__: Last media IP version to match 170 170 * 171 171 * Note that the range matching this rule is [ @ver_start__, @ver_end__ ], i.e. 172 - * inclusive on boths sides 172 + * inclusive on both sides 173 173 * 174 174 * Refer to XE_RTP_RULES() for expected usage. 175 175 */ ··· 475 475 */ 476 476 bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt, 477 477 const struct xe_hw_engine *hwe); 478 + 479 + /* 480 + * xe_rtp_match_not_sriov_vf - Match when not on SR-IOV VF device 481 + * 482 + * @gt: GT structure 483 + * @hwe: Engine instance 484 + * 485 + * Returns: true if device is not VF, false otherwise. 486 + */ 487 + bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt, 488 + const struct xe_hw_engine *hwe); 478 489 479 490 #endif
+1 -1
drivers/gpu/drm/xe/xe_uc_fw_types.h
··· 92 92 const enum xe_uc_fw_status status; 93 93 /** 94 94 * @__status: private firmware load status - only to be used 95 - * by firmware laoding code 95 + * by firmware loading code 96 96 */ 97 97 enum xe_uc_fw_status __status; 98 98 };
+2 -2
drivers/gpu/drm/xe/xe_vm.c
··· 1024 1024 1025 1025 /* 1026 1026 * Since userptr pages are not pinned, we can't remove 1027 - * the notifer until we're sure the GPU is not accessing 1027 + * the notifier until we're sure the GPU is not accessing 1028 1028 * them anymore 1029 1029 */ 1030 1030 mmu_interval_notifier_remove(&userptr->notifier); ··· 2107 2107 } 2108 2108 } 2109 2109 2110 - /* Adjust for partial unbind after removin VMA from VM */ 2110 + /* Adjust for partial unbind after removing VMA from VM */ 2111 2111 if (!err) { 2112 2112 op->base.remap.unmap->va->va.addr = op->remap.start; 2113 2113 op->base.remap.unmap->va->va.range = op->remap.range;
+1 -1
drivers/gpu/drm/xe/xe_wa_oob.rules
··· 34 34 GRAPHICS_VERSION(2004) 35 35 22019338487 MEDIA_VERSION(2000) 36 36 GRAPHICS_VERSION(2001) 37 - MEDIA_VERSION(3000), MEDIA_STEP(A0, B0) 37 + MEDIA_VERSION(3000), MEDIA_STEP(A0, B0), FUNC(xe_rtp_match_not_sriov_vf) 38 38 22019338487_display PLATFORM(LUNARLAKE) 39 39 16023588340 GRAPHICS_VERSION(2001) 40 40 14019789679 GRAPHICS_VERSION(1255)
+2 -1
include/drm/intel/pciids.h
··· 858 858 MACRO__(0xB092, ## __VA_ARGS__), \ 859 859 MACRO__(0xB0A0, ## __VA_ARGS__), \ 860 860 MACRO__(0xB0A1, ## __VA_ARGS__), \ 861 - MACRO__(0xB0A2, ## __VA_ARGS__) 861 + MACRO__(0xB0A2, ## __VA_ARGS__), \ 862 + MACRO__(0xB0B0, ## __VA_ARGS__) 862 863 863 864 #endif /* __PCIIDS_H__ */
-235
include/drm/intel/xe_pciids.h
··· 1 - /* SPDX-License-Identifier: MIT */ 2 - /* 3 - * Copyright © 2022 Intel Corporation 4 - */ 5 - 6 - #ifndef _XE_PCIIDS_H_ 7 - #define _XE_PCIIDS_H_ 8 - 9 - /* 10 - * Lists below can be turned into initializers for a struct pci_device_id 11 - * by defining INTEL_VGA_DEVICE: 12 - * 13 - * #define INTEL_VGA_DEVICE(id, info) { \ 14 - * 0x8086, id, \ 15 - * ~0, ~0, \ 16 - * 0x030000, 0xff0000, \ 17 - * (unsigned long) info } 18 - * 19 - * And then calling like: 20 - * 21 - * XE_TGL_12_GT1_IDS(INTEL_VGA_DEVICE, ## __VA_ARGS__) 22 - * 23 - * To turn them into something else, just provide a different macro passed as 24 - * first argument. 25 - */ 26 - 27 - /* TGL */ 28 - #define XE_TGL_GT1_IDS(MACRO__, ...) \ 29 - MACRO__(0x9A60, ## __VA_ARGS__), \ 30 - MACRO__(0x9A68, ## __VA_ARGS__), \ 31 - MACRO__(0x9A70, ## __VA_ARGS__) 32 - 33 - #define XE_TGL_GT2_IDS(MACRO__, ...) \ 34 - MACRO__(0x9A40, ## __VA_ARGS__), \ 35 - MACRO__(0x9A49, ## __VA_ARGS__), \ 36 - MACRO__(0x9A59, ## __VA_ARGS__), \ 37 - MACRO__(0x9A78, ## __VA_ARGS__), \ 38 - MACRO__(0x9AC0, ## __VA_ARGS__), \ 39 - MACRO__(0x9AC9, ## __VA_ARGS__), \ 40 - MACRO__(0x9AD9, ## __VA_ARGS__), \ 41 - MACRO__(0x9AF8, ## __VA_ARGS__) 42 - 43 - #define XE_TGL_IDS(MACRO__, ...) \ 44 - XE_TGL_GT1_IDS(MACRO__, ## __VA_ARGS__),\ 45 - XE_TGL_GT2_IDS(MACRO__, ## __VA_ARGS__) 46 - 47 - /* RKL */ 48 - #define XE_RKL_IDS(MACRO__, ...) \ 49 - MACRO__(0x4C80, ## __VA_ARGS__), \ 50 - MACRO__(0x4C8A, ## __VA_ARGS__), \ 51 - MACRO__(0x4C8B, ## __VA_ARGS__), \ 52 - MACRO__(0x4C8C, ## __VA_ARGS__), \ 53 - MACRO__(0x4C90, ## __VA_ARGS__), \ 54 - MACRO__(0x4C9A, ## __VA_ARGS__) 55 - 56 - /* DG1 */ 57 - #define XE_DG1_IDS(MACRO__, ...) \ 58 - MACRO__(0x4905, ## __VA_ARGS__), \ 59 - MACRO__(0x4906, ## __VA_ARGS__), \ 60 - MACRO__(0x4907, ## __VA_ARGS__), \ 61 - MACRO__(0x4908, ## __VA_ARGS__), \ 62 - MACRO__(0x4909, ## __VA_ARGS__) 63 - 64 - /* ADL-S */ 65 - #define XE_ADLS_IDS(MACRO__, ...) \ 66 - MACRO__(0x4680, ## __VA_ARGS__), \ 67 - MACRO__(0x4682, ## __VA_ARGS__), \ 68 - MACRO__(0x4688, ## __VA_ARGS__), \ 69 - MACRO__(0x468A, ## __VA_ARGS__), \ 70 - MACRO__(0x468B, ## __VA_ARGS__), \ 71 - MACRO__(0x4690, ## __VA_ARGS__), \ 72 - MACRO__(0x4692, ## __VA_ARGS__), \ 73 - MACRO__(0x4693, ## __VA_ARGS__) 74 - 75 - /* ADL-P */ 76 - #define XE_ADLP_IDS(MACRO__, ...) \ 77 - MACRO__(0x46A0, ## __VA_ARGS__), \ 78 - MACRO__(0x46A1, ## __VA_ARGS__), \ 79 - MACRO__(0x46A2, ## __VA_ARGS__), \ 80 - MACRO__(0x46A3, ## __VA_ARGS__), \ 81 - MACRO__(0x46A6, ## __VA_ARGS__), \ 82 - MACRO__(0x46A8, ## __VA_ARGS__), \ 83 - MACRO__(0x46AA, ## __VA_ARGS__), \ 84 - MACRO__(0x462A, ## __VA_ARGS__), \ 85 - MACRO__(0x4626, ## __VA_ARGS__), \ 86 - MACRO__(0x4628, ## __VA_ARGS__), \ 87 - MACRO__(0x46B0, ## __VA_ARGS__), \ 88 - MACRO__(0x46B1, ## __VA_ARGS__), \ 89 - MACRO__(0x46B2, ## __VA_ARGS__), \ 90 - MACRO__(0x46B3, ## __VA_ARGS__), \ 91 - MACRO__(0x46C0, ## __VA_ARGS__), \ 92 - MACRO__(0x46C1, ## __VA_ARGS__), \ 93 - MACRO__(0x46C2, ## __VA_ARGS__), \ 94 - MACRO__(0x46C3, ## __VA_ARGS__) 95 - 96 - /* ADL-N */ 97 - #define XE_ADLN_IDS(MACRO__, ...) \ 98 - MACRO__(0x46D0, ## __VA_ARGS__), \ 99 - MACRO__(0x46D1, ## __VA_ARGS__), \ 100 - MACRO__(0x46D2, ## __VA_ARGS__), \ 101 - MACRO__(0x46D3, ## __VA_ARGS__), \ 102 - MACRO__(0x46D4, ## __VA_ARGS__) 103 - 104 - /* RPL-S */ 105 - #define XE_RPLS_IDS(MACRO__, ...) \ 106 - MACRO__(0xA780, ## __VA_ARGS__), \ 107 - MACRO__(0xA781, ## __VA_ARGS__), \ 108 - MACRO__(0xA782, ## __VA_ARGS__), \ 109 - MACRO__(0xA783, ## __VA_ARGS__), \ 110 - MACRO__(0xA788, ## __VA_ARGS__), \ 111 - MACRO__(0xA789, ## __VA_ARGS__), \ 112 - MACRO__(0xA78A, ## __VA_ARGS__), \ 113 - MACRO__(0xA78B, ## __VA_ARGS__) 114 - 115 - /* RPL-U */ 116 - #define XE_RPLU_IDS(MACRO__, ...) \ 117 - MACRO__(0xA721, ## __VA_ARGS__), \ 118 - MACRO__(0xA7A1, ## __VA_ARGS__), \ 119 - MACRO__(0xA7A9, ## __VA_ARGS__), \ 120 - MACRO__(0xA7AC, ## __VA_ARGS__), \ 121 - MACRO__(0xA7AD, ## __VA_ARGS__) 122 - 123 - /* RPL-P */ 124 - #define XE_RPLP_IDS(MACRO__, ...) \ 125 - MACRO__(0xA720, ## __VA_ARGS__), \ 126 - MACRO__(0xA7A0, ## __VA_ARGS__), \ 127 - MACRO__(0xA7A8, ## __VA_ARGS__), \ 128 - MACRO__(0xA7AA, ## __VA_ARGS__), \ 129 - MACRO__(0xA7AB, ## __VA_ARGS__) 130 - 131 - /* DG2 */ 132 - #define XE_DG2_G10_IDS(MACRO__, ...) \ 133 - MACRO__(0x5690, ## __VA_ARGS__), \ 134 - MACRO__(0x5691, ## __VA_ARGS__), \ 135 - MACRO__(0x5692, ## __VA_ARGS__), \ 136 - MACRO__(0x56A0, ## __VA_ARGS__), \ 137 - MACRO__(0x56A1, ## __VA_ARGS__), \ 138 - MACRO__(0x56A2, ## __VA_ARGS__), \ 139 - MACRO__(0x56BE, ## __VA_ARGS__), \ 140 - MACRO__(0x56BF, ## __VA_ARGS__) 141 - 142 - #define XE_DG2_G11_IDS(MACRO__, ...) \ 143 - MACRO__(0x5693, ## __VA_ARGS__), \ 144 - MACRO__(0x5694, ## __VA_ARGS__), \ 145 - MACRO__(0x5695, ## __VA_ARGS__), \ 146 - MACRO__(0x56A5, ## __VA_ARGS__), \ 147 - MACRO__(0x56A6, ## __VA_ARGS__), \ 148 - MACRO__(0x56B0, ## __VA_ARGS__), \ 149 - MACRO__(0x56B1, ## __VA_ARGS__), \ 150 - MACRO__(0x56BA, ## __VA_ARGS__), \ 151 - MACRO__(0x56BB, ## __VA_ARGS__), \ 152 - MACRO__(0x56BC, ## __VA_ARGS__), \ 153 - MACRO__(0x56BD, ## __VA_ARGS__) 154 - 155 - #define XE_DG2_G12_IDS(MACRO__, ...) \ 156 - MACRO__(0x5696, ## __VA_ARGS__), \ 157 - MACRO__(0x5697, ## __VA_ARGS__), \ 158 - MACRO__(0x56A3, ## __VA_ARGS__), \ 159 - MACRO__(0x56A4, ## __VA_ARGS__), \ 160 - MACRO__(0x56B2, ## __VA_ARGS__), \ 161 - MACRO__(0x56B3, ## __VA_ARGS__) 162 - 163 - #define XE_DG2_IDS(MACRO__, ...) \ 164 - XE_DG2_G10_IDS(MACRO__, ## __VA_ARGS__),\ 165 - XE_DG2_G11_IDS(MACRO__, ## __VA_ARGS__),\ 166 - XE_DG2_G12_IDS(MACRO__, ## __VA_ARGS__) 167 - 168 - #define XE_ATS_M150_IDS(MACRO__, ...) \ 169 - MACRO__(0x56C0, ## __VA_ARGS__), \ 170 - MACRO__(0x56C2, ## __VA_ARGS__) 171 - 172 - #define XE_ATS_M75_IDS(MACRO__, ...) \ 173 - MACRO__(0x56C1, ## __VA_ARGS__) 174 - 175 - #define XE_ATS_M_IDS(MACRO__, ...) \ 176 - XE_ATS_M150_IDS(MACRO__, ## __VA_ARGS__),\ 177 - XE_ATS_M75_IDS(MACRO__, ## __VA_ARGS__) 178 - 179 - /* ARL */ 180 - #define XE_ARL_IDS(MACRO__, ...) \ 181 - MACRO__(0x7D41, ## __VA_ARGS__), \ 182 - MACRO__(0x7D51, ## __VA_ARGS__), \ 183 - MACRO__(0x7D67, ## __VA_ARGS__), \ 184 - MACRO__(0x7DD1, ## __VA_ARGS__), \ 185 - MACRO__(0xB640, ## __VA_ARGS__) 186 - 187 - /* MTL */ 188 - #define XE_MTL_IDS(MACRO__, ...) \ 189 - MACRO__(0x7D40, ## __VA_ARGS__), \ 190 - MACRO__(0x7D45, ## __VA_ARGS__), \ 191 - MACRO__(0x7D55, ## __VA_ARGS__), \ 192 - MACRO__(0x7D60, ## __VA_ARGS__), \ 193 - MACRO__(0x7DD5, ## __VA_ARGS__) 194 - 195 - /* PVC */ 196 - #define XE_PVC_IDS(MACRO__, ...) \ 197 - MACRO__(0x0B69, ## __VA_ARGS__), \ 198 - MACRO__(0x0B6E, ## __VA_ARGS__), \ 199 - MACRO__(0x0BD4, ## __VA_ARGS__), \ 200 - MACRO__(0x0BD5, ## __VA_ARGS__), \ 201 - MACRO__(0x0BD6, ## __VA_ARGS__), \ 202 - MACRO__(0x0BD7, ## __VA_ARGS__), \ 203 - MACRO__(0x0BD8, ## __VA_ARGS__), \ 204 - MACRO__(0x0BD9, ## __VA_ARGS__), \ 205 - MACRO__(0x0BDA, ## __VA_ARGS__), \ 206 - MACRO__(0x0BDB, ## __VA_ARGS__), \ 207 - MACRO__(0x0BE0, ## __VA_ARGS__), \ 208 - MACRO__(0x0BE1, ## __VA_ARGS__), \ 209 - MACRO__(0x0BE5, ## __VA_ARGS__) 210 - 211 - #define XE_LNL_IDS(MACRO__, ...) \ 212 - MACRO__(0x6420, ## __VA_ARGS__), \ 213 - MACRO__(0x64A0, ## __VA_ARGS__), \ 214 - MACRO__(0x64B0, ## __VA_ARGS__) 215 - 216 - #define XE_BMG_IDS(MACRO__, ...) \ 217 - MACRO__(0xE202, ## __VA_ARGS__), \ 218 - MACRO__(0xE20B, ## __VA_ARGS__), \ 219 - MACRO__(0xE20C, ## __VA_ARGS__), \ 220 - MACRO__(0xE20D, ## __VA_ARGS__), \ 221 - MACRO__(0xE212, ## __VA_ARGS__) 222 - 223 - #define XE_PTL_IDS(MACRO__, ...) \ 224 - MACRO__(0xB080, ## __VA_ARGS__), \ 225 - MACRO__(0xB081, ## __VA_ARGS__), \ 226 - MACRO__(0xB082, ## __VA_ARGS__), \ 227 - MACRO__(0xB090, ## __VA_ARGS__), \ 228 - MACRO__(0xB091, ## __VA_ARGS__), \ 229 - MACRO__(0xB092, ## __VA_ARGS__), \ 230 - MACRO__(0xB0A0, ## __VA_ARGS__), \ 231 - MACRO__(0xB0A1, ## __VA_ARGS__), \ 232 - MACRO__(0xB0A2, ## __VA_ARGS__), \ 233 - MACRO__(0xB0B0, ## __VA_ARGS__) 234 - 235 - #endif