Commit 62cab426 authored by Dave Airlie's avatar Dave Airlie
Browse files

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



Driver Changes:
 - Increase global invalidation timeout to handle some workloads
   (Kenneth Graunke)
 - Fix NPD while evicting BOs in an array of VM binds (Matthew Brost)
 - Fix resizable BAR to account for possibly needing to move BARs other
   than the LMEMBAR (Lucas De Marchi)
 - Fix error handling in xe_migrate_init() (Thomas Hellström)
 - Fix atomic fault handling with mixed mappings or if the page is
   already in VRAM (Matthew Brost)
 - Enable media samplers power gating for platforms before Xe2 (Vinay
   Belgaumkar)
 - Fix de-registering exec queue from GuC when unbinding (Matthew Brost)
 - Ensure data migration to system if indicated by madvise with SVM
   (Thomas Hellström)
 - Fix kerneldoc for kunit change (Matt Roper)
 - Always account for cacheline alignment on migration (Matthew Auld)
 - Drop bogus assertion on eviction (Matthew Auld)

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

From: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/rch735eqkmprfyutk3ux2fsqa3e5ve4p77w7a5j66qdpgyquxr@ao3wzcqtpn6s
parents d6dd930a 225bc03d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -342,6 +342,7 @@
#define POWERGATE_ENABLE			XE_REG(0xa210)
#define   RENDER_POWERGATE_ENABLE		REG_BIT(0)
#define   MEDIA_POWERGATE_ENABLE		REG_BIT(1)
#define   MEDIA_SAMPLERS_POWERGATE_ENABLE	REG_BIT(2)
#define   VDN_HCP_POWERGATE_ENABLE(n)		REG_BIT(3 + 2 * (n))
#define   VDN_MFXVDENC_POWERGATE_ENABLE(n)	REG_BIT(4 + 2 * (n))

+5 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);

/**
 * xe_pci_fake_data_gen_params - Generate struct xe_pci_fake_data parameters
 * @test: test context object
 * @prev: the pointer to the previous parameter to iterate from or NULL
 * @desc: output buffer with minimum size of KUNIT_PARAM_DESC_SIZE
 *
@@ -242,6 +243,7 @@ KUNIT_ARRAY_PARAM(pci_id, pciidlist, xe_pci_id_kunit_desc);

/**
 * xe_pci_graphics_ip_gen_param - Generate graphics struct xe_ip parameters
 * @test: test context object
 * @prev: the pointer to the previous parameter to iterate from or NULL
 * @desc: output buffer with minimum size of KUNIT_PARAM_DESC_SIZE
 *
@@ -266,6 +268,7 @@ EXPORT_SYMBOL_IF_KUNIT(xe_pci_graphics_ip_gen_param);

/**
 * xe_pci_media_ip_gen_param - Generate media struct xe_ip parameters
 * @test: test context object
 * @prev: the pointer to the previous parameter to iterate from or NULL
 * @desc: output buffer with minimum size of KUNIT_PARAM_DESC_SIZE
 *
@@ -290,6 +293,7 @@ EXPORT_SYMBOL_IF_KUNIT(xe_pci_media_ip_gen_param);

/**
 * xe_pci_id_gen_param - Generate struct pci_device_id parameters
 * @test: test context object
 * @prev: the pointer to the previous parameter to iterate from or NULL
 * @desc: output buffer with minimum size of KUNIT_PARAM_DESC_SIZE
 *
@@ -376,6 +380,7 @@ EXPORT_SYMBOL_IF_KUNIT(xe_pci_fake_device_init);

/**
 * xe_pci_live_device_gen_param - Helper to iterate Xe devices as KUnit parameters
 * @test: test context object
 * @prev: the previously returned value, or NULL for the first iteration
 * @desc: the buffer for a parameter name
 *
+0 −8
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ int xe_bo_evict_all(struct xe_device *xe)

static int xe_bo_restore_and_map_ggtt(struct xe_bo *bo)
{
	struct xe_device *xe = xe_bo_device(bo);
	int ret;

	ret = xe_bo_restore_pinned(bo);
@@ -201,13 +200,6 @@ static int xe_bo_restore_and_map_ggtt(struct xe_bo *bo)
		}
	}

	/*
	 * We expect validate to trigger a move VRAM and our move code
	 * should setup the iosys map.
	 */
	xe_assert(xe, !(bo->flags & XE_BO_FLAG_PINNED_LATE_RESTORE) ||
		  !iosys_map_is_null(&bo->vmap));

	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -1070,7 +1070,7 @@ void xe_device_l2_flush(struct xe_device *xe)
	spin_lock(&gt->global_invl_lock);

	xe_mmio_write32(&gt->mmio, XE2_GLOBAL_INVAL, 0x1);
	if (xe_mmio_wait32(&gt->mmio, XE2_GLOBAL_INVAL, 0x1, 0x0, 500, NULL, true))
	if (xe_mmio_wait32(&gt->mmio, XE2_GLOBAL_INVAL, 0x1, 0x0, 1000, NULL, true))
		xe_gt_err_once(gt, "Global invalidation timeout\n");

	spin_unlock(&gt->global_invl_lock);
+8 −0
Original line number Diff line number Diff line
@@ -124,6 +124,9 @@ void xe_gt_idle_enable_pg(struct xe_gt *gt)
	if (xe_gt_is_main_type(gt))
		gtidle->powergate_enable |= RENDER_POWERGATE_ENABLE;

	if (MEDIA_VERx100(xe) >= 1100 && MEDIA_VERx100(xe) < 1255)
		gtidle->powergate_enable |= MEDIA_SAMPLERS_POWERGATE_ENABLE;

	if (xe->info.platform != XE_DG1) {
		for (i = XE_HW_ENGINE_VCS0, j = 0; i <= XE_HW_ENGINE_VCS7; ++i, ++j) {
			if ((gt->info.engine_mask & BIT(i)))
@@ -246,6 +249,11 @@ int xe_gt_idle_pg_print(struct xe_gt *gt, struct drm_printer *p)
				drm_printf(p, "Media Slice%d Power Gate Status: %s\n", n,
					   str_up_down(pg_status & media_slices[n].status_bit));
	}

	if (MEDIA_VERx100(xe) >= 1100 && MEDIA_VERx100(xe) < 1255)
		drm_printf(p, "Media Samplers Power Gating Enabled: %s\n",
			   str_yes_no(pg_enabled & MEDIA_SAMPLERS_POWERGATE_ENABLE));

	return 0;
}

Loading