Skip to contentSkip to conversation

Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap

RFC PATCH Superseded Matthew Brost 4 participants 16 messages Jan 23 – Jan 27

Subsystems (3)

v2 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Matthew Brost

author maintainer
#0 lore raw

v2 cover Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap

The dma-map IOVA alloc, link, and sync APIs perform significantly better than dma-map / dma-unmap, as they avoid costly IOMMU synchronizations. This difference is especially noticeable when mapping a 2MB region in 4KB pages.

Use dma-map IOVA alloc, link, and sync APIs for GPU SVM and DRM page, which mappings between the CPU and GPU.

Initial results are promising.

Baseline CPU time during 2M / 64K fault with a migration:
Average migrate 2M cpu time (us, percentage): 552.36049107142857142857, .71943789893868318799 Average migrate 64K cpu time (us, percentage): 24.97767857142857142857, .34789908128526791960

After this series CPU time during 2M / 64K fault with a migration:
Average migrate 2M cpu time (us, percentage): 224.81808035714285714286, .51412827364772602557 Average migrate 64K cpu time (us, percentage): 14.65625000000000000000, .25659463050529524405

Sending as an RFC as there appears to be intermittent memory corruptions when running xe_exec_system_allocator that need to be tracked down.

Matt

v2:
- Include missing basline patch for CI

Francois Dugast (1):
drm/pagemap: Add helper to access zone_device_data

Matthew Brost (2):
drm/gpusvm: Use new dma-map IOVA alloc, link, and sync API in GPU SVM drm/pagemap: Use new dma-map IOVA alloc, link, and sync API for DRM
pagemap

 drivers/gpu/drm/drm_gpusvm.c  |  70 ++++++++++-----
 drivers/gpu/drm/drm_pagemap.c | 156 +++++++++++++++++++++++++---------
 include/drm/drm_gpusvm.h      |   3 +
 include/drm/drm_pagemap.h     |  14 +++
 4 files changed, 183 insertions(+), 60 deletions(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

RFC PATCH v2 1/3 drm/pagemap: Add helper to access zone_device_data

From: Francois Dugast <[email protected]>

This new helper helps ensure all accesses to zone_device_data use the correct API whether the page is part of a folio or not.

v2:
- Move to drm_pagemap.h, stick to folio_zone_device_data (Matthew Brost)
- Return struct drm_pagemap_zdd * (Matthew Brost)

---
 drivers/gpu/drm/drm_gpusvm.c  |  7 +++++--
 drivers/gpu/drm/drm_pagemap.c | 21 ++++++++++++---------
 include/drm/drm_pagemap.h     | 14 ++++++++++++++
 3 files changed, 31 insertions(+), 11 deletions(-)
drivers/gpu/drm/drm_gpusvm.c +5 -2
index aa9a0b60e727..585d913d3d19 100644
@@ -1488,12 +1488,15 @@ int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
 		order = drm_gpusvm_hmm_pfn_to_order(pfns[i], i, npages);
 		if (is_device_private_page(page) ||
 		    is_device_coherent_page(page)) {
+			struct drm_pagemap_zdd *__zdd =
+				drm_pagemap_page_zone_device_data(page);
+
 			if (!ctx->allow_mixed &&
-			    zdd != page->zone_device_data && i > 0) {
+			    zdd != __zdd && i > 0) {
 				err = -EOPNOTSUPP;
 				goto err_unmap;
 			}
-			zdd = page->zone_device_data;
+			zdd = __zdd;
 			if (pagemap != page_pgmap(page)) {
 				if (i > 0) {
 					err = -EOPNOTSUPP;
drivers/gpu/drm/drm_pagemap.c +12 -9
index 03ee39a761a4..2c67aabd8d65 100644
@@ -244,7 +244,7 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
 		order = folio_order(folio);
 
 		if (is_device_private_page(page)) {
-			struct drm_pagemap_zdd *zdd = page->zone_device_data;
+			struct drm_pagemap_zdd *zdd = drm_pagemap_page_zone_device_data(page);
 			struct drm_pagemap *dpagemap = zdd->dpagemap;
 			struct drm_pagemap_addr addr;
 
@@ -315,7 +315,7 @@ static void drm_pagemap_migrate_unmap_pages(struct device *dev,
 			goto next;
 
 		if (is_zone_device_page(page)) {
-			struct drm_pagemap_zdd *zdd = page->zone_device_data;
+			struct drm_pagemap_zdd *zdd = drm_pagemap_page_zone_device_data(page);
 			struct drm_pagemap *dpagemap = zdd->dpagemap;
 
 			dpagemap->ops->device_unmap(dpagemap, dev, pagemap_addr[i]);
@@ -603,7 +603,8 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
 
 		pages[i] = NULL;
 		if (src_page && is_device_private_page(src_page)) {
-			struct drm_pagemap_zdd *src_zdd = src_page->zone_device_data;
+			struct drm_pagemap_zdd *src_zdd =
+				drm_pagemap_page_zone_device_data(src_page);
 
 			if (page_pgmap(src_page) == pagemap &&
 			    !mdetails->can_migrate_same_pagemap) {
@@ -725,8 +726,8 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,
 			goto next;
 
 		if (fault_page) {
-			if (src_page->zone_device_data !=
-			    fault_page->zone_device_data)
+			if (drm_pagemap_page_zone_device_data(src_page) !=
+			    drm_pagemap_page_zone_device_data(fault_page))
 				goto next;
 		}
 
@@ -1067,7 +1068,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
 	void *buf;
 	int i, err = 0;
 
-	zdd = page->zone_device_data;
+	zdd = drm_pagemap_page_zone_device_data(page);
 	if (time_before64(get_jiffies_64(), zdd->devmem_allocation->timeslice_expiration))
 		return 0;
 
@@ -1150,7 +1151,9 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
  */
 static void drm_pagemap_folio_free(struct folio *folio)
 {
-	drm_pagemap_zdd_put(folio->page.zone_device_data);
+	struct page *page = folio_page(folio, 0);
+
+	drm_pagemap_zdd_put(drm_pagemap_page_zone_device_data(page));
 }
 
 /**
@@ -1166,7 +1169,7 @@ static void drm_pagemap_folio_free(struct folio *folio)
  */
 static vm_fault_t drm_pagemap_migrate_to_ram(struct vm_fault *vmf)
 {
-	struct drm_pagemap_zdd *zdd = vmf->page->zone_device_data;
+	struct drm_pagemap_zdd *zdd = drm_pagemap_page_zone_device_data(vmf->page);
 	int err;
 
 	err = __drm_pagemap_migrate_to_ram(vmf->vma,
@@ -1232,7 +1235,7 @@ EXPORT_SYMBOL_GPL(drm_pagemap_devmem_init);
  */
 struct drm_pagemap *drm_pagemap_page_to_dpagemap(struct page *page)
 {
-	struct drm_pagemap_zdd *zdd = page->zone_device_data;
+	struct drm_pagemap_zdd *zdd = drm_pagemap_page_zone_device_data(page);
 
 	return zdd->devmem_allocation->dpagemap;
 }
include/drm/drm_pagemap.h +14 -0
index 2baf0861f78f..c6459f4bde8b 100644
@@ -4,6 +4,7 @@
 
 #include <linux/dma-direction.h>
 #include <linux/hmm.h>
+#include <linux/memremap.h>
 #include <linux/types.h>
 
 #define NR_PAGES(order) (1U << (order))
@@ -367,6 +368,19 @@ void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaim
 
 int drm_pagemap_reinit(struct drm_pagemap *dpagemap);
 
+/**
+ * drm_pagemap_page_zone_device_data() - Page to zone_device_data
+ * @page: Pointer to the page
+ *
+ * Return: Page's zone_device_data
+ */
+static inline struct drm_pagemap_zdd *drm_pagemap_page_zone_device_data(struct page *page)
+{
+	struct folio *folio = page_folio(page);
+
+	return folio_zone_device_data(folio);
+}
+
 #endif /* IS_ENABLED(CONFIG_ZONE_DEVICE) */
 
 #endif
Signature · 1 line
2.34.1
#2 lore raw

Re: [RFC PATCH v2 1/3] drm/pagemap: Add helper to access zone_device_data

kernel test robot noticed the following build errors:

Hi Matthew,

[This is a private test report for your RFC patch.] kernel test robot noticed the following build errors:

[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-misc/drm-misc-next daeinki-drm-exynos/exynos-drm-next drm/drm-next drm-i915/for-linux-next drm-i915/for-linux-next-fixes linus/master v6.19-rc6 next-20260123] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/drm-pagemap-Add-helper-to-access-zone_device_data/20260124-060207
base:   https://gitlab.freedesktop.org/drm/tip.git drm-tip
patch link:    https://lore.kernel.org/r/20260123215907.1643088-2-matthew.brost%40intel.com
patch subject: [RFC PATCH v2 1/3] drm/pagemap: Add helper to access zone_device_data
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20260124/[email protected]/config)
compiler: hppa-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260124/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

drivers/gpu/drm/drm_gpusvm.c: In function 'drm_gpusvm_get_pages':

>> drivers/gpu/drm/drm_gpusvm.c:1492:33: error: implicit declaration of function 'drm_pagemap_page_zone_device_data'; did you mean 'drm_pagemap_page_to_dpagemap'? [-Wimplicit-function-declaration]
    1492 |                                 drm_pagemap_page_zone_device_data(page);
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                 drm_pagemap_page_to_dpagemap
>> drivers/gpu/drm/drm_gpusvm.c:1492:33: error: initialization of 'struct drm_pagemap_zdd *' from 'int' makes pointer from integer without a cast [-Wint-conversion]

vim +1492 drivers/gpu/drm/drm_gpusvm.c

1366
1367 /**
1368 * drm_gpusvm_get_pages() - Get pages and populate GPU SVM pages struct
1369 * @gpusvm: Pointer to the GPU SVM structure
1370 * @svm_pages: The SVM pages to populate. This will contain the dma-addresses
1371 * @mm: The mm corresponding to the CPU range
1372 * @notifier: The corresponding notifier for the given CPU range
1373 * @pages_start: Start CPU address for the pages
1374 * @pages_end: End CPU address for the pages (exclusive)
1375 * @ctx: GPU SVM context
1376 *
1377 * This function gets and maps pages for CPU range and ensures they are
1378 * mapped for DMA access.
1379 *
1380 * Return: 0 on success, negative error code on failure.
1381 */
1382 int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
1383 struct drm_gpusvm_pages *svm_pages,
1384 struct mm_struct *mm,
1385 struct mmu_interval_notifier *notifier,
1386 unsigned long pages_start, unsigned long pages_end,
1387 const struct drm_gpusvm_ctx *ctx)
1388 {
1389 struct hmm_range hmm_range = {
1390 .default_flags = HMM_PFN_REQ_FAULT | (ctx->read_only ? 0 :
1391 HMM_PFN_REQ_WRITE),
1392 .notifier = notifier,
1393 .start = pages_start,
1394 .end = pages_end,
1395 .dev_private_owner = ctx->device_private_page_owner,
1396 };
1397 void *zdd;
1398 unsigned long timeout =
1399 jiffies + msecs_to_jiffies(HMM_RANGE_DEFAULT_TIMEOUT);
1400 unsigned long i, j;
1401 unsigned long npages = npages_in_range(pages_start, pages_end);
1402 unsigned long num_dma_mapped;
1403 unsigned int order = 0;
1404 unsigned long *pfns;
1405 int err = 0;
1406 struct dev_pagemap *pagemap;
1407 struct drm_pagemap *dpagemap;
1408 struct drm_gpusvm_pages_flags flags;
1409 enum dma_data_direction dma_dir = ctx->read_only ? DMA_TO_DEVICE :
1410 DMA_BIDIRECTIONAL;
1411
1412 retry:
1413 if (time_after(jiffies, timeout))
1414 return -EBUSY;
1415
1416 hmm_range.notifier_seq = mmu_interval_read_begin(notifier);
1417 if (drm_gpusvm_pages_valid_unlocked(gpusvm, svm_pages))
1418 goto set_seqno;
1419
1420 pfns = kvmalloc_array(npages, sizeof(*pfns), GFP_KERNEL);
1421 if (!pfns)
1422 return -ENOMEM;
1423
1424 if (!mmget_not_zero(mm)) {
1425 err = -EFAULT;
1426 goto err_free;
1427 }
1428
1429 hmm_range.hmm_pfns = pfns;
1430 while (true) {
1431 mmap_read_lock(mm);
1432 err = hmm_range_fault(&hmm_range);
1433 mmap_read_unlock(mm);
1434
1435 if (err == -EBUSY) {
1436 if (time_after(jiffies, timeout))
1437 break;
1438
1439 hmm_range.notifier_seq =
1440 mmu_interval_read_begin(notifier);
1441 continue;
1442 }
1443 break;
1444 }
1445 mmput(mm);
1446 if (err)
1447 goto err_free;
1448
1449 map_pages:
1450 /*
1451 * Perform all dma mappings under the notifier lock to not
1452 * access freed pages. A notifier will either block on
1453 * the notifier lock or unmap dma.
1454 */
1455 drm_gpusvm_notifier_lock(gpusvm);
1456
1457 flags.__flags = svm_pages->flags.__flags;
1458 if (flags.unmapped) {
1459 drm_gpusvm_notifier_unlock(gpusvm);
1460 err = -EFAULT;
1461 goto err_free;
1462 }
1463
1464 if (mmu_interval_read_retry(notifier, hmm_range.notifier_seq)) {
1465 drm_gpusvm_notifier_unlock(gpusvm);
1466 kvfree(pfns);
1467 goto retry;
1468 }
1469
1470 if (!svm_pages->dma_addr) {
1471 /* Unlock and restart mapping to allocate memory. */
1472 drm_gpusvm_notifier_unlock(gpusvm);
1473 svm_pages->dma_addr =
1474 kvmalloc_array(npages, sizeof(*svm_pages->dma_addr), GFP_KERNEL);
1475 if (!svm_pages->dma_addr) {
1476 err = -ENOMEM;
1477 goto err_free;
1478 }
1479 goto map_pages;
1480 }
1481
1482 zdd = NULL;
1483 pagemap = NULL;
1484 num_dma_mapped = 0;
1485 for (i = 0, j = 0; i < npages; ++j) {
1486 struct page *page = hmm_pfn_to_page(pfns[i]);
1487
1488 order = drm_gpusvm_hmm_pfn_to_order(pfns[i], i, npages);
1489 if (is_device_private_page(page) ||
1490 is_device_coherent_page(page)) {
1491 struct drm_pagemap_zdd *__zdd =

> 1492					drm_pagemap_page_zone_device_data(page);
  1493	
  1494				if (!ctx->allow_mixed &&
  1495				    zdd != __zdd && i > 0) {
  1496					err = -EOPNOTSUPP;
  1497					goto err_unmap;
  1498				}
  1499				zdd = __zdd;
  1500				if (pagemap != page_pgmap(page)) {
  1501					if (i > 0) {
  1502						err = -EOPNOTSUPP;
  1503						goto err_unmap;
  1504					}
  1505	
  1506					pagemap = page_pgmap(page);
  1507					dpagemap = drm_pagemap_page_to_dpagemap(page);
  1508					if (drm_WARN_ON(gpusvm->drm, !dpagemap)) {
  1509						/*
  1510						 * Raced. This is not supposed to happen
  1511						 * since hmm_range_fault() should've migrated
  1512						 * this page to system.
  1513						 */
  1514						err = -EAGAIN;
  1515						goto err_unmap;
  1516					}
  1517				}
  1518				svm_pages->dma_addr[j] =
  1519					dpagemap->ops->device_map(dpagemap,
  1520								  gpusvm->drm->dev,
  1521								  page, order,
  1522								  dma_dir);
  1523				if (dma_mapping_error(gpusvm->drm->dev,
  1524						      svm_pages->dma_addr[j].addr)) {
  1525					err = -EFAULT;
  1526					goto err_unmap;
  1527				}
  1528			} else {
  1529				dma_addr_t addr;
  1530	
  1531				if (is_zone_device_page(page) ||
  1532				    (pagemap && !ctx->allow_mixed)) {
  1533					err = -EOPNOTSUPP;
  1534					goto err_unmap;
  1535				}
  1536	
  1537				if (ctx->devmem_only) {
  1538					err = -EFAULT;
  1539					goto err_unmap;
  1540				}
  1541	
  1542				addr = dma_map_page(gpusvm->drm->dev,
  1543						    page, 0,
  1544						    PAGE_SIZE << order,
  1545						    dma_dir);

1546 if (dma_mapping_error(gpusvm->drm->dev, addr)) {
1547 err = -EFAULT;
1548 goto err_unmap;
1549 }
1550
1551 svm_pages->dma_addr[j] = drm_pagemap_addr_encode
1552 (addr, DRM_INTERCONNECT_SYSTEM, order,
1553 dma_dir);
1554 }
1555 i += 1 << order;
1556 num_dma_mapped = i;
1557 flags.has_dma_mapping = true;
1558 }
1559
1560 if (pagemap) {
1561 flags.has_devmem_pages = true;
1562 drm_pagemap_get(dpagemap);
1563 drm_pagemap_put(svm_pages->dpagemap);
1564 svm_pages->dpagemap = dpagemap;
1565 }
1566
1567 /* WRITE_ONCE pairs with READ_ONCE for opportunistic checks */
1568 WRITE_ONCE(svm_pages->flags.__flags, flags.__flags);
1569
1570 drm_gpusvm_notifier_unlock(gpusvm);
1571 kvfree(pfns);
1572 set_seqno:
1573 svm_pages->notifier_seq = hmm_range.notifier_seq;
1574
1575 return 0;
1576
1577 err_unmap:
1578 __drm_gpusvm_unmap_pages(gpusvm, svm_pages, num_dma_mapped);
1579 drm_gpusvm_notifier_unlock(gpusvm);
1580 err_free:
1581 kvfree(pfns);
1582 if (err == -EAGAIN)
1583 goto retry;
1584 return err;
1585 }
1586 EXPORT_SYMBOL_GPL(drm_gpusvm_get_pages);
1587

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#3 lore raw

Re: [RFC PATCH v2 1/3] drm/pagemap: Add helper to access zone_device_data

In reply to Matthew Brost
kernel test robot noticed the following build errors:

Hi Matthew,

[This is a private test report for your RFC patch.] kernel test robot noticed the following build errors:

[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-misc/drm-misc-next daeinki-drm-exynos/exynos-drm-next drm/drm-next drm-i915/for-linux-next drm-i915/for-linux-next-fixes linus/master v6.19-rc6 next-20260123] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/drm-pagemap-Add-helper-to-access-zone_device_data/20260124-060207
base:   https://gitlab.freedesktop.org/drm/tip.git drm-tip
patch link:    https://lore.kernel.org/r/20260123215907.1643088-2-matthew.brost%40intel.com
patch subject: [RFC PATCH v2 1/3] drm/pagemap: Add helper to access zone_device_data
config: x86_64-randconfig-004-20260124 (https://download.01.org/0day-ci/archive/20260124/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260124/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/drm_gpusvm.c:1492:5: error: call to undeclared function 'drm_pagemap_page_zone_device_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1492 |                                 drm_pagemap_page_zone_device_data(page);
         |                                 ^
   drivers/gpu/drm/drm_gpusvm.c:1492:5: note: did you mean 'drm_pagemap_page_to_dpagemap'?
   include/drm/drm_pagemap.h:264:35: note: 'drm_pagemap_page_to_dpagemap' declared here
     264 | static inline struct drm_pagemap *drm_pagemap_page_to_dpagemap(struct page *page)
         |                                   ^
>> drivers/gpu/drm/drm_gpusvm.c:1491:28: error: incompatible integer to pointer conversion initializing 'struct drm_pagemap_zdd *' with an expression of type 'int' [-Wint-conversion]
    1491 |                         struct drm_pagemap_zdd *__zdd =
         |                                                 ^
    1492 |                                 drm_pagemap_page_zone_device_data(page);
         |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2 errors generated.

vim +/drm_pagemap_page_zone_device_data +1492 drivers/gpu/drm/drm_gpusvm.c

1366
1367 /**
1368 * drm_gpusvm_get_pages() - Get pages and populate GPU SVM pages struct
1369 * @gpusvm: Pointer to the GPU SVM structure
1370 * @svm_pages: The SVM pages to populate. This will contain the dma-addresses
1371 * @mm: The mm corresponding to the CPU range
1372 * @notifier: The corresponding notifier for the given CPU range
1373 * @pages_start: Start CPU address for the pages
1374 * @pages_end: End CPU address for the pages (exclusive)
1375 * @ctx: GPU SVM context
1376 *
1377 * This function gets and maps pages for CPU range and ensures they are
1378 * mapped for DMA access.
1379 *
1380 * Return: 0 on success, negative error code on failure.
1381 */
1382 int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
1383 struct drm_gpusvm_pages *svm_pages,
1384 struct mm_struct *mm,
1385 struct mmu_interval_notifier *notifier,
1386 unsigned long pages_start, unsigned long pages_end,
1387 const struct drm_gpusvm_ctx *ctx)
1388 {
1389 struct hmm_range hmm_range = {
1390 .default_flags = HMM_PFN_REQ_FAULT | (ctx->read_only ? 0 :
1391 HMM_PFN_REQ_WRITE),
1392 .notifier = notifier,
1393 .start = pages_start,
1394 .end = pages_end,
1395 .dev_private_owner = ctx->device_private_page_owner,
1396 };
1397 void *zdd;
1398 unsigned long timeout =
1399 jiffies + msecs_to_jiffies(HMM_RANGE_DEFAULT_TIMEOUT);
1400 unsigned long i, j;
1401 unsigned long npages = npages_in_range(pages_start, pages_end);
1402 unsigned long num_dma_mapped;
1403 unsigned int order = 0;
1404 unsigned long *pfns;
1405 int err = 0;
1406 struct dev_pagemap *pagemap;
1407 struct drm_pagemap *dpagemap;
1408 struct drm_gpusvm_pages_flags flags;
1409 enum dma_data_direction dma_dir = ctx->read_only ? DMA_TO_DEVICE :
1410 DMA_BIDIRECTIONAL;
1411
1412 retry:
1413 if (time_after(jiffies, timeout))
1414 return -EBUSY;
1415
1416 hmm_range.notifier_seq = mmu_interval_read_begin(notifier);
1417 if (drm_gpusvm_pages_valid_unlocked(gpusvm, svm_pages))
1418 goto set_seqno;
1419
1420 pfns = kvmalloc_array(npages, sizeof(*pfns), GFP_KERNEL);
1421 if (!pfns)
1422 return -ENOMEM;
1423
1424 if (!mmget_not_zero(mm)) {
1425 err = -EFAULT;
1426 goto err_free;
1427 }
1428
1429 hmm_range.hmm_pfns = pfns;
1430 while (true) {
1431 mmap_read_lock(mm);
1432 err = hmm_range_fault(&hmm_range);
1433 mmap_read_unlock(mm);
1434
1435 if (err == -EBUSY) {
1436 if (time_after(jiffies, timeout))
1437 break;
1438
1439 hmm_range.notifier_seq =
1440 mmu_interval_read_begin(notifier);
1441 continue;
1442 }
1443 break;
1444 }
1445 mmput(mm);
1446 if (err)
1447 goto err_free;
1448
1449 map_pages:
1450 /*
1451 * Perform all dma mappings under the notifier lock to not
1452 * access freed pages. A notifier will either block on
1453 * the notifier lock or unmap dma.
1454 */
1455 drm_gpusvm_notifier_lock(gpusvm);
1456
1457 flags.__flags = svm_pages->flags.__flags;
1458 if (flags.unmapped) {
1459 drm_gpusvm_notifier_unlock(gpusvm);
1460 err = -EFAULT;
1461 goto err_free;
1462 }
1463
1464 if (mmu_interval_read_retry(notifier, hmm_range.notifier_seq)) {
1465 drm_gpusvm_notifier_unlock(gpusvm);
1466 kvfree(pfns);
1467 goto retry;
1468 }
1469
1470 if (!svm_pages->dma_addr) {
1471 /* Unlock and restart mapping to allocate memory. */
1472 drm_gpusvm_notifier_unlock(gpusvm);
1473 svm_pages->dma_addr =
1474 kvmalloc_array(npages, sizeof(*svm_pages->dma_addr), GFP_KERNEL);
1475 if (!svm_pages->dma_addr) {
1476 err = -ENOMEM;
1477 goto err_free;
1478 }
1479 goto map_pages;
1480 }
1481
1482 zdd = NULL;
1483 pagemap = NULL;
1484 num_dma_mapped = 0;
1485 for (i = 0, j = 0; i < npages; ++j) {
1486 struct page *page = hmm_pfn_to_page(pfns[i]);
1487
1488 order = drm_gpusvm_hmm_pfn_to_order(pfns[i], i, npages);
1489 if (is_device_private_page(page) ||
1490 is_device_coherent_page(page)) {

> 1491				struct drm_pagemap_zdd *__zdd =
> 1492					drm_pagemap_page_zone_device_data(page);
  1493	
  1494				if (!ctx->allow_mixed &&
  1495				    zdd != __zdd && i > 0) {
  1496					err = -EOPNOTSUPP;
  1497					goto err_unmap;
  1498				}
  1499				zdd = __zdd;
  1500				if (pagemap != page_pgmap(page)) {
  1501					if (i > 0) {
  1502						err = -EOPNOTSUPP;
  1503						goto err_unmap;
  1504					}
  1505	
  1506					pagemap = page_pgmap(page);
  1507					dpagemap = drm_pagemap_page_to_dpagemap(page);
  1508					if (drm_WARN_ON(gpusvm->drm, !dpagemap)) {
  1509						/*
  1510						 * Raced. This is not supposed to happen
  1511						 * since hmm_range_fault() should've migrated
  1512						 * this page to system.
  1513						 */
  1514						err = -EAGAIN;
  1515						goto err_unmap;
  1516					}
  1517				}
  1518				svm_pages->dma_addr[j] =
  1519					dpagemap->ops->device_map(dpagemap,
  1520								  gpusvm->drm->dev,
  1521								  page, order,
  1522								  dma_dir);
  1523				if (dma_mapping_error(gpusvm->drm->dev,
  1524						      svm_pages->dma_addr[j].addr)) {
  1525					err = -EFAULT;
  1526					goto err_unmap;
  1527				}
  1528			} else {
  1529				dma_addr_t addr;
  1530	
  1531				if (is_zone_device_page(page) ||
  1532				    (pagemap && !ctx->allow_mixed)) {
  1533					err = -EOPNOTSUPP;
  1534					goto err_unmap;
  1535				}
  1536	
  1537				if (ctx->devmem_only) {
  1538					err = -EFAULT;
  1539					goto err_unmap;
  1540				}
  1541	
  1542				addr = dma_map_page(gpusvm->drm->dev,
  1543						    page, 0,
  1544						    PAGE_SIZE << order,
  1545						    dma_dir);

1546 if (dma_mapping_error(gpusvm->drm->dev, addr)) {
1547 err = -EFAULT;
1548 goto err_unmap;
1549 }
1550
1551 svm_pages->dma_addr[j] = drm_pagemap_addr_encode
1552 (addr, DRM_INTERCONNECT_SYSTEM, order,
1553 dma_dir);
1554 }
1555 i += 1 << order;
1556 num_dma_mapped = i;
1557 flags.has_dma_mapping = true;
1558 }
1559
1560 if (pagemap) {
1561 flags.has_devmem_pages = true;
1562 drm_pagemap_get(dpagemap);
1563 drm_pagemap_put(svm_pages->dpagemap);
1564 svm_pages->dpagemap = dpagemap;
1565 }
1566
1567 /* WRITE_ONCE pairs with READ_ONCE for opportunistic checks */
1568 WRITE_ONCE(svm_pages->flags.__flags, flags.__flags);
1569
1570 drm_gpusvm_notifier_unlock(gpusvm);
1571 kvfree(pfns);
1572 set_seqno:
1573 svm_pages->notifier_seq = hmm_range.notifier_seq;
1574
1575 return 0;
1576
1577 err_unmap:
1578 __drm_gpusvm_unmap_pages(gpusvm, svm_pages, num_dma_mapped);
1579 drm_gpusvm_notifier_unlock(gpusvm);
1580 err_free:
1581 kvfree(pfns);
1582 if (err == -EAGAIN)
1583 goto retry;
1584 return err;
1585 }
1586 EXPORT_SYMBOL_GPL(drm_gpusvm_get_pages);
1587

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#4 lore raw

Re: [RFC PATCH v2 1/3] drm/pagemap: Add helper to access zone_device_data

In reply to Matthew Brost
kernel test robot noticed the following build warnings:

Hi Matthew,

[This is a private test report for your RFC patch.] kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-misc/drm-misc-next daeinki-drm-exynos/exynos-drm-next drm/drm-next drm-i915/for-linux-next drm-i915/for-linux-next-fixes linus/master v6.19-rc6 next-20260123] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/drm-pagemap-Add-helper-to-access-zone_device_data/20260124-060207
base:   https://gitlab.freedesktop.org/drm/tip.git drm-tip
patch link:    https://lore.kernel.org/r/20260123215907.1643088-2-matthew.brost%40intel.com
patch subject: [RFC PATCH v2 1/3] drm/pagemap: Add helper to access zone_device_data
config: riscv-randconfig-001-20260124 (https://download.01.org/0day-ci/archive/20260125/[email protected]/config)
compiler: riscv64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260125/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

drivers/gpu/drm/drm_gpusvm.c: In function 'drm_gpusvm_get_pages':
drivers/gpu/drm/drm_gpusvm.c:1492:5: error: implicit declaration of function 'drm_pagemap_page_zone_device_data'; did you mean 'drm_pagemap_page_to_dpagemap'? [-Werror=implicit-function-declaration]

        drm_pagemap_page_zone_device_data(page);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        drm_pagemap_page_to_dpagemap
>> drivers/gpu/drm/drm_gpusvm.c:1492:5: warning: initialization of 'struct drm_pagemap_zdd *' from 'int' makes pointer from integer without a cast [-Wint-conversion]

cc1: some warnings being treated as errors

vim +1492 drivers/gpu/drm/drm_gpusvm.c

1366
1367 /**
1368 * drm_gpusvm_get_pages() - Get pages and populate GPU SVM pages struct
1369 * @gpusvm: Pointer to the GPU SVM structure
1370 * @svm_pages: The SVM pages to populate. This will contain the dma-addresses
1371 * @mm: The mm corresponding to the CPU range
1372 * @notifier: The corresponding notifier for the given CPU range
1373 * @pages_start: Start CPU address for the pages
1374 * @pages_end: End CPU address for the pages (exclusive)
1375 * @ctx: GPU SVM context
1376 *
1377 * This function gets and maps pages for CPU range and ensures they are
1378 * mapped for DMA access.
1379 *
1380 * Return: 0 on success, negative error code on failure.
1381 */
1382 int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
1383 struct drm_gpusvm_pages *svm_pages,
1384 struct mm_struct *mm,
1385 struct mmu_interval_notifier *notifier,
1386 unsigned long pages_start, unsigned long pages_end,
1387 const struct drm_gpusvm_ctx *ctx)
1388 {
1389 struct hmm_range hmm_range = {
1390 .default_flags = HMM_PFN_REQ_FAULT | (ctx->read_only ? 0 :
1391 HMM_PFN_REQ_WRITE),
1392 .notifier = notifier,
1393 .start = pages_start,
1394 .end = pages_end,
1395 .dev_private_owner = ctx->device_private_page_owner,
1396 };
1397 void *zdd;
1398 unsigned long timeout =
1399 jiffies + msecs_to_jiffies(HMM_RANGE_DEFAULT_TIMEOUT);
1400 unsigned long i, j;
1401 unsigned long npages = npages_in_range(pages_start, pages_end);
1402 unsigned long num_dma_mapped;
1403 unsigned int order = 0;
1404 unsigned long *pfns;
1405 int err = 0;
1406 struct dev_pagemap *pagemap;
1407 struct drm_pagemap *dpagemap;
1408 struct drm_gpusvm_pages_flags flags;
1409 enum dma_data_direction dma_dir = ctx->read_only ? DMA_TO_DEVICE :
1410 DMA_BIDIRECTIONAL;
1411
1412 retry:
1413 if (time_after(jiffies, timeout))
1414 return -EBUSY;
1415
1416 hmm_range.notifier_seq = mmu_interval_read_begin(notifier);
1417 if (drm_gpusvm_pages_valid_unlocked(gpusvm, svm_pages))
1418 goto set_seqno;
1419
1420 pfns = kvmalloc_array(npages, sizeof(*pfns), GFP_KERNEL);
1421 if (!pfns)
1422 return -ENOMEM;
1423
1424 if (!mmget_not_zero(mm)) {
1425 err = -EFAULT;
1426 goto err_free;
1427 }
1428
1429 hmm_range.hmm_pfns = pfns;
1430 while (true) {
1431 mmap_read_lock(mm);
1432 err = hmm_range_fault(&hmm_range);
1433 mmap_read_unlock(mm);
1434
1435 if (err == -EBUSY) {
1436 if (time_after(jiffies, timeout))
1437 break;
1438
1439 hmm_range.notifier_seq =
1440 mmu_interval_read_begin(notifier);
1441 continue;
1442 }
1443 break;
1444 }
1445 mmput(mm);
1446 if (err)
1447 goto err_free;
1448
1449 map_pages:
1450 /*
1451 * Perform all dma mappings under the notifier lock to not
1452 * access freed pages. A notifier will either block on
1453 * the notifier lock or unmap dma.
1454 */
1455 drm_gpusvm_notifier_lock(gpusvm);
1456
1457 flags.__flags = svm_pages->flags.__flags;
1458 if (flags.unmapped) {
1459 drm_gpusvm_notifier_unlock(gpusvm);
1460 err = -EFAULT;
1461 goto err_free;
1462 }
1463
1464 if (mmu_interval_read_retry(notifier, hmm_range.notifier_seq)) {
1465 drm_gpusvm_notifier_unlock(gpusvm);
1466 kvfree(pfns);
1467 goto retry;
1468 }
1469
1470 if (!svm_pages->dma_addr) {
1471 /* Unlock and restart mapping to allocate memory. */
1472 drm_gpusvm_notifier_unlock(gpusvm);
1473 svm_pages->dma_addr =
1474 kvmalloc_array(npages, sizeof(*svm_pages->dma_addr), GFP_KERNEL);
1475 if (!svm_pages->dma_addr) {
1476 err = -ENOMEM;
1477 goto err_free;
1478 }
1479 goto map_pages;
1480 }
1481
1482 zdd = NULL;
1483 pagemap = NULL;
1484 num_dma_mapped = 0;
1485 for (i = 0, j = 0; i < npages; ++j) {
1486 struct page *page = hmm_pfn_to_page(pfns[i]);
1487
1488 order = drm_gpusvm_hmm_pfn_to_order(pfns[i], i, npages);
1489 if (is_device_private_page(page) ||
1490 is_device_coherent_page(page)) {
1491 struct drm_pagemap_zdd *__zdd =

> 1492					drm_pagemap_page_zone_device_data(page);
  1493	
  1494				if (!ctx->allow_mixed &&
  1495				    zdd != __zdd && i > 0) {
  1496					err = -EOPNOTSUPP;
  1497					goto err_unmap;
  1498				}
  1499				zdd = __zdd;
  1500				if (pagemap != page_pgmap(page)) {
  1501					if (i > 0) {
  1502						err = -EOPNOTSUPP;
  1503						goto err_unmap;
  1504					}
  1505	
  1506					pagemap = page_pgmap(page);
  1507					dpagemap = drm_pagemap_page_to_dpagemap(page);
  1508					if (drm_WARN_ON(gpusvm->drm, !dpagemap)) {
  1509						/*
  1510						 * Raced. This is not supposed to happen
  1511						 * since hmm_range_fault() should've migrated
  1512						 * this page to system.
  1513						 */
  1514						err = -EAGAIN;
  1515						goto err_unmap;
  1516					}
  1517				}
  1518				svm_pages->dma_addr[j] =
  1519					dpagemap->ops->device_map(dpagemap,
  1520								  gpusvm->drm->dev,
  1521								  page, order,
  1522								  dma_dir);
  1523				if (dma_mapping_error(gpusvm->drm->dev,
  1524						      svm_pages->dma_addr[j].addr)) {
  1525					err = -EFAULT;
  1526					goto err_unmap;
  1527				}
  1528			} else {
  1529				dma_addr_t addr;
  1530	
  1531				if (is_zone_device_page(page) ||
  1532				    (pagemap && !ctx->allow_mixed)) {
  1533					err = -EOPNOTSUPP;
  1534					goto err_unmap;
  1535				}
  1536	
  1537				if (ctx->devmem_only) {
  1538					err = -EFAULT;
  1539					goto err_unmap;
  1540				}
  1541	
  1542				addr = dma_map_page(gpusvm->drm->dev,
  1543						    page, 0,
  1544						    PAGE_SIZE << order,
  1545						    dma_dir);

1546 if (dma_mapping_error(gpusvm->drm->dev, addr)) {
1547 err = -EFAULT;
1548 goto err_unmap;
1549 }
1550
1551 svm_pages->dma_addr[j] = drm_pagemap_addr_encode
1552 (addr, DRM_INTERCONNECT_SYSTEM, order,
1553 dma_dir);
1554 }
1555 i += 1 << order;
1556 num_dma_mapped = i;
1557 flags.has_dma_mapping = true;
1558 }
1559
1560 if (pagemap) {
1561 flags.has_devmem_pages = true;
1562 drm_pagemap_get(dpagemap);
1563 drm_pagemap_put(svm_pages->dpagemap);
1564 svm_pages->dpagemap = dpagemap;
1565 }
1566
1567 /* WRITE_ONCE pairs with READ_ONCE for opportunistic checks */
1568 WRITE_ONCE(svm_pages->flags.__flags, flags.__flags);
1569
1570 drm_gpusvm_notifier_unlock(gpusvm);
1571 kvfree(pfns);
1572 set_seqno:
1573 svm_pages->notifier_seq = hmm_range.notifier_seq;
1574
1575 return 0;
1576
1577 err_unmap:
1578 __drm_gpusvm_unmap_pages(gpusvm, svm_pages, num_dma_mapped);
1579 drm_gpusvm_notifier_unlock(gpusvm);
1580 err_free:
1581 kvfree(pfns);
1582 if (err == -EAGAIN)
1583 goto retry;
1584 return err;
1585 }
1586 EXPORT_SYMBOL_GPL(drm_gpusvm_get_pages);
1587

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
author maintainer
#5 lore raw

RFC PATCH v2 2/3 drm/gpusvm: Use new dma-map IOVA alloc, link, and sync API in GPU SVM

In reply to Matthew Brost

The dma-map IOVA alloc, link, and sync APIs perform significantly better than dma-map / dma-unmap, as they avoid costly IOMMU synchronizations. This difference is especially noticeable when mapping a 2MB region in 4KB pages.

Use the IOVA alloc, link, and sync APIs for GPU SVM, which create DMA mappings between the CPU and GPU.

---
 drivers/gpu/drm/drm_gpusvm.c | 63 +++++++++++++++++++++++++-----------
 include/drm/drm_gpusvm.h     |  3 ++
 2 files changed, 47 insertions(+), 19 deletions(-)
drivers/gpu/drm/drm_gpusvm.c +44 -19
index 585d913d3d19..eff764445108 100644
@@ -1139,19 +1139,26 @@ static void __drm_gpusvm_unmap_pages(struct drm_gpusvm *gpusvm,
 		struct drm_gpusvm_pages_flags flags = {
 			.__flags = svm_pages->flags.__flags,
 		};
+		struct dma_iova_state __state = {};
 
-		for (i = 0, j = 0; i < npages; j++) {
-			struct drm_pagemap_addr *addr = &svm_pages->dma_addr[j];
-
-			if (addr->proto == DRM_INTERCONNECT_SYSTEM)
-				dma_unmap_page(dev,
-					       addr->addr,
-					       PAGE_SIZE << addr->order,
-					       addr->dir);
-			else if (dpagemap && dpagemap->ops->device_unmap)
-				dpagemap->ops->device_unmap(dpagemap,
-							    dev, *addr);
-			i += 1 << addr->order;
+		if (dma_use_iova(&svm_pages->state)) {
+			dma_iova_destroy(dev, &svm_pages->state,
+					 npages * PAGE_SIZE,
+					 svm_pages->dma_addr[0].dir, 0);
+		} else {
+			for (i = 0, j = 0; i < npages; j++) {
+				struct drm_pagemap_addr *addr = &svm_pages->dma_addr[j];
+
+				if (addr->proto == DRM_INTERCONNECT_SYSTEM)
+					dma_unmap_page(dev,
+						       addr->addr,
+						       PAGE_SIZE << addr->order,
+						       addr->dir);
+				else if (dpagemap && dpagemap->ops->device_unmap)
+					dpagemap->ops->device_unmap(dpagemap,
+								    dev, *addr);
+				i += 1 << addr->order;
+			}
 		}
 
 		/* WRITE_ONCE pairs with READ_ONCE for opportunistic checks */
@@ -1161,6 +1168,7 @@ static void __drm_gpusvm_unmap_pages(struct drm_gpusvm *gpusvm,
 
 		drm_pagemap_put(svm_pages->dpagemap);
 		svm_pages->dpagemap = NULL;
+		svm_pages->state = __state;
 	}
 }
 
@@ -1408,6 +1416,7 @@ int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
 	struct drm_gpusvm_pages_flags flags;
 	enum dma_data_direction dma_dir = ctx->read_only ? DMA_TO_DEVICE :
 							   DMA_BIDIRECTIONAL;
+	struct dma_iova_state *state = &svm_pages->state;
 
 retry:
 	if (time_after(jiffies, timeout))
@@ -1539,13 +1548,29 @@ int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
 				goto err_unmap;
 			}
 
-			addr = dma_map_page(gpusvm->drm->dev,
-					    page, 0,
-					    PAGE_SIZE << order,
-					    dma_dir);
-			if (dma_mapping_error(gpusvm->drm->dev, addr)) {
-				err = -EFAULT;
-				goto err_unmap;
+			if (!i)
+				dma_iova_try_alloc(gpusvm->drm->dev, state, 0,
+						   npages * PAGE_SIZE);
+
+			if (dma_use_iova(state)) {
+				err = dma_iova_link(gpusvm->drm->dev, state,
+						    page_to_phys(page),
+						    i * PAGE_SIZE,
+						    PAGE_SIZE << order,
+						    dma_dir, 0);
+				if (err)
+					goto err_unmap;
+
+				addr = state->addr + i * PAGE_SIZE;
+			} else {
+				addr = dma_map_page(gpusvm->drm->dev,
+						    page, 0,
+						    PAGE_SIZE << order,
+						    dma_dir);
+				if (dma_mapping_error(gpusvm->drm->dev, addr)) {
+					err = -EFAULT;
+					goto err_unmap;
+				}
 			}
 
 			svm_pages->dma_addr[j] = drm_pagemap_addr_encode
include/drm/drm_gpusvm.h +3 -0
index 2578ac92a8d4..6772d8a92788 100644
@@ -6,6 +6,7 @@
 #ifndef __DRM_GPUSVM_H__
 #define __DRM_GPUSVM_H__
 
+#include <linux/dma-mapping.h>
 #include <linux/kref.h>
 #include <linux/interval_tree.h>
 #include <linux/mmu_notifier.h>
@@ -136,6 +137,7 @@ struct drm_gpusvm_pages_flags {
  * @dma_addr: Device address array
  * @dpagemap: The struct drm_pagemap of the device pages we're dma-mapping.
  *            Note this is assuming only one drm_pagemap per range is allowed.
+ * @state: DMA IOVA state for mapping.
  * @notifier_seq: Notifier sequence number of the range's pages
  * @flags: Flags for range
  * @flags.migrate_devmem: Flag indicating whether the range can be migrated to device memory
@@ -147,6 +149,7 @@ struct drm_gpusvm_pages_flags {
 struct drm_gpusvm_pages {
 	struct drm_pagemap_addr *dma_addr;
 	struct drm_pagemap *dpagemap;
+	struct dma_iova_state state;
 	unsigned long notifier_seq;
 	struct drm_gpusvm_pages_flags flags;
 };
Signature · 1 line
2.34.1
author maintainer
#6 lore raw

RFC PATCH v2 3/3 drm/pagemap: Use new dma-map IOVA alloc, link, and sync API for DRM pagemap

In reply to Matthew Brost

The dma-map IOVA alloc, link, and sync APIs perform significantly better than dma-map / dma-unmap, as they avoid costly IOMMU synchronizations. This difference is especially noticeable when mapping a 2MB region in 4KB pages.

Use the IOVA alloc, link, and sync APIs for DRM pagemap, which create DMA mappings between the CPU and GPU for copying data.

---
 drivers/gpu/drm/drm_pagemap.c | 135 ++++++++++++++++++++++++++--------
 1 file changed, 105 insertions(+), 30 deletions(-)
drivers/gpu/drm/drm_pagemap.c +105 -30
index 2c67aabd8d65..a4749aa77964 100644
@@ -213,6 +213,7 @@ static void drm_pagemap_get_devmem_page(struct page *page,
  * @npages: Number of system pages or peer pages to map.
  * @dir: Direction of data transfer (e.g., DMA_BIDIRECTIONAL)
  * @mdetails: Details governing the migration behaviour.
+ * @state: DMA IOVA state for mapping.
  *
  * This function maps pages of memory for migration usage in GPU SVM. It
  * iterates over each page frame number provided in @migrate_pfn, maps the
@@ -227,27 +228,46 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
 					 unsigned long *migrate_pfn,
 					 unsigned long npages,
 					 enum dma_data_direction dir,
-					 const struct drm_pagemap_migrate_details *mdetails)
+					 const struct drm_pagemap_migrate_details *mdetails,
+					 struct dma_iova_state *state)
 {
-	unsigned long num_peer_pages = 0, num_local_pages = 0, i;
+	unsigned long num_peer_pages = 0, num_local_pages = 0, psize, i;
+	struct page *dummy_page = NULL;
+	bool try_alloc = false, device_private = false;
+	int err = 0;
 
 	for (i = 0; i < npages;) {
 		struct page *page = migrate_pfn_to_page(migrate_pfn[i]);
-		dma_addr_t dma_addr;
-		struct folio *folio;
+		dma_addr_t dma_addr = -1;
 		unsigned int order = 0;
 
-		if (!page)
+		/*
+		 * This loop is a bit goofy, but if IOVA linking is used, the
+		 * entire IOVA range must be populated with physical addresses.
+		 * The first page we find, dummy_page, is therefore used to
+		 * ensure every address in the IOVA range is populated.
+		 */
+
+		if (!page && (device_private || !dummy_page))
 			goto next;
 
-		folio = page_folio(page);
-		order = folio_order(folio);
+		if (!page) {
+			page = dummy_page;
+			psize = PAGE_SIZE;
+		} else {
+			struct folio *folio;
+
+			folio = page_folio(page);
+			order = folio_order(folio);
+			psize = page_size(page);
+		}
 
 		if (is_device_private_page(page)) {
 			struct drm_pagemap_zdd *zdd = drm_pagemap_page_zone_device_data(page);
 			struct drm_pagemap *dpagemap = zdd->dpagemap;
 			struct drm_pagemap_addr addr;
 
+			device_private = true;
 			if (dpagemap == local_dpagemap) {
 				if (!mdetails->can_migrate_same_pagemap)
 					goto next;
@@ -263,28 +283,68 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
 
 			pagemap_addr[i] = addr;
 		} else {
-			dma_addr = dma_map_page(dev, page, 0, page_size(page), dir);
-			if (dma_mapping_error(dev, dma_addr))
-				return -EFAULT;
+			if (!try_alloc) {
+				dma_iova_try_alloc(dev, state, 0,
+						   npages * PAGE_SIZE);
+				try_alloc = true;
+			}
+
+			if (dma_use_iova(state)) {
+				bool found_dummy = page && !dummy_page;
+
+				if (found_dummy) {
+					unsigned long j;
 
-			pagemap_addr[i] =
-				drm_pagemap_addr_encode(dma_addr,
-							DRM_INTERCONNECT_SYSTEM,
-							order, dir);
+					for (j = 0; j < i; ++j) {
+						err = dma_iova_link(dev, state,
+								    page_to_phys(page),
+								    j * PAGE_SIZE,
+								    PAGE_SIZE,
+								    dir, 0);
+						if (err)
+							return err;
+					}
+				}
+
+				err = dma_iova_link(dev, state, page_to_phys(page),
+						    i * PAGE_SIZE, psize,
+						    dir, 0);
+				if (err)
+					return err;
+
+				if (page != dummy_page)
+					dma_addr = state->addr + i * PAGE_SIZE;
+
+				if (found_dummy)
+					dummy_page = page;
+
+			} else {
+				dma_addr = dma_map_page(dev, page, 0, psize, dir);
+				if (dma_mapping_error(dev, dma_addr))
+					return -EFAULT;
+			}
+
+			if (dma_addr != -1)
+				pagemap_addr[i] =
+					drm_pagemap_addr_encode(dma_addr,
+								DRM_INTERCONNECT_SYSTEM,
+								order, dir);
 		}
 
 next:
 		i += NR_PAGES(order);
 	}
 
-	if (num_peer_pages)
+	if (dma_use_iova(state))
+		err = dma_iova_sync(dev, state, 0, npages * PAGE_SIZE);
+	if (!err && num_peer_pages)
 		drm_dbg(local_dpagemap->drm, "Migrating %lu peer pages over interconnect.\n",
 			num_peer_pages);
-	if (num_local_pages)
+	if (!err && num_local_pages)
 		drm_dbg(local_dpagemap->drm, "Migrating %lu local pages over interconnect.\n",
 			num_local_pages);
 
-	return 0;
+	return err;
 }
 
 /**
@@ -295,6 +355,7 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
  * @pagemap_addr: Array of DMA information corresponding to mapped pages
  * @npages: Number of pages to unmap
  * @dir: Direction of data transfer (e.g., DMA_BIDIRECTIONAL)
+ * @state: DMA IOVA state for mapping.
  *
  * This function unmaps previously mapped pages of memory for GPU Shared Virtual
  * Memory (SVM). It iterates over each DMA address provided in @dma_addr, checks
@@ -304,10 +365,16 @@ static void drm_pagemap_migrate_unmap_pages(struct device *dev,
 					    struct drm_pagemap_addr *pagemap_addr,
 					    unsigned long *migrate_pfn,
 					    unsigned long npages,
-					    enum dma_data_direction dir)
+					    enum dma_data_direction dir,
+					    struct dma_iova_state *state)
 {
 	unsigned long i;
 
+	if (dma_use_iova(state)) {
+		dma_iova_destroy(dev, state, npages * PAGE_SIZE, dir, 0);
+		return;
+	}
+
 	for (i = 0; i < npages;) {
 		struct page *page = migrate_pfn_to_page(migrate_pfn[i]);
 
@@ -344,12 +411,14 @@ drm_pagemap_migrate_remote_to_local(struct drm_pagemap_devmem *devmem,
 				    struct drm_pagemap_addr pagemap_addr[],
 				    unsigned long npages,
 				    const struct drm_pagemap_devmem_ops *ops,
-				    const struct drm_pagemap_migrate_details *mdetails)
+				    const struct drm_pagemap_migrate_details *mdetails,
+				    struct dma_iova_state *state)
 
 {
 	int err = drm_pagemap_migrate_map_pages(remote_device, remote_dpagemap,
 						pagemap_addr, local_pfns,
-						npages, DMA_FROM_DEVICE, mdetails);
+						npages, DMA_FROM_DEVICE,
+						mdetails, state);
 
 	if (err)
 		goto out;
@@ -358,7 +427,7 @@ drm_pagemap_migrate_remote_to_local(struct drm_pagemap_devmem *devmem,
 			       devmem->pre_migrate_fence);
 out:
 	drm_pagemap_migrate_unmap_pages(remote_device, pagemap_addr, local_pfns,
-					npages, DMA_FROM_DEVICE);
+					npages, DMA_FROM_DEVICE, state);
 	return err;
 }
 
@@ -369,11 +438,12 @@ drm_pagemap_migrate_sys_to_dev(struct drm_pagemap_devmem *devmem,
 			       struct drm_pagemap_addr pagemap_addr[],
 			       unsigned long npages,
 			       const struct drm_pagemap_devmem_ops *ops,
-			       const struct drm_pagemap_migrate_details *mdetails)
+			       const struct drm_pagemap_migrate_details *mdetails,
+			       struct dma_iova_state *state)
 {
 	int err = drm_pagemap_migrate_map_pages(devmem->dev, devmem->dpagemap,
 						pagemap_addr, sys_pfns, npages,
-						DMA_TO_DEVICE, mdetails);
+						DMA_TO_DEVICE, mdetails, state);
 
 	if (err)
 		goto out;
@@ -382,7 +452,7 @@ drm_pagemap_migrate_sys_to_dev(struct drm_pagemap_devmem *devmem,
 				  devmem->pre_migrate_fence);
 out:
 	drm_pagemap_migrate_unmap_pages(devmem->dev, pagemap_addr, sys_pfns, npages,
-					DMA_TO_DEVICE);
+					DMA_TO_DEVICE, state);
 	return err;
 }
 
@@ -410,6 +480,7 @@ static int drm_pagemap_migrate_range(struct drm_pagemap_devmem *devmem,
 				     const struct migrate_range_loc *cur,
 				     const struct drm_pagemap_migrate_details *mdetails)
 {
+	struct dma_iova_state state = {};
 	int ret = 0;
 
 	if (cur->start == 0)
@@ -429,7 +500,8 @@ static int drm_pagemap_migrate_range(struct drm_pagemap_devmem *devmem,
 							  &pages[last->start],
 							  &pagemap_addr[last->start],
 							  cur->start - last->start,
-							  last->ops, mdetails);
+							  last->ops, mdetails,
+							  &state);
 
 	else
 		ret = drm_pagemap_migrate_sys_to_dev(devmem,
@@ -437,7 +509,7 @@ static int drm_pagemap_migrate_range(struct drm_pagemap_devmem *devmem,
 						     &pages[last->start],
 						     &pagemap_addr[last->start],
 						     cur->start - last->start,
-						     last->ops, mdetails);
+						     last->ops, mdetails, &state);
 
 out:
 	*last = *cur;
@@ -955,6 +1027,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
 {
 	const struct drm_pagemap_devmem_ops *ops = devmem_allocation->ops;
 	struct drm_pagemap_migrate_details mdetails = {};
+	struct dma_iova_state state = {};
 	unsigned long npages, mpages = 0;
 	struct page **pages;
 	unsigned long *src, *dst;
@@ -996,7 +1069,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
 	err = drm_pagemap_migrate_map_pages(devmem_allocation->dev,
 					    devmem_allocation->dpagemap, pagemap_addr,
 					    dst, npages, DMA_FROM_DEVICE,
-					    &mdetails);
+					    &mdetails, &state);
 	if (err)
 		goto err_finalize;
 
@@ -1013,7 +1086,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
 	migrate_device_pages(src, dst, npages);
 	migrate_device_finalize(src, dst, npages);
 	drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, pagemap_addr, dst, npages,
-					DMA_FROM_DEVICE);
+					DMA_FROM_DEVICE, &state);
 
 err_free:
 	kvfree(buf);
@@ -1058,6 +1131,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
 		.fault_page	= page,
 	};
 	struct drm_pagemap_migrate_details mdetails = {};
+	struct dma_iova_state state = {};
 	struct drm_pagemap_zdd *zdd;
 	const struct drm_pagemap_devmem_ops *ops;
 	struct device *dev = NULL;
@@ -1116,7 +1190,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
 		goto err_finalize;
 
 	err = drm_pagemap_migrate_map_pages(dev, zdd->dpagemap, pagemap_addr, migrate.dst, npages,
-					    DMA_FROM_DEVICE, &mdetails);
+					    DMA_FROM_DEVICE, &mdetails, &state);
 	if (err)
 		goto err_finalize;
 
@@ -1134,7 +1208,8 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
 	migrate_vma_finalize(&migrate);
 	if (dev)
 		drm_pagemap_migrate_unmap_pages(dev, pagemap_addr, migrate.dst,
-						npages, DMA_FROM_DEVICE);
+						npages, DMA_FROM_DEVICE,
+						&state);
 err_free:
 	kvfree(buf);
 err_out:
Signature · 1 line
2.34.1
#7 lore raw

✗ CI.checkpatch: warning for Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap (rev2)

In reply to Matthew Brost
== Series Details ==

== Series Details ==

Series: Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap (rev2)
URL : https://patchwork.freedesktop.org/series/160587/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 1f57ba1afceae32108bd24770069f764d940a0e4
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit cc6f00405301c3a32b4585dd3b60d2e7c146e633

Author: Matthew Brost <[email protected]>
Date:   Fri Jan 23 13:59:07 2026 -0800

drm/pagemap: Use new dma-map IOVA alloc, link, and sync API for DRM pagemap

The dma-map IOVA alloc, link, and sync APIs perform significantly better than dma-map / dma-unmap, as they avoid costly IOMMU synchronizations. This difference is especially noticeable when mapping a 2MB region in 4KB pages.

Use the IOVA alloc, link, and sync APIs for DRM pagemap, which create DMA mappings between the CPU and GPU for copying data.

+ /mt/dim checkpatch a0ea91e77badad299c63216a93999551ea2a02f0 drm-intel 26e937287585 drm/pagemap: Add helper to access zone_device_data 3a9a94d8ffc9 drm/gpusvm: Use new dma-map IOVA alloc, link, and sync API in GPU SVM cc6f00405301 drm/pagemap: Use new dma-map IOVA alloc, link, and sync API for DRM pagemap -:112: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #112: FILE: drivers/gpu/drm/drm_pagemap.c:304:
+ if (err)

total: 0 errors, 1 warnings, 0 checks, 279 lines checked

#8 lore raw

✓ CI.KUnit: success for Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap (rev2)

In reply to Matthew Brost
== Series Details ==

== Series Details ==

Series: Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap (rev2)
URL : https://patchwork.freedesktop.org/series/160587/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [22:13:30] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[22:13:34] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[22:14:06] Starting KUnit Kernel (1/1)...
[22:14:06] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:14:06] ================== guc_buf (11 subtests) ===================
[22:14:06] [PASSED] test_smallest
[22:14:06] [PASSED] test_largest
[22:14:06] [PASSED] test_granular
[22:14:06] [PASSED] test_unique
[22:14:06] [PASSED] test_overlap
[22:14:06] [PASSED] test_reusable
[22:14:06] [PASSED] test_too_big
[22:14:06] [PASSED] test_flush
[22:14:06] [PASSED] test_lookup
[22:14:06] [PASSED] test_data
[22:14:06] [PASSED] test_class
[22:14:06] ===================== [PASSED] guc_buf =====================
[22:14:06] =================== guc_dbm (7 subtests) ===================
[22:14:06] [PASSED] test_empty
[22:14:06] [PASSED] test_default
[22:14:06] ======================== test_size  ========================
[22:14:06] [PASSED] 4
[22:14:06] [PASSED] 8
[22:14:06] [PASSED] 32
[22:14:06] [PASSED] 256
[22:14:06] ==================== [PASSED] test_size ====================
[22:14:06] ======================= test_reuse  ========================
[22:14:06] [PASSED] 4
[22:14:06] [PASSED] 8
[22:14:06] [PASSED] 32
[22:14:06] [PASSED] 256
[22:14:06] =================== [PASSED] test_reuse ====================
[22:14:06] =================== test_range_overlap  ====================
[22:14:06] [PASSED] 4
[22:14:06] [PASSED] 8
[22:14:06] [PASSED] 32
[22:14:06] [PASSED] 256
[22:14:06] =============== [PASSED] test_range_overlap ================
[22:14:06] =================== test_range_compact  ====================
[22:14:06] [PASSED] 4
[22:14:06] [PASSED] 8
[22:14:06] [PASSED] 32
[22:14:06] [PASSED] 256
[22:14:06] =============== [PASSED] test_range_compact ================
[22:14:06] ==================== test_range_spare  =====================
[22:14:06] [PASSED] 4
[22:14:06] [PASSED] 8
[22:14:06] [PASSED] 32
[22:14:06] [PASSED] 256
[22:14:06] ================ [PASSED] test_range_spare =================
[22:14:06] ===================== [PASSED] guc_dbm =====================
[22:14:06] =================== guc_idm (6 subtests) ===================
[22:14:06] [PASSED] bad_init
[22:14:06] [PASSED] no_init
[22:14:06] [PASSED] init_fini
[22:14:06] [PASSED] check_used
[22:14:06] [PASSED] check_quota
[22:14:06] [PASSED] check_all
[22:14:06] ===================== [PASSED] guc_idm =====================
[22:14:06] ================== no_relay (3 subtests) ===================
[22:14:06] [PASSED] xe_drops_guc2pf_if_not_ready
[22:14:06] [PASSED] xe_drops_guc2vf_if_not_ready
[22:14:06] [PASSED] xe_rejects_send_if_not_ready
[22:14:06] ==================== [PASSED] no_relay =====================
[22:14:06] ================== pf_relay (14 subtests) ==================
[22:14:06] [PASSED] pf_rejects_guc2pf_too_short
[22:14:06] [PASSED] pf_rejects_guc2pf_too_long
[22:14:06] [PASSED] pf_rejects_guc2pf_no_payload
[22:14:06] [PASSED] pf_fails_no_payload
[22:14:06] [PASSED] pf_fails_bad_origin
[22:14:06] [PASSED] pf_fails_bad_type
[22:14:06] [PASSED] pf_txn_reports_error
[22:14:06] [PASSED] pf_txn_sends_pf2guc
[22:14:06] [PASSED] pf_sends_pf2guc
[22:14:06] [SKIPPED] pf_loopback_nop
[22:14:06] [SKIPPED] pf_loopback_echo
[22:14:06] [SKIPPED] pf_loopback_fail
[22:14:06] [SKIPPED] pf_loopback_busy
[22:14:06] [SKIPPED] pf_loopback_retry
[22:14:06] ==================== [PASSED] pf_relay =====================
[22:14:06] ================== vf_relay (3 subtests) ===================
[22:14:06] [PASSED] vf_rejects_guc2vf_too_short
[22:14:06] [PASSED] vf_rejects_guc2vf_too_long
[22:14:06] [PASSED] vf_rejects_guc2vf_no_payload
[22:14:06] ==================== [PASSED] vf_relay =====================
[22:14:06] ================ pf_gt_config (6 subtests) =================
[22:14:06] [PASSED] fair_contexts_1vf
[22:14:06] [PASSED] fair_doorbells_1vf
[22:14:06] [PASSED] fair_ggtt_1vf
[22:14:06] ====================== fair_contexts  ======================
[22:14:06] [PASSED] 1 VF
[22:14:06] [PASSED] 2 VFs
[22:14:06] [PASSED] 3 VFs
[22:14:06] [PASSED] 4 VFs
[22:14:06] [PASSED] 5 VFs
[22:14:06] [PASSED] 6 VFs
[22:14:06] [PASSED] 7 VFs
[22:14:06] [PASSED] 8 VFs
[22:14:06] [PASSED] 9 VFs
[22:14:06] [PASSED] 10 VFs
[22:14:06] [PASSED] 11 VFs
[22:14:06] [PASSED] 12 VFs
[22:14:06] [PASSED] 13 VFs
[22:14:06] [PASSED] 14 VFs
[22:14:06] [PASSED] 15 VFs
[22:14:06] [PASSED] 16 VFs
[22:14:06] [PASSED] 17 VFs
[22:14:06] [PASSED] 18 VFs
[22:14:06] [PASSED] 19 VFs
[22:14:06] [PASSED] 20 VFs
[22:14:06] [PASSED] 21 VFs
[22:14:06] [PASSED] 22 VFs
[22:14:06] [PASSED] 23 VFs
[22:14:06] [PASSED] 24 VFs
[22:14:06] [PASSED] 25 VFs
[22:14:06] [PASSED] 26 VFs
[22:14:06] [PASSED] 27 VFs
[22:14:06] [PASSED] 28 VFs
[22:14:06] [PASSED] 29 VFs
[22:14:06] [PASSED] 30 VFs
[22:14:06] [PASSED] 31 VFs
[22:14:06] [PASSED] 32 VFs
[22:14:06] [PASSED] 33 VFs
[22:14:06] [PASSED] 34 VFs
[22:14:06] [PASSED] 35 VFs
[22:14:06] [PASSED] 36 VFs
[22:14:06] [PASSED] 37 VFs
[22:14:06] [PASSED] 38 VFs
[22:14:06] [PASSED] 39 VFs
[22:14:06] [PASSED] 40 VFs
[22:14:06] [PASSED] 41 VFs
[22:14:06] [PASSED] 42 VFs
[22:14:06] [PASSED] 43 VFs
[22:14:06] [PASSED] 44 VFs
[22:14:06] [PASSED] 45 VFs
[22:14:06] [PASSED] 46 VFs
[22:14:06] [PASSED] 47 VFs
[22:14:06] [PASSED] 48 VFs
[22:14:06] [PASSED] 49 VFs
[22:14:06] [PASSED] 50 VFs
[22:14:06] [PASSED] 51 VFs
[22:14:06] [PASSED] 52 VFs
[22:14:06] [PASSED] 53 VFs
[22:14:06] [PASSED] 54 VFs
[22:14:06] [PASSED] 55 VFs
[22:14:06] [PASSED] 56 VFs
[22:14:06] [PASSED] 57 VFs
[22:14:06] [PASSED] 58 VFs
[22:14:06] [PASSED] 59 VFs
[22:14:06] [PASSED] 60 VFs
[22:14:06] [PASSED] 61 VFs
[22:14:06] [PASSED] 62 VFs
[22:14:06] [PASSED] 63 VFs
[22:14:06] ================== [PASSED] fair_contexts ==================
[22:14:06] ===================== fair_doorbells  ======================
[22:14:06] [PASSED] 1 VF
[22:14:06] [PASSED] 2 VFs
[22:14:06] [PASSED] 3 VFs
[22:14:06] [PASSED] 4 VFs
[22:14:06] [PASSED] 5 VFs
[22:14:06] [PASSED] 6 VFs
[22:14:06] [PASSED] 7 VFs
[22:14:06] [PASSED] 8 VFs
[22:14:06] [PASSED] 9 VFs
[22:14:06] [PASSED] 10 VFs
[22:14:06] [PASSED] 11 VFs
[22:14:06] [PASSED] 12 VFs
[22:14:06] [PASSED] 13 VFs
[22:14:06] [PASSED] 14 VFs
[22:14:06] [PASSED] 15 VFs
[22:14:06] [PASSED] 16 VFs
[22:14:06] [PASSED] 17 VFs
[22:14:06] [PASSED] 18 VFs
[22:14:06] [PASSED] 19 VFs
[22:14:06] [PASSED] 20 VFs
[22:14:06] [PASSED] 21 VFs
[22:14:06] [PASSED] 22 VFs
[22:14:06] [PASSED] 23 VFs
[22:14:06] [PASSED] 24 VFs
[22:14:06] [PASSED] 25 VFs
[22:14:06] [PASSED] 26 VFs
[22:14:06] [PASSED] 27 VFs
[22:14:06] [PASSED] 28 VFs
[22:14:06] [PASSED] 29 VFs
[22:14:06] [PASSED] 30 VFs
[22:14:06] [PASSED] 31 VFs
[22:14:06] [PASSED] 32 VFs
[22:14:06] [PASSED] 33 VFs
[22:14:06] [PASSED] 34 VFs
[22:14:06] [PASSED] 35 VFs
[22:14:06] [PASSED] 36 VFs
[22:14:06] [PASSED] 37 VFs
[22:14:06] [PASSED] 38 VFs
[22:14:06] [PASSED] 39 VFs
[22:14:06] [PASSED] 40 VFs
[22:14:06] [PASSED] 41 VFs
[22:14:06] [PASSED] 42 VFs
[22:14:06] [PASSED] 43 VFs
[22:14:06] [PASSED] 44 VFs
[22:14:06] [PASSED] 45 VFs
[22:14:06] [PASSED] 46 VFs
[22:14:06] [PASSED] 47 VFs
[22:14:06] [PASSED] 48 VFs
[22:14:06] [PASSED] 49 VFs
[22:14:06] [PASSED] 50 VFs
[22:14:06] [PASSED] 51 VFs
[22:14:06] [PASSED] 52 VFs
[22:14:06] [PASSED] 53 VFs
[22:14:06] [PASSED] 54 VFs
[22:14:06] [PASSED] 55 VFs
[22:14:06] [PASSED] 56 VFs
[22:14:06] [PASSED] 57 VFs
[22:14:06] [PASSED] 58 VFs
[22:14:06] [PASSED] 59 VFs
[22:14:06] [PASSED] 60 VFs
[22:14:06] [PASSED] 61 VFs
[22:14:06] [PASSED] 62 VFs
[22:14:06] [PASSED] 63 VFs
[22:14:06] ================= [PASSED] fair_doorbells ==================
[22:14:06] ======================== fair_ggtt  ========================
[22:14:06] [PASSED] 1 VF
[22:14:06] [PASSED] 2 VFs
[22:14:06] [PASSED] 3 VFs
[22:14:06] [PASSED] 4 VFs
[22:14:06] [PASSED] 5 VFs
[22:14:06] [PASSED] 6 VFs
[22:14:06] [PASSED] 7 VFs
[22:14:06] [PASSED] 8 VFs
[22:14:06] [PASSED] 9 VFs
[22:14:06] [PASSED] 10 VFs
[22:14:06] [PASSED] 11 VFs
[22:14:06] [PASSED] 12 VFs
[22:14:06] [PASSED] 13 VFs
[22:14:06] [PASSED] 14 VFs
[22:14:06] [PASSED] 15 VFs
[22:14:06] [PASSED] 16 VFs
[22:14:06] [PASSED] 17 VFs
[22:14:06] [PASSED] 18 VFs
[22:14:06] [PASSED] 19 VFs
[22:14:06] [PASSED] 20 VFs
[22:14:06] [PASSED] 21 VFs
[22:14:06] [PASSED] 22 VFs
[22:14:06] [PASSED] 23 VFs
[22:14:06] [PASSED] 24 VFs
[22:14:06] [PASSED] 25 VFs
[22:14:06] [PASSED] 26 VFs
[22:14:06] [PASSED] 27 VFs
[22:14:06] [PASSED] 28 VFs
[22:14:06] [PASSED] 29 VFs
[22:14:06] [PASSED] 30 VFs
[22:14:06] [PASSED] 31 VFs
[22:14:06] [PASSED] 32 VFs
[22:14:06] [PASSED] 33 VFs
[22:14:06] [PASSED] 34 VFs
[22:14:06] [PASSED] 35 VFs
[22:14:06] [PASSED] 36 VFs
[22:14:06] [PASSED] 37 VFs
[22:14:06] [PASSED] 38 VFs
[22:14:06] [PASSED] 39 VFs
[22:14:06] [PASSED] 40 VFs
[22:14:06] [PASSED] 41 VFs
[22:14:06] [PASSED] 42 VFs
[22:14:06] [PASSED] 43 VFs
[22:14:06] [PASSED] 44 VFs
[22:14:06] [PASSED] 45 VFs
[22:14:06] [PASSED] 46 VFs
[22:14:06] [PASSED] 47 VFs
[22:14:06] [PASSED] 48 VFs
[22:14:06] [PASSED] 49 VFs
[22:14:06] [PASSED] 50 VFs
[22:14:06] [PASSED] 51 VFs
[22:14:06] [PASSED] 52 VFs
[22:14:06] [PASSED] 53 VFs
[22:14:06] [PASSED] 54 VFs
[22:14:06] [PASSED] 55 VFs
[22:14:06] [PASSED] 56 VFs
[22:14:06] [PASSED] 57 VFs
[22:14:06] [PASSED] 58 VFs
[22:14:06] [PASSED] 59 VFs
[22:14:06] [PASSED] 60 VFs
[22:14:06] [PASSED] 61 VFs
[22:14:06] [PASSED] 62 VFs
[22:14:06] [PASSED] 63 VFs
[22:14:06] ==================== [PASSED] fair_ggtt ====================
[22:14:06] ================== [PASSED] pf_gt_config ===================
[22:14:06] ===================== lmtt (1 subtest) =====================
[22:14:06] ======================== test_ops  =========================
[22:14:06] [PASSED] 2-level
[22:14:06] [PASSED] multi-level
[22:14:06] ==================== [PASSED] test_ops =====================
[22:14:06] ====================== [PASSED] lmtt =======================
[22:14:06] ================= pf_service (11 subtests) =================
[22:14:06] [PASSED] pf_negotiate_any
[22:14:06] [PASSED] pf_negotiate_base_match
[22:14:06] [PASSED] pf_negotiate_base_newer
[22:14:06] [PASSED] pf_negotiate_base_next
[22:14:06] [SKIPPED] pf_negotiate_base_older
[22:14:06] [PASSED] pf_negotiate_base_prev
[22:14:06] [PASSED] pf_negotiate_latest_match
[22:14:06] [PASSED] pf_negotiate_latest_newer
[22:14:06] [PASSED] pf_negotiate_latest_next
[22:14:06] [SKIPPED] pf_negotiate_latest_older
[22:14:06] [SKIPPED] pf_negotiate_latest_prev
[22:14:06] =================== [PASSED] pf_service ====================
[22:14:06] ================= xe_guc_g2g (2 subtests) ==================
[22:14:06] ============== xe_live_guc_g2g_kunit_default  ==============
[22:14:06] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[22:14:06] ============== xe_live_guc_g2g_kunit_allmem  ===============
[22:14:06] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[22:14:06] =================== [SKIPPED] xe_guc_g2g ===================
[22:14:06] =================== xe_mocs (2 subtests) ===================
[22:14:06] ================ xe_live_mocs_kernel_kunit  ================
[22:14:06] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[22:14:06] ================ xe_live_mocs_reset_kunit  =================
[22:14:06] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[22:14:06] ==================== [SKIPPED] xe_mocs =====================
[22:14:06] ================= xe_migrate (2 subtests) ==================
[22:14:06] ================= xe_migrate_sanity_kunit  =================
[22:14:06] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[22:14:06] ================== xe_validate_ccs_kunit  ==================
[22:14:06] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[22:14:06] =================== [SKIPPED] xe_migrate ===================
[22:14:06] ================== xe_dma_buf (1 subtest) ==================
[22:14:06] ==================== xe_dma_buf_kunit  =====================
[22:14:06] ================ [SKIPPED] xe_dma_buf_kunit ================
[22:14:06] =================== [SKIPPED] xe_dma_buf ===================
[22:14:06] ================= xe_bo_shrink (1 subtest) =================
[22:14:06] =================== xe_bo_shrink_kunit  ====================
[22:14:06] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[22:14:06] ================== [SKIPPED] xe_bo_shrink ==================
[22:14:06] ==================== xe_bo (2 subtests) ====================
[22:14:06] ================== xe_ccs_migrate_kunit  ===================
[22:14:06] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[22:14:06] ==================== xe_bo_evict_kunit  ====================
[22:14:06] =============== [SKIPPED] xe_bo_evict_kunit ================
[22:14:06] ===================== [SKIPPED] xe_bo ======================
[22:14:06] ==================== args (13 subtests) ====================
[22:14:06] [PASSED] count_args_test
[22:14:06] [PASSED] call_args_example
[22:14:06] [PASSED] call_args_test
[22:14:06] [PASSED] drop_first_arg_example
[22:14:06] [PASSED] drop_first_arg_test
[22:14:06] [PASSED] first_arg_example
[22:14:06] [PASSED] first_arg_test
[22:14:06] [PASSED] last_arg_example
[22:14:06] [PASSED] last_arg_test
[22:14:06] [PASSED] pick_arg_example
[22:14:06] [PASSED] if_args_example
[22:14:06] [PASSED] if_args_test
[22:14:06] [PASSED] sep_comma_example
[22:14:06] ====================== [PASSED] args =======================
[22:14:06] =================== xe_pci (3 subtests) ====================
[22:14:06] ==================== check_graphics_ip  ====================
[22:14:06] [PASSED] 12.00 Xe_LP
[22:14:06] [PASSED] 12.10 Xe_LP+
[22:14:06] [PASSED] 12.55 Xe_HPG
[22:14:06] [PASSED] 12.60 Xe_HPC
[22:14:06] [PASSED] 12.70 Xe_LPG
[22:14:06] [PASSED] 12.71 Xe_LPG
[22:14:06] [PASSED] 12.74 Xe_LPG+
[22:14:06] [PASSED] 20.01 Xe2_HPG
[22:14:06] [PASSED] 20.02 Xe2_HPG
[22:14:06] [PASSED] 20.04 Xe2_LPG
[22:14:06] [PASSED] 30.00 Xe3_LPG
[22:14:06] [PASSED] 30.01 Xe3_LPG
[22:14:06] [PASSED] 30.03 Xe3_LPG
[22:14:06] [PASSED] 30.04 Xe3_LPG
[22:14:06] [PASSED] 30.05 Xe3_LPG
[22:14:06] [PASSED] 35.11 Xe3p_XPC
[22:14:06] ================ [PASSED] check_graphics_ip ================
[22:14:06] ===================== check_media_ip  ======================
[22:14:06] [PASSED] 12.00 Xe_M
[22:14:06] [PASSED] 12.55 Xe_HPM
[22:14:06] [PASSED] 13.00 Xe_LPM+
[22:14:06] [PASSED] 13.01 Xe2_HPM
[22:14:06] [PASSED] 20.00 Xe2_LPM
[22:14:06] [PASSED] 30.00 Xe3_LPM
[22:14:06] [PASSED] 30.02 Xe3_LPM
[22:14:06] [PASSED] 35.00 Xe3p_LPM
[22:14:06] [PASSED] 35.03 Xe3p_HPM
[22:14:06] ================= [PASSED] check_media_ip ==================
[22:14:06] =================== check_platform_desc  ===================
[22:14:06] [PASSED] 0x9A60 (TIGERLAKE)
[22:14:06] [PASSED] 0x9A68 (TIGERLAKE)
[22:14:06] [PASSED] 0x9A70 (TIGERLAKE)
[22:14:06] [PASSED] 0x9A40 (TIGERLAKE)
[22:14:06] [PASSED] 0x9A49 (TIGERLAKE)
[22:14:06] [PASSED] 0x9A59 (TIGERLAKE)
[22:14:06] [PASSED] 0x9A78 (TIGERLAKE)
[22:14:06] [PASSED] 0x9AC0 (TIGERLAKE)
[22:14:06] [PASSED] 0x9AC9 (TIGERLAKE)
[22:14:06] [PASSED] 0x9AD9 (TIGERLAKE)
[22:14:06] [PASSED] 0x9AF8 (TIGERLAKE)
[22:14:06] [PASSED] 0x4C80 (ROCKETLAKE)
[22:14:06] [PASSED] 0x4C8A (ROCKETLAKE)
[22:14:06] [PASSED] 0x4C8B (ROCKETLAKE)
[22:14:06] [PASSED] 0x4C8C (ROCKETLAKE)
[22:14:06] [PASSED] 0x4C90 (ROCKETLAKE)
[22:14:06] [PASSED] 0x4C9A (ROCKETLAKE)
[22:14:06] [PASSED] 0x4680 (ALDERLAKE_S)
[22:14:06] [PASSED] 0x4682 (ALDERLAKE_S)
[22:14:06] [PASSED] 0x4688 (ALDERLAKE_S)
[22:14:06] [PASSED] 0x468A (ALDERLAKE_S)
[22:14:06] [PASSED] 0x468B (ALDERLAKE_S)
[22:14:06] [PASSED] 0x4690 (ALDERLAKE_S)
[22:14:06] [PASSED] 0x4692 (ALDERLAKE_S)
[22:14:06] [PASSED] 0x4693 (ALDERLAKE_S)
[22:14:06] [PASSED] 0x46A0 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46A1 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46A2 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46A3 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46A6 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46A8 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46AA (ALDERLAKE_P)
[22:14:06] [PASSED] 0x462A (ALDERLAKE_P)
[22:14:06] [PASSED] 0x4626 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x4628 (ALDERLAKE_P)
stty: 'standard input': Inappropriate ioctl for device
[22:14:06] [PASSED] 0x46B0 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46B1 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46B2 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46B3 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46C0 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46C1 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46C2 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46C3 (ALDERLAKE_P)
[22:14:06] [PASSED] 0x46D0 (ALDERLAKE_N)
[22:14:06] [PASSED] 0x46D1 (ALDERLAKE_N)
[22:14:06] [PASSED] 0x46D2 (ALDERLAKE_N)
[22:14:06] [PASSED] 0x46D3 (ALDERLAKE_N)
[22:14:06] [PASSED] 0x46D4 (ALDERLAKE_N)
[22:14:06] [PASSED] 0xA721 (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA7A1 (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA7A9 (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA7AC (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA7AD (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA720 (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA7A0 (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA7A8 (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA7AA (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA7AB (ALDERLAKE_P)
[22:14:06] [PASSED] 0xA780 (ALDERLAKE_S)
[22:14:06] [PASSED] 0xA781 (ALDERLAKE_S)
[22:14:06] [PASSED] 0xA782 (ALDERLAKE_S)
[22:14:06] [PASSED] 0xA783 (ALDERLAKE_S)
[22:14:06] [PASSED] 0xA788 (ALDERLAKE_S)
[22:14:06] [PASSED] 0xA789 (ALDERLAKE_S)
[22:14:06] [PASSED] 0xA78A (ALDERLAKE_S)
[22:14:06] [PASSED] 0xA78B (ALDERLAKE_S)
[22:14:06] [PASSED] 0x4905 (DG1)
[22:14:06] [PASSED] 0x4906 (DG1)
[22:14:06] [PASSED] 0x4907 (DG1)
[22:14:06] [PASSED] 0x4908 (DG1)
[22:14:06] [PASSED] 0x4909 (DG1)
[22:14:06] [PASSED] 0x56C0 (DG2)
[22:14:06] [PASSED] 0x56C2 (DG2)
[22:14:06] [PASSED] 0x56C1 (DG2)
[22:14:06] [PASSED] 0x7D51 (METEORLAKE)
[22:14:06] [PASSED] 0x7DD1 (METEORLAKE)
[22:14:06] [PASSED] 0x7D41 (METEORLAKE)
[22:14:06] [PASSED] 0x7D67 (METEORLAKE)
[22:14:06] [PASSED] 0xB640 (METEORLAKE)
[22:14:06] [PASSED] 0x56A0 (DG2)
[22:14:06] [PASSED] 0x56A1 (DG2)
[22:14:06] [PASSED] 0x56A2 (DG2)
[22:14:06] [PASSED] 0x56BE (DG2)
[22:14:06] [PASSED] 0x56BF (DG2)
[22:14:06] [PASSED] 0x5690 (DG2)
[22:14:06] [PASSED] 0x5691 (DG2)
[22:14:06] [PASSED] 0x5692 (DG2)
[22:14:06] [PASSED] 0x56A5 (DG2)
[22:14:06] [PASSED] 0x56A6 (DG2)
[22:14:06] [PASSED] 0x56B0 (DG2)
[22:14:06] [PASSED] 0x56B1 (DG2)
[22:14:06] [PASSED] 0x56BA (DG2)
[22:14:06] [PASSED] 0x56BB (DG2)
[22:14:06] [PASSED] 0x56BC (DG2)
[22:14:06] [PASSED] 0x56BD (DG2)
[22:14:06] [PASSED] 0x5693 (DG2)
[22:14:06] [PASSED] 0x5694 (DG2)
[22:14:06] [PASSED] 0x5695 (DG2)
[22:14:06] [PASSED] 0x56A3 (DG2)
[22:14:06] [PASSED] 0x56A4 (DG2)
[22:14:06] [PASSED] 0x56B2 (DG2)
[22:14:06] [PASSED] 0x56B3 (DG2)
[22:14:06] [PASSED] 0x5696 (DG2)
[22:14:06] [PASSED] 0x5697 (DG2)
[22:14:06] [PASSED] 0xB69 (PVC)
[22:14:06] [PASSED] 0xB6E (PVC)
[22:14:06] [PASSED] 0xBD4 (PVC)
[22:14:06] [PASSED] 0xBD5 (PVC)
[22:14:06] [PASSED] 0xBD6 (PVC)
[22:14:06] [PASSED] 0xBD7 (PVC)
[22:14:06] [PASSED] 0xBD8 (PVC)
[22:14:06] [PASSED] 0xBD9 (PVC)
[22:14:06] [PASSED] 0xBDA (PVC)
[22:14:06] [PASSED] 0xBDB (PVC)
[22:14:06] [PASSED] 0xBE0 (PVC)
[22:14:06] [PASSED] 0xBE1 (PVC)
[22:14:06] [PASSED] 0xBE5 (PVC)
[22:14:06] [PASSED] 0x7D40 (METEORLAKE)
[22:14:06] [PASSED] 0x7D45 (METEORLAKE)
[22:14:06] [PASSED] 0x7D55 (METEORLAKE)
[22:14:06] [PASSED] 0x7D60 (METEORLAKE)
[22:14:06] [PASSED] 0x7DD5 (METEORLAKE)
[22:14:06] [PASSED] 0x6420 (LUNARLAKE)
[22:14:06] [PASSED] 0x64A0 (LUNARLAKE)
[22:14:06] [PASSED] 0x64B0 (LUNARLAKE)
[22:14:06] [PASSED] 0xE202 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE209 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE20B (BATTLEMAGE)
[22:14:06] [PASSED] 0xE20C (BATTLEMAGE)
[22:14:06] [PASSED] 0xE20D (BATTLEMAGE)
[22:14:06] [PASSED] 0xE210 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE211 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE212 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE216 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE220 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE221 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE222 (BATTLEMAGE)
[22:14:06] [PASSED] 0xE223 (BATTLEMAGE)
[22:14:06] [PASSED] 0xB080 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB081 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB082 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB083 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB084 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB085 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB086 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB087 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB08F (PANTHERLAKE)
[22:14:06] [PASSED] 0xB090 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB0A0 (PANTHERLAKE)
[22:14:06] [PASSED] 0xB0B0 (PANTHERLAKE)
[22:14:06] [PASSED] 0xFD80 (PANTHERLAKE)
[22:14:06] [PASSED] 0xFD81 (PANTHERLAKE)
[22:14:06] [PASSED] 0xD740 (NOVALAKE_S)
[22:14:06] [PASSED] 0xD741 (NOVALAKE_S)
[22:14:06] [PASSED] 0xD742 (NOVALAKE_S)
[22:14:06] [PASSED] 0xD743 (NOVALAKE_S)
[22:14:06] [PASSED] 0xD744 (NOVALAKE_S)
[22:14:06] [PASSED] 0xD745 (NOVALAKE_S)
[22:14:06] [PASSED] 0x674C (CRESCENTISLAND)
[22:14:06] =============== [PASSED] check_platform_desc ===============
[22:14:06] ===================== [PASSED] xe_pci ======================
[22:14:06] =================== xe_rtp (2 subtests) ====================
[22:14:06] =============== xe_rtp_process_to_sr_tests  ================
[22:14:06] [PASSED] coalesce-same-reg
[22:14:06] [PASSED] no-match-no-add
[22:14:06] [PASSED] match-or
[22:14:06] [PASSED] match-or-xfail
[22:14:06] [PASSED] no-match-no-add-multiple-rules
[22:14:06] [PASSED] two-regs-two-entries
[22:14:06] [PASSED] clr-one-set-other
[22:14:06] [PASSED] set-field
[22:14:06] [PASSED] conflict-duplicate
[22:14:06] [PASSED] conflict-not-disjoint
[22:14:06] [PASSED] conflict-reg-type
[22:14:06] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[22:14:06] ================== xe_rtp_process_tests  ===================
[22:14:06] [PASSED] active1
[22:14:06] [PASSED] active2
[22:14:06] [PASSED] active-inactive
[22:14:06] [PASSED] inactive-active
[22:14:06] [PASSED] inactive-1st_or_active-inactive
[22:14:06] [PASSED] inactive-2nd_or_active-inactive
[22:14:06] [PASSED] inactive-last_or_active-inactive
[22:14:06] [PASSED] inactive-no_or_active-inactive
[22:14:06] ============== [PASSED] xe_rtp_process_tests ===============
[22:14:06] ===================== [PASSED] xe_rtp ======================
[22:14:06] ==================== xe_wa (1 subtest) =====================
[22:14:06] ======================== xe_wa_gt  =========================
[22:14:06] [PASSED] TIGERLAKE B0
[22:14:06] [PASSED] DG1 A0
[22:14:06] [PASSED] DG1 B0
[22:14:06] [PASSED] ALDERLAKE_S A0
[22:14:06] [PASSED] ALDERLAKE_S B0
[22:14:06] [PASSED] ALDERLAKE_S C0
[22:14:06] [PASSED] ALDERLAKE_S D0
[22:14:06] [PASSED] ALDERLAKE_P A0
[22:14:06] [PASSED] ALDERLAKE_P B0
[22:14:06] [PASSED] ALDERLAKE_P C0
[22:14:06] [PASSED] ALDERLAKE_S RPLS D0
[22:14:06] [PASSED] ALDERLAKE_P RPLU E0
[22:14:06] [PASSED] DG2 G10 C0
[22:14:06] [PASSED] DG2 G11 B1
[22:14:06] [PASSED] DG2 G12 A1
[22:14:06] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[22:14:06] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[22:14:06] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[22:14:06] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[22:14:06] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[22:14:06] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[22:14:06] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[22:14:06] ==================== [PASSED] xe_wa_gt =====================
[22:14:06] ====================== [PASSED] xe_wa ======================
[22:14:06] ============================================================
[22:14:06] Testing complete. Ran 512 tests: passed: 494, skipped: 18
[22:14:06] Elapsed time: 36.370s total, 4.204s configuring, 31.648s building, 0.472s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [22:14:06] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[22:14:08] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[22:14:34] Starting KUnit Kernel (1/1)...
[22:14:34] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:14:34] ============ drm_test_pick_cmdline (2 subtests) ============
[22:14:34] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[22:14:34] =============== drm_test_pick_cmdline_named  ===============
[22:14:34] [PASSED] NTSC
[22:14:34] [PASSED] NTSC-J
[22:14:34] [PASSED] PAL
[22:14:34] [PASSED] PAL-M
[22:14:34] =========== [PASSED] drm_test_pick_cmdline_named ===========
[22:14:34] ============== [PASSED] drm_test_pick_cmdline ==============
[22:14:34] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[22:14:34] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[22:14:34] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[22:14:34] =========== drm_validate_clone_mode (2 subtests) ===========
[22:14:34] ============== drm_test_check_in_clone_mode  ===============
[22:14:34] [PASSED] in_clone_mode
[22:14:34] [PASSED] not_in_clone_mode
[22:14:34] ========== [PASSED] drm_test_check_in_clone_mode ===========
[22:14:34] =============== drm_test_check_valid_clones  ===============
[22:14:34] [PASSED] not_in_clone_mode
[22:14:34] [PASSED] valid_clone
[22:14:34] [PASSED] invalid_clone
[22:14:34] =========== [PASSED] drm_test_check_valid_clones ===========
[22:14:34] ============= [PASSED] drm_validate_clone_mode =============
[22:14:34] ============= drm_validate_modeset (1 subtest) =============
[22:14:34] [PASSED] drm_test_check_connector_changed_modeset
[22:14:34] ============== [PASSED] drm_validate_modeset ===============
[22:14:34] ====== drm_test_bridge_get_current_state (2 subtests) ======
[22:14:34] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[22:14:34] [PASSED] drm_test_drm_bridge_get_current_state_legacy
[22:14:34] ======== [PASSED] drm_test_bridge_get_current_state ========
[22:14:34] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[22:14:34] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[22:14:34] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[22:14:34] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy
[22:14:34] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[22:14:34] ============== drm_bridge_alloc (2 subtests) ===============
[22:14:34] [PASSED] drm_test_drm_bridge_alloc_basic
[22:14:34] [PASSED] drm_test_drm_bridge_alloc_get_put
[22:14:34] ================ [PASSED] drm_bridge_alloc =================
[22:14:34] ================== drm_buddy (9 subtests) ==================
[22:14:34] [PASSED] drm_test_buddy_alloc_limit
[22:14:34] [PASSED] drm_test_buddy_alloc_optimistic
[22:14:34] [PASSED] drm_test_buddy_alloc_pessimistic
[22:14:34] [PASSED] drm_test_buddy_alloc_pathological
[22:14:34] [PASSED] drm_test_buddy_alloc_contiguous
[22:14:34] [PASSED] drm_test_buddy_alloc_clear
[22:14:34] [PASSED] drm_test_buddy_alloc_range_bias
[22:14:34] [PASSED] drm_test_buddy_fragmentation_performance
[22:14:34] [PASSED] drm_test_buddy_alloc_exceeds_max_order
[22:14:34] ==================== [PASSED] drm_buddy ====================
[22:14:34] ============= drm_cmdline_parser (40 subtests) =============
[22:14:34] [PASSED] drm_test_cmdline_force_d_only
[22:14:34] [PASSED] drm_test_cmdline_force_D_only_dvi
[22:14:34] [PASSED] drm_test_cmdline_force_D_only_hdmi
[22:14:34] [PASSED] drm_test_cmdline_force_D_only_not_digital
[22:14:34] [PASSED] drm_test_cmdline_force_e_only
[22:14:34] [PASSED] drm_test_cmdline_res
[22:14:34] [PASSED] drm_test_cmdline_res_vesa
[22:14:34] [PASSED] drm_test_cmdline_res_vesa_rblank
[22:14:34] [PASSED] drm_test_cmdline_res_rblank
[22:14:34] [PASSED] drm_test_cmdline_res_bpp
[22:14:34] [PASSED] drm_test_cmdline_res_refresh
[22:14:34] [PASSED] drm_test_cmdline_res_bpp_refresh
[22:14:34] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[22:14:34] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[22:14:34] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[22:14:34] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[22:14:34] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[22:14:34] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[22:14:34] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[22:14:34] [PASSED] drm_test_cmdline_res_margins_force_on
[22:14:34] [PASSED] drm_test_cmdline_res_vesa_margins
[22:14:34] [PASSED] drm_test_cmdline_name
[22:14:34] [PASSED] drm_test_cmdline_name_bpp
[22:14:34] [PASSED] drm_test_cmdline_name_option
[22:14:34] [PASSED] drm_test_cmdline_name_bpp_option
[22:14:34] [PASSED] drm_test_cmdline_rotate_0
[22:14:34] [PASSED] drm_test_cmdline_rotate_90
[22:14:34] [PASSED] drm_test_cmdline_rotate_180
[22:14:34] [PASSED] drm_test_cmdline_rotate_270
[22:14:34] [PASSED] drm_test_cmdline_hmirror
[22:14:34] [PASSED] drm_test_cmdline_vmirror
[22:14:34] [PASSED] drm_test_cmdline_margin_options
[22:14:34] [PASSED] drm_test_cmdline_multiple_options
[22:14:34] [PASSED] drm_test_cmdline_bpp_extra_and_option
[22:14:34] [PASSED] drm_test_cmdline_extra_and_option
[22:14:34] [PASSED] drm_test_cmdline_freestanding_options
[22:14:34] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[22:14:34] [PASSED] drm_test_cmdline_panel_orientation
[22:14:34] ================ drm_test_cmdline_invalid  =================
[22:14:34] [PASSED] margin_only
[22:14:34] [PASSED] interlace_only
[22:14:34] [PASSED] res_missing_x
[22:14:34] [PASSED] res_missing_y
[22:14:34] [PASSED] res_bad_y
[22:14:34] [PASSED] res_missing_y_bpp
[22:14:34] [PASSED] res_bad_bpp
[22:14:34] [PASSED] res_bad_refresh
[22:14:34] [PASSED] res_bpp_refresh_force_on_off
[22:14:34] [PASSED] res_invalid_mode
[22:14:34] [PASSED] res_bpp_wrong_place_mode
[22:14:34] [PASSED] name_bpp_refresh
[22:14:34] [PASSED] name_refresh
[22:14:34] [PASSED] name_refresh_wrong_mode
[22:14:34] [PASSED] name_refresh_invalid_mode
[22:14:34] [PASSED] rotate_multiple
[22:14:34] [PASSED] rotate_invalid_val
[22:14:34] [PASSED] rotate_truncated
[22:14:34] [PASSED] invalid_option
[22:14:34] [PASSED] invalid_tv_option
[22:14:34] [PASSED] truncated_tv_option
[22:14:34] ============ [PASSED] drm_test_cmdline_invalid =============
[22:14:34] =============== drm_test_cmdline_tv_options  ===============
[22:14:34] [PASSED] NTSC
[22:14:34] [PASSED] NTSC_443
[22:14:34] [PASSED] NTSC_J
[22:14:34] [PASSED] PAL
[22:14:34] [PASSED] PAL_M
[22:14:34] [PASSED] PAL_N
[22:14:34] [PASSED] SECAM
[22:14:34] [PASSED] MONO_525
[22:14:34] [PASSED] MONO_625
[22:14:34] =========== [PASSED] drm_test_cmdline_tv_options ===========
[22:14:34] =============== [PASSED] drm_cmdline_parser ================
[22:14:34] ========== drmm_connector_hdmi_init (20 subtests) ==========
[22:14:34] [PASSED] drm_test_connector_hdmi_init_valid
[22:14:34] [PASSED] drm_test_connector_hdmi_init_bpc_8
[22:14:34] [PASSED] drm_test_connector_hdmi_init_bpc_10
[22:14:34] [PASSED] drm_test_connector_hdmi_init_bpc_12
[22:14:34] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[22:14:34] [PASSED] drm_test_connector_hdmi_init_bpc_null
[22:14:34] [PASSED] drm_test_connector_hdmi_init_formats_empty
[22:14:34] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[22:14:34] === drm_test_connector_hdmi_init_formats_yuv420_allowed  ===
[22:14:34] [PASSED] supported_formats=0x9 yuv420_allowed=1
[22:14:34] [PASSED] supported_formats=0x9 yuv420_allowed=0
[22:14:34] [PASSED] supported_formats=0x3 yuv420_allowed=1
[22:14:34] [PASSED] supported_formats=0x3 yuv420_allowed=0
[22:14:34] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[22:14:34] [PASSED] drm_test_connector_hdmi_init_null_ddc
[22:14:34] [PASSED] drm_test_connector_hdmi_init_null_product
[22:14:34] [PASSED] drm_test_connector_hdmi_init_null_vendor
[22:14:34] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[22:14:34] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[22:14:34] [PASSED] drm_test_connector_hdmi_init_product_valid
[22:14:34] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[22:14:34] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[22:14:34] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[22:14:34] ========= drm_test_connector_hdmi_init_type_valid  =========
[22:14:34] [PASSED] HDMI-A
[22:14:34] [PASSED] HDMI-B
[22:14:34] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[22:14:34] ======== drm_test_connector_hdmi_init_type_invalid  ========
[22:14:34] [PASSED] Unknown
[22:14:34] [PASSED] VGA
[22:14:34] [PASSED] DVI-I
[22:14:34] [PASSED] DVI-D
[22:14:34] [PASSED] DVI-A
[22:14:34] [PASSED] Composite
[22:14:34] [PASSED] SVIDEO
[22:14:34] [PASSED] LVDS
[22:14:34] [PASSED] Component
[22:14:34] [PASSED] DIN
[22:14:34] [PASSED] DP
[22:14:34] [PASSED] TV
[22:14:34] [PASSED] eDP
[22:14:34] [PASSED] Virtual
[22:14:34] [PASSED] DSI
[22:14:34] [PASSED] DPI
[22:14:34] [PASSED] Writeback
[22:14:34] [PASSED] SPI
[22:14:34] [PASSED] USB
[22:14:34] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[22:14:34] ============ [PASSED] drmm_connector_hdmi_init =============
[22:14:34] ============= drmm_connector_init (3 subtests) =============
[22:14:34] [PASSED] drm_test_drmm_connector_init
[22:14:34] [PASSED] drm_test_drmm_connector_init_null_ddc
[22:14:34] ========= drm_test_drmm_connector_init_type_valid  =========
[22:14:34] [PASSED] Unknown
[22:14:34] [PASSED] VGA
[22:14:34] [PASSED] DVI-I
[22:14:34] [PASSED] DVI-D
[22:14:34] [PASSED] DVI-A
[22:14:34] [PASSED] Composite
[22:14:34] [PASSED] SVIDEO
[22:14:34] [PASSED] LVDS
[22:14:34] [PASSED] Component
[22:14:34] [PASSED] DIN
[22:14:34] [PASSED] DP
[22:14:34] [PASSED] HDMI-A
[22:14:34] [PASSED] HDMI-B
[22:14:34] [PASSED] TV
[22:14:34] [PASSED] eDP
[22:14:34] [PASSED] Virtual
[22:14:34] [PASSED] DSI
[22:14:34] [PASSED] DPI
[22:14:34] [PASSED] Writeback
[22:14:34] [PASSED] SPI
[22:14:34] [PASSED] USB
[22:14:34] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[22:14:34] =============== [PASSED] drmm_connector_init ===============
[22:14:34] ========= drm_connector_dynamic_init (6 subtests) ==========
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_init
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_init_properties
[22:14:34] ===== drm_test_drm_connector_dynamic_init_type_valid  ======
[22:14:34] [PASSED] Unknown
[22:14:34] [PASSED] VGA
[22:14:34] [PASSED] DVI-I
[22:14:34] [PASSED] DVI-D
[22:14:34] [PASSED] DVI-A
[22:14:34] [PASSED] Composite
[22:14:34] [PASSED] SVIDEO
[22:14:34] [PASSED] LVDS
[22:14:34] [PASSED] Component
[22:14:34] [PASSED] DIN
[22:14:34] [PASSED] DP
[22:14:34] [PASSED] HDMI-A
[22:14:34] [PASSED] HDMI-B
[22:14:34] [PASSED] TV
[22:14:34] [PASSED] eDP
[22:14:34] [PASSED] Virtual
[22:14:34] [PASSED] DSI
[22:14:34] [PASSED] DPI
[22:14:34] [PASSED] Writeback
[22:14:34] [PASSED] SPI
[22:14:34] [PASSED] USB
[22:14:34] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[22:14:34] ======== drm_test_drm_connector_dynamic_init_name  =========
[22:14:34] [PASSED] Unknown
[22:14:34] [PASSED] VGA
[22:14:34] [PASSED] DVI-I
[22:14:34] [PASSED] DVI-D
[22:14:34] [PASSED] DVI-A
[22:14:34] [PASSED] Composite
[22:14:34] [PASSED] SVIDEO
[22:14:34] [PASSED] LVDS
[22:14:34] [PASSED] Component
[22:14:34] [PASSED] DIN
[22:14:34] [PASSED] DP
[22:14:34] [PASSED] HDMI-A
[22:14:34] [PASSED] HDMI-B
[22:14:34] [PASSED] TV
[22:14:34] [PASSED] eDP
[22:14:34] [PASSED] Virtual
[22:14:34] [PASSED] DSI
[22:14:34] [PASSED] DPI
[22:14:34] [PASSED] Writeback
[22:14:34] [PASSED] SPI
[22:14:34] [PASSED] USB
[22:14:34] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[22:14:34] =========== [PASSED] drm_connector_dynamic_init ============
[22:14:34] ==== drm_connector_dynamic_register_early (4 subtests) =====
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[22:14:34] ====== [PASSED] drm_connector_dynamic_register_early =======
[22:14:34] ======= drm_connector_dynamic_register (7 subtests) ========
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[22:14:34] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[22:14:34] ========= [PASSED] drm_connector_dynamic_register ==========
[22:14:34] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[22:14:34] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[22:14:34] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[22:14:34] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[22:14:34] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[22:14:34] ========== drm_test_get_tv_mode_from_name_valid  ===========
[22:14:34] [PASSED] NTSC
[22:14:34] [PASSED] NTSC-443
[22:14:34] [PASSED] NTSC-J
[22:14:34] [PASSED] PAL
[22:14:34] [PASSED] PAL-M
[22:14:34] [PASSED] PAL-N
[22:14:34] [PASSED] SECAM
[22:14:34] [PASSED] Mono
[22:14:34] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[22:14:34] [PASSED] drm_test_get_tv_mode_from_name_truncated
[22:14:34] ============ [PASSED] drm_get_tv_mode_from_name ============
[22:14:34] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[22:14:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[22:14:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[22:14:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[22:14:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[22:14:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[22:14:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[22:14:34] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[22:14:34] [PASSED] VIC 96
[22:14:34] [PASSED] VIC 97
[22:14:34] [PASSED] VIC 101
[22:14:34] [PASSED] VIC 102
[22:14:34] [PASSED] VIC 106
[22:14:34] [PASSED] VIC 107
[22:14:34] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[22:14:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[22:14:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[22:14:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[22:14:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[22:14:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[22:14:34] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[22:14:34] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[22:14:34] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[22:14:34] [PASSED] Automatic
[22:14:34] [PASSED] Full
[22:14:34] [PASSED] Limited 16:235
[22:14:34] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[22:14:34] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[22:14:34] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[22:14:34] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[22:14:34] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[22:14:34] [PASSED] RGB
[22:14:34] [PASSED] YUV 4:2:0
[22:14:34] [PASSED] YUV 4:2:2
[22:14:34] [PASSED] YUV 4:4:4
[22:14:34] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[22:14:34] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[22:14:34] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[22:14:34] ============= drm_damage_helper (21 subtests) ==============
[22:14:34] [PASSED] drm_test_damage_iter_no_damage
[22:14:34] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[22:14:34] [PASSED] drm_test_damage_iter_no_damage_src_moved
[22:14:34] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[22:14:34] [PASSED] drm_test_damage_iter_no_damage_not_visible
[22:14:34] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[22:14:34] [PASSED] drm_test_damage_iter_no_damage_no_fb
[22:14:34] [PASSED] drm_test_damage_iter_simple_damage
[22:14:34] [PASSED] drm_test_damage_iter_single_damage
[22:14:34] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[22:14:34] [PASSED] drm_test_damage_iter_single_damage_outside_src
[22:14:34] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[22:14:34] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[22:14:34] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[22:14:34] [PASSED] drm_test_damage_iter_single_damage_src_moved
[22:14:34] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[22:14:34] [PASSED] drm_test_damage_iter_damage
[22:14:34] [PASSED] drm_test_damage_iter_damage_one_intersect
[22:14:34] [PASSED] drm_test_damage_iter_damage_one_outside
[22:14:34] [PASSED] drm_test_damage_iter_damage_src_moved
[22:14:34] [PASSED] drm_test_damage_iter_damage_not_visible
[22:14:34] ================ [PASSED] drm_damage_helper ================
[22:14:34] ============== drm_dp_mst_helper (3 subtests) ==============
[22:14:34] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[22:14:34] [PASSED] Clock 154000 BPP 30 DSC disabled
[22:14:34] [PASSED] Clock 234000 BPP 30 DSC disabled
[22:14:34] [PASSED] Clock 297000 BPP 24 DSC disabled
[22:14:34] [PASSED] Clock 332880 BPP 24 DSC enabled
[22:14:34] [PASSED] Clock 324540 BPP 24 DSC enabled
[22:14:34] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[22:14:34] ============== drm_test_dp_mst_calc_pbn_div  ===============
[22:14:34] [PASSED] Link rate 2000000 lane count 4
[22:14:34] [PASSED] Link rate 2000000 lane count 2
[22:14:34] [PASSED] Link rate 2000000 lane count 1
[22:14:34] [PASSED] Link rate 1350000 lane count 4
[22:14:34] [PASSED] Link rate 1350000 lane count 2
[22:14:34] [PASSED] Link rate 1350000 lane count 1
[22:14:34] [PASSED] Link rate 1000000 lane count 4
[22:14:34] [PASSED] Link rate 1000000 lane count 2
[22:14:34] [PASSED] Link rate 1000000 lane count 1
[22:14:34] [PASSED] Link rate 810000 lane count 4
[22:14:34] [PASSED] Link rate 810000 lane count 2
[22:14:34] [PASSED] Link rate 810000 lane count 1
[22:14:34] [PASSED] Link rate 540000 lane count 4
[22:14:34] [PASSED] Link rate 540000 lane count 2
[22:14:34] [PASSED] Link rate 540000 lane count 1
[22:14:34] [PASSED] Link rate 270000 lane count 4
[22:14:34] [PASSED] Link rate 270000 lane count 2
[22:14:34] [PASSED] Link rate 270000 lane count 1
[22:14:34] [PASSED] Link rate 162000 lane count 4
[22:14:34] [PASSED] Link rate 162000 lane count 2
[22:14:34] [PASSED] Link rate 162000 lane count 1
[22:14:34] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[22:14:34] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[22:14:34] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[22:14:34] [PASSED] DP_POWER_UP_PHY with port number
[22:14:34] [PASSED] DP_POWER_DOWN_PHY with port number
[22:14:34] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[22:14:34] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[22:14:34] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[22:14:34] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[22:14:34] [PASSED] DP_QUERY_PAYLOAD with port number
[22:14:34] [PASSED] DP_QUERY_PAYLOAD with VCPI
[22:14:34] [PASSED] DP_REMOTE_DPCD_READ with port number
[22:14:34] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[22:14:34] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[22:14:34] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[22:14:34] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[22:14:34] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[22:14:34] [PASSED] DP_REMOTE_I2C_READ with port number
[22:14:34] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[22:14:34] [PASSED] DP_REMOTE_I2C_READ with transactions array
[22:14:34] [PASSED] DP_REMOTE_I2C_WRITE with port number
[22:14:34] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[22:14:34] [PASSED] DP_REMOTE_I2C_WRITE with data array
[22:14:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[22:14:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[22:14:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[22:14:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[22:14:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[22:14:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[22:14:34] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[22:14:34] ================ [PASSED] drm_dp_mst_helper ================
[22:14:34] ================== drm_exec (7 subtests) ===================
[22:14:34] [PASSED] sanitycheck
[22:14:34] [PASSED] test_lock
[22:14:34] [PASSED] test_lock_unlock
[22:14:34] [PASSED] test_duplicates
[22:14:34] [PASSED] test_prepare
[22:14:34] [PASSED] test_prepare_array
[22:14:34] [PASSED] test_multiple_loops
[22:14:34] ==================== [PASSED] drm_exec =====================
[22:14:34] =========== drm_format_helper_test (17 subtests) ===========
[22:14:34] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[22:14:34] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[22:14:34] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[22:14:34] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[22:14:34] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[22:14:34] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[22:14:34] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[22:14:34] ============= drm_test_fb_xrgb8888_to_bgr888  ==============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[22:14:34] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[22:14:34] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[22:14:34] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[22:14:34] ============== drm_test_fb_xrgb8888_to_mono  ===============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[22:14:34] ==================== drm_test_fb_swab  =====================
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ================ [PASSED] drm_test_fb_swab =================
[22:14:34] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[22:14:34] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[22:14:34] [PASSED] single_pixel_source_buffer
[22:14:34] [PASSED] single_pixel_clip_rectangle
[22:14:34] [PASSED] well_known_colors
[22:14:34] [PASSED] destination_pitch
[22:14:34] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[22:14:34] ================= drm_test_fb_clip_offset  =================
[22:14:34] [PASSED] pass through
[22:14:34] [PASSED] horizontal offset
[22:14:34] [PASSED] vertical offset
[22:14:34] [PASSED] horizontal and vertical offset
[22:14:34] [PASSED] horizontal offset (custom pitch)
[22:14:34] [PASSED] vertical offset (custom pitch)
[22:14:34] [PASSED] horizontal and vertical offset (custom pitch)
[22:14:34] ============= [PASSED] drm_test_fb_clip_offset =============
[22:14:34] =================== drm_test_fb_memcpy  ====================
[22:14:34] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[22:14:34] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[22:14:34] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[22:14:34] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[22:14:34] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[22:14:34] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[22:14:34] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[22:14:34] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[22:14:34] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[22:14:34] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[22:14:34] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[22:14:34] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[22:14:34] =============== [PASSED] drm_test_fb_memcpy ================
[22:14:34] ============= [PASSED] drm_format_helper_test ==============
[22:14:34] ================= drm_format (18 subtests) =================
[22:14:34] [PASSED] drm_test_format_block_width_invalid
[22:14:34] [PASSED] drm_test_format_block_width_one_plane
[22:14:34] [PASSED] drm_test_format_block_width_two_plane
[22:14:34] [PASSED] drm_test_format_block_width_three_plane
[22:14:34] [PASSED] drm_test_format_block_width_tiled
[22:14:34] [PASSED] drm_test_format_block_height_invalid
[22:14:34] [PASSED] drm_test_format_block_height_one_plane
[22:14:34] [PASSED] drm_test_format_block_height_two_plane
[22:14:34] [PASSED] drm_test_format_block_height_three_plane
[22:14:34] [PASSED] drm_test_format_block_height_tiled
[22:14:34] [PASSED] drm_test_format_min_pitch_invalid
[22:14:34] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[22:14:34] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[22:14:34] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[22:14:34] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[22:14:34] [PASSED] drm_test_format_min_pitch_two_plane
[22:14:34] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[22:14:34] [PASSED] drm_test_format_min_pitch_tiled
[22:14:34] =================== [PASSED] drm_format ====================
[22:14:34] ============== drm_framebuffer (10 subtests) ===============
[22:14:34] ========== drm_test_framebuffer_check_src_coords  ==========
[22:14:34] [PASSED] Success: source fits into fb
[22:14:34] [PASSED] Fail: overflowing fb with x-axis coordinate
[22:14:34] [PASSED] Fail: overflowing fb with y-axis coordinate
[22:14:34] [PASSED] Fail: overflowing fb with source width
[22:14:34] [PASSED] Fail: overflowing fb with source height
[22:14:34] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[22:14:34] [PASSED] drm_test_framebuffer_cleanup
[22:14:34] =============== drm_test_framebuffer_create  ===============
[22:14:34] [PASSED] ABGR8888 normal sizes
[22:14:34] [PASSED] ABGR8888 max sizes
[22:14:34] [PASSED] ABGR8888 pitch greater than min required
[22:14:34] [PASSED] ABGR8888 pitch less than min required
[22:14:34] [PASSED] ABGR8888 Invalid width
[22:14:34] [PASSED] ABGR8888 Invalid buffer handle
[22:14:34] [PASSED] No pixel format
[22:14:34] [PASSED] ABGR8888 Width 0
[22:14:34] [PASSED] ABGR8888 Height 0
[22:14:34] [PASSED] ABGR8888 Out of bound height * pitch combination
[22:14:34] [PASSED] ABGR8888 Large buffer offset
[22:14:34] [PASSED] ABGR8888 Buffer offset for inexistent plane
[22:14:34] [PASSED] ABGR8888 Invalid flag
[22:14:34] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[22:14:34] [PASSED] ABGR8888 Valid buffer modifier
[22:14:34] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[22:14:34] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[22:14:34] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[22:14:34] [PASSED] NV12 Normal sizes
[22:14:34] [PASSED] NV12 Max sizes
[22:14:34] [PASSED] NV12 Invalid pitch
[22:14:34] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[22:14:34] [PASSED] NV12 different  modifier per-plane
[22:14:34] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[22:14:34] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[22:14:34] [PASSED] NV12 Modifier for inexistent plane
[22:14:34] [PASSED] NV12 Handle for inexistent plane
[22:14:34] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[22:14:34] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[22:14:34] [PASSED] YVU420 Normal sizes
[22:14:34] [PASSED] YVU420 Max sizes
[22:14:34] [PASSED] YVU420 Invalid pitch
[22:14:34] [PASSED] YVU420 Different pitches
[22:14:34] [PASSED] YVU420 Different buffer offsets/pitches
[22:14:34] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[22:14:34] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[22:14:34] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[22:14:34] [PASSED] YVU420 Valid modifier
[22:14:34] [PASSED] YVU420 Different modifiers per plane
[22:14:34] [PASSED] YVU420 Modifier for inexistent plane
[22:14:34] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[22:14:34] [PASSED] X0L2 Normal sizes
[22:14:34] [PASSED] X0L2 Max sizes
[22:14:34] [PASSED] X0L2 Invalid pitch
[22:14:34] [PASSED] X0L2 Pitch greater than minimum required
[22:14:34] [PASSED] X0L2 Handle for inexistent plane
[22:14:34] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[22:14:34] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[22:14:34] [PASSED] X0L2 Valid modifier
[22:14:34] [PASSED] X0L2 Modifier for inexistent plane
[22:14:34] =========== [PASSED] drm_test_framebuffer_create ===========
[22:14:34] [PASSED] drm_test_framebuffer_free
[22:14:34] [PASSED] drm_test_framebuffer_init
[22:14:34] [PASSED] drm_test_framebuffer_init_bad_format
[22:14:34] [PASSED] drm_test_framebuffer_init_dev_mismatch
[22:14:34] [PASSED] drm_test_framebuffer_lookup
[22:14:34] [PASSED] drm_test_framebuffer_lookup_inexistent
[22:14:34] [PASSED] drm_test_framebuffer_modifiers_not_supported
[22:14:34] ================= [PASSED] drm_framebuffer =================
[22:14:34] ================ drm_gem_shmem (8 subtests) ================
[22:14:34] [PASSED] drm_gem_shmem_test_obj_create
[22:14:34] [PASSED] drm_gem_shmem_test_obj_create_private
[22:14:34] [PASSED] drm_gem_shmem_test_pin_pages
[22:14:34] [PASSED] drm_gem_shmem_test_vmap
[22:14:34] [PASSED] drm_gem_shmem_test_get_sg_table
[22:14:34] [PASSED] drm_gem_shmem_test_get_pages_sgt
[22:14:34] [PASSED] drm_gem_shmem_test_madvise
[22:14:34] [PASSED] drm_gem_shmem_test_purge
[22:14:34] ================== [PASSED] drm_gem_shmem ==================
[22:14:34] === drm_atomic_helper_connector_hdmi_check (27 subtests) ===
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[22:14:34] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420  =======
[22:14:34] [PASSED] Automatic
[22:14:34] [PASSED] Full
[22:14:34] [PASSED] Limited 16:235
[22:14:34] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[22:14:34] [PASSED] drm_test_check_disable_connector
[22:14:34] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[22:14:34] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[22:14:34] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[22:14:34] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[22:14:34] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[22:14:34] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[22:14:34] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[22:14:34] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[22:14:34] [PASSED] drm_test_check_output_bpc_dvi
[22:14:34] [PASSED] drm_test_check_output_bpc_format_vic_1
[22:14:34] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[22:14:34] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[22:14:34] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[22:14:34] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[22:14:34] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[22:14:34] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[22:14:34] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[22:14:34] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[22:14:34] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[22:14:34] [PASSED] drm_test_check_broadcast_rgb_value
[22:14:34] [PASSED] drm_test_check_bpc_8_value
[22:14:34] [PASSED] drm_test_check_bpc_10_value
[22:14:34] [PASSED] drm_test_check_bpc_12_value
[22:14:34] [PASSED] drm_test_check_format_value
[22:14:34] [PASSED] drm_test_check_tmds_char_value
[22:14:34] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[22:14:34] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) =
[22:14:34] [PASSED] drm_test_check_mode_valid
[22:14:34] [PASSED] drm_test_check_mode_valid_reject
[22:14:34] [PASSED] drm_test_check_mode_valid_reject_rate
[22:14:34] [PASSED] drm_test_check_mode_valid_reject_max_clock
[22:14:34] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[22:14:34] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[22:14:34] [PASSED] drm_test_check_infoframes
[22:14:34] [PASSED] drm_test_check_reject_avi_infoframe
[22:14:34] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[22:14:34] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[22:14:34] [PASSED] drm_test_check_reject_audio_infoframe
[22:14:34] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[22:14:34] ================= drm_managed (2 subtests) =================
[22:14:34] [PASSED] drm_test_managed_release_action
[22:14:34] [PASSED] drm_test_managed_run_action
[22:14:34] =================== [PASSED] drm_managed ===================
[22:14:34] =================== drm_mm (6 subtests) ====================
[22:14:34] [PASSED] drm_test_mm_init
[22:14:34] [PASSED] drm_test_mm_debug
[22:14:34] [PASSED] drm_test_mm_align32
[22:14:34] [PASSED] drm_test_mm_align64
[22:14:34] [PASSED] drm_test_mm_lowest
[22:14:34] [PASSED] drm_test_mm_highest
[22:14:34] ===================== [PASSED] drm_mm ======================
[22:14:34] ============= drm_modes_analog_tv (5 subtests) =============
[22:14:34] [PASSED] drm_test_modes_analog_tv_mono_576i
[22:14:34] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[22:14:34] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[22:14:34] [PASSED] drm_test_modes_analog_tv_pal_576i
[22:14:34] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[22:14:34] =============== [PASSED] drm_modes_analog_tv ===============
[22:14:34] ============== drm_plane_helper (2 subtests) ===============
[22:14:34] =============== drm_test_check_plane_state  ================
[22:14:34] [PASSED] clipping_simple
[22:14:34] [PASSED] clipping_rotate_reflect
[22:14:34] [PASSED] positioning_simple
[22:14:34] [PASSED] upscaling
[22:14:34] [PASSED] downscaling
[22:14:34] [PASSED] rounding1
[22:14:34] [PASSED] rounding2
[22:14:34] [PASSED] rounding3
[22:14:34] [PASSED] rounding4
[22:14:34] =========== [PASSED] drm_test_check_plane_state ============
[22:14:34] =========== drm_test_check_invalid_plane_state  ============
[22:14:34] [PASSED] positioning_invalid
[22:14:34] [PASSED] upscaling_invalid
[22:14:34] [PASSED] downscaling_invalid
[22:14:34] ======= [PASSED] drm_test_check_invalid_plane_state ========
[22:14:34] ================ [PASSED] drm_plane_helper =================
[22:14:34] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[22:14:34] ====== drm_test_connector_helper_tv_get_modes_check  =======
[22:14:34] [PASSED] None
[22:14:34] [PASSED] PAL
[22:14:34] [PASSED] NTSC
[22:14:34] [PASSED] Both, NTSC Default
[22:14:34] [PASSED] Both, PAL Default
[22:14:34] [PASSED] Both, NTSC Default, with PAL on command-line
[22:14:34] [PASSED] Both, PAL Default, with NTSC on command-line
[22:14:34] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[22:14:34] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[22:14:34] ================== drm_rect (9 subtests) ===================
[22:14:34] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[22:14:34] [PASSED] drm_test_rect_clip_scaled_not_clipped
[22:14:34] [PASSED] drm_test_rect_clip_scaled_clipped
[22:14:34] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[22:14:34] ================= drm_test_rect_intersect  =================
[22:14:34] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[22:14:34] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[22:14:34] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[22:14:34] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[22:14:34] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[22:14:34] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[22:14:34] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[22:14:34] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[22:14:34] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[22:14:34] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[22:14:34] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[22:14:34] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[22:14:34] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[22:14:34] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[22:14:34] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
stty: 'standard input': Inappropriate ioctl for device
[22:14:34] ============= [PASSED] drm_test_rect_intersect =============
[22:14:34] ================ drm_test_rect_calc_hscale  ================
[22:14:34] [PASSED] normal use
[22:14:34] [PASSED] out of max range
[22:14:34] [PASSED] out of min range
[22:14:34] [PASSED] zero dst
[22:14:34] [PASSED] negative src
[22:14:34] [PASSED] negative dst
[22:14:34] ============ [PASSED] drm_test_rect_calc_hscale ============
[22:14:34] ================ drm_test_rect_calc_vscale  ================
[22:14:34] [PASSED] normal use
[22:14:34] [PASSED] out of max range
[22:14:34] [PASSED] out of min range
[22:14:34] [PASSED] zero dst
[22:14:34] [PASSED] negative src
[22:14:34] [PASSED] negative dst
[22:14:34] ============ [PASSED] drm_test_rect_calc_vscale ============
[22:14:34] ================== drm_test_rect_rotate  ===================
[22:14:34] [PASSED] reflect-x
[22:14:34] [PASSED] reflect-y
[22:14:34] [PASSED] rotate-0
[22:14:34] [PASSED] rotate-90
[22:14:34] [PASSED] rotate-180
[22:14:34] [PASSED] rotate-270
[22:14:34] ============== [PASSED] drm_test_rect_rotate ===============
[22:14:34] ================ drm_test_rect_rotate_inv  =================
[22:14:34] [PASSED] reflect-x
[22:14:34] [PASSED] reflect-y
[22:14:34] [PASSED] rotate-0
[22:14:34] [PASSED] rotate-90
[22:14:34] [PASSED] rotate-180
[22:14:34] [PASSED] rotate-270
[22:14:34] ============ [PASSED] drm_test_rect_rotate_inv =============
[22:14:34] ==================== [PASSED] drm_rect =====================
[22:14:34] ============ drm_sysfb_modeset_test (1 subtest) ============
[22:14:34] ============ drm_test_sysfb_build_fourcc_list  =============
[22:14:34] [PASSED] no native formats
[22:14:34] [PASSED] XRGB8888 as native format
[22:14:34] [PASSED] remove duplicates
[22:14:34] [PASSED] convert alpha formats
[22:14:34] [PASSED] random formats
[22:14:34] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[22:14:34] ============= [PASSED] drm_sysfb_modeset_test ==============
[22:14:34] ================== drm_fixp (2 subtests) ===================
[22:14:34] [PASSED] drm_test_int2fixp
[22:14:34] [PASSED] drm_test_sm2fixp
[22:14:34] ==================== [PASSED] drm_fixp =====================
[22:14:34] ============================================================
[22:14:34] Testing complete. Ran 630 tests: passed: 630
[22:14:34] Elapsed time: 27.800s total, 1.705s configuring, 25.673s building, 0.382s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [22:14:34] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[22:14:36] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[22:14:45] Starting KUnit Kernel (1/1)...
[22:14:45] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:14:45] ================= ttm_device (5 subtests) ==================
[22:14:45] [PASSED] ttm_device_init_basic
[22:14:45] [PASSED] ttm_device_init_multiple
[22:14:45] [PASSED] ttm_device_fini_basic
[22:14:45] [PASSED] ttm_device_init_no_vma_man
[22:14:45] ================== ttm_device_init_pools  ==================
[22:14:45] [PASSED] No DMA allocations, no DMA32 required
[22:14:45] [PASSED] DMA allocations, DMA32 required
[22:14:45] [PASSED] No DMA allocations, DMA32 required
[22:14:45] [PASSED] DMA allocations, no DMA32 required
[22:14:45] ============== [PASSED] ttm_device_init_pools ==============
[22:14:45] =================== [PASSED] ttm_device ====================
[22:14:45] ================== ttm_pool (8 subtests) ===================
[22:14:45] ================== ttm_pool_alloc_basic  ===================
[22:14:45] [PASSED] One page
[22:14:45] [PASSED] More than one page
[22:14:45] [PASSED] Above the allocation limit
[22:14:45] [PASSED] One page, with coherent DMA mappings enabled
[22:14:45] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[22:14:45] ============== [PASSED] ttm_pool_alloc_basic ===============
[22:14:45] ============== ttm_pool_alloc_basic_dma_addr  ==============
[22:14:45] [PASSED] One page
[22:14:45] [PASSED] More than one page
[22:14:45] [PASSED] Above the allocation limit
[22:14:45] [PASSED] One page, with coherent DMA mappings enabled
[22:14:45] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[22:14:45] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[22:14:45] [PASSED] ttm_pool_alloc_order_caching_match
[22:14:45] [PASSED] ttm_pool_alloc_caching_mismatch
[22:14:45] [PASSED] ttm_pool_alloc_order_mismatch
[22:14:45] [PASSED] ttm_pool_free_dma_alloc
[22:14:45] [PASSED] ttm_pool_free_no_dma_alloc
[22:14:45] [PASSED] ttm_pool_fini_basic
[22:14:45] ==================== [PASSED] ttm_pool =====================
[22:14:45] ================ ttm_resource (8 subtests) =================
[22:14:45] ================= ttm_resource_init_basic  =================
[22:14:45] [PASSED] Init resource in TTM_PL_SYSTEM
[22:14:45] [PASSED] Init resource in TTM_PL_VRAM
[22:14:45] [PASSED] Init resource in a private placement
[22:14:45] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[22:14:45] ============= [PASSED] ttm_resource_init_basic =============
[22:14:45] [PASSED] ttm_resource_init_pinned
[22:14:45] [PASSED] ttm_resource_fini_basic
[22:14:45] [PASSED] ttm_resource_manager_init_basic
[22:14:45] [PASSED] ttm_resource_manager_usage_basic
[22:14:45] [PASSED] ttm_resource_manager_set_used_basic
[22:14:45] [PASSED] ttm_sys_man_alloc_basic
[22:14:45] [PASSED] ttm_sys_man_free_basic
[22:14:45] ================== [PASSED] ttm_resource ===================
[22:14:45] =================== ttm_tt (15 subtests) ===================
[22:14:45] ==================== ttm_tt_init_basic  ====================
[22:14:45] [PASSED] Page-aligned size
[22:14:45] [PASSED] Extra pages requested
[22:14:45] ================ [PASSED] ttm_tt_init_basic ================
[22:14:45] [PASSED] ttm_tt_init_misaligned
[22:14:45] [PASSED] ttm_tt_fini_basic
[22:14:45] [PASSED] ttm_tt_fini_sg
[22:14:45] [PASSED] ttm_tt_fini_shmem
[22:14:45] [PASSED] ttm_tt_create_basic
[22:14:45] [PASSED] ttm_tt_create_invalid_bo_type
[22:14:45] [PASSED] ttm_tt_create_ttm_exists
[22:14:45] [PASSED] ttm_tt_create_failed
[22:14:45] [PASSED] ttm_tt_destroy_basic
[22:14:45] [PASSED] ttm_tt_populate_null_ttm
[22:14:45] [PASSED] ttm_tt_populate_populated_ttm
[22:14:45] [PASSED] ttm_tt_unpopulate_basic
[22:14:45] [PASSED] ttm_tt_unpopulate_empty_ttm
[22:14:45] [PASSED] ttm_tt_swapin_basic
[22:14:45] ===================== [PASSED] ttm_tt ======================
[22:14:45] =================== ttm_bo (14 subtests) ===================
[22:14:45] =========== ttm_bo_reserve_optimistic_no_ticket  ===========
[22:14:45] [PASSED] Cannot be interrupted and sleeps
[22:14:45] [PASSED] Cannot be interrupted, locks straight away
[22:14:45] [PASSED] Can be interrupted, sleeps
[22:14:45] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[22:14:45] [PASSED] ttm_bo_reserve_locked_no_sleep
[22:14:45] [PASSED] ttm_bo_reserve_no_wait_ticket
[22:14:46] [PASSED] ttm_bo_reserve_double_resv
[22:14:46] [PASSED] ttm_bo_reserve_interrupted
[22:14:46] [PASSED] ttm_bo_reserve_deadlock
[22:14:46] [PASSED] ttm_bo_unreserve_basic
[22:14:46] [PASSED] ttm_bo_unreserve_pinned
[22:14:46] [PASSED] ttm_bo_unreserve_bulk
[22:14:46] [PASSED] ttm_bo_fini_basic
[22:14:46] [PASSED] ttm_bo_fini_shared_resv
[22:14:46] [PASSED] ttm_bo_pin_basic
[22:14:46] [PASSED] ttm_bo_pin_unpin_resource
[22:14:46] [PASSED] ttm_bo_multiple_pin_one_unpin
[22:14:46] ===================== [PASSED] ttm_bo ======================
[22:14:46] ============== ttm_bo_validate (21 subtests) ===============
[22:14:46] ============== ttm_bo_init_reserved_sys_man  ===============
[22:14:46] [PASSED] Buffer object for userspace
[22:14:46] [PASSED] Kernel buffer object
[22:14:46] [PASSED] Shared buffer object
[22:14:46] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[22:14:46] ============== ttm_bo_init_reserved_mock_man  ==============
[22:14:46] [PASSED] Buffer object for userspace
[22:14:46] [PASSED] Kernel buffer object
[22:14:46] [PASSED] Shared buffer object
[22:14:46] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[22:14:46] [PASSED] ttm_bo_init_reserved_resv
[22:14:46] ================== ttm_bo_validate_basic  ==================
[22:14:46] [PASSED] Buffer object for userspace
[22:14:46] [PASSED] Kernel buffer object
[22:14:46] [PASSED] Shared buffer object
[22:14:46] ============== [PASSED] ttm_bo_validate_basic ==============
[22:14:46] [PASSED] ttm_bo_validate_invalid_placement
[22:14:46] ============= ttm_bo_validate_same_placement  ==============
[22:14:46] [PASSED] System manager
[22:14:46] [PASSED] VRAM manager
[22:14:46] ========= [PASSED] ttm_bo_validate_same_placement ==========
[22:14:46] [PASSED] ttm_bo_validate_failed_alloc
[22:14:46] [PASSED] ttm_bo_validate_pinned
[22:14:46] [PASSED] ttm_bo_validate_busy_placement
[22:14:46] ================ ttm_bo_validate_multihop  =================
[22:14:46] [PASSED] Buffer object for userspace
[22:14:46] [PASSED] Kernel buffer object
[22:14:46] [PASSED] Shared buffer object
[22:14:46] ============ [PASSED] ttm_bo_validate_multihop =============
[22:14:46] ========== ttm_bo_validate_no_placement_signaled  ==========
[22:14:46] [PASSED] Buffer object in system domain, no page vector
[22:14:46] [PASSED] Buffer object in system domain with an existing page vector
[22:14:46] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[22:14:46] ======== ttm_bo_validate_no_placement_not_signaled  ========
[22:14:46] [PASSED] Buffer object for userspace
[22:14:46] [PASSED] Kernel buffer object
[22:14:46] [PASSED] Shared buffer object
[22:14:46] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[22:14:46] [PASSED] ttm_bo_validate_move_fence_signaled
[22:14:46] ========= ttm_bo_validate_move_fence_not_signaled  =========
[22:14:46] [PASSED] Waits for GPU
[22:14:46] [PASSED] Tries to lock straight away
[22:14:46] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[22:14:46] [PASSED] ttm_bo_validate_happy_evict
[22:14:46] [PASSED] ttm_bo_validate_all_pinned_evict
[22:14:46] [PASSED] ttm_bo_validate_allowed_only_evict
[22:14:46] [PASSED] ttm_bo_validate_deleted_evict
[22:14:46] [PASSED] ttm_bo_validate_busy_domain_evict
[22:14:46] [PASSED] ttm_bo_validate_evict_gutting
[22:14:46] [PASSED] ttm_bo_validate_recrusive_evict
stty: 'standard input': Inappropriate ioctl for device
[22:14:46] ================= [PASSED] ttm_bo_validate =================
[22:14:46] ============================================================
[22:14:46] Testing complete. Ran 101 tests: passed: 101
[22:14:46] Elapsed time: 11.332s total, 1.697s configuring, 9.369s building, 0.228s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel

#9 lore raw
In reply to Matthew Brost
Quoted 10 lines · Matthew Brost

The dma-map IOVA alloc, link, and sync APIs perform significantly better than dma-map / dma-unmap, as they avoid costly IOMMU synchronizations. This difference is especially noticeable when mapping a 2MB region in 4KB pages.

Use dma-map IOVA alloc, link, and sync APIs for GPU SVM and DRM page, which mappings between the CPU and GPU.

Initial results are promising.

Quoted 7 lines

Baseline CPU time during 2M / 64K fault with a migration:
Average migrate 2M cpu time (us, percentage): 552.36049107142857142857, .71943789893868318799 Average migrate 64K cpu time (us, percentage): 24.97767857142857142857, .34789908128526791960

After this series CPU time during 2M / 64K fault with a migration:
Average migrate 2M cpu time (us, percentage): 224.81808035714285714286, .51412827364772602557 Average migrate 64K cpu time (us, percentage): 14.65625000000000000000, .25659463050529524405

Thats a 2x improvement in overall full operation? Wow!

Did you look at how non-iommu cases perform too?

I think we can do better still for the non-cached platforms as I have a way in mind to batch up lines and flush the line instead of flushing for every 8 byte IOPTE written. Some ARM folks have been talking about this problem too..

Jason

author maintainer
#10 lore raw
Quoted 15 lines · Jason Gunthorpe
Quoted 14 lines · Matthew Brost

The dma-map IOVA alloc, link, and sync APIs perform significantly better than dma-map / dma-unmap, as they avoid costly IOMMU synchronizations. This difference is especially noticeable when mapping a 2MB region in 4KB pages.

Use dma-map IOVA alloc, link, and sync APIs for GPU SVM and DRM page, which mappings between the CPU and GPU.

Initial results are promising.

Baseline CPU time during 2M / 64K fault with a migration:
Average migrate 2M cpu time (us, percentage): 552.36049107142857142857, .71943789893868318799 Average migrate 64K cpu time (us, percentage): 24.97767857142857142857, .34789908128526791960

Quoted 8 lines
Quoted 3 lines

After this series CPU time during 2M / 64K fault with a migration:
Average migrate 2M cpu time (us, percentage): 224.81808035714285714286, .51412827364772602557 Average migrate 64K cpu time (us, percentage): 14.65625000000000000000, .25659463050529524405

Thats a 2x improvement in overall full operation? Wow!

Did you look at how non-iommu cases perform too?

Like intel_iommu=off kerenl command line? I haven't checked that but can.

Quoted 4 lines

I think we can do better still for the non-cached platforms as I have a way in mind to batch up lines and flush the line instead of flushing for every 8 byte IOPTE written. Some ARM folks have been talking about this problem too..

Yes, prior to the IOMMU changes I believe the basline was ~330us so dma-map/unmap are still way slower than before and if this affect platforms other than Intel x86 there will be complaints everyone until the entire kernel moves to the IOVA alloc model.

Also another question does IOVA alloc support modes similar to dma_map_resource between per device? We also do that and I haven't modified that code or check that for perf regressions.

Matt

Quoted 2 lines

Jason

#11 lore raw
Quoted 6 lines · Matthew Brost
Quoted 4 lines

Thats a 2x improvement in overall full operation? Wow!

Did you look at how non-iommu cases perform too?

Like intel_iommu=off kerenl command line? I haven't checked that but can.

iommu.passthrough=1

This is generally what we recommend everyone who cares about performance more than iommu protection should use by default. It leaves the iommu HW turned on, which x86 requires for other reasons, but eliminates the performance cost to DMA.

Quoted 9 lines
Quoted 4 lines

I think we can do better still for the non-cached platforms as I have a way in mind to batch up lines and flush the line instead of flushing for every 8 byte IOPTE written. Some ARM folks have been talking about this problem too..

Yes, prior to the IOMMU changes I believe the basline was ~330us so dma-map/unmap are still way slower than before and if this affect platforms other than Intel x86 there will be complaints everyone until the entire kernel moves to the IOVA alloc model.

I have managed to get a test showing that when cache flushing is turned on the new code is 50% slower. I'm investigating this..

map_pages

   pgsz  ,avg new,old ns, min new,old ns  , min % (+ve is better)
     2^12,    331,249   ,     289,214     , -35.35
     2^21,    335,243   ,     306,222     , -37.37
     2^30,    226,238   ,     205,215     ,   4.04
    # test_map_unmap_benchmark:
unmap_pages
   pgsz  ,avg new,old ns, min new,old ns  , min % (+ve is better)
     2^12,    389,272   ,     347,237     , -46.46
     2^21,    321,261   ,     297,239     , -24.24
     2^30,    237,251   ,     214,228     ,   6.06

So it looks to me like this is isolated to Intel GPU for the moment because it is the only device that would use the cache flushing flow until we convert ARM.

FWIW, on my system enabling cache flushing goes from 60ns to 250ns, it has a huge, huge cost to these flows.

Quoted 3 lines

Also another question does IOVA alloc support modes similar to dma_map_resource between per device? We also do that and I haven't modified that code or check that for perf regressions.

Yes, and no.. The API does, but Christoph doesn't want to let arbitary drivers use it. So you need to figure out some way to get there.

For reference Leon added dma_buf_phys_vec_to_sgt() which shows this flow to create a sg_table.

There are also hmm helpers for the mapping too if this is in a hmm context.

A PCI device calling map_resource is incorrect usage of the DMA API, but it was the only option till now.

Jason

author maintainer
#12 lore raw
Quoted 6 lines · Jason Gunthorpe
Quoted 5 lines · Matthew Brost
Quoted 4 lines

Thats a 2x improvement in overall full operation? Wow!

Did you look at how non-iommu cases perform too?

Quoted 6 lines
Quoted 1 line

Like intel_iommu=off kerenl command line? I haven't checked that but can.

iommu.passthrough=1

This is generally what we recommend everyone who cares about performance more than iommu protection should use by default. It

Yes, worked in HPC for a long time and we always set the IOMMU to passthrough.

Quoted 3 lines

leaves the iommu HW turned on, which x86 requires for other reasons, but eliminates the performance cost to DMA.

iommu.passthrough=1 brings the 2M case to roughly 130us for 2M - this stat includes migrate_vma_* functions btw, also for reference this time drops to ~10us in any scenario with 2M device pages.

Quoted 25 lines
Quoted 9 lines
Quoted 4 lines

I think we can do better still for the non-cached platforms as I have a way in mind to batch up lines and flush the line instead of flushing for every 8 byte IOPTE written. Some ARM folks have been talking about this problem too..

Yes, prior to the IOMMU changes I believe the basline was ~330us so dma-map/unmap are still way slower than before and if this affect platforms other than Intel x86 there will be complaints everyone until the entire kernel moves to the IOVA alloc model.

I have managed to get a test showing that when cache flushing is turned on the new code is 50% slower. I'm investigating this..

map_pages

   pgsz  ,avg new,old ns, min new,old ns  , min % (+ve is better)
     2^12,    331,249   ,     289,214     , -35.35
     2^21,    335,243   ,     306,222     , -37.37
     2^30,    226,238   ,     205,215     ,   4.04
    # test_map_unmap_benchmark:
unmap_pages
   pgsz  ,avg new,old ns, min new,old ns  , min % (+ve is better)
     2^12,    389,272   ,     347,237     , -46.46
     2^21,    321,261   ,     297,239     , -24.24
     2^30,    237,251   ,     214,228     ,   6.06
Quoted 6 lines

So it looks to me like this is isolated to Intel GPU for the moment because it is the only device that would use the cache flushing flow until we convert ARM.

FWIW, on my system enabling cache flushing goes from 60ns to 250ns, it has a huge, huge cost to these flows.

I see that you have fixed this one, we verfieid it, thanks!.

Quoted 8 lines
Quoted 4 lines

Also another question does IOVA alloc support modes similar to dma_map_resource between per device? We also do that and I haven't modified that code or check that for perf regressions.

Yes, and no.. The API does, but Christoph doesn't want to let arbitary drivers use it. So you need to figure out some way to get there.

Yes, I see that API allows this and it seems to work too.

Quoted 3 lines

For reference Leon added dma_buf_phys_vec_to_sgt() which shows this flow to create a sg_table.

That will likely work for dma-buf, let me see if I can convert our dma-buf flows to use this helper. But it won't work for things like SVM, so it would be desirable to figure out to have an API drivers can use to iova alloc/link/sync/unlink/free for multi-device or just agree we trust drivers enough to use the existing API.

Matt

Quoted 7 lines

There are also hmm helpers for the mapping too if this is in a hmm context.

A PCI device calling map_resource is incorrect usage of the DMA API, but it was the only option till now.

Jason

#13 lore raw
Quoted 5 lines · Matthew Brost

That will likely work for dma-buf, let me see if I can convert our dma-buf flows to use this helper. But it won't work for things like SVM, so it would be desirable to figure out to have an API drivers can use to iova alloc/link/sync/unlink/free for multi-device or just agree we trust drivers enough to use the existing API.

SVM should be driven with HMM and there is a helper in hmm_dma_map_pfn() for this.

Yonatan posted a series to expand it to work with ZONE_DEVICE PRIVATE pages but it needs a refresh

https://lore.kernel.org/linux-rdma/[email protected]/

If there are other cases it would be reasonable to discuss enhancing hmm_dma_map_pfn().

Jason

author maintainer
#14 lore raw
Quoted 11 lines · Jason Gunthorpe
Quoted 5 lines · Matthew Brost

That will likely work for dma-buf, let me see if I can convert our dma-buf flows to use this helper. But it won't work for things like SVM, so it would be desirable to figure out to have an API drivers can use to iova alloc/link/sync/unlink/free for multi-device or just agree we trust drivers enough to use the existing API.

SVM should be driven with HMM and there is a helper in hmm_dma_map_pfn() for this.

Ok, I'm not sure if that will exactly fit how our SVM code is structured.

Quoted 5 lines

Yonatan posted a series to expand it to work with ZONE_DEVICE PRIVATE pages but it needs a refresh

https://lore.kernel.org/linux-rdma/[email protected]/

A brief look, this isn't all that far off from ideas we have in DRM with ops in the pagemap (DRM pagemap) though to handle P2P mappings. We are also forward looking to not just DMA connections but high speed fabrics too. The thinking there was make high speed fabric API look like dma-map iova alloc/link/sync/unlink/free but let DRM pagemap op pick between the dma-map API and high speed fabric API based on connection and wrap everything into DRM common layer (GPU SVM) to map the pages.

Quoted 3 lines

If there are other cases it would be reasonable to discuss enhancing hmm_dma_map_pfn().

Let me wrap my head around this one and get back to you. Something to think about.

Matt

Quoted 1 line

Jason

#15 lore raw

✗ Xe.CI.Full: failure for Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap (rev2)

In reply to Matthew Brost
== Series Details ==

== Series Details ==

Series: Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap (rev2)
URL : https://patchwork.freedesktop.org/series/160587/
State : failure

== Summary ==

ERROR: The runconfig 'xe-4443-a47173257e3d0aeae02f59baad97046bee0b7ce9_FULL' does not exist in the database

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160587v2/index.html