* [PATCH v1 1/5] drm/pagemap: Use struct drm_pagemap_device_addr in mapping and copy functions
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
@ 2025-07-17 13:38 ` Francois Dugast
2025-07-18 4:03 ` Matthew Brost
2025-07-17 13:38 ` [PATCH v1 2/5] drm/xe/svm: Use struct drm_pagemap_device_addr Francois Dugast
` (7 subsequent siblings)
8 siblings, 1 reply; 19+ messages in thread
From: Francois Dugast @ 2025-07-17 13:38 UTC (permalink / raw)
To: intel-xe; +Cc: matthew.brost, Francois Dugast
This struct embeds more information than just the DMA address. This will help
later to support folio orders greater than zero. At this point, there is no
functional change as the only struct member used is addr.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/drm_pagemap.c | 58 +++++++++++++++++------------------
include/drm/drm_pagemap.h | 8 ++---
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
index 1da55322af12..0ed66aaade14 100644
--- a/drivers/gpu/drm/drm_pagemap.c
+++ b/drivers/gpu/drm/drm_pagemap.c
@@ -202,7 +202,7 @@ static void drm_pagemap_get_devmem_page(struct page *page,
/**
* drm_pagemap_migrate_map_pages() - Map migration pages for GPU SVM migration
* @dev: The device for which the pages are being mapped
- * @dma_addr: Array to store DMA addresses corresponding to mapped pages
+ * @device_addr: Array to store DMA information corresponding to mapped pages
* @migrate_pfn: Array of migrate page frame numbers to map
* @npages: Number of pages to map
* @dir: Direction of data transfer (e.g., DMA_BIDIRECTIONAL)
@@ -215,7 +215,7 @@ static void drm_pagemap_get_devmem_page(struct page *page,
* Returns: 0 on success, -EFAULT if an error occurs during mapping.
*/
static int drm_pagemap_migrate_map_pages(struct device *dev,
- dma_addr_t *dma_addr,
+ struct drm_pagemap_device_addr *device_addr,
unsigned long *migrate_pfn,
unsigned long npages,
enum dma_data_direction dir)
@@ -231,8 +231,8 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
if (WARN_ON_ONCE(is_zone_device_page(page)))
return -EFAULT;
- dma_addr[i] = dma_map_page(dev, page, 0, PAGE_SIZE, dir);
- if (dma_mapping_error(dev, dma_addr[i]))
+ device_addr[i].addr = dma_map_page(dev, page, 0, PAGE_SIZE, dir);
+ if (dma_mapping_error(dev, device_addr[i].addr))
return -EFAULT;
}
@@ -242,7 +242,7 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
/**
* drm_pagemap_migrate_unmap_pages() - Unmap pages previously mapped for GPU SVM migration
* @dev: The device for which the pages were mapped
- * @dma_addr: Array of DMA addresses corresponding to mapped pages
+ * @device_addr: Array of DMA information corresponding to mapped pages
* @npages: Number of pages to unmap
* @dir: Direction of data transfer (e.g., DMA_BIDIRECTIONAL)
*
@@ -251,17 +251,17 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
* if it's valid and not already unmapped, and unmaps the corresponding page.
*/
static void drm_pagemap_migrate_unmap_pages(struct device *dev,
- dma_addr_t *dma_addr,
+ struct drm_pagemap_device_addr *device_addr,
unsigned long npages,
enum dma_data_direction dir)
{
unsigned long i;
for (i = 0; i < npages; ++i) {
- if (!dma_addr[i] || dma_mapping_error(dev, dma_addr[i]))
+ if (!device_addr[i].addr || dma_mapping_error(dev, device_addr[i].addr))
continue;
- dma_unmap_page(dev, dma_addr[i], PAGE_SIZE, dir);
+ dma_unmap_page(dev, device_addr[i].addr, PAGE_SIZE, dir);
}
}
@@ -314,7 +314,7 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
struct vm_area_struct *vas;
struct drm_pagemap_zdd *zdd = NULL;
struct page **pages;
- dma_addr_t *dma_addr;
+ struct drm_pagemap_device_addr *device_addr;
void *buf;
int err;
@@ -340,14 +340,14 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
goto err_out;
}
- buf = kvcalloc(npages, 2 * sizeof(*migrate.src) + sizeof(*dma_addr) +
+ buf = kvcalloc(npages, 2 * sizeof(*migrate.src) + sizeof(*device_addr) +
sizeof(*pages), GFP_KERNEL);
if (!buf) {
err = -ENOMEM;
goto err_out;
}
- dma_addr = buf + (2 * sizeof(*migrate.src) * npages);
- pages = buf + (2 * sizeof(*migrate.src) + sizeof(*dma_addr)) * npages;
+ device_addr = buf + (2 * sizeof(*migrate.src) * npages);
+ pages = buf + (2 * sizeof(*migrate.src) + sizeof(*device_addr)) * npages;
zdd = drm_pagemap_zdd_alloc(pgmap_owner);
if (!zdd) {
@@ -377,7 +377,7 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
if (err)
goto err_finalize;
- err = drm_pagemap_migrate_map_pages(devmem_allocation->dev, dma_addr,
+ err = drm_pagemap_migrate_map_pages(devmem_allocation->dev, device_addr,
migrate.src, npages, DMA_TO_DEVICE);
if (err)
goto err_finalize;
@@ -390,7 +390,7 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
drm_pagemap_get_devmem_page(page, zdd);
}
- err = ops->copy_to_devmem(pages, dma_addr, npages);
+ err = ops->copy_to_devmem(pages, device_addr, npages);
if (err)
goto err_finalize;
@@ -404,7 +404,7 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
drm_pagemap_migration_unlock_put_pages(npages, migrate.dst);
migrate_vma_pages(&migrate);
migrate_vma_finalize(&migrate);
- drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, dma_addr, npages,
+ drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, device_addr, npages,
DMA_TO_DEVICE);
err_free:
if (zdd)
@@ -509,7 +509,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
unsigned long npages, mpages = 0;
struct page **pages;
unsigned long *src, *dst;
- dma_addr_t *dma_addr;
+ struct drm_pagemap_device_addr *device_addr;
void *buf;
int i, err = 0;
unsigned int retry_count = 2;
@@ -520,7 +520,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
if (!mmget_not_zero(devmem_allocation->mm))
return -EFAULT;
- buf = kvcalloc(npages, 2 * sizeof(*src) + sizeof(*dma_addr) +
+ buf = kvcalloc(npages, 2 * sizeof(*src) + sizeof(*device_addr) +
sizeof(*pages), GFP_KERNEL);
if (!buf) {
err = -ENOMEM;
@@ -528,8 +528,8 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
}
src = buf;
dst = buf + (sizeof(*src) * npages);
- dma_addr = buf + (2 * sizeof(*src) * npages);
- pages = buf + (2 * sizeof(*src) + sizeof(*dma_addr)) * npages;
+ device_addr = buf + (2 * sizeof(*src) * npages);
+ pages = buf + (2 * sizeof(*src) + sizeof(*device_addr)) * npages;
err = ops->populate_devmem_pfn(devmem_allocation, npages, src);
if (err)
@@ -544,7 +544,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
if (err || !mpages)
goto err_finalize;
- err = drm_pagemap_migrate_map_pages(devmem_allocation->dev, dma_addr,
+ err = drm_pagemap_migrate_map_pages(devmem_allocation->dev, device_addr,
dst, npages, DMA_FROM_DEVICE);
if (err)
goto err_finalize;
@@ -552,7 +552,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
for (i = 0; i < npages; ++i)
pages[i] = migrate_pfn_to_page(src[i]);
- err = ops->copy_to_ram(pages, dma_addr, npages);
+ err = ops->copy_to_ram(pages, device_addr, npages);
if (err)
goto err_finalize;
@@ -561,7 +561,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
drm_pagemap_migration_unlock_put_pages(npages, dst);
migrate_device_pages(src, dst, npages);
migrate_device_finalize(src, dst, npages);
- drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, dma_addr, npages,
+ drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, device_addr, npages,
DMA_FROM_DEVICE);
err_free:
kvfree(buf);
@@ -612,7 +612,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
struct device *dev = NULL;
unsigned long npages, mpages = 0;
struct page **pages;
- dma_addr_t *dma_addr;
+ struct drm_pagemap_device_addr *device_addr;
unsigned long start, end;
void *buf;
int i, err = 0;
@@ -637,14 +637,14 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
migrate.end = end;
npages = npages_in_range(start, end);
- buf = kvcalloc(npages, 2 * sizeof(*migrate.src) + sizeof(*dma_addr) +
+ buf = kvcalloc(npages, 2 * sizeof(*migrate.src) + sizeof(*device_addr) +
sizeof(*pages), GFP_KERNEL);
if (!buf) {
err = -ENOMEM;
goto err_out;
}
- dma_addr = buf + (2 * sizeof(*migrate.src) * npages);
- pages = buf + (2 * sizeof(*migrate.src) + sizeof(*dma_addr)) * npages;
+ device_addr = buf + (2 * sizeof(*migrate.src) * npages);
+ pages = buf + (2 * sizeof(*migrate.src) + sizeof(*device_addr)) * npages;
migrate.vma = vas;
migrate.src = buf;
@@ -680,7 +680,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
if (err)
goto err_finalize;
- err = drm_pagemap_migrate_map_pages(dev, dma_addr, migrate.dst, npages,
+ err = drm_pagemap_migrate_map_pages(dev, device_addr, migrate.dst, npages,
DMA_FROM_DEVICE);
if (err)
goto err_finalize;
@@ -688,7 +688,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
for (i = 0; i < npages; ++i)
pages[i] = migrate_pfn_to_page(migrate.src[i]);
- err = ops->copy_to_ram(pages, dma_addr, npages);
+ err = ops->copy_to_ram(pages, device_addr, npages);
if (err)
goto err_finalize;
@@ -698,7 +698,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
migrate_vma_pages(&migrate);
migrate_vma_finalize(&migrate);
if (dev)
- drm_pagemap_migrate_unmap_pages(dev, dma_addr, npages,
+ drm_pagemap_migrate_unmap_pages(dev, device_addr, npages,
DMA_FROM_DEVICE);
err_free:
kvfree(buf);
diff --git a/include/drm/drm_pagemap.h b/include/drm/drm_pagemap.h
index e5f20a1235be..a0c0882eeb8e 100644
--- a/include/drm/drm_pagemap.h
+++ b/include/drm/drm_pagemap.h
@@ -170,7 +170,7 @@ struct drm_pagemap_devmem_ops {
/**
* @copy_to_devmem: Copy to device memory (required for migration)
* @pages: Pointer to array of device memory pages (destination)
- * @dma_addr: Pointer to array of DMA addresses (source)
+ * @device_addr: Pointer to array of DMA information (source)
* @npages: Number of pages to copy
*
* Copy pages to device memory.
@@ -178,13 +178,13 @@ struct drm_pagemap_devmem_ops {
* Return: 0 on success, a negative error code on failure.
*/
int (*copy_to_devmem)(struct page **pages,
- dma_addr_t *dma_addr,
+ struct drm_pagemap_device_addr *device_addr,
unsigned long npages);
/**
* @copy_to_ram: Copy to system RAM (required for migration)
* @pages: Pointer to array of device memory pages (source)
- * @dma_addr: Pointer to array of DMA addresses (destination)
+ * @device_addr: Pointer to array of DMA information (destination)
* @npages: Number of pages to copy
*
* Copy pages to system RAM.
@@ -192,7 +192,7 @@ struct drm_pagemap_devmem_ops {
* Return: 0 on success, a negative error code on failure.
*/
int (*copy_to_ram)(struct page **pages,
- dma_addr_t *dma_addr,
+ struct drm_pagemap_device_addr *device_addr,
unsigned long npages);
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v1 1/5] drm/pagemap: Use struct drm_pagemap_device_addr in mapping and copy functions
2025-07-17 13:38 ` [PATCH v1 1/5] drm/pagemap: Use struct drm_pagemap_device_addr in mapping and copy functions Francois Dugast
@ 2025-07-18 4:03 ` Matthew Brost
2025-07-23 12:10 ` Thomas Hellström
0 siblings, 1 reply; 19+ messages in thread
From: Matthew Brost @ 2025-07-18 4:03 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
On Thu, Jul 17, 2025 at 03:38:23PM +0200, Francois Dugast wrote:
> This struct embeds more information than just the DMA address. This will help
> later to support folio orders greater than zero. At this point, there is no
> functional change as the only struct member used is addr.
>
This patch alone will break the build. You'll need to combine it with
the next patch to avoid build breakage.
> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/drm_pagemap.c | 58 +++++++++++++++++------------------
> include/drm/drm_pagemap.h | 8 ++---
> 2 files changed, 33 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
> index 1da55322af12..0ed66aaade14 100644
> --- a/drivers/gpu/drm/drm_pagemap.c
> +++ b/drivers/gpu/drm/drm_pagemap.c
> @@ -202,7 +202,7 @@ static void drm_pagemap_get_devmem_page(struct page *page,
> /**
> * drm_pagemap_migrate_map_pages() - Map migration pages for GPU SVM migration
> * @dev: The device for which the pages are being mapped
> - * @dma_addr: Array to store DMA addresses corresponding to mapped pages
> + * @device_addr: Array to store DMA information corresponding to mapped pages
> * @migrate_pfn: Array of migrate page frame numbers to map
> * @npages: Number of pages to map
> * @dir: Direction of data transfer (e.g., DMA_BIDIRECTIONAL)
> @@ -215,7 +215,7 @@ static void drm_pagemap_get_devmem_page(struct page *page,
> * Returns: 0 on success, -EFAULT if an error occurs during mapping.
> */
> static int drm_pagemap_migrate_map_pages(struct device *dev,
> - dma_addr_t *dma_addr,
> + struct drm_pagemap_device_addr *device_addr,
I like the change to drm_pagemap_device_addr—I think it fits with the
patch—but it's not actually a device address. It's a DMA mapping of CPU
memory. Originally, drm_pagemap_device_addr was intended to represent a
device memory address shared between devices. That said, I think it
still works for our purpose here.
So, I suggest we rename it:
s/drm_pagemap_device_addr/drm_pagemap_addr
And for the variable:
s/device_addr/pagemap_addr
Thomas is back Monday, perhaps field his input on this too.
> unsigned long *migrate_pfn,
> unsigned long npages,
> enum dma_data_direction dir)
> @@ -231,8 +231,8 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
> if (WARN_ON_ONCE(is_zone_device_page(page)))
> return -EFAULT;
>
> - dma_addr[i] = dma_map_page(dev, page, 0, PAGE_SIZE, dir);
> - if (dma_mapping_error(dev, dma_addr[i]))
> + device_addr[i].addr = dma_map_page(dev, page, 0, PAGE_SIZE, dir);
I'd explicitly set proto to DRM_INTERCONNECT_SYSTEM here—even though
it's zero—for clarity, and also set the dir for completeness.
Matt
> + if (dma_mapping_error(dev, device_addr[i].addr))
> return -EFAULT;
> }
>
> @@ -242,7 +242,7 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
> /**
> * drm_pagemap_migrate_unmap_pages() - Unmap pages previously mapped for GPU SVM migration
> * @dev: The device for which the pages were mapped
> - * @dma_addr: Array of DMA addresses corresponding to mapped pages
> + * @device_addr: Array of DMA information corresponding to mapped pages
> * @npages: Number of pages to unmap
> * @dir: Direction of data transfer (e.g., DMA_BIDIRECTIONAL)
> *
> @@ -251,17 +251,17 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
> * if it's valid and not already unmapped, and unmaps the corresponding page.
> */
> static void drm_pagemap_migrate_unmap_pages(struct device *dev,
> - dma_addr_t *dma_addr,
> + struct drm_pagemap_device_addr *device_addr,
> unsigned long npages,
> enum dma_data_direction dir)
> {
> unsigned long i;
>
> for (i = 0; i < npages; ++i) {
> - if (!dma_addr[i] || dma_mapping_error(dev, dma_addr[i]))
> + if (!device_addr[i].addr || dma_mapping_error(dev, device_addr[i].addr))
> continue;
>
> - dma_unmap_page(dev, dma_addr[i], PAGE_SIZE, dir);
> + dma_unmap_page(dev, device_addr[i].addr, PAGE_SIZE, dir);
> }
> }
>
> @@ -314,7 +314,7 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
> struct vm_area_struct *vas;
> struct drm_pagemap_zdd *zdd = NULL;
> struct page **pages;
> - dma_addr_t *dma_addr;
> + struct drm_pagemap_device_addr *device_addr;
> void *buf;
> int err;
>
> @@ -340,14 +340,14 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
> goto err_out;
> }
>
> - buf = kvcalloc(npages, 2 * sizeof(*migrate.src) + sizeof(*dma_addr) +
> + buf = kvcalloc(npages, 2 * sizeof(*migrate.src) + sizeof(*device_addr) +
> sizeof(*pages), GFP_KERNEL);
> if (!buf) {
> err = -ENOMEM;
> goto err_out;
> }
> - dma_addr = buf + (2 * sizeof(*migrate.src) * npages);
> - pages = buf + (2 * sizeof(*migrate.src) + sizeof(*dma_addr)) * npages;
> + device_addr = buf + (2 * sizeof(*migrate.src) * npages);
> + pages = buf + (2 * sizeof(*migrate.src) + sizeof(*device_addr)) * npages;
>
> zdd = drm_pagemap_zdd_alloc(pgmap_owner);
> if (!zdd) {
> @@ -377,7 +377,7 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
> if (err)
> goto err_finalize;
>
> - err = drm_pagemap_migrate_map_pages(devmem_allocation->dev, dma_addr,
> + err = drm_pagemap_migrate_map_pages(devmem_allocation->dev, device_addr,
> migrate.src, npages, DMA_TO_DEVICE);
> if (err)
> goto err_finalize;
> @@ -390,7 +390,7 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
> drm_pagemap_get_devmem_page(page, zdd);
> }
>
> - err = ops->copy_to_devmem(pages, dma_addr, npages);
> + err = ops->copy_to_devmem(pages, device_addr, npages);
> if (err)
> goto err_finalize;
>
> @@ -404,7 +404,7 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
> drm_pagemap_migration_unlock_put_pages(npages, migrate.dst);
> migrate_vma_pages(&migrate);
> migrate_vma_finalize(&migrate);
> - drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, dma_addr, npages,
> + drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, device_addr, npages,
> DMA_TO_DEVICE);
> err_free:
> if (zdd)
> @@ -509,7 +509,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> unsigned long npages, mpages = 0;
> struct page **pages;
> unsigned long *src, *dst;
> - dma_addr_t *dma_addr;
> + struct drm_pagemap_device_addr *device_addr;
> void *buf;
> int i, err = 0;
> unsigned int retry_count = 2;
> @@ -520,7 +520,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> if (!mmget_not_zero(devmem_allocation->mm))
> return -EFAULT;
>
> - buf = kvcalloc(npages, 2 * sizeof(*src) + sizeof(*dma_addr) +
> + buf = kvcalloc(npages, 2 * sizeof(*src) + sizeof(*device_addr) +
> sizeof(*pages), GFP_KERNEL);
> if (!buf) {
> err = -ENOMEM;
> @@ -528,8 +528,8 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> }
> src = buf;
> dst = buf + (sizeof(*src) * npages);
> - dma_addr = buf + (2 * sizeof(*src) * npages);
> - pages = buf + (2 * sizeof(*src) + sizeof(*dma_addr)) * npages;
> + device_addr = buf + (2 * sizeof(*src) * npages);
> + pages = buf + (2 * sizeof(*src) + sizeof(*device_addr)) * npages;
>
> err = ops->populate_devmem_pfn(devmem_allocation, npages, src);
> if (err)
> @@ -544,7 +544,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> if (err || !mpages)
> goto err_finalize;
>
> - err = drm_pagemap_migrate_map_pages(devmem_allocation->dev, dma_addr,
> + err = drm_pagemap_migrate_map_pages(devmem_allocation->dev, device_addr,
> dst, npages, DMA_FROM_DEVICE);
> if (err)
> goto err_finalize;
> @@ -552,7 +552,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> for (i = 0; i < npages; ++i)
> pages[i] = migrate_pfn_to_page(src[i]);
>
> - err = ops->copy_to_ram(pages, dma_addr, npages);
> + err = ops->copy_to_ram(pages, device_addr, npages);
> if (err)
> goto err_finalize;
>
> @@ -561,7 +561,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> drm_pagemap_migration_unlock_put_pages(npages, dst);
> migrate_device_pages(src, dst, npages);
> migrate_device_finalize(src, dst, npages);
> - drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, dma_addr, npages,
> + drm_pagemap_migrate_unmap_pages(devmem_allocation->dev, device_addr, npages,
> DMA_FROM_DEVICE);
> err_free:
> kvfree(buf);
> @@ -612,7 +612,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
> struct device *dev = NULL;
> unsigned long npages, mpages = 0;
> struct page **pages;
> - dma_addr_t *dma_addr;
> + struct drm_pagemap_device_addr *device_addr;
> unsigned long start, end;
> void *buf;
> int i, err = 0;
> @@ -637,14 +637,14 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
> migrate.end = end;
> npages = npages_in_range(start, end);
>
> - buf = kvcalloc(npages, 2 * sizeof(*migrate.src) + sizeof(*dma_addr) +
> + buf = kvcalloc(npages, 2 * sizeof(*migrate.src) + sizeof(*device_addr) +
> sizeof(*pages), GFP_KERNEL);
> if (!buf) {
> err = -ENOMEM;
> goto err_out;
> }
> - dma_addr = buf + (2 * sizeof(*migrate.src) * npages);
> - pages = buf + (2 * sizeof(*migrate.src) + sizeof(*dma_addr)) * npages;
> + device_addr = buf + (2 * sizeof(*migrate.src) * npages);
> + pages = buf + (2 * sizeof(*migrate.src) + sizeof(*device_addr)) * npages;
>
> migrate.vma = vas;
> migrate.src = buf;
> @@ -680,7 +680,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
> if (err)
> goto err_finalize;
>
> - err = drm_pagemap_migrate_map_pages(dev, dma_addr, migrate.dst, npages,
> + err = drm_pagemap_migrate_map_pages(dev, device_addr, migrate.dst, npages,
> DMA_FROM_DEVICE);
> if (err)
> goto err_finalize;
> @@ -688,7 +688,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
> for (i = 0; i < npages; ++i)
> pages[i] = migrate_pfn_to_page(migrate.src[i]);
>
> - err = ops->copy_to_ram(pages, dma_addr, npages);
> + err = ops->copy_to_ram(pages, device_addr, npages);
> if (err)
> goto err_finalize;
>
> @@ -698,7 +698,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
> migrate_vma_pages(&migrate);
> migrate_vma_finalize(&migrate);
> if (dev)
> - drm_pagemap_migrate_unmap_pages(dev, dma_addr, npages,
> + drm_pagemap_migrate_unmap_pages(dev, device_addr, npages,
> DMA_FROM_DEVICE);
> err_free:
> kvfree(buf);
> diff --git a/include/drm/drm_pagemap.h b/include/drm/drm_pagemap.h
> index e5f20a1235be..a0c0882eeb8e 100644
> --- a/include/drm/drm_pagemap.h
> +++ b/include/drm/drm_pagemap.h
> @@ -170,7 +170,7 @@ struct drm_pagemap_devmem_ops {
> /**
> * @copy_to_devmem: Copy to device memory (required for migration)
> * @pages: Pointer to array of device memory pages (destination)
> - * @dma_addr: Pointer to array of DMA addresses (source)
> + * @device_addr: Pointer to array of DMA information (source)
> * @npages: Number of pages to copy
> *
> * Copy pages to device memory.
> @@ -178,13 +178,13 @@ struct drm_pagemap_devmem_ops {
> * Return: 0 on success, a negative error code on failure.
> */
> int (*copy_to_devmem)(struct page **pages,
> - dma_addr_t *dma_addr,
> + struct drm_pagemap_device_addr *device_addr,
> unsigned long npages);
>
> /**
> * @copy_to_ram: Copy to system RAM (required for migration)
> * @pages: Pointer to array of device memory pages (source)
> - * @dma_addr: Pointer to array of DMA addresses (destination)
> + * @device_addr: Pointer to array of DMA information (destination)
> * @npages: Number of pages to copy
> *
> * Copy pages to system RAM.
> @@ -192,7 +192,7 @@ struct drm_pagemap_devmem_ops {
> * Return: 0 on success, a negative error code on failure.
> */
> int (*copy_to_ram)(struct page **pages,
> - dma_addr_t *dma_addr,
> + struct drm_pagemap_device_addr *device_addr,
> unsigned long npages);
> };
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH v1 1/5] drm/pagemap: Use struct drm_pagemap_device_addr in mapping and copy functions
2025-07-18 4:03 ` Matthew Brost
@ 2025-07-23 12:10 ` Thomas Hellström
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Hellström @ 2025-07-23 12:10 UTC (permalink / raw)
To: Matthew Brost, Francois Dugast; +Cc: intel-xe
On Thu, 2025-07-17 at 21:03 -0700, Matthew Brost wrote:
> On Thu, Jul 17, 2025 at 03:38:23PM +0200, Francois Dugast wrote:
> > This struct embeds more information than just the DMA address. This
> > will help
> > later to support folio orders greater than zero. At this point,
> > there is no
> > functional change as the only struct member used is addr.
> >
>
> This patch alone will break the build. You'll need to combine it with
> the next patch to avoid build breakage.
>
> > Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > ---
> > drivers/gpu/drm/drm_pagemap.c | 58 +++++++++++++++++--------------
> > ----
> > include/drm/drm_pagemap.h | 8 ++---
> > 2 files changed, 33 insertions(+), 33 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_pagemap.c
> > b/drivers/gpu/drm/drm_pagemap.c
> > index 1da55322af12..0ed66aaade14 100644
> > --- a/drivers/gpu/drm/drm_pagemap.c
> > +++ b/drivers/gpu/drm/drm_pagemap.c
> > @@ -202,7 +202,7 @@ static void drm_pagemap_get_devmem_page(struct
> > page *page,
> > /**
> > * drm_pagemap_migrate_map_pages() - Map migration pages for GPU
> > SVM migration
> > * @dev: The device for which the pages are being mapped
> > - * @dma_addr: Array to store DMA addresses corresponding to mapped
> > pages
> > + * @device_addr: Array to store DMA information corresponding to
> > mapped pages
> > * @migrate_pfn: Array of migrate page frame numbers to map
> > * @npages: Number of pages to map
> > * @dir: Direction of data transfer (e.g., DMA_BIDIRECTIONAL)
> > @@ -215,7 +215,7 @@ static void drm_pagemap_get_devmem_page(struct
> > page *page,
> > * Returns: 0 on success, -EFAULT if an error occurs during
> > mapping.
> > */
> > static int drm_pagemap_migrate_map_pages(struct device *dev,
> > - dma_addr_t *dma_addr,
> > + struct
> > drm_pagemap_device_addr *device_addr,
>
> I like the change to drm_pagemap_device_addr—I think it fits with the
> patch—but it's not actually a device address. It's a DMA mapping of
> CPU
> memory. Originally, drm_pagemap_device_addr was intended to represent
> a
> device memory address shared between devices. That said, I think it
> still works for our purpose here.
>
> So, I suggest we rename it:
> s/drm_pagemap_device_addr/drm_pagemap_addr
> And for the variable:
> s/device_addr/pagemap_addr
IIRC regardless of referencing system pages or device pages, both are
actually dma mappings.
So would drm_pagemap_dma_addr be a better fit? FWIW I'm OK with both.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v1 2/5] drm/xe/svm: Use struct drm_pagemap_device_addr
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
2025-07-17 13:38 ` [PATCH v1 1/5] drm/pagemap: Use struct drm_pagemap_device_addr in mapping and copy functions Francois Dugast
@ 2025-07-17 13:38 ` Francois Dugast
2025-07-18 4:12 ` Matthew Brost
2025-07-17 13:38 ` [PATCH v1 3/5] drm/pagemap: DMA map folios when possible Francois Dugast
` (6 subsequent siblings)
8 siblings, 1 reply; 19+ messages in thread
From: Francois Dugast @ 2025-07-17 13:38 UTC (permalink / raw)
To: intel-xe; +Cc: matthew.brost, Francois Dugast
Adapt to the new drm_gpusvm_devmem_ops type signatures using struct
drm_pagemap_device_addr, as well as the internal xe SVM functions
implementing those operations.
Besides, the use of drm_gpusvm_dma_info is propagated to xe_migrate
because it makes indexed accesses to the next DMA address but they
are no longer contiguous.
There is no functional change.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/xe/xe_migrate.c | 55 ++++++++++++++++++---------------
drivers/gpu/drm/xe/xe_migrate.h | 5 +--
drivers/gpu/drm/xe/xe_svm.c | 37 ++++++++++++----------
3 files changed, 54 insertions(+), 43 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 6a80ae6104dd..33d67993f1f6 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -9,6 +9,7 @@
#include <linux/sizes.h>
#include <drm/drm_managed.h>
+#include <drm/drm_pagemap.h>
#include <drm/ttm/ttm_tt.h>
#include <uapi/drm/xe_drm.h>
@@ -1585,7 +1586,8 @@ static u32 pte_update_cmd_size(u64 size)
static void build_pt_update_batch_sram(struct xe_migrate *m,
struct xe_bb *bb, u32 pt_offset,
- dma_addr_t *sram_addr, u32 size)
+ struct drm_pagemap_device_addr *sram_addr,
+ u32 size)
{
u16 pat_index = tile_to_xe(m->tile)->pat.idx[XE_CACHE_WB];
u32 ptes;
@@ -1603,7 +1605,7 @@ static void build_pt_update_batch_sram(struct xe_migrate *m,
ptes -= chunk;
while (chunk--) {
- u64 addr = sram_addr[i++] & PAGE_MASK;
+ u64 addr = sram_addr[i++].addr & PAGE_MASK;
xe_tile_assert(m->tile, addr);
addr = m->q->vm->pt_ops->pte_encode_addr(m->tile->xe,
@@ -1626,7 +1628,8 @@ enum xe_migrate_copy_dir {
static struct dma_fence *xe_migrate_vram(struct xe_migrate *m,
unsigned long len,
unsigned long sram_offset,
- dma_addr_t *sram_addr, u64 vram_addr,
+ struct drm_pagemap_device_addr *sram_addr,
+ u64 vram_addr,
const enum xe_migrate_copy_dir dir)
{
struct xe_gt *gt = m->tile->primary_gt;
@@ -1708,7 +1711,7 @@ static struct dma_fence *xe_migrate_vram(struct xe_migrate *m,
* xe_migrate_to_vram() - Migrate to VRAM
* @m: The migration context.
* @npages: Number of pages to migrate.
- * @src_addr: Array of dma addresses (source of migrate)
+ * @src_addr: Array of DMA information (source of migrate)
* @dst_addr: Device physical address of VRAM (destination of migrate)
*
* Copy from an array dma addresses to a VRAM device physical address
@@ -1718,7 +1721,7 @@ static struct dma_fence *xe_migrate_vram(struct xe_migrate *m,
*/
struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
unsigned long npages,
- dma_addr_t *src_addr,
+ struct drm_pagemap_device_addr *src_addr,
u64 dst_addr)
{
return xe_migrate_vram(m, npages * PAGE_SIZE, 0, src_addr, dst_addr,
@@ -1730,7 +1733,7 @@ struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
* @m: The migration context.
* @npages: Number of pages to migrate.
* @src_addr: Device physical address of VRAM (source of migrate)
- * @dst_addr: Array of dma addresses (destination of migrate)
+ * @dst_addr: Array of DMA information (destination of migrate)
*
* Copy from a VRAM device physical address to an array dma addresses
*
@@ -1740,35 +1743,37 @@ struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
struct dma_fence *xe_migrate_from_vram(struct xe_migrate *m,
unsigned long npages,
u64 src_addr,
- dma_addr_t *dst_addr)
+ struct drm_pagemap_device_addr *dst_addr)
{
return xe_migrate_vram(m, npages * PAGE_SIZE, 0, dst_addr, src_addr,
XE_MIGRATE_COPY_TO_SRAM);
}
-static void xe_migrate_dma_unmap(struct xe_device *xe, dma_addr_t *dma_addr,
+static void xe_migrate_dma_unmap(struct xe_device *xe,
+ struct drm_pagemap_device_addr *device_addr,
int len, int write)
{
unsigned long i, npages = DIV_ROUND_UP(len, PAGE_SIZE);
for (i = 0; i < npages; ++i) {
- if (!dma_addr[i])
+ if (!device_addr[i].addr)
break;
- dma_unmap_page(xe->drm.dev, dma_addr[i], PAGE_SIZE,
+ dma_unmap_page(xe->drm.dev, device_addr[i].addr, PAGE_SIZE,
write ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
}
- kfree(dma_addr);
+ kfree(device_addr);
}
-static dma_addr_t *xe_migrate_dma_map(struct xe_device *xe,
- void *buf, int len, int write)
+static struct drm_pagemap_device_addr *xe_migrate_dma_map(struct xe_device *xe,
+ void *buf, int len,
+ int write)
{
- dma_addr_t *dma_addr;
+ struct drm_pagemap_device_addr *device_addr;
unsigned long i, npages = DIV_ROUND_UP(len, PAGE_SIZE);
- dma_addr = kcalloc(npages, sizeof(*dma_addr), GFP_KERNEL);
- if (!dma_addr)
+ device_addr = kcalloc(npages, sizeof(*device_addr), GFP_KERNEL);
+ if (!device_addr)
return ERR_PTR(-ENOMEM);
for (i = 0; i < npages; ++i) {
@@ -1787,14 +1792,14 @@ static dma_addr_t *xe_migrate_dma_map(struct xe_device *xe,
if (dma_mapping_error(xe->drm.dev, addr))
goto err_fault;
- dma_addr[i] = addr;
+ device_addr[i].addr = addr;
buf += PAGE_SIZE;
}
- return dma_addr;
+ return device_addr;
err_fault:
- xe_migrate_dma_unmap(xe, dma_addr, len, write);
+ xe_migrate_dma_unmap(xe, device_addr, len, write);
return ERR_PTR(-EFAULT);
}
@@ -1823,7 +1828,7 @@ int xe_migrate_access_memory(struct xe_migrate *m, struct xe_bo *bo,
struct xe_device *xe = tile_to_xe(tile);
struct xe_res_cursor cursor;
struct dma_fence *fence = NULL;
- dma_addr_t *dma_addr;
+ struct drm_pagemap_device_addr *device_addr;
unsigned long page_offset = (unsigned long)buf & ~PAGE_MASK;
int bytes_left = len, current_page = 0;
void *orig_buf = buf;
@@ -1878,9 +1883,9 @@ int xe_migrate_access_memory(struct xe_migrate *m, struct xe_bo *bo,
return 0;
}
- dma_addr = xe_migrate_dma_map(xe, buf, len + page_offset, write);
- if (IS_ERR(dma_addr))
- return PTR_ERR(dma_addr);
+ device_addr = xe_migrate_dma_map(xe, buf, len + page_offset, write);
+ if (IS_ERR(device_addr))
+ return PTR_ERR(device_addr);
xe_res_first(bo->ttm.resource, offset, xe_bo_size(bo) - offset, &cursor);
@@ -1901,7 +1906,7 @@ int xe_migrate_access_memory(struct xe_migrate *m, struct xe_bo *bo,
__fence = xe_migrate_vram(m, current_bytes,
(unsigned long)buf & ~PAGE_MASK,
- dma_addr + current_page,
+ &device_addr[current_page],
vram_addr, write ?
XE_MIGRATE_COPY_TO_VRAM :
XE_MIGRATE_COPY_TO_SRAM);
@@ -1925,7 +1930,7 @@ int xe_migrate_access_memory(struct xe_migrate *m, struct xe_bo *bo,
dma_fence_put(fence);
out_err:
- xe_migrate_dma_unmap(xe, dma_addr, len + page_offset, write);
+ xe_migrate_dma_unmap(xe, device_addr, len + page_offset, write);
return IS_ERR(fence) ? PTR_ERR(fence) : 0;
}
diff --git a/drivers/gpu/drm/xe/xe_migrate.h b/drivers/gpu/drm/xe/xe_migrate.h
index 74c60f55004a..f8bff3f2904a 100644
--- a/drivers/gpu/drm/xe/xe_migrate.h
+++ b/drivers/gpu/drm/xe/xe_migrate.h
@@ -9,6 +9,7 @@
#include <linux/types.h>
struct dma_fence;
+struct drm_pagemap_device_addr;
struct iosys_map;
struct ttm_resource;
@@ -98,13 +99,13 @@ struct xe_migrate *xe_migrate_init(struct xe_tile *tile);
struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
unsigned long npages,
- dma_addr_t *src_addr,
+ struct drm_pagemap_device_addr *src_addr,
u64 dst_addr);
struct dma_fence *xe_migrate_from_vram(struct xe_migrate *m,
unsigned long npages,
u64 src_addr,
- dma_addr_t *dst_addr);
+ struct drm_pagemap_device_addr *dst_addr);
struct dma_fence *xe_migrate_copy(struct xe_migrate *m,
struct xe_bo *src_bo,
diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
index 10c8a1bcb86e..80dfb96d5ca4 100644
--- a/drivers/gpu/drm/xe/xe_svm.c
+++ b/drivers/gpu/drm/xe/xe_svm.c
@@ -328,7 +328,8 @@ enum xe_svm_copy_dir {
XE_SVM_COPY_TO_SRAM,
};
-static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
+static int xe_svm_copy(struct page **pages,
+ struct drm_pagemap_device_addr *device_addr,
unsigned long npages, const enum xe_svm_copy_dir dir)
{
struct xe_vram_region *vr = NULL;
@@ -360,7 +361,7 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
last = (i + 1) == npages;
/* No CPU page and no device pages queue'd to copy */
- if (!dma_addr[i] && vram_addr == XE_VRAM_ADDR_INVALID)
+ if (!device_addr[i].addr && vram_addr == XE_VRAM_ADDR_INVALID)
continue;
if (!vr && spage) {
@@ -374,7 +375,7 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
* first device page, check if physical contiguous on subsequent
* device pages.
*/
- if (dma_addr[i] && spage) {
+ if (device_addr[i].addr && spage) {
__vram_addr = xe_vram_region_page_to_dpa(vr, spage);
if (vram_addr == XE_VRAM_ADDR_INVALID) {
vram_addr = __vram_addr;
@@ -399,18 +400,20 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
if (sram) {
vm_dbg(&xe->drm,
"COPY TO SRAM - 0x%016llx -> 0x%016llx, NPAGES=%ld",
- vram_addr, (u64)dma_addr[pos], i - pos + incr);
+ vram_addr,
+ (u64)device_addr[pos].addr, i - pos + incr);
__fence = xe_migrate_from_vram(vr->migrate,
i - pos + incr,
vram_addr,
- dma_addr + pos);
+ &device_addr[pos]);
} else {
vm_dbg(&xe->drm,
"COPY TO VRAM - 0x%016llx -> 0x%016llx, NPAGES=%ld",
- (u64)dma_addr[pos], vram_addr, i - pos + incr);
+ (u64)device_addr[pos].addr, vram_addr,
+ i - pos + incr);
__fence = xe_migrate_to_vram(vr->migrate,
i - pos + incr,
- dma_addr + pos,
+ &device_addr[pos],
vram_addr);
}
if (IS_ERR(__fence)) {
@@ -423,7 +426,7 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
}
/* Setup physical address of next device page */
- if (dma_addr[i] && spage) {
+ if (device_addr[i].addr && spage) {
vram_addr = __vram_addr;
pos = i;
} else {
@@ -435,16 +438,16 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
if (sram) {
vm_dbg(&xe->drm,
"COPY TO SRAM - 0x%016llx -> 0x%016llx, NPAGES=%d",
- vram_addr, (u64)dma_addr[pos], 1);
+ vram_addr, (u64)device_addr[pos].addr, 1);
__fence = xe_migrate_from_vram(vr->migrate, 1,
vram_addr,
- dma_addr + pos);
+ &device_addr[pos]);
} else {
vm_dbg(&xe->drm,
"COPY TO VRAM - 0x%016llx -> 0x%016llx, NPAGES=%d",
- (u64)dma_addr[pos], vram_addr, 1);
+ (u64)device_addr[pos].addr, vram_addr, 1);
__fence = xe_migrate_to_vram(vr->migrate, 1,
- dma_addr + pos,
+ &device_addr[pos],
vram_addr);
}
if (IS_ERR(__fence)) {
@@ -470,16 +473,18 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
#undef XE_VRAM_ADDR_INVALID
}
-static int xe_svm_copy_to_devmem(struct page **pages, dma_addr_t *dma_addr,
+static int xe_svm_copy_to_devmem(struct page **pages,
+ struct drm_pagemap_device_addr *device_addr,
unsigned long npages)
{
- return xe_svm_copy(pages, dma_addr, npages, XE_SVM_COPY_TO_VRAM);
+ return xe_svm_copy(pages, device_addr, npages, XE_SVM_COPY_TO_VRAM);
}
-static int xe_svm_copy_to_ram(struct page **pages, dma_addr_t *dma_addr,
+static int xe_svm_copy_to_ram(struct page **pages,
+ struct drm_pagemap_device_addr *device_addr,
unsigned long npages)
{
- return xe_svm_copy(pages, dma_addr, npages, XE_SVM_COPY_TO_SRAM);
+ return xe_svm_copy(pages, device_addr, npages, XE_SVM_COPY_TO_SRAM);
}
static struct xe_bo *to_xe_bo(struct drm_pagemap_devmem *devmem_allocation)
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v1 2/5] drm/xe/svm: Use struct drm_pagemap_device_addr
2025-07-17 13:38 ` [PATCH v1 2/5] drm/xe/svm: Use struct drm_pagemap_device_addr Francois Dugast
@ 2025-07-18 4:12 ` Matthew Brost
0 siblings, 0 replies; 19+ messages in thread
From: Matthew Brost @ 2025-07-18 4:12 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
On Thu, Jul 17, 2025 at 03:38:24PM +0200, Francois Dugast wrote:
> Adapt to the new drm_gpusvm_devmem_ops type signatures using struct
> drm_pagemap_device_addr, as well as the internal xe SVM functions
> implementing those operations.
>
> Besides, the use of drm_gpusvm_dma_info is propagated to xe_migrate
> because it makes indexed accesses to the next DMA address but they
> are no longer contiguous.
>
> There is no functional change.
>
Again, combine this previous patch.
Same comment about device_addr vs. pagemap_addr as previous patch.
> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_migrate.c | 55 ++++++++++++++++++---------------
> drivers/gpu/drm/xe/xe_migrate.h | 5 +--
> drivers/gpu/drm/xe/xe_svm.c | 37 ++++++++++++----------
> 3 files changed, 54 insertions(+), 43 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
> index 6a80ae6104dd..33d67993f1f6 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -9,6 +9,7 @@
> #include <linux/sizes.h>
>
> #include <drm/drm_managed.h>
> +#include <drm/drm_pagemap.h>
> #include <drm/ttm/ttm_tt.h>
> #include <uapi/drm/xe_drm.h>
>
> @@ -1585,7 +1586,8 @@ static u32 pte_update_cmd_size(u64 size)
>
> static void build_pt_update_batch_sram(struct xe_migrate *m,
> struct xe_bb *bb, u32 pt_offset,
> - dma_addr_t *sram_addr, u32 size)
> + struct drm_pagemap_device_addr *sram_addr,
> + u32 size)
> {
> u16 pat_index = tile_to_xe(m->tile)->pat.idx[XE_CACHE_WB];
> u32 ptes;
> @@ -1603,7 +1605,7 @@ static void build_pt_update_batch_sram(struct xe_migrate *m,
> ptes -= chunk;
>
> while (chunk--) {
> - u64 addr = sram_addr[i++] & PAGE_MASK;
> + u64 addr = sram_addr[i++].addr & PAGE_MASK;
>
xe_assert(xe, sram_addr[i].proto == DRM_INTERCONNECT_SYSTEM);
Obviously, don't do this after incrementing 'i' but you get the idea -
assert address is using the dma map protocol.
> xe_tile_assert(m->tile, addr);
> addr = m->q->vm->pt_ops->pte_encode_addr(m->tile->xe,
> @@ -1626,7 +1628,8 @@ enum xe_migrate_copy_dir {
> static struct dma_fence *xe_migrate_vram(struct xe_migrate *m,
> unsigned long len,
> unsigned long sram_offset,
> - dma_addr_t *sram_addr, u64 vram_addr,
> + struct drm_pagemap_device_addr *sram_addr,
> + u64 vram_addr,
> const enum xe_migrate_copy_dir dir)
> {
> struct xe_gt *gt = m->tile->primary_gt;
> @@ -1708,7 +1711,7 @@ static struct dma_fence *xe_migrate_vram(struct xe_migrate *m,
> * xe_migrate_to_vram() - Migrate to VRAM
> * @m: The migration context.
> * @npages: Number of pages to migrate.
> - * @src_addr: Array of dma addresses (source of migrate)
> + * @src_addr: Array of DMA information (source of migrate)
> * @dst_addr: Device physical address of VRAM (destination of migrate)
> *
> * Copy from an array dma addresses to a VRAM device physical address
> @@ -1718,7 +1721,7 @@ static struct dma_fence *xe_migrate_vram(struct xe_migrate *m,
> */
> struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
> unsigned long npages,
> - dma_addr_t *src_addr,
> + struct drm_pagemap_device_addr *src_addr,
> u64 dst_addr)
> {
> return xe_migrate_vram(m, npages * PAGE_SIZE, 0, src_addr, dst_addr,
> @@ -1730,7 +1733,7 @@ struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
> * @m: The migration context.
> * @npages: Number of pages to migrate.
> * @src_addr: Device physical address of VRAM (source of migrate)
> - * @dst_addr: Array of dma addresses (destination of migrate)
> + * @dst_addr: Array of DMA information (destination of migrate)
> *
> * Copy from a VRAM device physical address to an array dma addresses
> *
> @@ -1740,35 +1743,37 @@ struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
> struct dma_fence *xe_migrate_from_vram(struct xe_migrate *m,
> unsigned long npages,
> u64 src_addr,
> - dma_addr_t *dst_addr)
> + struct drm_pagemap_device_addr *dst_addr)
> {
> return xe_migrate_vram(m, npages * PAGE_SIZE, 0, dst_addr, src_addr,
> XE_MIGRATE_COPY_TO_SRAM);
> }
>
> -static void xe_migrate_dma_unmap(struct xe_device *xe, dma_addr_t *dma_addr,
> +static void xe_migrate_dma_unmap(struct xe_device *xe,
> + struct drm_pagemap_device_addr *device_addr,
> int len, int write)
> {
> unsigned long i, npages = DIV_ROUND_UP(len, PAGE_SIZE);
>
> for (i = 0; i < npages; ++i) {
> - if (!dma_addr[i])
> + if (!device_addr[i].addr)
> break;
>
> - dma_unmap_page(xe->drm.dev, dma_addr[i], PAGE_SIZE,
> + dma_unmap_page(xe->drm.dev, device_addr[i].addr, PAGE_SIZE,
> write ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
> }
> - kfree(dma_addr);
> + kfree(device_addr);
> }
>
> -static dma_addr_t *xe_migrate_dma_map(struct xe_device *xe,
> - void *buf, int len, int write)
> +static struct drm_pagemap_device_addr *xe_migrate_dma_map(struct xe_device *xe,
> + void *buf, int len,
> + int write)
> {
> - dma_addr_t *dma_addr;
> + struct drm_pagemap_device_addr *device_addr;
> unsigned long i, npages = DIV_ROUND_UP(len, PAGE_SIZE);
>
> - dma_addr = kcalloc(npages, sizeof(*dma_addr), GFP_KERNEL);
> - if (!dma_addr)
> + device_addr = kcalloc(npages, sizeof(*device_addr), GFP_KERNEL);
> + if (!device_addr)
> return ERR_PTR(-ENOMEM);
>
> for (i = 0; i < npages; ++i) {
> @@ -1787,14 +1792,14 @@ static dma_addr_t *xe_migrate_dma_map(struct xe_device *xe,
> if (dma_mapping_error(xe->drm.dev, addr))
> goto err_fault;
>
> - dma_addr[i] = addr;
> + device_addr[i].addr = addr;
Set proto, dir for clarity and completeness.
Matt
> buf += PAGE_SIZE;
> }
>
> - return dma_addr;
> + return device_addr;
>
> err_fault:
> - xe_migrate_dma_unmap(xe, dma_addr, len, write);
> + xe_migrate_dma_unmap(xe, device_addr, len, write);
> return ERR_PTR(-EFAULT);
> }
>
> @@ -1823,7 +1828,7 @@ int xe_migrate_access_memory(struct xe_migrate *m, struct xe_bo *bo,
> struct xe_device *xe = tile_to_xe(tile);
> struct xe_res_cursor cursor;
> struct dma_fence *fence = NULL;
> - dma_addr_t *dma_addr;
> + struct drm_pagemap_device_addr *device_addr;
> unsigned long page_offset = (unsigned long)buf & ~PAGE_MASK;
> int bytes_left = len, current_page = 0;
> void *orig_buf = buf;
> @@ -1878,9 +1883,9 @@ int xe_migrate_access_memory(struct xe_migrate *m, struct xe_bo *bo,
> return 0;
> }
>
> - dma_addr = xe_migrate_dma_map(xe, buf, len + page_offset, write);
> - if (IS_ERR(dma_addr))
> - return PTR_ERR(dma_addr);
> + device_addr = xe_migrate_dma_map(xe, buf, len + page_offset, write);
> + if (IS_ERR(device_addr))
> + return PTR_ERR(device_addr);
>
> xe_res_first(bo->ttm.resource, offset, xe_bo_size(bo) - offset, &cursor);
>
> @@ -1901,7 +1906,7 @@ int xe_migrate_access_memory(struct xe_migrate *m, struct xe_bo *bo,
>
> __fence = xe_migrate_vram(m, current_bytes,
> (unsigned long)buf & ~PAGE_MASK,
> - dma_addr + current_page,
> + &device_addr[current_page],
> vram_addr, write ?
> XE_MIGRATE_COPY_TO_VRAM :
> XE_MIGRATE_COPY_TO_SRAM);
> @@ -1925,7 +1930,7 @@ int xe_migrate_access_memory(struct xe_migrate *m, struct xe_bo *bo,
> dma_fence_put(fence);
>
> out_err:
> - xe_migrate_dma_unmap(xe, dma_addr, len + page_offset, write);
> + xe_migrate_dma_unmap(xe, device_addr, len + page_offset, write);
> return IS_ERR(fence) ? PTR_ERR(fence) : 0;
> }
>
> diff --git a/drivers/gpu/drm/xe/xe_migrate.h b/drivers/gpu/drm/xe/xe_migrate.h
> index 74c60f55004a..f8bff3f2904a 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.h
> +++ b/drivers/gpu/drm/xe/xe_migrate.h
> @@ -9,6 +9,7 @@
> #include <linux/types.h>
>
> struct dma_fence;
> +struct drm_pagemap_device_addr;
> struct iosys_map;
> struct ttm_resource;
>
> @@ -98,13 +99,13 @@ struct xe_migrate *xe_migrate_init(struct xe_tile *tile);
>
> struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
> unsigned long npages,
> - dma_addr_t *src_addr,
> + struct drm_pagemap_device_addr *src_addr,
> u64 dst_addr);
>
> struct dma_fence *xe_migrate_from_vram(struct xe_migrate *m,
> unsigned long npages,
> u64 src_addr,
> - dma_addr_t *dst_addr);
> + struct drm_pagemap_device_addr *dst_addr);
>
> struct dma_fence *xe_migrate_copy(struct xe_migrate *m,
> struct xe_bo *src_bo,
> diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
> index 10c8a1bcb86e..80dfb96d5ca4 100644
> --- a/drivers/gpu/drm/xe/xe_svm.c
> +++ b/drivers/gpu/drm/xe/xe_svm.c
> @@ -328,7 +328,8 @@ enum xe_svm_copy_dir {
> XE_SVM_COPY_TO_SRAM,
> };
>
> -static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
> +static int xe_svm_copy(struct page **pages,
> + struct drm_pagemap_device_addr *device_addr,
> unsigned long npages, const enum xe_svm_copy_dir dir)
> {
> struct xe_vram_region *vr = NULL;
> @@ -360,7 +361,7 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
> last = (i + 1) == npages;
>
> /* No CPU page and no device pages queue'd to copy */
> - if (!dma_addr[i] && vram_addr == XE_VRAM_ADDR_INVALID)
> + if (!device_addr[i].addr && vram_addr == XE_VRAM_ADDR_INVALID)
> continue;
>
> if (!vr && spage) {
> @@ -374,7 +375,7 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
> * first device page, check if physical contiguous on subsequent
> * device pages.
> */
> - if (dma_addr[i] && spage) {
> + if (device_addr[i].addr && spage) {
> __vram_addr = xe_vram_region_page_to_dpa(vr, spage);
> if (vram_addr == XE_VRAM_ADDR_INVALID) {
> vram_addr = __vram_addr;
> @@ -399,18 +400,20 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
> if (sram) {
> vm_dbg(&xe->drm,
> "COPY TO SRAM - 0x%016llx -> 0x%016llx, NPAGES=%ld",
> - vram_addr, (u64)dma_addr[pos], i - pos + incr);
> + vram_addr,
> + (u64)device_addr[pos].addr, i - pos + incr);
> __fence = xe_migrate_from_vram(vr->migrate,
> i - pos + incr,
> vram_addr,
> - dma_addr + pos);
> + &device_addr[pos]);
> } else {
> vm_dbg(&xe->drm,
> "COPY TO VRAM - 0x%016llx -> 0x%016llx, NPAGES=%ld",
> - (u64)dma_addr[pos], vram_addr, i - pos + incr);
> + (u64)device_addr[pos].addr, vram_addr,
> + i - pos + incr);
> __fence = xe_migrate_to_vram(vr->migrate,
> i - pos + incr,
> - dma_addr + pos,
> + &device_addr[pos],
> vram_addr);
> }
> if (IS_ERR(__fence)) {
> @@ -423,7 +426,7 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
> }
>
> /* Setup physical address of next device page */
> - if (dma_addr[i] && spage) {
> + if (device_addr[i].addr && spage) {
> vram_addr = __vram_addr;
> pos = i;
> } else {
> @@ -435,16 +438,16 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
> if (sram) {
> vm_dbg(&xe->drm,
> "COPY TO SRAM - 0x%016llx -> 0x%016llx, NPAGES=%d",
> - vram_addr, (u64)dma_addr[pos], 1);
> + vram_addr, (u64)device_addr[pos].addr, 1);
> __fence = xe_migrate_from_vram(vr->migrate, 1,
> vram_addr,
> - dma_addr + pos);
> + &device_addr[pos]);
> } else {
> vm_dbg(&xe->drm,
> "COPY TO VRAM - 0x%016llx -> 0x%016llx, NPAGES=%d",
> - (u64)dma_addr[pos], vram_addr, 1);
> + (u64)device_addr[pos].addr, vram_addr, 1);
> __fence = xe_migrate_to_vram(vr->migrate, 1,
> - dma_addr + pos,
> + &device_addr[pos],
> vram_addr);
> }
> if (IS_ERR(__fence)) {
> @@ -470,16 +473,18 @@ static int xe_svm_copy(struct page **pages, dma_addr_t *dma_addr,
> #undef XE_VRAM_ADDR_INVALID
> }
>
> -static int xe_svm_copy_to_devmem(struct page **pages, dma_addr_t *dma_addr,
> +static int xe_svm_copy_to_devmem(struct page **pages,
> + struct drm_pagemap_device_addr *device_addr,
> unsigned long npages)
> {
> - return xe_svm_copy(pages, dma_addr, npages, XE_SVM_COPY_TO_VRAM);
> + return xe_svm_copy(pages, device_addr, npages, XE_SVM_COPY_TO_VRAM);
> }
>
> -static int xe_svm_copy_to_ram(struct page **pages, dma_addr_t *dma_addr,
> +static int xe_svm_copy_to_ram(struct page **pages,
> + struct drm_pagemap_device_addr *device_addr,
> unsigned long npages)
> {
> - return xe_svm_copy(pages, dma_addr, npages, XE_SVM_COPY_TO_SRAM);
> + return xe_svm_copy(pages, device_addr, npages, XE_SVM_COPY_TO_SRAM);
> }
>
> static struct xe_bo *to_xe_bo(struct drm_pagemap_devmem *devmem_allocation)
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v1 3/5] drm/pagemap: DMA map folios when possible
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
2025-07-17 13:38 ` [PATCH v1 1/5] drm/pagemap: Use struct drm_pagemap_device_addr in mapping and copy functions Francois Dugast
2025-07-17 13:38 ` [PATCH v1 2/5] drm/xe/svm: Use struct drm_pagemap_device_addr Francois Dugast
@ 2025-07-17 13:38 ` Francois Dugast
2025-07-18 4:21 ` Matthew Brost
2025-07-20 19:53 ` Matthew Brost
2025-07-17 13:38 ` [PATCH v1 4/5] drm/xe/migrate: Use order to calculate migration length Francois Dugast
` (5 subsequent siblings)
8 siblings, 2 replies; 19+ messages in thread
From: Francois Dugast @ 2025-07-17 13:38 UTC (permalink / raw)
To: intel-xe; +Cc: matthew.brost, Francois Dugast
If the page is part of a folio, DMA map the whole folio at once instead of
mapping individual pages one after the other. For example if 2MB folios
are used instead of 4KB pages, this reduces the number of DMA mappings by
512.
The folio order (and consequently, the size) is persisted in the struct
drm_pagemap_device_addr to be available at the time of unmapping.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/drm_pagemap.c | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
index 0ed66aaade14..de15d96f6393 100644
--- a/drivers/gpu/drm/drm_pagemap.c
+++ b/drivers/gpu/drm/drm_pagemap.c
@@ -220,20 +220,31 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
unsigned long npages,
enum dma_data_direction dir)
{
- unsigned long i;
+ unsigned long i, j;
- for (i = 0; i < npages; ++i) {
+ for (i = 0; i < npages;) {
struct page *page = migrate_pfn_to_page(migrate_pfn[i]);
+ struct folio *folio;
+ unsigned int order;
if (!page)
- continue;
+ goto next;
if (WARN_ON_ONCE(is_zone_device_page(page)))
return -EFAULT;
- device_addr[i].addr = dma_map_page(dev, page, 0, PAGE_SIZE, dir);
+ folio = page_folio(page);
+ order = folio_order(folio);
+ device_addr[i].addr = dma_map_page(dev, page, 0, page_size(page), dir);
+ device_addr[i].order = order;
+
if (dma_mapping_error(dev, device_addr[i].addr))
return -EFAULT;
+
+ for (j = 0; j < (0x1 << order) && i+j < npages; j++)
+ device_addr[i+j].addr = device_addr[i].addr + j * PAGE_SIZE;
+next:
+ i += 0x1 << order;
}
return 0;
@@ -257,11 +268,14 @@ static void drm_pagemap_migrate_unmap_pages(struct device *dev,
{
unsigned long i;
- for (i = 0; i < npages; ++i) {
+ for (i = 0; i < npages;) {
if (!device_addr[i].addr || dma_mapping_error(dev, device_addr[i].addr))
- continue;
+ goto next;
+
+ dma_unmap_page(dev, device_addr[i].addr, PAGE_SIZE << device_addr[i].order, dir);
- dma_unmap_page(dev, device_addr[i].addr, PAGE_SIZE, dir);
+next:
+ i += 0x1 << device_addr[i].order;
}
}
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v1 3/5] drm/pagemap: DMA map folios when possible
2025-07-17 13:38 ` [PATCH v1 3/5] drm/pagemap: DMA map folios when possible Francois Dugast
@ 2025-07-18 4:21 ` Matthew Brost
2025-07-20 19:53 ` Matthew Brost
1 sibling, 0 replies; 19+ messages in thread
From: Matthew Brost @ 2025-07-18 4:21 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
On Thu, Jul 17, 2025 at 03:38:25PM +0200, Francois Dugast wrote:
> If the page is part of a folio, DMA map the whole folio at once instead of
> mapping individual pages one after the other. For example if 2MB folios
> are used instead of 4KB pages, this reduces the number of DMA mappings by
> 512.
>
> The folio order (and consequently, the size) is persisted in the struct
> drm_pagemap_device_addr to be available at the time of unmapping.
>
> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/drm_pagemap.c | 28 +++++++++++++++++++++-------
> 1 file changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
> index 0ed66aaade14..de15d96f6393 100644
> --- a/drivers/gpu/drm/drm_pagemap.c
> +++ b/drivers/gpu/drm/drm_pagemap.c
> @@ -220,20 +220,31 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
> unsigned long npages,
> enum dma_data_direction dir)
> {
> - unsigned long i;
> + unsigned long i, j;
>
> - for (i = 0; i < npages; ++i) {
> + for (i = 0; i < npages;) {
> struct page *page = migrate_pfn_to_page(migrate_pfn[i]);
> + struct folio *folio;
> + unsigned int order;
>
> if (!page)
> - continue;
> + goto next;
>
> if (WARN_ON_ONCE(is_zone_device_page(page)))
> return -EFAULT;
>
> - device_addr[i].addr = dma_map_page(dev, page, 0, PAGE_SIZE, dir);
> + folio = page_folio(page);
> + order = folio_order(folio);
> + device_addr[i].addr = dma_map_page(dev, page, 0, page_size(page), dir);
> + device_addr[i].order = order;
Again, proto, dir.
> +
> if (dma_mapping_error(dev, device_addr[i].addr))
> return -EFAULT;
> +
> + for (j = 0; j < (0x1 << order) && i+j < npages; j++)
> + device_addr[i+j].addr = device_addr[i].addr + j * PAGE_SIZE;
I wouldn’t do this here. The Xe SVM copy functions expect a fully
populated drm_pagemap_addr, but we can hack around that there for now.
I’d prefer to keep this layer as clean as possible.
With that in mind, I’d update the kernel doc for the copy_to_ram and
copy_from_ram functions to indicate that if drm_pagemap_addr is higher
order, the subsequent entries within the range of that order are
expected to be unpopulated.
> +next:
> + i += 0x1 << order;
I wonder if there's a macro/function in Linux that does (0x1 << order).
If so, I'd use that. If not, add a local one to drm_pagemap.
Matt
> }
>
> return 0;
> @@ -257,11 +268,14 @@ static void drm_pagemap_migrate_unmap_pages(struct device *dev,
> {
> unsigned long i;
>
> - for (i = 0; i < npages; ++i) {
> + for (i = 0; i < npages;) {
> if (!device_addr[i].addr || dma_mapping_error(dev, device_addr[i].addr))
> - continue;
> + goto next;
> +
> + dma_unmap_page(dev, device_addr[i].addr, PAGE_SIZE << device_addr[i].order, dir);
>
> - dma_unmap_page(dev, device_addr[i].addr, PAGE_SIZE, dir);
> +next:
> + i += 0x1 << device_addr[i].order;
> }
> }
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH v1 3/5] drm/pagemap: DMA map folios when possible
2025-07-17 13:38 ` [PATCH v1 3/5] drm/pagemap: DMA map folios when possible Francois Dugast
2025-07-18 4:21 ` Matthew Brost
@ 2025-07-20 19:53 ` Matthew Brost
1 sibling, 0 replies; 19+ messages in thread
From: Matthew Brost @ 2025-07-20 19:53 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
On Thu, Jul 17, 2025 at 03:38:25PM +0200, Francois Dugast wrote:
> If the page is part of a folio, DMA map the whole folio at once instead of
> mapping individual pages one after the other. For example if 2MB folios
> are used instead of 4KB pages, this reduces the number of DMA mappings by
> 512.
>
> The folio order (and consequently, the size) is persisted in the struct
> drm_pagemap_device_addr to be available at the time of unmapping.
>
> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/drm_pagemap.c | 28 +++++++++++++++++++++-------
> 1 file changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
> index 0ed66aaade14..de15d96f6393 100644
> --- a/drivers/gpu/drm/drm_pagemap.c
> +++ b/drivers/gpu/drm/drm_pagemap.c
> @@ -220,20 +220,31 @@ static int drm_pagemap_migrate_map_pages(struct device *dev,
> unsigned long npages,
> enum dma_data_direction dir)
> {
> - unsigned long i;
> + unsigned long i, j;
>
> - for (i = 0; i < npages; ++i) {
> + for (i = 0; i < npages;) {
> struct page *page = migrate_pfn_to_page(migrate_pfn[i]);
> + struct folio *folio;
> + unsigned int order;
order is unitialized and if page is NULL, loop increment (next lable)
behavior will be undefined.
Matt
>
> if (!page)
> - continue;
> + goto next;
>
> if (WARN_ON_ONCE(is_zone_device_page(page)))
> return -EFAULT;
>
> - device_addr[i].addr = dma_map_page(dev, page, 0, PAGE_SIZE, dir);
> + folio = page_folio(page);
> + order = folio_order(folio);
> + device_addr[i].addr = dma_map_page(dev, page, 0, page_size(page), dir);
> + device_addr[i].order = order;
> +
> if (dma_mapping_error(dev, device_addr[i].addr))
> return -EFAULT;
> +
> + for (j = 0; j < (0x1 << order) && i+j < npages; j++)
> + device_addr[i+j].addr = device_addr[i].addr + j * PAGE_SIZE;
> +next:
> + i += 0x1 << order;
> }
>
> return 0;
> @@ -257,11 +268,14 @@ static void drm_pagemap_migrate_unmap_pages(struct device *dev,
> {
> unsigned long i;
>
> - for (i = 0; i < npages; ++i) {
> + for (i = 0; i < npages;) {
> if (!device_addr[i].addr || dma_mapping_error(dev, device_addr[i].addr))
> - continue;
> + goto next;
> +
> + dma_unmap_page(dev, device_addr[i].addr, PAGE_SIZE << device_addr[i].order, dir);
>
> - dma_unmap_page(dev, device_addr[i].addr, PAGE_SIZE, dir);
> +next:
> + i += 0x1 << device_addr[i].order;
> }
> }
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v1 4/5] drm/xe/migrate: Use order to calculate migration length
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
` (2 preceding siblings ...)
2025-07-17 13:38 ` [PATCH v1 3/5] drm/pagemap: DMA map folios when possible Francois Dugast
@ 2025-07-17 13:38 ` Francois Dugast
2025-07-18 4:27 ` Matthew Brost
2025-07-17 13:38 ` [PATCH v1 5/5] drm/pagemap: Allocate folios when possible Francois Dugast
` (4 subsequent siblings)
8 siblings, 1 reply; 19+ messages in thread
From: Francois Dugast @ 2025-07-17 13:38 UTC (permalink / raw)
To: intel-xe; +Cc: matthew.brost, Francois Dugast
Since GPU SVM can DMA map folios, it can no longer be assumed that the
order is always 0 and that the mapping size is always PAGE_SIZE. Instead,
to determinate the migration length, use the order associated with each
DMA mapping, provided by drm_pagemap_device_addr.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/xe/xe_migrate.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 33d67993f1f6..efbf8c0f41dc 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -1724,7 +1724,12 @@ struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
struct drm_pagemap_device_addr *src_addr,
u64 dst_addr)
{
- return xe_migrate_vram(m, npages * PAGE_SIZE, 0, src_addr, dst_addr,
+ unsigned long i, len = 0;
+
+ for (i = 0; i < npages; i++)
+ len += PAGE_SIZE << src_addr[i].order;
+
+ return xe_migrate_vram(m, len, 0, src_addr, dst_addr,
XE_MIGRATE_COPY_TO_VRAM);
}
@@ -1745,7 +1750,12 @@ struct dma_fence *xe_migrate_from_vram(struct xe_migrate *m,
u64 src_addr,
struct drm_pagemap_device_addr *dst_addr)
{
- return xe_migrate_vram(m, npages * PAGE_SIZE, 0, dst_addr, src_addr,
+ unsigned long i, len = 0;
+
+ for (i = 0; i < npages; i++)
+ len += PAGE_SIZE << dst_addr[i].order;
+
+ return xe_migrate_vram(m, len, 0, dst_addr, src_addr,
XE_MIGRATE_COPY_TO_SRAM);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v1 4/5] drm/xe/migrate: Use order to calculate migration length
2025-07-17 13:38 ` [PATCH v1 4/5] drm/xe/migrate: Use order to calculate migration length Francois Dugast
@ 2025-07-18 4:27 ` Matthew Brost
0 siblings, 0 replies; 19+ messages in thread
From: Matthew Brost @ 2025-07-18 4:27 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
On Thu, Jul 17, 2025 at 03:38:26PM +0200, Francois Dugast wrote:
> Since GPU SVM can DMA map folios, it can no longer be assumed that the
> order is always 0 and that the mapping size is always PAGE_SIZE. Instead,
> to determinate the migration length, use the order associated with each
> DMA mapping, provided by drm_pagemap_device_addr.
>
Hmm, I think the interface should still define npages as the total
number of pages mapped, even if drm_pagemap_addr contains entries of
higher order. In the case of higher-order mappings, I’d expect
unpopulated entries based on the order of each individual entry.
So, I think we can drop this patch, but update kernel doc in similar way
I mentioned in the previous patches.
Matt
> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_migrate.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
> index 33d67993f1f6..efbf8c0f41dc 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -1724,7 +1724,12 @@ struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
> struct drm_pagemap_device_addr *src_addr,
> u64 dst_addr)
> {
> - return xe_migrate_vram(m, npages * PAGE_SIZE, 0, src_addr, dst_addr,
> + unsigned long i, len = 0;
> +
> + for (i = 0; i < npages; i++)
> + len += PAGE_SIZE << src_addr[i].order;
> +
> + return xe_migrate_vram(m, len, 0, src_addr, dst_addr,
> XE_MIGRATE_COPY_TO_VRAM);
> }
>
> @@ -1745,7 +1750,12 @@ struct dma_fence *xe_migrate_from_vram(struct xe_migrate *m,
> u64 src_addr,
> struct drm_pagemap_device_addr *dst_addr)
> {
> - return xe_migrate_vram(m, npages * PAGE_SIZE, 0, dst_addr, src_addr,
> + unsigned long i, len = 0;
> +
> + for (i = 0; i < npages; i++)
> + len += PAGE_SIZE << dst_addr[i].order;
> +
> + return xe_migrate_vram(m, len, 0, dst_addr, src_addr,
> XE_MIGRATE_COPY_TO_SRAM);
> }
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v1 5/5] drm/pagemap: Allocate folios when possible
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
` (3 preceding siblings ...)
2025-07-17 13:38 ` [PATCH v1 4/5] drm/xe/migrate: Use order to calculate migration length Francois Dugast
@ 2025-07-17 13:38 ` Francois Dugast
2025-07-18 4:41 ` Matthew Brost
2025-07-17 14:25 ` ✗ CI.checkpatch: warning for Prepare GPU SVM for migration of THP Patchwork
` (3 subsequent siblings)
8 siblings, 1 reply; 19+ messages in thread
From: Francois Dugast @ 2025-07-17 13:38 UTC (permalink / raw)
To: intel-xe; +Cc: matthew.brost, Francois Dugast
If the order is greater than zero, allocate a folio when populating the
RAM PFNs instead of allocating individual pages one after the other. For
example if 2MB folios are used instead of 4KB pages, this reduces the
number of calls to the allocation API by 512.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/drm_pagemap.c | 33 ++++++++++++++++++++++-----------
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
index de15d96f6393..4f67c6173ee5 100644
--- a/drivers/gpu/drm/drm_pagemap.c
+++ b/drivers/gpu/drm/drm_pagemap.c
@@ -438,6 +438,7 @@ EXPORT_SYMBOL_GPL(drm_pagemap_migrate_to_devmem);
* @src_mpfn: Source array of migrate PFNs
* @mpfn: Array of migrate PFNs to populate
* @addr: Start address for PFN allocation
+ * @order: Page order
*
* This function populates the RAM migrate page frame numbers (PFNs) for the
* specified VM area structure. It allocates and locks pages in the VM area for
@@ -452,35 +453,45 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,
unsigned long *mpages,
unsigned long *src_mpfn,
unsigned long *mpfn,
- unsigned long addr)
+ unsigned long addr,
+ unsigned int order)
{
unsigned long i;
- for (i = 0; i < npages; ++i, addr += PAGE_SIZE) {
+ for (i = 0; i < npages;) {
struct page *page, *src_page;
if (!(src_mpfn[i] & MIGRATE_PFN_MIGRATE))
- continue;
+ goto next;
src_page = migrate_pfn_to_page(src_mpfn[i]);
if (!src_page)
- continue;
+ goto next;
if (fault_page) {
if (src_page->zone_device_data !=
fault_page->zone_device_data)
- continue;
+ goto next;
}
- if (vas)
- page = alloc_page_vma(GFP_HIGHUSER, vas, addr);
- else
- page = alloc_page(GFP_HIGHUSER);
+ if (order) {
+ page = folio_page(vma_alloc_folio(GFP_HIGHUSER | __GFP_ZERO,
+ order, vas, addr), 0);
+ } else {
+ if (vas)
+ page = alloc_page_vma(GFP_HIGHUSER, vas, addr);
+ else
+ page = alloc_page(GFP_HIGHUSER);
+ }
if (!page)
goto free_pages;
mpfn[i] = migrate_pfn(page_to_pfn(page));
+
+next:
+ i += 0x1 << order;
+ addr += page_size(page);
}
for (i = 0; i < npages; ++i) {
@@ -554,7 +565,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
goto err_free;
err = drm_pagemap_migrate_populate_ram_pfn(NULL, NULL, npages, &mpages,
- src, dst, 0);
+ src, dst, 0, 0);
if (err || !mpages)
goto err_finalize;
@@ -690,7 +701,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
err = drm_pagemap_migrate_populate_ram_pfn(vas, page, npages, &mpages,
migrate.src, migrate.dst,
- start);
+ start, 0);
if (err)
goto err_finalize;
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v1 5/5] drm/pagemap: Allocate folios when possible
2025-07-17 13:38 ` [PATCH v1 5/5] drm/pagemap: Allocate folios when possible Francois Dugast
@ 2025-07-18 4:41 ` Matthew Brost
2025-07-18 5:49 ` Matthew Brost
0 siblings, 1 reply; 19+ messages in thread
From: Matthew Brost @ 2025-07-18 4:41 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
On Thu, Jul 17, 2025 at 03:38:27PM +0200, Francois Dugast wrote:
> If the order is greater than zero, allocate a folio when populating the
> RAM PFNs instead of allocating individual pages one after the other. For
> example if 2MB folios are used instead of 4KB pages, this reduces the
> number of calls to the allocation API by 512.
>
> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/drm_pagemap.c | 33 ++++++++++++++++++++++-----------
> 1 file changed, 22 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
> index de15d96f6393..4f67c6173ee5 100644
> --- a/drivers/gpu/drm/drm_pagemap.c
> +++ b/drivers/gpu/drm/drm_pagemap.c
> @@ -438,6 +438,7 @@ EXPORT_SYMBOL_GPL(drm_pagemap_migrate_to_devmem);
> * @src_mpfn: Source array of migrate PFNs
> * @mpfn: Array of migrate PFNs to populate
> * @addr: Start address for PFN allocation
> + * @order: Page order
> *
> * This function populates the RAM migrate page frame numbers (PFNs) for the
> * specified VM area structure. It allocates and locks pages in the VM area for
> @@ -452,35 +453,45 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,
> unsigned long *mpages,
> unsigned long *src_mpfn,
> unsigned long *mpfn,
> - unsigned long addr)
> + unsigned long addr,
> + unsigned int order)
I don't think an order argument is needed. A better approach would be to
look at the order of the src_mpfn (device) page and allocate based on
that. This would maintain congruence between the initial GPU fault—which
creates device pages either as THP or not—and the migration path back,
where we'd insert a THP or not accordingly. In other words, it would
preserve consistency throughout the entire flow.
Also, if you look at the migrate_vma_* functions for THP, it's never
allowed to upgrade from non-THP to THP—only a downgrade from THP to
non-THP is permitted.
> {
> unsigned long i;
>
> - for (i = 0; i < npages; ++i, addr += PAGE_SIZE) {
> + for (i = 0; i < npages;) {
> struct page *page, *src_page;
>
> if (!(src_mpfn[i] & MIGRATE_PFN_MIGRATE))
> - continue;
> + goto next;
>
> src_page = migrate_pfn_to_page(src_mpfn[i]);
> if (!src_page)
> - continue;
> + goto next;
>
> if (fault_page) {
> if (src_page->zone_device_data !=
> fault_page->zone_device_data)
> - continue;
> + goto next;
> }
>
> - if (vas)
> - page = alloc_page_vma(GFP_HIGHUSER, vas, addr);
> - else
> - page = alloc_page(GFP_HIGHUSER);
> + if (order) {
> + page = folio_page(vma_alloc_folio(GFP_HIGHUSER | __GFP_ZERO,
> + order, vas, addr), 0);
if (vas)
page = folio_page(vma_alloc_folio(GFP_HIGHUSER,
order, vas, addr), 0);
else
page = alloc_pages(GFP_HIGHUSER, order);
We may also want to consider a downgrade path—for example, if THP
allocation fails here, we could fall back to allocating single pages.
That would complicate things across GPU SVM and Xe, so maybe we table it
for now. But eventually, we'll need to handle this as per Nvidia's
comments, THP allocation failure seems possible.
Maybe add a comment indicating that, something like:
/* TODO: Support fallback to single pages if THP allocation fails */
> + } else {
> + if (vas)
> + page = alloc_page_vma(GFP_HIGHUSER, vas, addr);
> + else
> + page = alloc_page(GFP_HIGHUSER);
> + }
>
> if (!page)
> goto free_pages;
>
> mpfn[i] = migrate_pfn(page_to_pfn(page));
> +
> +next:
> + i += 0x1 << order;
> + addr += page_size(page);
> }
>
The loops below need to be updated to loop based on order too.
Matt
> for (i = 0; i < npages; ++i) {
> @@ -554,7 +565,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> goto err_free;
>
> err = drm_pagemap_migrate_populate_ram_pfn(NULL, NULL, npages, &mpages,
> - src, dst, 0);
> + src, dst, 0, 0);
> if (err || !mpages)
> goto err_finalize;
>
> @@ -690,7 +701,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
>
> err = drm_pagemap_migrate_populate_ram_pfn(vas, page, npages, &mpages,
> migrate.src, migrate.dst,
> - start);
> + start, 0);
> if (err)
> goto err_finalize;
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH v1 5/5] drm/pagemap: Allocate folios when possible
2025-07-18 4:41 ` Matthew Brost
@ 2025-07-18 5:49 ` Matthew Brost
2025-07-20 20:53 ` Matthew Brost
0 siblings, 1 reply; 19+ messages in thread
From: Matthew Brost @ 2025-07-18 5:49 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
On Thu, Jul 17, 2025 at 09:41:23PM -0700, Matthew Brost wrote:
> On Thu, Jul 17, 2025 at 03:38:27PM +0200, Francois Dugast wrote:
> > If the order is greater than zero, allocate a folio when populating the
> > RAM PFNs instead of allocating individual pages one after the other. For
> > example if 2MB folios are used instead of 4KB pages, this reduces the
> > number of calls to the allocation API by 512.
> >
> > Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > ---
> > drivers/gpu/drm/drm_pagemap.c | 33 ++++++++++++++++++++++-----------
> > 1 file changed, 22 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
> > index de15d96f6393..4f67c6173ee5 100644
> > --- a/drivers/gpu/drm/drm_pagemap.c
> > +++ b/drivers/gpu/drm/drm_pagemap.c
> > @@ -438,6 +438,7 @@ EXPORT_SYMBOL_GPL(drm_pagemap_migrate_to_devmem);
> > * @src_mpfn: Source array of migrate PFNs
> > * @mpfn: Array of migrate PFNs to populate
> > * @addr: Start address for PFN allocation
> > + * @order: Page order
> > *
> > * This function populates the RAM migrate page frame numbers (PFNs) for the
> > * specified VM area structure. It allocates and locks pages in the VM area for
> > @@ -452,35 +453,45 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,
> > unsigned long *mpages,
> > unsigned long *src_mpfn,
> > unsigned long *mpfn,
> > - unsigned long addr)
> > + unsigned long addr,
> > + unsigned int order)
>
> I don't think an order argument is needed. A better approach would be to
> look at the order of the src_mpfn (device) page and allocate based on
> that. This would maintain congruence between the initial GPU fault—which
> creates device pages either as THP or not—and the migration path back,
> where we'd insert a THP or not accordingly. In other words, it would
> preserve consistency throughout the entire flow.
>
> Also, if you look at the migrate_vma_* functions for THP, it's never
> allowed to upgrade from non-THP to THP—only a downgrade from THP to
> non-THP is permitted.
>
> > {
> > unsigned long i;
> >
> > - for (i = 0; i < npages; ++i, addr += PAGE_SIZE) {
> > + for (i = 0; i < npages;) {
> > struct page *page, *src_page;
> >
> > if (!(src_mpfn[i] & MIGRATE_PFN_MIGRATE))
> > - continue;
> > + goto next;
> >
> > src_page = migrate_pfn_to_page(src_mpfn[i]);
> > if (!src_page)
> > - continue;
> > + goto next;
> >
> > if (fault_page) {
> > if (src_page->zone_device_data !=
> > fault_page->zone_device_data)
> > - continue;
> > + goto next;
> > }
> >
> > - if (vas)
> > - page = alloc_page_vma(GFP_HIGHUSER, vas, addr);
> > - else
> > - page = alloc_page(GFP_HIGHUSER);
> > + if (order) {
> > + page = folio_page(vma_alloc_folio(GFP_HIGHUSER | __GFP_ZERO,
> > + order, vas, addr), 0);
>
> if (vas)
> page = folio_page(vma_alloc_folio(GFP_HIGHUSER,
> order, vas, addr), 0);
> else
> page = alloc_pages(GFP_HIGHUSER, order);
>
> We may also want to consider a downgrade path—for example, if THP
> allocation fails here, we could fall back to allocating single pages.
> That would complicate things across GPU SVM and Xe, so maybe we table it
> for now. But eventually, we'll need to handle this as per Nvidia's
> comments, THP allocation failure seems possible.
>
> Maybe add a comment indicating that, something like:
>
> /* TODO: Support fallback to single pages if THP allocation fails */
>
> > + } else {
> > + if (vas)
> > + page = alloc_page_vma(GFP_HIGHUSER, vas, addr);
> > + else
> > + page = alloc_page(GFP_HIGHUSER);
> > + }
> >
> > if (!page)
> > goto free_pages;
> >
> > mpfn[i] = migrate_pfn(page_to_pfn(page));
> > +
> > +next:
> > + i += 0x1 << order;
> > + addr += page_size(page);
> > }
> >
>
> The loops below need to be updated to loop based on order too.
>
Also the mpages return based on order.
Matt
> Matt
>
> > for (i = 0; i < npages; ++i) {
> > @@ -554,7 +565,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> > goto err_free;
> >
> > err = drm_pagemap_migrate_populate_ram_pfn(NULL, NULL, npages, &mpages,
> > - src, dst, 0);
> > + src, dst, 0, 0);
> > if (err || !mpages)
> > goto err_finalize;
> >
> > @@ -690,7 +701,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
> >
> > err = drm_pagemap_migrate_populate_ram_pfn(vas, page, npages, &mpages,
> > migrate.src, migrate.dst,
> > - start);
> > + start, 0);
> > if (err)
> > goto err_finalize;
> >
> > --
> > 2.43.0
> >
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH v1 5/5] drm/pagemap: Allocate folios when possible
2025-07-18 5:49 ` Matthew Brost
@ 2025-07-20 20:53 ` Matthew Brost
0 siblings, 0 replies; 19+ messages in thread
From: Matthew Brost @ 2025-07-20 20:53 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
On Thu, Jul 17, 2025 at 10:49:48PM -0700, Matthew Brost wrote:
> On Thu, Jul 17, 2025 at 09:41:23PM -0700, Matthew Brost wrote:
> > On Thu, Jul 17, 2025 at 03:38:27PM +0200, Francois Dugast wrote:
> > > If the order is greater than zero, allocate a folio when populating the
> > > RAM PFNs instead of allocating individual pages one after the other. For
> > > example if 2MB folios are used instead of 4KB pages, this reduces the
> > > number of calls to the allocation API by 512.
> > >
> > > Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> > > Cc: Matthew Brost <matthew.brost@intel.com>
> > > ---
> > > drivers/gpu/drm/drm_pagemap.c | 33 ++++++++++++++++++++++-----------
> > > 1 file changed, 22 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
> > > index de15d96f6393..4f67c6173ee5 100644
> > > --- a/drivers/gpu/drm/drm_pagemap.c
> > > +++ b/drivers/gpu/drm/drm_pagemap.c
> > > @@ -438,6 +438,7 @@ EXPORT_SYMBOL_GPL(drm_pagemap_migrate_to_devmem);
> > > * @src_mpfn: Source array of migrate PFNs
> > > * @mpfn: Array of migrate PFNs to populate
> > > * @addr: Start address for PFN allocation
> > > + * @order: Page order
> > > *
> > > * This function populates the RAM migrate page frame numbers (PFNs) for the
> > > * specified VM area structure. It allocates and locks pages in the VM area for
> > > @@ -452,35 +453,45 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,
> > > unsigned long *mpages,
> > > unsigned long *src_mpfn,
> > > unsigned long *mpfn,
> > > - unsigned long addr)
> > > + unsigned long addr,
> > > + unsigned int order)
> >
> > I don't think an order argument is needed. A better approach would be to
> > look at the order of the src_mpfn (device) page and allocate based on
> > that. This would maintain congruence between the initial GPU fault—which
> > creates device pages either as THP or not—and the migration path back,
> > where we'd insert a THP or not accordingly. In other words, it would
> > preserve consistency throughout the entire flow.
> >
> > Also, if you look at the migrate_vma_* functions for THP, it's never
> > allowed to upgrade from non-THP to THP—only a downgrade from THP to
> > non-THP is permitted.
> >
> > > {
> > > unsigned long i;
> > >
> > > - for (i = 0; i < npages; ++i, addr += PAGE_SIZE) {
> > > + for (i = 0; i < npages;) {
> > > struct page *page, *src_page;
> > >
> > > if (!(src_mpfn[i] & MIGRATE_PFN_MIGRATE))
> > > - continue;
> > > + goto next;
> > >
> > > src_page = migrate_pfn_to_page(src_mpfn[i]);
> > > if (!src_page)
> > > - continue;
> > > + goto next;
> > >
> > > if (fault_page) {
> > > if (src_page->zone_device_data !=
> > > fault_page->zone_device_data)
> > > - continue;
> > > + goto next;
> > > }
> > >
> > > - if (vas)
> > > - page = alloc_page_vma(GFP_HIGHUSER, vas, addr);
> > > - else
> > > - page = alloc_page(GFP_HIGHUSER);
> > > + if (order) {
> > > + page = folio_page(vma_alloc_folio(GFP_HIGHUSER | __GFP_ZERO,
> > > + order, vas, addr), 0);
> >
> > if (vas)
> > page = folio_page(vma_alloc_folio(GFP_HIGHUSER,
> > order, vas, addr), 0);
> > else
> > page = alloc_pages(GFP_HIGHUSER, order);
s/alloc_pages/folio_alloc actually.
Also I think calling folio_page before checking the return of
vma_alloc_folio is dangerous too as vma_alloc_folio can return NULL on
failure.
Matt
> >
> > We may also want to consider a downgrade path—for example, if THP
> > allocation fails here, we could fall back to allocating single pages.
> > That would complicate things across GPU SVM and Xe, so maybe we table it
> > for now. But eventually, we'll need to handle this as per Nvidia's
> > comments, THP allocation failure seems possible.
> >
> > Maybe add a comment indicating that, something like:
> >
> > /* TODO: Support fallback to single pages if THP allocation fails */
> >
> > > + } else {
> > > + if (vas)
> > > + page = alloc_page_vma(GFP_HIGHUSER, vas, addr);
> > > + else
> > > + page = alloc_page(GFP_HIGHUSER);
> > > + }
> > >
> > > if (!page)
> > > goto free_pages;
> > >
> > > mpfn[i] = migrate_pfn(page_to_pfn(page));
> > > +
> > > +next:
> > > + i += 0x1 << order;
> > > + addr += page_size(page);
> > > }
> > >
> >
> > The loops below need to be updated to loop based on order too.
> >
>
> Also the mpages return based on order.
>
> Matt
>
> > Matt
> >
> > > for (i = 0; i < npages; ++i) {
> > > @@ -554,7 +565,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)
> > > goto err_free;
> > >
> > > err = drm_pagemap_migrate_populate_ram_pfn(NULL, NULL, npages, &mpages,
> > > - src, dst, 0);
> > > + src, dst, 0, 0);
> > > if (err || !mpages)
> > > goto err_finalize;
> > >
> > > @@ -690,7 +701,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
> > >
> > > err = drm_pagemap_migrate_populate_ram_pfn(vas, page, npages, &mpages,
> > > migrate.src, migrate.dst,
> > > - start);
> > > + start, 0);
> > > if (err)
> > > goto err_finalize;
> > >
> > > --
> > > 2.43.0
> > >
^ permalink raw reply [flat|nested] 19+ messages in thread
* ✗ CI.checkpatch: warning for Prepare GPU SVM for migration of THP
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
` (4 preceding siblings ...)
2025-07-17 13:38 ` [PATCH v1 5/5] drm/pagemap: Allocate folios when possible Francois Dugast
@ 2025-07-17 14:25 ` Patchwork
2025-07-17 14:26 ` ✓ CI.KUnit: success " Patchwork
` (2 subsequent siblings)
8 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2025-07-17 14:25 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
== Series Details ==
Series: Prepare GPU SVM for migration of THP
URL : https://patchwork.freedesktop.org/series/151754/
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
43254c2aa575037fc031c7ac21b0d031c700b2bf
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit a7a2cd5543581784260203c489ed17895e1acbf3
Author: Francois Dugast <francois.dugast@intel.com>
Date: Thu Jul 17 15:38:27 2025 +0200
drm/pagemap: Allocate folios when possible
If the order is greater than zero, allocate a folio when populating the
RAM PFNs instead of allocating individual pages one after the other. For
example if 2MB folios are used instead of 4KB pages, this reduces the
number of calls to the allocation API by 512.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
+ /mt/dim checkpatch 32c3655fcecb4e7e7dd624bf7b201ae69eb5bb5f drm-intel
d0601960ab32 drm/pagemap: Use struct drm_pagemap_device_addr in mapping and copy functions
-:7: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#7:
This struct embeds more information than just the DMA address. This will help
total: 0 errors, 1 warnings, 0 checks, 233 lines checked
d0c6c1d894a9 drm/xe/svm: Use struct drm_pagemap_device_addr
a99a95ba6ef6 drm/pagemap: DMA map folios when possible
-:50: CHECK:SPACING: spaces preferred around that '+' (ctx:VxV)
#50: FILE: drivers/gpu/drm/drm_pagemap.c:244:
+ for (j = 0; j < (0x1 << order) && i+j < npages; j++)
^
-:51: CHECK:SPACING: spaces preferred around that '+' (ctx:VxV)
#51: FILE: drivers/gpu/drm/drm_pagemap.c:245:
+ device_addr[i+j].addr = device_addr[i].addr + j * PAGE_SIZE;
^
total: 0 errors, 0 warnings, 2 checks, 52 lines checked
6c4f03df6f84 drm/xe/migrate: Use order to calculate migration length
a7a2cd554358 drm/pagemap: Allocate folios when possible
^ permalink raw reply [flat|nested] 19+ messages in thread* ✓ CI.KUnit: success for Prepare GPU SVM for migration of THP
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
` (5 preceding siblings ...)
2025-07-17 14:25 ` ✗ CI.checkpatch: warning for Prepare GPU SVM for migration of THP Patchwork
@ 2025-07-17 14:26 ` Patchwork
2025-07-17 15:34 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-18 22:46 ` ✗ Xe.CI.Full: failure " Patchwork
8 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2025-07-17 14:26 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
== Series Details ==
Series: Prepare GPU SVM for migration of THP
URL : https://patchwork.freedesktop.org/series/151754/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[14:25:28] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:25:32] 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=25
[14:26:06] Starting KUnit Kernel (1/1)...
[14:26:06] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[14:26:06] ================== guc_buf (11 subtests) ===================
[14:26:06] [PASSED] test_smallest
[14:26:06] [PASSED] test_largest
[14:26:06] [PASSED] test_granular
[14:26:06] [PASSED] test_unique
[14:26:06] [PASSED] test_overlap
[14:26:06] [PASSED] test_reusable
[14:26:06] [PASSED] test_too_big
[14:26:06] [PASSED] test_flush
[14:26:06] [PASSED] test_lookup
[14:26:06] [PASSED] test_data
[14:26:06] [PASSED] test_class
[14:26:06] ===================== [PASSED] guc_buf =====================
[14:26:06] =================== guc_dbm (7 subtests) ===================
[14:26:06] [PASSED] test_empty
[14:26:06] [PASSED] test_default
[14:26:06] ======================== test_size ========================
[14:26:06] [PASSED] 4
[14:26:06] [PASSED] 8
[14:26:06] [PASSED] 32
[14:26:06] [PASSED] 256
[14:26:06] ==================== [PASSED] test_size ====================
[14:26:06] ======================= test_reuse ========================
[14:26:06] [PASSED] 4
[14:26:06] [PASSED] 8
[14:26:06] [PASSED] 32
[14:26:06] [PASSED] 256
[14:26:06] =================== [PASSED] test_reuse ====================
[14:26:06] =================== test_range_overlap ====================
[14:26:06] [PASSED] 4
[14:26:06] [PASSED] 8
[14:26:06] [PASSED] 32
[14:26:06] [PASSED] 256
[14:26:06] =============== [PASSED] test_range_overlap ================
[14:26:06] =================== test_range_compact ====================
[14:26:06] [PASSED] 4
[14:26:06] [PASSED] 8
[14:26:06] [PASSED] 32
[14:26:06] [PASSED] 256
[14:26:06] =============== [PASSED] test_range_compact ================
[14:26:06] ==================== test_range_spare =====================
[14:26:06] [PASSED] 4
[14:26:06] [PASSED] 8
[14:26:06] [PASSED] 32
[14:26:06] [PASSED] 256
[14:26:06] ================ [PASSED] test_range_spare =================
[14:26:06] ===================== [PASSED] guc_dbm =====================
[14:26:06] =================== guc_idm (6 subtests) ===================
[14:26:06] [PASSED] bad_init
[14:26:06] [PASSED] no_init
[14:26:06] [PASSED] init_fini
[14:26:06] [PASSED] check_used
[14:26:06] [PASSED] check_quota
[14:26:06] [PASSED] check_all
[14:26:06] ===================== [PASSED] guc_idm =====================
[14:26:06] ================== no_relay (3 subtests) ===================
[14:26:06] [PASSED] xe_drops_guc2pf_if_not_ready
[14:26:06] [PASSED] xe_drops_guc2vf_if_not_ready
[14:26:06] [PASSED] xe_rejects_send_if_not_ready
[14:26:06] ==================== [PASSED] no_relay =====================
[14:26:06] ================== pf_relay (14 subtests) ==================
[14:26:06] [PASSED] pf_rejects_guc2pf_too_short
[14:26:06] [PASSED] pf_rejects_guc2pf_too_long
[14:26:06] [PASSED] pf_rejects_guc2pf_no_payload
[14:26:06] [PASSED] pf_fails_no_payload
[14:26:06] [PASSED] pf_fails_bad_origin
[14:26:06] [PASSED] pf_fails_bad_type
[14:26:06] [PASSED] pf_txn_reports_error
[14:26:06] [PASSED] pf_txn_sends_pf2guc
[14:26:06] [PASSED] pf_sends_pf2guc
[14:26:06] [SKIPPED] pf_loopback_nop
[14:26:06] [SKIPPED] pf_loopback_echo
[14:26:06] [SKIPPED] pf_loopback_fail
[14:26:06] [SKIPPED] pf_loopback_busy
[14:26:06] [SKIPPED] pf_loopback_retry
[14:26:06] ==================== [PASSED] pf_relay =====================
[14:26:06] ================== vf_relay (3 subtests) ===================
[14:26:06] [PASSED] vf_rejects_guc2vf_too_short
[14:26:06] [PASSED] vf_rejects_guc2vf_too_long
[14:26:06] [PASSED] vf_rejects_guc2vf_no_payload
[14:26:06] ==================== [PASSED] vf_relay =====================
[14:26:06] ===================== lmtt (1 subtest) =====================
[14:26:06] ======================== test_ops =========================
[14:26:06] [PASSED] 2-level
[14:26:06] [PASSED] multi-level
[14:26:06] ==================== [PASSED] test_ops =====================
[14:26:06] ====================== [PASSED] lmtt =======================
[14:26:06] ================= pf_service (11 subtests) =================
[14:26:06] [PASSED] pf_negotiate_any
[14:26:06] [PASSED] pf_negotiate_base_match
[14:26:06] [PASSED] pf_negotiate_base_newer
[14:26:06] [PASSED] pf_negotiate_base_next
[14:26:06] [SKIPPED] pf_negotiate_base_older
[14:26:06] [PASSED] pf_negotiate_base_prev
[14:26:06] [PASSED] pf_negotiate_latest_match
[14:26:07] [PASSED] pf_negotiate_latest_newer
[14:26:07] [PASSED] pf_negotiate_latest_next
[14:26:07] [SKIPPED] pf_negotiate_latest_older
[14:26:07] [SKIPPED] pf_negotiate_latest_prev
[14:26:07] =================== [PASSED] pf_service ====================
[14:26:07] =================== xe_mocs (2 subtests) ===================
[14:26:07] ================ xe_live_mocs_kernel_kunit ================
[14:26:07] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[14:26:07] ================ xe_live_mocs_reset_kunit =================
[14:26:07] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[14:26:07] ==================== [SKIPPED] xe_mocs =====================
[14:26:07] ================= xe_migrate (2 subtests) ==================
[14:26:07] ================= xe_migrate_sanity_kunit =================
[14:26:07] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[14:26:07] ================== xe_validate_ccs_kunit ==================
[14:26:07] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[14:26:07] =================== [SKIPPED] xe_migrate ===================
[14:26:07] ================== xe_dma_buf (1 subtest) ==================
[14:26:07] ==================== xe_dma_buf_kunit =====================
[14:26:07] ================ [SKIPPED] xe_dma_buf_kunit ================
[14:26:07] =================== [SKIPPED] xe_dma_buf ===================
[14:26:07] ================= xe_bo_shrink (1 subtest) =================
[14:26:07] =================== xe_bo_shrink_kunit ====================
[14:26:07] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[14:26:07] ================== [SKIPPED] xe_bo_shrink ==================
[14:26:07] ==================== xe_bo (2 subtests) ====================
[14:26:07] ================== xe_ccs_migrate_kunit ===================
[14:26:07] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[14:26:07] ==================== xe_bo_evict_kunit ====================
[14:26:07] =============== [SKIPPED] xe_bo_evict_kunit ================
[14:26:07] ===================== [SKIPPED] xe_bo ======================
[14:26:07] ==================== args (11 subtests) ====================
[14:26:07] [PASSED] count_args_test
[14:26:07] [PASSED] call_args_example
[14:26:07] [PASSED] call_args_test
[14:26:07] [PASSED] drop_first_arg_example
[14:26:07] [PASSED] drop_first_arg_test
[14:26:07] [PASSED] first_arg_example
[14:26:07] [PASSED] first_arg_test
[14:26:07] [PASSED] last_arg_example
[14:26:07] [PASSED] last_arg_test
[14:26:07] [PASSED] pick_arg_example
[14:26:07] [PASSED] sep_comma_example
[14:26:07] ====================== [PASSED] args =======================
[14:26:07] =================== xe_pci (3 subtests) ====================
[14:26:07] ==================== check_graphics_ip ====================
[14:26:07] [PASSED] 12.70 Xe_LPG
[14:26:07] [PASSED] 12.71 Xe_LPG
[14:26:07] [PASSED] 12.74 Xe_LPG+
[14:26:07] [PASSED] 20.01 Xe2_HPG
[14:26:07] [PASSED] 20.02 Xe2_HPG
[14:26:07] [PASSED] 20.04 Xe2_LPG
[14:26:07] [PASSED] 30.00 Xe3_LPG
[14:26:07] [PASSED] 30.01 Xe3_LPG
[14:26:07] [PASSED] 30.03 Xe3_LPG
[14:26:07] ================ [PASSED] check_graphics_ip ================
[14:26:07] ===================== check_media_ip ======================
[14:26:07] [PASSED] 13.00 Xe_LPM+
[14:26:07] [PASSED] 13.01 Xe2_HPM
[14:26:07] [PASSED] 20.00 Xe2_LPM
[14:26:07] [PASSED] 30.00 Xe3_LPM
[14:26:07] [PASSED] 30.02 Xe3_LPM
[14:26:07] ================= [PASSED] check_media_ip ==================
[14:26:07] ================= check_platform_gt_count =================
[14:26:07] [PASSED] 0x9A60 (TIGERLAKE)
[14:26:07] [PASSED] 0x9A68 (TIGERLAKE)
[14:26:07] [PASSED] 0x9A70 (TIGERLAKE)
[14:26:07] [PASSED] 0x9A40 (TIGERLAKE)
[14:26:07] [PASSED] 0x9A49 (TIGERLAKE)
[14:26:07] [PASSED] 0x9A59 (TIGERLAKE)
[14:26:07] [PASSED] 0x9A78 (TIGERLAKE)
[14:26:07] [PASSED] 0x9AC0 (TIGERLAKE)
[14:26:07] [PASSED] 0x9AC9 (TIGERLAKE)
[14:26:07] [PASSED] 0x9AD9 (TIGERLAKE)
[14:26:07] [PASSED] 0x9AF8 (TIGERLAKE)
[14:26:07] [PASSED] 0x4C80 (ROCKETLAKE)
[14:26:07] [PASSED] 0x4C8A (ROCKETLAKE)
[14:26:07] [PASSED] 0x4C8B (ROCKETLAKE)
[14:26:07] [PASSED] 0x4C8C (ROCKETLAKE)
[14:26:07] [PASSED] 0x4C90 (ROCKETLAKE)
[14:26:07] [PASSED] 0x4C9A (ROCKETLAKE)
[14:26:07] [PASSED] 0x4680 (ALDERLAKE_S)
[14:26:07] [PASSED] 0x4682 (ALDERLAKE_S)
[14:26:07] [PASSED] 0x4688 (ALDERLAKE_S)
[14:26:07] [PASSED] 0x468A (ALDERLAKE_S)
[14:26:07] [PASSED] 0x468B (ALDERLAKE_S)
[14:26:07] [PASSED] 0x4690 (ALDERLAKE_S)
[14:26:07] [PASSED] 0x4692 (ALDERLAKE_S)
[14:26:07] [PASSED] 0x4693 (ALDERLAKE_S)
[14:26:07] [PASSED] 0x46A0 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46A1 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46A2 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46A3 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46A6 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46A8 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46AA (ALDERLAKE_P)
[14:26:07] [PASSED] 0x462A (ALDERLAKE_P)
[14:26:07] [PASSED] 0x4626 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x4628 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46B0 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46B1 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46B2 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46B3 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46C0 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46C1 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46C2 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46C3 (ALDERLAKE_P)
[14:26:07] [PASSED] 0x46D0 (ALDERLAKE_N)
[14:26:07] [PASSED] 0x46D1 (ALDERLAKE_N)
[14:26:07] [PASSED] 0x46D2 (ALDERLAKE_N)
[14:26:07] [PASSED] 0x46D3 (ALDERLAKE_N)
[14:26:07] [PASSED] 0x46D4 (ALDERLAKE_N)
[14:26:07] [PASSED] 0xA721 (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA7A1 (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA7A9 (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA7AC (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA7AD (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA720 (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA7A0 (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA7A8 (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA7AA (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA7AB (ALDERLAKE_P)
[14:26:07] [PASSED] 0xA780 (ALDERLAKE_S)
[14:26:07] [PASSED] 0xA781 (ALDERLAKE_S)
[14:26:07] [PASSED] 0xA782 (ALDERLAKE_S)
[14:26:07] [PASSED] 0xA783 (ALDERLAKE_S)
[14:26:07] [PASSED] 0xA788 (ALDERLAKE_S)
[14:26:07] [PASSED] 0xA789 (ALDERLAKE_S)
[14:26:07] [PASSED] 0xA78A (ALDERLAKE_S)
[14:26:07] [PASSED] 0xA78B (ALDERLAKE_S)
[14:26:07] [PASSED] 0x4905 (DG1)
[14:26:07] [PASSED] 0x4906 (DG1)
[14:26:07] [PASSED] 0x4907 (DG1)
[14:26:07] [PASSED] 0x4908 (DG1)
[14:26:07] [PASSED] 0x4909 (DG1)
[14:26:07] [PASSED] 0x56C0 (DG2)
[14:26:07] [PASSED] 0x56C2 (DG2)
[14:26:07] [PASSED] 0x56C1 (DG2)
[14:26:07] [PASSED] 0x7D51 (METEORLAKE)
[14:26:07] [PASSED] 0x7DD1 (METEORLAKE)
[14:26:07] [PASSED] 0x7D41 (METEORLAKE)
[14:26:07] [PASSED] 0x7D67 (METEORLAKE)
[14:26:07] [PASSED] 0xB640 (METEORLAKE)
[14:26:07] [PASSED] 0x56A0 (DG2)
[14:26:07] [PASSED] 0x56A1 (DG2)
[14:26:07] [PASSED] 0x56A2 (DG2)
[14:26:07] [PASSED] 0x56BE (DG2)
[14:26:07] [PASSED] 0x56BF (DG2)
[14:26:07] [PASSED] 0x5690 (DG2)
[14:26:07] [PASSED] 0x5691 (DG2)
[14:26:07] [PASSED] 0x5692 (DG2)
[14:26:07] [PASSED] 0x56A5 (DG2)
[14:26:07] [PASSED] 0x56A6 (DG2)
[14:26:07] [PASSED] 0x56B0 (DG2)
[14:26:07] [PASSED] 0x56B1 (DG2)
[14:26:07] [PASSED] 0x56BA (DG2)
[14:26:07] [PASSED] 0x56BB (DG2)
[14:26:07] [PASSED] 0x56BC (DG2)
[14:26:07] [PASSED] 0x56BD (DG2)
[14:26:07] [PASSED] 0x5693 (DG2)
[14:26:07] [PASSED] 0x5694 (DG2)
[14:26:07] [PASSED] 0x5695 (DG2)
[14:26:07] [PASSED] 0x56A3 (DG2)
[14:26:07] [PASSED] 0x56A4 (DG2)
[14:26:07] [PASSED] 0x56B2 (DG2)
[14:26:07] [PASSED] 0x56B3 (DG2)
[14:26:07] [PASSED] 0x5696 (DG2)
[14:26:07] [PASSED] 0x5697 (DG2)
[14:26:07] [PASSED] 0xB69 (PVC)
[14:26:07] [PASSED] 0xB6E (PVC)
[14:26:07] [PASSED] 0xBD4 (PVC)
[14:26:07] [PASSED] 0xBD5 (PVC)
[14:26:07] [PASSED] 0xBD6 (PVC)
[14:26:07] [PASSED] 0xBD7 (PVC)
[14:26:07] [PASSED] 0xBD8 (PVC)
[14:26:07] [PASSED] 0xBD9 (PVC)
[14:26:07] [PASSED] 0xBDA (PVC)
[14:26:07] [PASSED] 0xBDB (PVC)
[14:26:07] [PASSED] 0xBE0 (PVC)
[14:26:07] [PASSED] 0xBE1 (PVC)
[14:26:07] [PASSED] 0xBE5 (PVC)
[14:26:07] [PASSED] 0x7D40 (METEORLAKE)
[14:26:07] [PASSED] 0x7D45 (METEORLAKE)
[14:26:07] [PASSED] 0x7D55 (METEORLAKE)
[14:26:07] [PASSED] 0x7D60 (METEORLAKE)
[14:26:07] [PASSED] 0x7DD5 (METEORLAKE)
[14:26:07] [PASSED] 0x6420 (LUNARLAKE)
[14:26:07] [PASSED] 0x64A0 (LUNARLAKE)
[14:26:07] [PASSED] 0x64B0 (LUNARLAKE)
[14:26:07] [PASSED] 0xE202 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE209 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE20B (BATTLEMAGE)
[14:26:07] [PASSED] 0xE20C (BATTLEMAGE)
[14:26:07] [PASSED] 0xE20D (BATTLEMAGE)
[14:26:07] [PASSED] 0xE210 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE211 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE212 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE216 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE220 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE221 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE222 (BATTLEMAGE)
[14:26:07] [PASSED] 0xE223 (BATTLEMAGE)
[14:26:07] [PASSED] 0xB080 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB081 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB082 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB083 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB084 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB085 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB086 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB087 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB08F (PANTHERLAKE)
[14:26:07] [PASSED] 0xB090 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB0A0 (PANTHERLAKE)
[14:26:07] [PASSED] 0xB0B0 (PANTHERLAKE)
[14:26:07] [PASSED] 0xFD80 (PANTHERLAKE)
[14:26:07] [PASSED] 0xFD81 (PANTHERLAKE)
[14:26:07] ============= [PASSED] check_platform_gt_count =============
[14:26:07] ===================== [PASSED] xe_pci ======================
[14:26:07] =================== xe_rtp (2 subtests) ====================
[14:26:07] =============== xe_rtp_process_to_sr_tests ================
[14:26:07] [PASSED] coalesce-same-reg
[14:26:07] [PASSED] no-match-no-add
[14:26:07] [PASSED] match-or
[14:26:07] [PASSED] match-or-xfail
[14:26:07] [PASSED] no-match-no-add-multiple-rules
[14:26:07] [PASSED] two-regs-two-entries
[14:26:07] [PASSED] clr-one-set-other
[14:26:07] [PASSED] set-field
[14:26:07] [PASSED] conflict-duplicate
[14:26:07] [PASSED] conflict-not-disjoint
[14:26:07] [PASSED] conflict-reg-type
[14:26:07] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[14:26:07] ================== xe_rtp_process_tests ===================
[14:26:07] [PASSED] active1
[14:26:07] [PASSED] active2
[14:26:07] [PASSED] active-inactive
[14:26:07] [PASSED] inactive-active
[14:26:07] [PASSED] inactive-1st_or_active-inactive
[14:26:07] [PASSED] inactive-2nd_or_active-inactive
[14:26:07] [PASSED] inactive-last_or_active-inactive
[14:26:07] [PASSED] inactive-no_or_active-inactive
[14:26:07] ============== [PASSED] xe_rtp_process_tests ===============
[14:26:07] ===================== [PASSED] xe_rtp ======================
[14:26:07] ==================== xe_wa (1 subtest) =====================
[14:26:07] ======================== xe_wa_gt =========================
[14:26:07] [PASSED] TIGERLAKE (B0)
[14:26:07] [PASSED] DG1 (A0)
[14:26:07] [PASSED] DG1 (B0)
[14:26:07] [PASSED] ALDERLAKE_S (A0)
[14:26:07] [PASSED] ALDERLAKE_S (B0)
[14:26:07] [PASSED] ALDERLAKE_S (C0)
[14:26:07] [PASSED] ALDERLAKE_S (D0)
[14:26:07] [PASSED] ALDERLAKE_P (A0)
[14:26:07] [PASSED] ALDERLAKE_P (B0)
[14:26:07] [PASSED] ALDERLAKE_P (C0)
[14:26:07] [PASSED] ALDERLAKE_S_RPLS (D0)
[14:26:07] [PASSED] ALDERLAKE_P_RPLU (E0)
[14:26:07] [PASSED] DG2_G10 (C0)
[14:26:07] [PASSED] DG2_G11 (B1)
[14:26:07] [PASSED] DG2_G12 (A1)
[14:26:07] [PASSED] METEORLAKE (g:A0, m:A0)
[14:26:07] [PASSED] METEORLAKE (g:A0, m:A0)
[14:26:07] [PASSED] METEORLAKE (g:A0, m:A0)
[14:26:07] [PASSED] LUNARLAKE (g:A0, m:A0)
[14:26:07] [PASSED] LUNARLAKE (g:B0, m:A0)
stty: 'standard input': Inappropriate ioctl for device
[14:26:07] [PASSED] BATTLEMAGE (g:A0, m:A1)
[14:26:07] ==================== [PASSED] xe_wa_gt =====================
[14:26:07] ====================== [PASSED] xe_wa ======================
[14:26:07] ============================================================
[14:26:07] Testing complete. Ran 297 tests: passed: 281, skipped: 16
[14:26:07] Elapsed time: 38.844s total, 4.233s configuring, 34.244s building, 0.327s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[14:26:07] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:26: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=25
[14:26:34] Starting KUnit Kernel (1/1)...
[14:26:34] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[14:26:34] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[14:26:34] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[14:26:34] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[14:26:34] =========== drm_validate_clone_mode (2 subtests) ===========
[14:26:34] ============== drm_test_check_in_clone_mode ===============
[14:26:34] [PASSED] in_clone_mode
[14:26:34] [PASSED] not_in_clone_mode
[14:26:34] ========== [PASSED] drm_test_check_in_clone_mode ===========
[14:26:34] =============== drm_test_check_valid_clones ===============
[14:26:34] [PASSED] not_in_clone_mode
[14:26:34] [PASSED] valid_clone
[14:26:34] [PASSED] invalid_clone
[14:26:34] =========== [PASSED] drm_test_check_valid_clones ===========
[14:26:34] ============= [PASSED] drm_validate_clone_mode =============
[14:26:34] ============= drm_validate_modeset (1 subtest) =============
[14:26:34] [PASSED] drm_test_check_connector_changed_modeset
[14:26:34] ============== [PASSED] drm_validate_modeset ===============
[14:26:34] ====== drm_test_bridge_get_current_state (2 subtests) ======
[14:26:34] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[14:26:34] [PASSED] drm_test_drm_bridge_get_current_state_legacy
[14:26:34] ======== [PASSED] drm_test_bridge_get_current_state ========
[14:26:34] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[14:26:34] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[14:26:34] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[14:26:34] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy
[14:26:34] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[14:26:34] ============== drm_bridge_alloc (2 subtests) ===============
[14:26:34] [PASSED] drm_test_drm_bridge_alloc_basic
[14:26:34] [PASSED] drm_test_drm_bridge_alloc_get_put
[14:26:34] ================ [PASSED] drm_bridge_alloc =================
[14:26:34] ================== drm_buddy (7 subtests) ==================
[14:26:34] [PASSED] drm_test_buddy_alloc_limit
[14:26:34] [PASSED] drm_test_buddy_alloc_optimistic
[14:26:34] [PASSED] drm_test_buddy_alloc_pessimistic
[14:26:34] [PASSED] drm_test_buddy_alloc_pathological
[14:26:34] [PASSED] drm_test_buddy_alloc_contiguous
[14:26:34] [PASSED] drm_test_buddy_alloc_clear
[14:26:34] [PASSED] drm_test_buddy_alloc_range_bias
[14:26:34] ==================== [PASSED] drm_buddy ====================
[14:26:34] ============= drm_cmdline_parser (40 subtests) =============
[14:26:34] [PASSED] drm_test_cmdline_force_d_only
[14:26:34] [PASSED] drm_test_cmdline_force_D_only_dvi
[14:26:34] [PASSED] drm_test_cmdline_force_D_only_hdmi
[14:26:34] [PASSED] drm_test_cmdline_force_D_only_not_digital
[14:26:34] [PASSED] drm_test_cmdline_force_e_only
[14:26:34] [PASSED] drm_test_cmdline_res
[14:26:34] [PASSED] drm_test_cmdline_res_vesa
[14:26:34] [PASSED] drm_test_cmdline_res_vesa_rblank
[14:26:34] [PASSED] drm_test_cmdline_res_rblank
[14:26:34] [PASSED] drm_test_cmdline_res_bpp
[14:26:34] [PASSED] drm_test_cmdline_res_refresh
[14:26:34] [PASSED] drm_test_cmdline_res_bpp_refresh
[14:26:34] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[14:26:34] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[14:26:34] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[14:26:34] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[14:26:34] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[14:26:34] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[14:26:34] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[14:26:34] [PASSED] drm_test_cmdline_res_margins_force_on
[14:26:34] [PASSED] drm_test_cmdline_res_vesa_margins
[14:26:34] [PASSED] drm_test_cmdline_name
[14:26:34] [PASSED] drm_test_cmdline_name_bpp
[14:26:34] [PASSED] drm_test_cmdline_name_option
[14:26:34] [PASSED] drm_test_cmdline_name_bpp_option
[14:26:34] [PASSED] drm_test_cmdline_rotate_0
[14:26:34] [PASSED] drm_test_cmdline_rotate_90
[14:26:34] [PASSED] drm_test_cmdline_rotate_180
[14:26:34] [PASSED] drm_test_cmdline_rotate_270
[14:26:34] [PASSED] drm_test_cmdline_hmirror
[14:26:34] [PASSED] drm_test_cmdline_vmirror
[14:26:34] [PASSED] drm_test_cmdline_margin_options
[14:26:34] [PASSED] drm_test_cmdline_multiple_options
[14:26:34] [PASSED] drm_test_cmdline_bpp_extra_and_option
[14:26:34] [PASSED] drm_test_cmdline_extra_and_option
[14:26:34] [PASSED] drm_test_cmdline_freestanding_options
[14:26:34] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[14:26:34] [PASSED] drm_test_cmdline_panel_orientation
[14:26:34] ================ drm_test_cmdline_invalid =================
[14:26:34] [PASSED] margin_only
[14:26:34] [PASSED] interlace_only
[14:26:34] [PASSED] res_missing_x
[14:26:34] [PASSED] res_missing_y
[14:26:34] [PASSED] res_bad_y
[14:26:34] [PASSED] res_missing_y_bpp
[14:26:34] [PASSED] res_bad_bpp
[14:26:34] [PASSED] res_bad_refresh
[14:26:34] [PASSED] res_bpp_refresh_force_on_off
[14:26:34] [PASSED] res_invalid_mode
[14:26:34] [PASSED] res_bpp_wrong_place_mode
[14:26:34] [PASSED] name_bpp_refresh
[14:26:34] [PASSED] name_refresh
[14:26:34] [PASSED] name_refresh_wrong_mode
[14:26:34] [PASSED] name_refresh_invalid_mode
[14:26:34] [PASSED] rotate_multiple
[14:26:34] [PASSED] rotate_invalid_val
[14:26:34] [PASSED] rotate_truncated
[14:26:34] [PASSED] invalid_option
[14:26:34] [PASSED] invalid_tv_option
[14:26:34] [PASSED] truncated_tv_option
[14:26:34] ============ [PASSED] drm_test_cmdline_invalid =============
[14:26:34] =============== drm_test_cmdline_tv_options ===============
[14:26:34] [PASSED] NTSC
[14:26:34] [PASSED] NTSC_443
[14:26:34] [PASSED] NTSC_J
[14:26:34] [PASSED] PAL
[14:26:34] [PASSED] PAL_M
[14:26:34] [PASSED] PAL_N
[14:26:34] [PASSED] SECAM
[14:26:34] [PASSED] MONO_525
[14:26:34] [PASSED] MONO_625
[14:26:34] =========== [PASSED] drm_test_cmdline_tv_options ===========
[14:26:34] =============== [PASSED] drm_cmdline_parser ================
[14:26:34] ========== drmm_connector_hdmi_init (20 subtests) ==========
[14:26:34] [PASSED] drm_test_connector_hdmi_init_valid
[14:26:34] [PASSED] drm_test_connector_hdmi_init_bpc_8
[14:26:34] [PASSED] drm_test_connector_hdmi_init_bpc_10
[14:26:34] [PASSED] drm_test_connector_hdmi_init_bpc_12
[14:26:34] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[14:26:34] [PASSED] drm_test_connector_hdmi_init_bpc_null
[14:26:34] [PASSED] drm_test_connector_hdmi_init_formats_empty
[14:26:34] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[14:26:34] === drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[14:26:34] [PASSED] supported_formats=0x9 yuv420_allowed=1
[14:26:34] [PASSED] supported_formats=0x9 yuv420_allowed=0
[14:26:34] [PASSED] supported_formats=0x3 yuv420_allowed=1
[14:26:34] [PASSED] supported_formats=0x3 yuv420_allowed=0
[14:26:34] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[14:26:34] [PASSED] drm_test_connector_hdmi_init_null_ddc
[14:26:34] [PASSED] drm_test_connector_hdmi_init_null_product
[14:26:34] [PASSED] drm_test_connector_hdmi_init_null_vendor
[14:26:34] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[14:26:34] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[14:26:34] [PASSED] drm_test_connector_hdmi_init_product_valid
[14:26:34] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[14:26:34] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[14:26:34] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[14:26:34] ========= drm_test_connector_hdmi_init_type_valid =========
[14:26:34] [PASSED] HDMI-A
[14:26:34] [PASSED] HDMI-B
[14:26:34] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[14:26:34] ======== drm_test_connector_hdmi_init_type_invalid ========
[14:26:34] [PASSED] Unknown
[14:26:34] [PASSED] VGA
[14:26:34] [PASSED] DVI-I
[14:26:34] [PASSED] DVI-D
[14:26:34] [PASSED] DVI-A
[14:26:34] [PASSED] Composite
[14:26:34] [PASSED] SVIDEO
[14:26:34] [PASSED] LVDS
[14:26:34] [PASSED] Component
[14:26:34] [PASSED] DIN
[14:26:34] [PASSED] DP
[14:26:34] [PASSED] TV
[14:26:34] [PASSED] eDP
[14:26:34] [PASSED] Virtual
[14:26:34] [PASSED] DSI
[14:26:34] [PASSED] DPI
[14:26:34] [PASSED] Writeback
[14:26:34] [PASSED] SPI
[14:26:34] [PASSED] USB
[14:26:34] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[14:26:34] ============ [PASSED] drmm_connector_hdmi_init =============
[14:26:34] ============= drmm_connector_init (3 subtests) =============
[14:26:34] [PASSED] drm_test_drmm_connector_init
[14:26:34] [PASSED] drm_test_drmm_connector_init_null_ddc
[14:26:34] ========= drm_test_drmm_connector_init_type_valid =========
[14:26:34] [PASSED] Unknown
[14:26:34] [PASSED] VGA
[14:26:34] [PASSED] DVI-I
[14:26:34] [PASSED] DVI-D
[14:26:34] [PASSED] DVI-A
[14:26:34] [PASSED] Composite
[14:26:34] [PASSED] SVIDEO
[14:26:34] [PASSED] LVDS
[14:26:34] [PASSED] Component
[14:26:34] [PASSED] DIN
[14:26:34] [PASSED] DP
[14:26:34] [PASSED] HDMI-A
[14:26:34] [PASSED] HDMI-B
[14:26:34] [PASSED] TV
[14:26:34] [PASSED] eDP
[14:26:34] [PASSED] Virtual
[14:26:34] [PASSED] DSI
[14:26:34] [PASSED] DPI
[14:26:34] [PASSED] Writeback
[14:26:34] [PASSED] SPI
[14:26:34] [PASSED] USB
[14:26:34] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[14:26:34] =============== [PASSED] drmm_connector_init ===============
[14:26:34] ========= drm_connector_dynamic_init (6 subtests) ==========
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_init
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_init_properties
[14:26:34] ===== drm_test_drm_connector_dynamic_init_type_valid ======
[14:26:34] [PASSED] Unknown
[14:26:34] [PASSED] VGA
[14:26:34] [PASSED] DVI-I
[14:26:34] [PASSED] DVI-D
[14:26:34] [PASSED] DVI-A
[14:26:34] [PASSED] Composite
[14:26:34] [PASSED] SVIDEO
[14:26:34] [PASSED] LVDS
[14:26:34] [PASSED] Component
[14:26:34] [PASSED] DIN
[14:26:34] [PASSED] DP
[14:26:34] [PASSED] HDMI-A
[14:26:34] [PASSED] HDMI-B
[14:26:34] [PASSED] TV
[14:26:34] [PASSED] eDP
[14:26:34] [PASSED] Virtual
[14:26:34] [PASSED] DSI
[14:26:34] [PASSED] DPI
[14:26:34] [PASSED] Writeback
[14:26:34] [PASSED] SPI
[14:26:34] [PASSED] USB
[14:26:34] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[14:26:34] ======== drm_test_drm_connector_dynamic_init_name =========
[14:26:34] [PASSED] Unknown
[14:26:34] [PASSED] VGA
[14:26:34] [PASSED] DVI-I
[14:26:34] [PASSED] DVI-D
[14:26:34] [PASSED] DVI-A
[14:26:34] [PASSED] Composite
[14:26:34] [PASSED] SVIDEO
[14:26:34] [PASSED] LVDS
[14:26:34] [PASSED] Component
[14:26:34] [PASSED] DIN
[14:26:34] [PASSED] DP
[14:26:34] [PASSED] HDMI-A
[14:26:34] [PASSED] HDMI-B
[14:26:34] [PASSED] TV
[14:26:34] [PASSED] eDP
[14:26:34] [PASSED] Virtual
[14:26:34] [PASSED] DSI
[14:26:34] [PASSED] DPI
[14:26:34] [PASSED] Writeback
[14:26:34] [PASSED] SPI
[14:26:34] [PASSED] USB
[14:26:34] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[14:26:34] =========== [PASSED] drm_connector_dynamic_init ============
[14:26:34] ==== drm_connector_dynamic_register_early (4 subtests) =====
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[14:26:34] ====== [PASSED] drm_connector_dynamic_register_early =======
[14:26:34] ======= drm_connector_dynamic_register (7 subtests) ========
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[14:26:34] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[14:26:34] ========= [PASSED] drm_connector_dynamic_register ==========
[14:26:34] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[14:26:34] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[14:26:34] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[14:26:34] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[14:26:34] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[14:26:34] ========== drm_test_get_tv_mode_from_name_valid ===========
[14:26:34] [PASSED] NTSC
[14:26:34] [PASSED] NTSC-443
[14:26:34] [PASSED] NTSC-J
[14:26:34] [PASSED] PAL
[14:26:34] [PASSED] PAL-M
[14:26:34] [PASSED] PAL-N
[14:26:34] [PASSED] SECAM
[14:26:34] [PASSED] Mono
[14:26:34] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[14:26:34] [PASSED] drm_test_get_tv_mode_from_name_truncated
[14:26:34] ============ [PASSED] drm_get_tv_mode_from_name ============
[14:26:34] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[14:26:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[14:26:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[14:26:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[14:26:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[14:26:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[14:26:34] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[14:26:34] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid =
[14:26:34] [PASSED] VIC 96
[14:26:34] [PASSED] VIC 97
[14:26:34] [PASSED] VIC 101
[14:26:34] [PASSED] VIC 102
[14:26:34] [PASSED] VIC 106
[14:26:34] [PASSED] VIC 107
[14:26:34] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[14:26:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[14:26:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[14:26:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[14:26:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[14:26:34] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[14:26:34] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[14:26:34] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[14:26:34] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ====
[14:26:34] [PASSED] Automatic
[14:26:34] [PASSED] Full
[14:26:34] [PASSED] Limited 16:235
[14:26:34] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[14:26:34] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[14:26:34] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[14:26:34] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[14:26:34] === drm_test_drm_hdmi_connector_get_output_format_name ====
[14:26:34] [PASSED] RGB
[14:26:34] [PASSED] YUV 4:2:0
[14:26:34] [PASSED] YUV 4:2:2
[14:26:34] [PASSED] YUV 4:4:4
[14:26:34] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[14:26:34] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[14:26:34] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[14:26:34] ============= drm_damage_helper (21 subtests) ==============
[14:26:34] [PASSED] drm_test_damage_iter_no_damage
[14:26:34] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[14:26:34] [PASSED] drm_test_damage_iter_no_damage_src_moved
[14:26:34] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[14:26:34] [PASSED] drm_test_damage_iter_no_damage_not_visible
[14:26:34] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[14:26:34] [PASSED] drm_test_damage_iter_no_damage_no_fb
[14:26:34] [PASSED] drm_test_damage_iter_simple_damage
[14:26:34] [PASSED] drm_test_damage_iter_single_damage
[14:26:34] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[14:26:34] [PASSED] drm_test_damage_iter_single_damage_outside_src
[14:26:34] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[14:26:34] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[14:26:34] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[14:26:34] [PASSED] drm_test_damage_iter_single_damage_src_moved
[14:26:34] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[14:26:34] [PASSED] drm_test_damage_iter_damage
[14:26:34] [PASSED] drm_test_damage_iter_damage_one_intersect
[14:26:34] [PASSED] drm_test_damage_iter_damage_one_outside
[14:26:34] [PASSED] drm_test_damage_iter_damage_src_moved
[14:26:34] [PASSED] drm_test_damage_iter_damage_not_visible
[14:26:34] ================ [PASSED] drm_damage_helper ================
[14:26:34] ============== drm_dp_mst_helper (3 subtests) ==============
[14:26:34] ============== drm_test_dp_mst_calc_pbn_mode ==============
[14:26:34] [PASSED] Clock 154000 BPP 30 DSC disabled
[14:26:34] [PASSED] Clock 234000 BPP 30 DSC disabled
[14:26:34] [PASSED] Clock 297000 BPP 24 DSC disabled
[14:26:34] [PASSED] Clock 332880 BPP 24 DSC enabled
[14:26:34] [PASSED] Clock 324540 BPP 24 DSC enabled
[14:26:34] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[14:26:34] ============== drm_test_dp_mst_calc_pbn_div ===============
[14:26:34] [PASSED] Link rate 2000000 lane count 4
[14:26:34] [PASSED] Link rate 2000000 lane count 2
[14:26:34] [PASSED] Link rate 2000000 lane count 1
[14:26:34] [PASSED] Link rate 1350000 lane count 4
[14:26:34] [PASSED] Link rate 1350000 lane count 2
[14:26:34] [PASSED] Link rate 1350000 lane count 1
[14:26:34] [PASSED] Link rate 1000000 lane count 4
[14:26:34] [PASSED] Link rate 1000000 lane count 2
[14:26:34] [PASSED] Link rate 1000000 lane count 1
[14:26:34] [PASSED] Link rate 810000 lane count 4
[14:26:34] [PASSED] Link rate 810000 lane count 2
[14:26:34] [PASSED] Link rate 810000 lane count 1
[14:26:34] [PASSED] Link rate 540000 lane count 4
[14:26:34] [PASSED] Link rate 540000 lane count 2
[14:26:34] [PASSED] Link rate 540000 lane count 1
[14:26:34] [PASSED] Link rate 270000 lane count 4
[14:26:34] [PASSED] Link rate 270000 lane count 2
[14:26:34] [PASSED] Link rate 270000 lane count 1
[14:26:34] [PASSED] Link rate 162000 lane count 4
[14:26:34] [PASSED] Link rate 162000 lane count 2
[14:26:34] [PASSED] Link rate 162000 lane count 1
[14:26:34] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[14:26:34] ========= drm_test_dp_mst_sideband_msg_req_decode =========
[14:26:34] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[14:26:34] [PASSED] DP_POWER_UP_PHY with port number
[14:26:34] [PASSED] DP_POWER_DOWN_PHY with port number
[14:26:34] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[14:26:34] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[14:26:34] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[14:26:34] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[14:26:34] [PASSED] DP_QUERY_PAYLOAD with port number
[14:26:34] [PASSED] DP_QUERY_PAYLOAD with VCPI
[14:26:34] [PASSED] DP_REMOTE_DPCD_READ with port number
[14:26:34] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[14:26:34] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[14:26:34] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[14:26:34] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[14:26:34] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[14:26:34] [PASSED] DP_REMOTE_I2C_READ with port number
[14:26:34] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[14:26:34] [PASSED] DP_REMOTE_I2C_READ with transactions array
[14:26:34] [PASSED] DP_REMOTE_I2C_WRITE with port number
[14:26:34] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[14:26:34] [PASSED] DP_REMOTE_I2C_WRITE with data array
[14:26:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[14:26:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[14:26:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[14:26:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[14:26:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[14:26:34] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[14:26:34] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[14:26:34] ================ [PASSED] drm_dp_mst_helper ================
[14:26:34] ================== drm_exec (7 subtests) ===================
[14:26:34] [PASSED] sanitycheck
[14:26:34] [PASSED] test_lock
[14:26:34] [PASSED] test_lock_unlock
[14:26:34] [PASSED] test_duplicates
[14:26:34] [PASSED] test_prepare
[14:26:34] [PASSED] test_prepare_array
[14:26:34] [PASSED] test_multiple_loops
[14:26:34] ==================== [PASSED] drm_exec =====================
[14:26:34] =========== drm_format_helper_test (17 subtests) ===========
[14:26:34] ============== drm_test_fb_xrgb8888_to_gray8 ==============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[14:26:34] ============= drm_test_fb_xrgb8888_to_rgb332 ==============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[14:26:34] ============= drm_test_fb_xrgb8888_to_rgb565 ==============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[14:26:34] ============ drm_test_fb_xrgb8888_to_xrgb1555 =============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[14:26:34] ============ drm_test_fb_xrgb8888_to_argb1555 =============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[14:26:34] ============ drm_test_fb_xrgb8888_to_rgba5551 =============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[14:26:34] ============= drm_test_fb_xrgb8888_to_rgb888 ==============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[14:26:34] ============= drm_test_fb_xrgb8888_to_bgr888 ==============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[14:26:34] ============ drm_test_fb_xrgb8888_to_argb8888 =============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[14:26:34] =========== drm_test_fb_xrgb8888_to_xrgb2101010 ===========
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[14:26:34] =========== drm_test_fb_xrgb8888_to_argb2101010 ===========
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[14:26:34] ============== drm_test_fb_xrgb8888_to_mono ===============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[14:26:34] ==================== drm_test_fb_swab =====================
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ================ [PASSED] drm_test_fb_swab =================
[14:26:34] ============ drm_test_fb_xrgb8888_to_xbgr8888 =============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[14:26:34] ============ drm_test_fb_xrgb8888_to_abgr8888 =============
[14:26:34] [PASSED] single_pixel_source_buffer
[14:26:34] [PASSED] single_pixel_clip_rectangle
[14:26:34] [PASSED] well_known_colors
[14:26:34] [PASSED] destination_pitch
[14:26:34] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[14:26:34] ================= drm_test_fb_clip_offset =================
[14:26:34] [PASSED] pass through
[14:26:34] [PASSED] horizontal offset
[14:26:34] [PASSED] vertical offset
[14:26:34] [PASSED] horizontal and vertical offset
[14:26:34] [PASSED] horizontal offset (custom pitch)
[14:26:34] [PASSED] vertical offset (custom pitch)
[14:26:34] [PASSED] horizontal and vertical offset (custom pitch)
[14:26:34] ============= [PASSED] drm_test_fb_clip_offset =============
[14:26:34] =================== drm_test_fb_memcpy ====================
[14:26:34] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[14:26:34] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[14:26:34] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[14:26:34] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[14:26:34] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[14:26:34] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[14:26:34] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[14:26:34] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[14:26:34] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[14:26:34] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[14:26:34] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[14:26:34] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[14:26:34] =============== [PASSED] drm_test_fb_memcpy ================
[14:26:34] ============= [PASSED] drm_format_helper_test ==============
[14:26:34] ================= drm_format (18 subtests) =================
[14:26:34] [PASSED] drm_test_format_block_width_invalid
[14:26:34] [PASSED] drm_test_format_block_width_one_plane
[14:26:34] [PASSED] drm_test_format_block_width_two_plane
[14:26:34] [PASSED] drm_test_format_block_width_three_plane
[14:26:34] [PASSED] drm_test_format_block_width_tiled
[14:26:34] [PASSED] drm_test_format_block_height_invalid
[14:26:34] [PASSED] drm_test_format_block_height_one_plane
[14:26:34] [PASSED] drm_test_format_block_height_two_plane
[14:26:34] [PASSED] drm_test_format_block_height_three_plane
[14:26:34] [PASSED] drm_test_format_block_height_tiled
[14:26:34] [PASSED] drm_test_format_min_pitch_invalid
[14:26:34] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[14:26:34] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[14:26:34] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[14:26:34] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[14:26:34] [PASSED] drm_test_format_min_pitch_two_plane
[14:26:34] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[14:26:34] [PASSED] drm_test_format_min_pitch_tiled
[14:26:34] =================== [PASSED] drm_format ====================
[14:26:34] ============== drm_framebuffer (10 subtests) ===============
[14:26:34] ========== drm_test_framebuffer_check_src_coords ==========
[14:26:34] [PASSED] Success: source fits into fb
[14:26:34] [PASSED] Fail: overflowing fb with x-axis coordinate
[14:26:34] [PASSED] Fail: overflowing fb with y-axis coordinate
[14:26:34] [PASSED] Fail: overflowing fb with source width
[14:26:34] [PASSED] Fail: overflowing fb with source height
[14:26:34] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[14:26:34] [PASSED] drm_test_framebuffer_cleanup
[14:26:34] =============== drm_test_framebuffer_create ===============
[14:26:34] [PASSED] ABGR8888 normal sizes
[14:26:34] [PASSED] ABGR8888 max sizes
[14:26:34] [PASSED] ABGR8888 pitch greater than min required
[14:26:34] [PASSED] ABGR8888 pitch less than min required
[14:26:34] [PASSED] ABGR8888 Invalid width
[14:26:34] [PASSED] ABGR8888 Invalid buffer handle
[14:26:34] [PASSED] No pixel format
[14:26:34] [PASSED] ABGR8888 Width 0
[14:26:34] [PASSED] ABGR8888 Height 0
[14:26:34] [PASSED] ABGR8888 Out of bound height * pitch combination
[14:26:34] [PASSED] ABGR8888 Large buffer offset
[14:26:34] [PASSED] ABGR8888 Buffer offset for inexistent plane
[14:26:34] [PASSED] ABGR8888 Invalid flag
[14:26:34] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[14:26:34] [PASSED] ABGR8888 Valid buffer modifier
[14:26:34] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[14:26:34] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[14:26:34] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[14:26:34] [PASSED] NV12 Normal sizes
[14:26:34] [PASSED] NV12 Max sizes
[14:26:34] [PASSED] NV12 Invalid pitch
[14:26:34] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[14:26:34] [PASSED] NV12 different modifier per-plane
[14:26:34] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[14:26:34] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[14:26:34] [PASSED] NV12 Modifier for inexistent plane
[14:26:34] [PASSED] NV12 Handle for inexistent plane
[14:26:34] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[14:26:34] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[14:26:34] [PASSED] YVU420 Normal sizes
[14:26:34] [PASSED] YVU420 Max sizes
[14:26:34] [PASSED] YVU420 Invalid pitch
[14:26:34] [PASSED] YVU420 Different pitches
[14:26:34] [PASSED] YVU420 Different buffer offsets/pitches
[14:26:34] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[14:26:34] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[14:26:34] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[14:26:34] [PASSED] YVU420 Valid modifier
[14:26:34] [PASSED] YVU420 Different modifiers per plane
[14:26:34] [PASSED] YVU420 Modifier for inexistent plane
[14:26:34] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[14:26:34] [PASSED] X0L2 Normal sizes
[14:26:34] [PASSED] X0L2 Max sizes
[14:26:34] [PASSED] X0L2 Invalid pitch
[14:26:34] [PASSED] X0L2 Pitch greater than minimum required
[14:26:34] [PASSED] X0L2 Handle for inexistent plane
[14:26:34] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[14:26:34] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[14:26:34] [PASSED] X0L2 Valid modifier
[14:26:34] [PASSED] X0L2 Modifier for inexistent plane
[14:26:34] =========== [PASSED] drm_test_framebuffer_create ===========
[14:26:34] [PASSED] drm_test_framebuffer_free
[14:26:34] [PASSED] drm_test_framebuffer_init
[14:26:34] [PASSED] drm_test_framebuffer_init_bad_format
[14:26:34] [PASSED] drm_test_framebuffer_init_dev_mismatch
[14:26:34] [PASSED] drm_test_framebuffer_lookup
[14:26:34] [PASSED] drm_test_framebuffer_lookup_inexistent
[14:26:34] [PASSED] drm_test_framebuffer_modifiers_not_supported
[14:26:34] ================= [PASSED] drm_framebuffer =================
[14:26:34] ================ drm_gem_shmem (8 subtests) ================
[14:26:34] [PASSED] drm_gem_shmem_test_obj_create
[14:26:34] [PASSED] drm_gem_shmem_test_obj_create_private
[14:26:34] [PASSED] drm_gem_shmem_test_pin_pages
[14:26:34] [PASSED] drm_gem_shmem_test_vmap
[14:26:34] [PASSED] drm_gem_shmem_test_get_pages_sgt
[14:26:34] [PASSED] drm_gem_shmem_test_get_sg_table
[14:26:34] [PASSED] drm_gem_shmem_test_madvise
[14:26:34] [PASSED] drm_gem_shmem_test_purge
[14:26:34] ================== [PASSED] drm_gem_shmem ==================
[14:26:34] === drm_atomic_helper_connector_hdmi_check (27 subtests) ===
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[14:26:34] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 =======
[14:26:34] [PASSED] Automatic
[14:26:34] [PASSED] Full
[14:26:34] [PASSED] Limited 16:235
[14:26:34] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[14:26:34] [PASSED] drm_test_check_disable_connector
[14:26:34] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[14:26:34] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[14:26:34] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[14:26:34] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[14:26:34] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[14:26:34] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[14:26:34] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[14:26:34] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[14:26:34] [PASSED] drm_test_check_output_bpc_dvi
[14:26:34] [PASSED] drm_test_check_output_bpc_format_vic_1
[14:26:34] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[14:26:34] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[14:26:34] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[14:26:34] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[14:26:34] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[14:26:34] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[14:26:34] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[14:26:34] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[14:26:34] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[14:26:34] [PASSED] drm_test_check_broadcast_rgb_value
[14:26:34] [PASSED] drm_test_check_bpc_8_value
[14:26:34] [PASSED] drm_test_check_bpc_10_value
[14:26:34] [PASSED] drm_test_check_bpc_12_value
[14:26:34] [PASSED] drm_test_check_format_value
[14:26:34] [PASSED] drm_test_check_tmds_char_value
[14:26:34] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[14:26:34] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) =
[14:26:34] [PASSED] drm_test_check_mode_valid
[14:26:34] [PASSED] drm_test_check_mode_valid_reject
[14:26:34] [PASSED] drm_test_check_mode_valid_reject_rate
[14:26:34] [PASSED] drm_test_check_mode_valid_reject_max_clock
[14:26:34] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[14:26:34] ================= drm_managed (2 subtests) =================
[14:26:34] [PASSED] drm_test_managed_release_action
[14:26:34] [PASSED] drm_test_managed_run_action
[14:26:34] =================== [PASSED] drm_managed ===================
[14:26:34] =================== drm_mm (6 subtests) ====================
[14:26:34] [PASSED] drm_test_mm_init
[14:26:34] [PASSED] drm_test_mm_debug
[14:26:34] [PASSED] drm_test_mm_align32
[14:26:34] [PASSED] drm_test_mm_align64
[14:26:34] [PASSED] drm_test_mm_lowest
[14:26:34] [PASSED] drm_test_mm_highest
[14:26:34] ===================== [PASSED] drm_mm ======================
[14:26:34] ============= drm_modes_analog_tv (5 subtests) =============
[14:26:34] [PASSED] drm_test_modes_analog_tv_mono_576i
[14:26:34] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[14:26:34] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[14:26:34] [PASSED] drm_test_modes_analog_tv_pal_576i
[14:26:34] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[14:26:34] =============== [PASSED] drm_modes_analog_tv ===============
[14:26:34] ============== drm_plane_helper (2 subtests) ===============
[14:26:34] =============== drm_test_check_plane_state ================
[14:26:34] [PASSED] clipping_simple
[14:26:34] [PASSED] clipping_rotate_reflect
[14:26:34] [PASSED] positioning_simple
[14:26:34] [PASSED] upscaling
[14:26:34] [PASSED] downscaling
[14:26:34] [PASSED] rounding1
[14:26:34] [PASSED] rounding2
[14:26:34] [PASSED] rounding3
[14:26:34] [PASSED] rounding4
[14:26:34] =========== [PASSED] drm_test_check_plane_state ============
[14:26:34] =========== drm_test_check_invalid_plane_state ============
[14:26:34] [PASSED] positioning_invalid
[14:26:34] [PASSED] upscaling_invalid
[14:26:34] [PASSED] downscaling_invalid
[14:26:34] ======= [PASSED] drm_test_check_invalid_plane_state ========
[14:26:34] ================ [PASSED] drm_plane_helper =================
[14:26:34] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[14:26:34] ====== drm_test_connector_helper_tv_get_modes_check =======
[14:26:34] [PASSED] None
[14:26:34] [PASSED] PAL
[14:26:34] [PASSED] NTSC
[14:26:34] [PASSED] Both, NTSC Default
[14:26:34] [PASSED] Both, PAL Default
[14:26:34] [PASSED] Both, NTSC Default, with PAL on command-line
[14:26:34] [PASSED] Both, PAL Default, with NTSC on command-line
[14:26:34] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[14:26:34] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[14:26:34] ================== drm_rect (9 subtests) ===================
[14:26:34] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[14:26:34] [PASSED] drm_test_rect_clip_scaled_not_clipped
[14:26:34] [PASSED] drm_test_rect_clip_scaled_clipped
[14:26:34] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[14:26:34] ================= drm_test_rect_intersect =================
[14:26:34] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[14:26:34] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[14:26:34] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[14:26:34] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[14:26:34] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[14:26:34] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[14:26:34] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[14:26:34] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[14:26:34] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[14:26:34] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[14:26:34] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[14:26:34] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[14:26:34] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[14:26:34] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[14:26:34] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[14:26:34] ============= [PASSED] drm_test_rect_intersect =============
[14:26:34] ================ drm_test_rect_calc_hscale ================
[14:26:34] [PASSED] normal use
[14:26:34] [PASSED] out of max range
[14:26:34] [PASSED] out of min range
[14:26:34] [PASSED] zero dst
[14:26:34] [PASSED] negative src
[14:26:34] [PASSED] negative dst
[14:26:34] ============ [PASSED] drm_test_rect_calc_hscale ============
[14:26:34] ================ drm_test_rect_calc_vscale ================
[14:26:34] [PASSED] normal use
[14:26:34] [PASSED] out of max range
[14:26:34] [PASSED] out of min range
[14:26:34] [PASSED] zero dst
[14:26:34] [PASSED] negative src
[14:26:34] [PASSED] negative dst
[14:26:34] ============ [PASSED] drm_test_rect_calc_vscale ============
[14:26:34] ================== drm_test_rect_rotate ===================
[14:26:34] [PASSED] reflect-x
[14:26:34] [PASSED] reflect-y
[14:26:34] [PASSED] rotate-0
[14:26:34] [PASSED] rotate-90
[14:26:34] [PASSED] rotate-180
[14:26:34] [PASSED] rotate-270
stty: 'standard input': Inappropriate ioctl for device
[14:26:34] ============== [PASSED] drm_test_rect_rotate ===============
[14:26:34] ================ drm_test_rect_rotate_inv =================
[14:26:34] [PASSED] reflect-x
[14:26:34] [PASSED] reflect-y
[14:26:34] [PASSED] rotate-0
[14:26:34] [PASSED] rotate-90
[14:26:34] [PASSED] rotate-180
[14:26:34] [PASSED] rotate-270
[14:26:34] ============ [PASSED] drm_test_rect_rotate_inv =============
[14:26:34] ==================== [PASSED] drm_rect =====================
[14:26:34] ============ drm_sysfb_modeset_test (1 subtest) ============
[14:26:34] ============ drm_test_sysfb_build_fourcc_list =============
[14:26:34] [PASSED] no native formats
[14:26:34] [PASSED] XRGB8888 as native format
[14:26:34] [PASSED] remove duplicates
[14:26:34] [PASSED] convert alpha formats
[14:26:34] [PASSED] random formats
[14:26:34] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[14:26:34] ============= [PASSED] drm_sysfb_modeset_test ==============
[14:26:34] ============================================================
[14:26:34] Testing complete. Ran 616 tests: passed: 616
[14:26:34] Elapsed time: 27.816s total, 1.587s configuring, 26.009s building, 0.190s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
[14:26:35] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:26: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=25
[14:26:44] Starting KUnit Kernel (1/1)...
[14:26:44] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[14:26:44] ================= ttm_device (5 subtests) ==================
[14:26:44] [PASSED] ttm_device_init_basic
[14:26:44] [PASSED] ttm_device_init_multiple
[14:26:44] [PASSED] ttm_device_fini_basic
[14:26:44] [PASSED] ttm_device_init_no_vma_man
[14:26:44] ================== ttm_device_init_pools ==================
[14:26:44] [PASSED] No DMA allocations, no DMA32 required
[14:26:44] [PASSED] DMA allocations, DMA32 required
[14:26:44] [PASSED] No DMA allocations, DMA32 required
[14:26:44] [PASSED] DMA allocations, no DMA32 required
[14:26:44] ============== [PASSED] ttm_device_init_pools ==============
[14:26:44] =================== [PASSED] ttm_device ====================
[14:26:44] ================== ttm_pool (8 subtests) ===================
[14:26:44] ================== ttm_pool_alloc_basic ===================
[14:26:44] [PASSED] One page
[14:26:44] [PASSED] More than one page
[14:26:44] [PASSED] Above the allocation limit
[14:26:44] [PASSED] One page, with coherent DMA mappings enabled
[14:26:44] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[14:26:44] ============== [PASSED] ttm_pool_alloc_basic ===============
[14:26:44] ============== ttm_pool_alloc_basic_dma_addr ==============
[14:26:44] [PASSED] One page
[14:26:44] [PASSED] More than one page
[14:26:44] [PASSED] Above the allocation limit
[14:26:44] [PASSED] One page, with coherent DMA mappings enabled
[14:26:44] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[14:26:44] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[14:26:44] [PASSED] ttm_pool_alloc_order_caching_match
[14:26:44] [PASSED] ttm_pool_alloc_caching_mismatch
[14:26:44] [PASSED] ttm_pool_alloc_order_mismatch
[14:26:44] [PASSED] ttm_pool_free_dma_alloc
[14:26:44] [PASSED] ttm_pool_free_no_dma_alloc
[14:26:44] [PASSED] ttm_pool_fini_basic
[14:26:44] ==================== [PASSED] ttm_pool =====================
[14:26:44] ================ ttm_resource (8 subtests) =================
[14:26:44] ================= ttm_resource_init_basic =================
[14:26:44] [PASSED] Init resource in TTM_PL_SYSTEM
[14:26:44] [PASSED] Init resource in TTM_PL_VRAM
[14:26:44] [PASSED] Init resource in a private placement
[14:26:44] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[14:26:44] ============= [PASSED] ttm_resource_init_basic =============
[14:26:44] [PASSED] ttm_resource_init_pinned
[14:26:44] [PASSED] ttm_resource_fini_basic
[14:26:44] [PASSED] ttm_resource_manager_init_basic
[14:26:44] [PASSED] ttm_resource_manager_usage_basic
[14:26:44] [PASSED] ttm_resource_manager_set_used_basic
[14:26:44] [PASSED] ttm_sys_man_alloc_basic
[14:26:44] [PASSED] ttm_sys_man_free_basic
[14:26:44] ================== [PASSED] ttm_resource ===================
[14:26:44] =================== ttm_tt (15 subtests) ===================
[14:26:44] ==================== ttm_tt_init_basic ====================
[14:26:44] [PASSED] Page-aligned size
[14:26:44] [PASSED] Extra pages requested
[14:26:44] ================ [PASSED] ttm_tt_init_basic ================
[14:26:44] [PASSED] ttm_tt_init_misaligned
[14:26:44] [PASSED] ttm_tt_fini_basic
[14:26:44] [PASSED] ttm_tt_fini_sg
[14:26:44] [PASSED] ttm_tt_fini_shmem
[14:26:44] [PASSED] ttm_tt_create_basic
[14:26:44] [PASSED] ttm_tt_create_invalid_bo_type
[14:26:44] [PASSED] ttm_tt_create_ttm_exists
[14:26:44] [PASSED] ttm_tt_create_failed
[14:26:44] [PASSED] ttm_tt_destroy_basic
[14:26:44] [PASSED] ttm_tt_populate_null_ttm
[14:26:44] [PASSED] ttm_tt_populate_populated_ttm
[14:26:44] [PASSED] ttm_tt_unpopulate_basic
[14:26:44] [PASSED] ttm_tt_unpopulate_empty_ttm
[14:26:44] [PASSED] ttm_tt_swapin_basic
[14:26:44] ===================== [PASSED] ttm_tt ======================
[14:26:44] =================== ttm_bo (14 subtests) ===================
[14:26:44] =========== ttm_bo_reserve_optimistic_no_ticket ===========
[14:26:44] [PASSED] Cannot be interrupted and sleeps
[14:26:44] [PASSED] Cannot be interrupted, locks straight away
[14:26:44] [PASSED] Can be interrupted, sleeps
[14:26:44] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[14:26:44] [PASSED] ttm_bo_reserve_locked_no_sleep
[14:26:44] [PASSED] ttm_bo_reserve_no_wait_ticket
[14:26:44] [PASSED] ttm_bo_reserve_double_resv
[14:26:44] [PASSED] ttm_bo_reserve_interrupted
[14:26:44] [PASSED] ttm_bo_reserve_deadlock
[14:26:44] [PASSED] ttm_bo_unreserve_basic
[14:26:44] [PASSED] ttm_bo_unreserve_pinned
[14:26:44] [PASSED] ttm_bo_unreserve_bulk
[14:26:44] [PASSED] ttm_bo_put_basic
[14:26:44] [PASSED] ttm_bo_put_shared_resv
[14:26:44] [PASSED] ttm_bo_pin_basic
[14:26:44] [PASSED] ttm_bo_pin_unpin_resource
[14:26:44] [PASSED] ttm_bo_multiple_pin_one_unpin
[14:26:44] ===================== [PASSED] ttm_bo ======================
[14:26:44] ============== ttm_bo_validate (21 subtests) ===============
[14:26:44] ============== ttm_bo_init_reserved_sys_man ===============
[14:26:44] [PASSED] Buffer object for userspace
[14:26:44] [PASSED] Kernel buffer object
[14:26:44] [PASSED] Shared buffer object
[14:26:44] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[14:26:44] ============== ttm_bo_init_reserved_mock_man ==============
[14:26:44] [PASSED] Buffer object for userspace
[14:26:44] [PASSED] Kernel buffer object
[14:26:44] [PASSED] Shared buffer object
[14:26:44] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[14:26:44] [PASSED] ttm_bo_init_reserved_resv
[14:26:44] ================== ttm_bo_validate_basic ==================
[14:26:44] [PASSED] Buffer object for userspace
[14:26:44] [PASSED] Kernel buffer object
[14:26:44] [PASSED] Shared buffer object
[14:26:44] ============== [PASSED] ttm_bo_validate_basic ==============
[14:26:44] [PASSED] ttm_bo_validate_invalid_placement
[14:26:44] ============= ttm_bo_validate_same_placement ==============
[14:26:44] [PASSED] System manager
[14:26:44] [PASSED] VRAM manager
[14:26:44] ========= [PASSED] ttm_bo_validate_same_placement ==========
[14:26:44] [PASSED] ttm_bo_validate_failed_alloc
[14:26:44] [PASSED] ttm_bo_validate_pinned
[14:26:44] [PASSED] ttm_bo_validate_busy_placement
[14:26:44] ================ ttm_bo_validate_multihop =================
[14:26:44] [PASSED] Buffer object for userspace
[14:26:44] [PASSED] Kernel buffer object
[14:26:44] [PASSED] Shared buffer object
[14:26:44] ============ [PASSED] ttm_bo_validate_multihop =============
[14:26:44] ========== ttm_bo_validate_no_placement_signaled ==========
[14:26:44] [PASSED] Buffer object in system domain, no page vector
[14:26:44] [PASSED] Buffer object in system domain with an existing page vector
[14:26:44] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[14:26:44] ======== ttm_bo_validate_no_placement_not_signaled ========
[14:26:44] [PASSED] Buffer object for userspace
[14:26:44] [PASSED] Kernel buffer object
[14:26:44] [PASSED] Shared buffer object
[14:26:44] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[14:26:44] [PASSED] ttm_bo_validate_move_fence_signaled
[14:26:44] ========= ttm_bo_validate_move_fence_not_signaled =========
[14:26:44] [PASSED] Waits for GPU
[14:26:44] [PASSED] Tries to lock straight away
[14:26:44] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[14:26:44] [PASSED] ttm_bo_validate_happy_evict
[14:26:44] [PASSED] ttm_bo_validate_all_pinned_evict
[14:26:44] [PASSED] ttm_bo_validate_allowed_only_evict
[14:26:44] [PASSED] ttm_bo_validate_deleted_evict
[14:26:44] [PASSED] ttm_bo_validate_busy_domain_evict
[14:26:44] [PASSED] ttm_bo_validate_evict_gutting
[14:26:44] [PASSED] ttm_bo_validate_recrusive_evict
stty: 'standard input': Inappropriate ioctl for device
[14:26:44] ================= [PASSED] ttm_bo_validate =================
[14:26:44] ============================================================
[14:26:44] Testing complete. Ran 101 tests: passed: 101
[14:26:44] Elapsed time: 9.611s total, 1.617s configuring, 7.777s building, 0.175s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 19+ messages in thread* ✓ Xe.CI.BAT: success for Prepare GPU SVM for migration of THP
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
` (6 preceding siblings ...)
2025-07-17 14:26 ` ✓ CI.KUnit: success " Patchwork
@ 2025-07-17 15:34 ` Patchwork
2025-07-18 22:46 ` ✗ Xe.CI.Full: failure " Patchwork
8 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2025-07-17 15:34 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]
== Series Details ==
Series: Prepare GPU SVM for migration of THP
URL : https://patchwork.freedesktop.org/series/151754/
State : success
== Summary ==
CI Bug Log - changes from xe-3430-32c3655fcecb4e7e7dd624bf7b201ae69eb5bb5f_BAT -> xe-pw-151754v1_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (8 -> 7)
------------------------------
Missing (1): bat-adlp-vm
Known issues
------------
Here are the changes found in xe-pw-151754v1_BAT that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@kms_flip@basic-plain-flip@c-edp1:
- bat-adlp-7: [DMESG-WARN][1] ([Intel XE#4543]) -> [PASS][2] +1 other test pass
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3430-32c3655fcecb4e7e7dd624bf7b201ae69eb5bb5f/bat-adlp-7/igt@kms_flip@basic-plain-flip@c-edp1.html
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-151754v1/bat-adlp-7/igt@kms_flip@basic-plain-flip@c-edp1.html
[Intel XE#4543]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4543
Build changes
-------------
* IGT: IGT_8463 -> IGT_8465
* Linux: xe-3430-32c3655fcecb4e7e7dd624bf7b201ae69eb5bb5f -> xe-pw-151754v1
IGT_8463: 348dbef0314ccb588cbe83492444afc215965982 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8465: dce322d513ea2c1793520e98658ffd28e94874fb @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-3430-32c3655fcecb4e7e7dd624bf7b201ae69eb5bb5f: 32c3655fcecb4e7e7dd624bf7b201ae69eb5bb5f
xe-pw-151754v1: 151754v1
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-151754v1/index.html
[-- Attachment #2: Type: text/html, Size: 2262 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread* ✗ Xe.CI.Full: failure for Prepare GPU SVM for migration of THP
2025-07-17 13:38 [PATCH v1 0/5] Prepare GPU SVM for migration of THP Francois Dugast
` (7 preceding siblings ...)
2025-07-17 15:34 ` ✓ Xe.CI.BAT: " Patchwork
@ 2025-07-18 22:46 ` Patchwork
8 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2025-07-18 22:46 UTC (permalink / raw)
To: Francois Dugast; +Cc: intel-xe
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
== Series Details ==
Series: Prepare GPU SVM for migration of THP
URL : https://patchwork.freedesktop.org/series/151754/
State : failure
== Summary ==
ERROR: The runconfig 'xe-3430-32c3655fcecb4e7e7dd624bf7b201ae69eb5bb5f_FULL' does not exist in the database
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-151754v1/index.html
[-- Attachment #2: Type: text/html, Size: 932 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread