mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:04:44 +01:00
Driver Changes:
- Skip address copy for sync-only execs (Lin) - Fix a WA (Tvrtko) - Derive mem_copy cap from graphics version (Nitin) - Fix is_bound() pci_dev lifetime (Lin) - xe nvm cleanup fixes (Lin) -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCaXu+YwAKCRC4FpNVCsYG v2UjAQDjZA/buxRS34ZqxeRXMI7DeQ1hYxjIHPpr78B2ctUSagEA4hmx6WqIqx2X Wu20OYSAUxuB14pdHPl/vMBQOHir/wE= =neEs -----END PGP SIGNATURE----- Merge tag 'drm-xe-fixes-2026-01-29' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Skip address copy for sync-only execs (Lin) - Fix a WA (Tvrtko) - Derive mem_copy cap from graphics version (Nitin) - Fix is_bound() pci_dev lifetime (Lin) - xe nvm cleanup fixes (Lin) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Link: https://patch.msgid.link/aXu_JzBFb9YVFYW1@fedora
This commit is contained in:
commit
190eaa45bb
8 changed files with 33 additions and 44 deletions
|
|
@ -347,11 +347,10 @@ static bool is_bound(struct xe_config_group_device *dev)
|
|||
return false;
|
||||
|
||||
ret = pci_get_drvdata(pdev);
|
||||
pci_dev_put(pdev);
|
||||
|
||||
if (ret)
|
||||
pci_dbg(pdev, "Already bound to driver\n");
|
||||
|
||||
pci_dev_put(pdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -984,8 +984,6 @@ void xe_device_remove(struct xe_device *xe)
|
|||
{
|
||||
xe_display_unregister(xe);
|
||||
|
||||
xe_nvm_fini(xe);
|
||||
|
||||
drm_dev_unplug(&xe->drm);
|
||||
|
||||
xe_bo_pci_dev_remove_all(xe);
|
||||
|
|
|
|||
|
|
@ -190,9 +190,9 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
|
|||
goto err_syncs;
|
||||
}
|
||||
|
||||
if (xe_exec_queue_is_parallel(q)) {
|
||||
err = copy_from_user(addresses, addresses_user, sizeof(u64) *
|
||||
q->width);
|
||||
if (args->num_batch_buffer && xe_exec_queue_is_parallel(q)) {
|
||||
err = copy_from_user(addresses, addresses_user,
|
||||
sizeof(u64) * q->width);
|
||||
if (err) {
|
||||
err = -EFAULT;
|
||||
goto err_syncs;
|
||||
|
|
|
|||
|
|
@ -1185,7 +1185,7 @@ static ssize_t setup_invalidate_state_cache_wa(struct xe_lrc *lrc,
|
|||
return -ENOSPC;
|
||||
|
||||
*cmd++ = MI_LOAD_REGISTER_IMM | MI_LRI_NUM_REGS(1);
|
||||
*cmd++ = CS_DEBUG_MODE1(0).addr;
|
||||
*cmd++ = CS_DEBUG_MODE2(0).addr;
|
||||
*cmd++ = _MASKED_BIT_ENABLE(INSTRUCTION_STATE_CACHE_INVALIDATE);
|
||||
|
||||
return cmd - batch;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,27 @@ static bool xe_nvm_writable_override(struct xe_device *xe)
|
|||
return writable_override;
|
||||
}
|
||||
|
||||
static void xe_nvm_fini(void *arg)
|
||||
{
|
||||
struct xe_device *xe = arg;
|
||||
struct intel_dg_nvm_dev *nvm = xe->nvm;
|
||||
|
||||
if (!xe->info.has_gsc_nvm)
|
||||
return;
|
||||
|
||||
/* No access to internal NVM from VFs */
|
||||
if (IS_SRIOV_VF(xe))
|
||||
return;
|
||||
|
||||
/* Nvm pointer should not be NULL here */
|
||||
if (WARN_ON(!nvm))
|
||||
return;
|
||||
|
||||
auxiliary_device_delete(&nvm->aux_dev);
|
||||
auxiliary_device_uninit(&nvm->aux_dev);
|
||||
xe->nvm = NULL;
|
||||
}
|
||||
|
||||
int xe_nvm_init(struct xe_device *xe)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
|
||||
|
|
@ -132,39 +153,17 @@ int xe_nvm_init(struct xe_device *xe)
|
|||
ret = auxiliary_device_init(aux_dev);
|
||||
if (ret) {
|
||||
drm_err(&xe->drm, "xe-nvm aux init failed %d\n", ret);
|
||||
goto err;
|
||||
kfree(nvm);
|
||||
xe->nvm = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = auxiliary_device_add(aux_dev);
|
||||
if (ret) {
|
||||
drm_err(&xe->drm, "xe-nvm aux add failed %d\n", ret);
|
||||
auxiliary_device_uninit(aux_dev);
|
||||
goto err;
|
||||
xe->nvm = NULL;
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
|
||||
err:
|
||||
kfree(nvm);
|
||||
xe->nvm = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void xe_nvm_fini(struct xe_device *xe)
|
||||
{
|
||||
struct intel_dg_nvm_dev *nvm = xe->nvm;
|
||||
|
||||
if (!xe->info.has_gsc_nvm)
|
||||
return;
|
||||
|
||||
/* No access to internal NVM from VFs */
|
||||
if (IS_SRIOV_VF(xe))
|
||||
return;
|
||||
|
||||
/* Nvm pointer should not be NULL here */
|
||||
if (WARN_ON(!nvm))
|
||||
return;
|
||||
|
||||
auxiliary_device_delete(&nvm->aux_dev);
|
||||
auxiliary_device_uninit(&nvm->aux_dev);
|
||||
xe->nvm = NULL;
|
||||
return devm_add_action_or_reset(xe->drm.dev, xe_nvm_fini, xe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,4 @@ struct xe_device;
|
|||
|
||||
int xe_nvm_init(struct xe_device *xe);
|
||||
|
||||
void xe_nvm_fini(struct xe_device *xe);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -342,7 +342,6 @@ static const struct xe_device_desc lnl_desc = {
|
|||
.has_display = true,
|
||||
.has_flat_ccs = 1,
|
||||
.has_pxp = true,
|
||||
.has_mem_copy_instr = true,
|
||||
.max_gt_per_tile = 2,
|
||||
.needs_scratch = true,
|
||||
.va_bits = 48,
|
||||
|
|
@ -363,7 +362,6 @@ static const struct xe_device_desc bmg_desc = {
|
|||
.has_heci_cscfi = 1,
|
||||
.has_late_bind = true,
|
||||
.has_sriov = true,
|
||||
.has_mem_copy_instr = true,
|
||||
.max_gt_per_tile = 2,
|
||||
.needs_scratch = true,
|
||||
.subplatforms = (const struct xe_subplatform_desc[]) {
|
||||
|
|
@ -380,7 +378,6 @@ static const struct xe_device_desc ptl_desc = {
|
|||
.has_display = true,
|
||||
.has_flat_ccs = 1,
|
||||
.has_sriov = true,
|
||||
.has_mem_copy_instr = true,
|
||||
.max_gt_per_tile = 2,
|
||||
.needs_scratch = true,
|
||||
.needs_shared_vf_gt_wq = true,
|
||||
|
|
@ -393,7 +390,6 @@ static const struct xe_device_desc nvls_desc = {
|
|||
.dma_mask_size = 46,
|
||||
.has_display = true,
|
||||
.has_flat_ccs = 1,
|
||||
.has_mem_copy_instr = true,
|
||||
.max_gt_per_tile = 2,
|
||||
.require_force_probe = true,
|
||||
.va_bits = 48,
|
||||
|
|
@ -675,7 +671,6 @@ static int xe_info_init_early(struct xe_device *xe,
|
|||
xe->info.has_pxp = desc->has_pxp;
|
||||
xe->info.has_sriov = xe_configfs_primary_gt_allowed(to_pci_dev(xe->drm.dev)) &&
|
||||
desc->has_sriov;
|
||||
xe->info.has_mem_copy_instr = desc->has_mem_copy_instr;
|
||||
xe->info.skip_guc_pc = desc->skip_guc_pc;
|
||||
xe->info.skip_mtcfg = desc->skip_mtcfg;
|
||||
xe->info.skip_pcode = desc->skip_pcode;
|
||||
|
|
@ -864,6 +859,7 @@ static int xe_info_init(struct xe_device *xe,
|
|||
xe->info.has_range_tlb_inval = graphics_desc->has_range_tlb_inval;
|
||||
xe->info.has_usm = graphics_desc->has_usm;
|
||||
xe->info.has_64bit_timestamp = graphics_desc->has_64bit_timestamp;
|
||||
xe->info.has_mem_copy_instr = GRAPHICS_VER(xe) >= 20;
|
||||
|
||||
xe_info_probe_tile_count(xe);
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ struct xe_device_desc {
|
|||
u8 has_late_bind:1;
|
||||
u8 has_llc:1;
|
||||
u8 has_mbx_power_limits:1;
|
||||
u8 has_mem_copy_instr:1;
|
||||
u8 has_pxp:1;
|
||||
u8 has_sriov:1;
|
||||
u8 needs_scratch:1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue