* [igt-dev] [i-g-t 00/45] Add IGT display support for XE
@ 2023-04-18 16:44 Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 01/45] lib/xe_ioctl: Add missing header for direct resolving Bhanuprakash Modem
` (48 more replies)
0 siblings, 49 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add IGT support to work kms tests on XE driver.
TODO: Spin, BUSY & HANG related tests.
Bhanuprakash Modem (35):
lib: Use i915 namespace for XE debugfs
lib/igt_fb: Add copy engine support for XE
lib/igt_draw: Add gpu draw routine support for XE
tests/i915/kms_big_fb: Add XE support
tests/i915/kms_big_joiner: Add XE support
tests/i915/kms_cdclk: Add XE support
tests/i915/kms_draw_crc: Add XE support
tests/i915/kms_dsc: Add XE support
tests/i915/kms_flip_scaled_crc: Add XE support
tests/i915/kms_flip_tiling: Add XE support
tests/i915/kms_mmap_write_crc: Add XE support
tests/i915/kms_psr*: Add XE support
tests/kms_3d: Add XE support
tests/kms_async_flips: No XE support
tests/kms_atomic_transition: Add XE support
tests/color: Add XE support
tests/kms_concurrent: Add XE support
tests/kms_content_protection: Add XE support
tests/kms_cursor_crc: Add XE support
tests/kms_cursor_legacy: Add XE support
tests/kms_flip: Add XE support
tests/kms_flip_event_leak: Add XE support
tests/kms_getfb: Add XE support
tests/kms_hdmi_inject: Add XE support
tests/kms_hdr: Add XE support
tests/kms_panel_fitting: Add XE support
tests/kms_plane: Add XE support
tests/kms_plane_lowers: Add XE support
tests/kms_plane_scaling: Add XE support
tests/kms_prime: Add XE support
tests/kms_rotation_crc: Add XE support
tests/kms_setmode: Add XE support
tests/kms_universal_plane: Add XE support
tests/kms: Move intel specific kms tests to new dir
xe-fast-feedback: Add kms tests to XE BAT
Zbigniew Kempczyński (10):
lib/xe_ioctl: Add missing header for direct resolving
lib/xe_query: Add region helpers and missing doc
lib/xe_query: Remove commented out function prototype
lib/intel_allocator: Add allocator support for Xe
lib/intel_bufops: Add Xe support in bufops
lib/intel_batchbuffer: Add Xe support in intel-bb
tests/xe_intel_bb: Check if intel-bb Xe support correctness
tests/xe-fast-feedback: Add xe_intel_bb test to BAT
lib/gpgpu_fill: Use RENDER engine flag to work on Xe
tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
lib/gpgpu_fill.c | 4 +-
lib/gpu_cmds.c | 2 +-
lib/igt_draw.c | 82 +-
lib/igt_draw.h | 2 +
lib/igt_fb.c | 30 +-
lib/igt_fb.h | 2 +
lib/igt_kms.c | 4 +-
lib/igt_psr.c | 4 +-
lib/intel_allocator.c | 49 +-
lib/intel_aux_pgtable.c | 2 +-
lib/intel_batchbuffer.c | 430 +++++--
lib/intel_batchbuffer.h | 28 +-
lib/intel_bufops.c | 73 +-
lib/intel_bufops.h | 13 +-
lib/xe/xe_ioctl.h | 1 +
lib/xe/xe_query.c | 45 +
lib/xe/xe_query.h | 3 +-
tests/chamelium/kms_chamelium_color.c | 2 +-
tests/i915/gem_caching.c | 4 +-
tests/i915/gem_pxp.c | 2 +-
tests/intel-ci/xe-fast-feedback.testlist | 50 +
tests/{i915 => intel}/kms_big_fb.c | 75 +-
tests/{i915 => intel}/kms_big_joiner.c | 2 +-
tests/{i915 => intel}/kms_cdclk.c | 5 +-
tests/{i915 => intel}/kms_draw_crc.c | 24 +-
tests/{i915 => intel}/kms_dsc.c | 2 +-
tests/{i915 => intel}/kms_dsc_helper.c | 0
tests/{i915 => intel}/kms_dsc_helper.h | 0
tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
tests/{i915 => intel}/kms_psr.c | 40 +-
tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
tests/{i915 => intel}/kms_psr2_su.c | 2 +-
tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
tests/kms_3d.c | 8 +
tests/kms_async_flips.c | 8 +-
tests/kms_atomic_transition.c | 8 +-
tests/kms_color.c | 10 +-
tests/kms_color_helper.c | 2 +-
tests/kms_concurrent.c | 4 +-
tests/kms_content_protection.c | 12 +-
tests/kms_cursor_crc.c | 4 +-
tests/kms_cursor_legacy.c | 4 +-
tests/kms_flip.c | 32 +-
tests/kms_flip_event_leak.c | 5 +
tests/kms_getfb.c | 22 +-
tests/kms_hdmi_inject.c | 10 +-
tests/kms_hdr.c | 8 +-
tests/kms_panel_fitting.c | 12 +-
tests/kms_plane.c | 19 +-
tests/kms_plane_lowres.c | 9 +-
tests/kms_plane_scaling.c | 41 +-
tests/kms_prime.c | 241 +++-
tests/kms_rotation_crc.c | 25 +-
tests/kms_setmode.c | 7 +
tests/kms_universal_plane.c | 15 +-
tests/meson.build | 39 +-
tests/xe/xe_gpgpu_fill.c | 133 +++
tests/xe/xe_intel_bb.c | 1181 +++++++++++++++++++
60 files changed, 2513 insertions(+), 352 deletions(-)
rename tests/{i915 => intel}/kms_big_fb.c (92%)
rename tests/{i915 => intel}/kms_big_joiner.c (99%)
rename tests/{i915 => intel}/kms_cdclk.c (98%)
rename tests/{i915 => intel}/kms_draw_crc.c (92%)
rename tests/{i915 => intel}/kms_dsc.c (99%)
rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
rename tests/{i915 => intel}/kms_psr.c (93%)
rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
rename tests/{i915 => intel}/kms_psr2_su.c (99%)
rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
create mode 100644 tests/xe/xe_gpgpu_fill.c
create mode 100644 tests/xe/xe_intel_bb.c
--
2.40.0
^ permalink raw reply [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 01/45] lib/xe_ioctl: Add missing header for direct resolving
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 02/45] lib/xe_query: Add region helpers and missing doc Bhanuprakash Modem
` (47 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
xe_ioctl.h user expects all types resolving. Add missing stddef.h
header which contains size_t definition.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
lib/xe/xe_ioctl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/xe/xe_ioctl.h b/lib/xe/xe_ioctl.h
index d8c40eda0..049cd183d 100644
--- a/lib/xe/xe_ioctl.h
+++ b/lib/xe/xe_ioctl.h
@@ -11,6 +11,7 @@
#ifndef XE_IOCTL_H
#define XE_IOCTL_H
+#include <stddef.h>
#include <stdint.h>
#include <xe_drm.h>
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 02/45] lib/xe_query: Add region helpers and missing doc
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 01/45] lib/xe_ioctl: Add missing header for direct resolving Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 03/45] lib/xe_query: Remove commented out function prototype Bhanuprakash Modem
` (46 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
For easier iterate over memory regions and produce dynamic subtests
add xe_region_name() helper.
As Xe requires buffer size alignment during creating bo add
xe_min_page_size() helper.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
lib/xe/xe_query.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
lib/xe/xe_query.h | 2 ++
2 files changed, 47 insertions(+)
diff --git a/lib/xe/xe_query.c b/lib/xe/xe_query.c
index 2b627a78a..bd5eb1d18 100644
--- a/lib/xe/xe_query.c
+++ b/lib/xe/xe_query.c
@@ -422,6 +422,13 @@ struct drm_xe_engine_class_instance *xe_hw_engine(int fd, int idx)
return &xe_dev->hw_engines[idx];
}
+/**
+ * xe_mem_region:
+ * @fd: xe device fd
+ * @region: region mask
+ *
+ * Returns memory region structure for @region mask.
+ */
struct drm_xe_query_mem_region *xe_mem_region(int fd, uint64_t region)
{
struct xe_device *xe_dev;
@@ -434,6 +441,44 @@ struct drm_xe_query_mem_region *xe_mem_region(int fd, uint64_t region)
return &xe_dev->mem_usage->regions[region_idx];
}
+/**
+ * xe_region_name:
+ * @region: region mask
+ *
+ * Returns region string like "system" or "vram-n" where n=0...62.
+ */
+const char *xe_region_name(uint64_t region)
+{
+ static char **vrams;
+ int region_idx = ffs(region) - 1;
+
+ /* Populate the array */
+ if (!vrams) {
+ vrams = calloc(64, sizeof(char *));
+ for (int i = 0; i < 64; i++) {
+ if (i != 0)
+ asprintf(&vrams[i], "vram-%d", i - 1);
+ else
+ asprintf(&vrams[i], "system");
+ igt_assert(vrams[i]);
+ }
+ }
+
+ return vrams[region_idx];
+}
+
+/**
+ * xe_min_page_size:
+ * @fd: xe device fd
+ * @region: region mask
+ *
+ * Returns minimum page size for @region.
+ */
+uint32_t xe_min_page_size(int fd, uint64_t region)
+{
+ return xe_mem_region(fd, region)->min_page_size;
+}
+
/**
* xe_number_hw_engine:
* @fd: xe device fd
diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
index 0d4b810a1..f49acb1d7 100644
--- a/lib/xe/xe_query.h
+++ b/lib/xe/xe_query.h
@@ -84,6 +84,8 @@ uint64_t vram_if_possible(int fd, int gt);
struct drm_xe_engine_class_instance *xe_hw_engines(int fd);
struct drm_xe_engine_class_instance *xe_hw_engine(int fd, int idx);
struct drm_xe_query_mem_region *xe_mem_region(int fd, uint64_t region);
+const char *xe_region_name(uint64_t region);
+uint32_t xe_min_page_size(int fd, uint64_t region);
unsigned int xe_number_hw_engines(int fd);
bool xe_has_vram(int fd);
//uint64_t xe_vram_size(int fd);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 03/45] lib/xe_query: Remove commented out function prototype
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 01/45] lib/xe_ioctl: Add missing header for direct resolving Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 02/45] lib/xe_query: Add region helpers and missing doc Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 04/45] lib/intel_allocator: Add allocator support for Xe Bhanuprakash Modem
` (45 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Remove unnecessary commented out code.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
lib/xe/xe_query.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
index f49acb1d7..cc6e7cefd 100644
--- a/lib/xe/xe_query.h
+++ b/lib/xe/xe_query.h
@@ -88,7 +88,6 @@ const char *xe_region_name(uint64_t region);
uint32_t xe_min_page_size(int fd, uint64_t region);
unsigned int xe_number_hw_engines(int fd);
bool xe_has_vram(int fd);
-//uint64_t xe_vram_size(int fd);
uint64_t xe_vram_size(int fd, int gt);
uint32_t xe_get_default_alignment(int fd);
uint32_t xe_va_bits(int fd);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 04/45] lib/intel_allocator: Add allocator support for Xe
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (2 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 03/45] lib/xe_query: Remove commented out function prototype Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 05/45] lib/intel_bufops: Add Xe support in bufops Bhanuprakash Modem
` (44 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Start supporting va range configuration for xe allocator.
During opening allocator has to be aware of vm range (start and end).
i915 driver doesn't expose vm range information so those variables
have to be detected. In xe driver we get information of va size from
the kernel query so va end can be directly configured. At the moment
there's no autodetection of va start for xe what might need to be
address in the future if due some reason lower offsets might not be
in use.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
lib/intel_allocator.c | 49 ++++++++++++++++++++++++++-----------------
1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/lib/intel_allocator.c b/lib/intel_allocator.c
index 2b08dd599..f644e2f49 100644
--- a/lib/intel_allocator.c
+++ b/lib/intel_allocator.c
@@ -16,6 +16,7 @@
#include "igt_map.h"
#include "intel_allocator.h"
#include "intel_allocator_msgchannel.h"
+#include "xe/xe_query.h"
//#define ALLOCDBG
#ifdef ALLOCDBG
@@ -910,24 +911,33 @@ static uint64_t __intel_allocator_open_full(int fd, uint32_t ctx,
struct alloc_resp resp;
uint64_t gtt_size;
- if (!start)
- req.open.start = gem_detect_safe_start_offset(fd);
+ if (is_i915_device(fd)) {
+ if (!start)
+ req.open.start = gem_detect_safe_start_offset(fd);
- if (!end) {
- igt_assert_f(can_report_gtt_size(fd), "Invalid fd\n");
- gtt_size = gem_aperture_size(fd);
- if (!gem_uses_full_ppgtt(fd))
- gtt_size /= 2;
- else
- gtt_size -= RESERVED;
+ if (!end) {
+ igt_assert_f(can_report_gtt_size(fd), "Invalid fd\n");
+ gtt_size = gem_aperture_size(fd);
+ if (!gem_uses_full_ppgtt(fd))
+ gtt_size /= 2;
+ else
+ gtt_size -= RESERVED;
- req.open.end = gtt_size;
- }
+ req.open.end = gtt_size;
+ }
+
+ if (!default_alignment)
+ req.open.default_alignment = gem_detect_safe_alignment(fd);
+
+ req.open.start = ALIGN(req.open.start, req.open.default_alignment);
+ } else {
+ struct xe_device *xe_dev = xe_device_get(fd);
- if (!default_alignment)
- req.open.default_alignment = gem_detect_safe_alignment(fd);
+ igt_assert(xe_dev);
- req.open.start = ALIGN(req.open.start, req.open.default_alignment);
+ if (!end)
+ req.open.end = 1ull << xe_dev->va_bits;
+ }
/* Get child_tid only once at open() */
if (child_tid == -1)
@@ -991,6 +1001,7 @@ uint64_t intel_allocator_open_vm_full(int fd, uint32_t vm,
uint64_t default_alignment)
{
igt_assert(vm != 0);
+
return __intel_allocator_open_full(fd, 0, vm, start, end,
allocator_type, strategy,
default_alignment);
@@ -998,7 +1009,7 @@ uint64_t intel_allocator_open_vm_full(int fd, uint32_t vm,
/**
* intel_allocator_open:
- * @fd: i915 descriptor
+ * @fd: i915 or xe descriptor
* @ctx: context
* @allocator_type: one of INTEL_ALLOCATOR_* define
*
@@ -1014,14 +1025,14 @@ uint64_t intel_allocator_open_vm_full(int fd, uint32_t vm,
*/
uint64_t intel_allocator_open(int fd, uint32_t ctx, uint8_t allocator_type)
{
- return intel_allocator_open_full(fd, ctx, 0, 0, allocator_type,
- ALLOC_STRATEGY_HIGH_TO_LOW, 0);
+ return __intel_allocator_open_full(fd, ctx, 0, 0, 0, allocator_type,
+ ALLOC_STRATEGY_HIGH_TO_LOW, 0);
}
uint64_t intel_allocator_open_vm(int fd, uint32_t vm, uint8_t allocator_type)
{
- return intel_allocator_open_vm_full(fd, vm, 0, 0, allocator_type,
- ALLOC_STRATEGY_HIGH_TO_LOW, 0);
+ return __intel_allocator_open_full(fd, 0, vm, 0, 0, allocator_type,
+ ALLOC_STRATEGY_HIGH_TO_LOW, 0);
}
uint64_t intel_allocator_open_vm_as(uint64_t allocator_handle, uint32_t new_vm)
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 05/45] lib/intel_bufops: Add Xe support in bufops
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (3 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 04/45] lib/intel_allocator: Add allocator support for Xe Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 06/45] lib/intel_batchbuffer: Add Xe support in intel-bb Bhanuprakash Modem
` (43 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Extend bufops to support Xe:
- change region to 64bit region mask,
- add initialization helper (full) which allows passing handle,
size and region,
- mapping functions (read + write) selects driver specific mapping
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
lib/intel_bufops.c | 73 ++++++++++++++++++++++++++++++++++++++++++----
lib/intel_bufops.h | 13 ++++++++-
2 files changed, 80 insertions(+), 6 deletions(-)
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index cdc7a1698..3307f30ee 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -26,6 +26,8 @@
#include <cairo.h>
#include "i915/gem_create.h"
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
#include "igt.h"
#include "igt_x86.h"
#include "intel_bufops.h"
@@ -488,6 +490,9 @@ static void *mmap_write(int fd, struct intel_buf *buf)
{
void *map = NULL;
+ if (is_xe_device(fd))
+ return xe_bo_map(fd, buf->handle, buf->surface[0].size);
+
if (gem_has_lmem(fd)) {
/*
* set/get_caching and set_domain are no longer supported on
@@ -530,6 +535,9 @@ static void *mmap_read(int fd, struct intel_buf *buf)
{
void *map = NULL;
+ if (is_xe_device(fd))
+ return xe_bo_map(fd, buf->handle, buf->surface[0].size);
+
if (gem_has_lmem(fd)) {
/*
* set/get_caching and set_domain are no longer supported on
@@ -809,7 +817,7 @@ static void __intel_buf_init(struct buf_ops *bops,
int width, int height, int bpp, int alignment,
uint32_t req_tiling, uint32_t compression,
uint64_t bo_size, int bo_stride,
- uint32_t region)
+ uint64_t region)
{
uint32_t tiling = req_tiling;
uint64_t size;
@@ -899,9 +907,17 @@ static void __intel_buf_init(struct buf_ops *bops,
buf->size = size;
buf->handle = handle;
- if (!handle)
- if (__gem_create_in_memory_regions(bops->fd, &buf->handle, &size, region))
- igt_assert_eq(__gem_create(bops->fd, &size, &buf->handle), 0);
+ if (!handle) {
+ if (is_i915_device(bops->fd)) {
+ if (__gem_create_in_memory_regions(bops->fd, &buf->handle, &size, region))
+ igt_assert_eq(__gem_create(bops->fd, &size, &buf->handle), 0);
+ } else {
+ region = vram_if_possible(bops->fd, 0);
+ size = ALIGN(size, xe_get_default_alignment(bops->fd));
+ buf->handle = xe_bo_create_flags(bops->fd, 0, size, region);
+ }
+ }
+ buf->region = region;
/* Store gem bo size */
buf->bo_size = size;
@@ -945,7 +961,7 @@ void intel_buf_init_in_region(struct buf_ops *bops,
struct intel_buf *buf,
int width, int height, int bpp, int alignment,
uint32_t tiling, uint32_t compression,
- uint32_t region)
+ uint64_t region)
{
__intel_buf_init(bops, 0, buf, width, height, bpp, alignment,
tiling, compression, 0, 0, region);
@@ -1010,6 +1026,41 @@ void intel_buf_init_using_handle(struct buf_ops *bops,
req_tiling, compression, 0, 0, -1);
}
+/**
+ * intel_buf_init_full
+ * @bops: pointer to buf_ops
+ * @handle: BO handle created by the caller
+ * @buf: pointer to intel_buf structure to be filled
+ * @width: surface width
+ * @height: surface height
+ * @bpp: bits-per-pixel (8 / 16 / 32 / 64)
+ * @alignment: alignment of the stride for linear surfaces
+ * @req_tiling: surface tiling
+ * @compression: surface compression type
+ * @size: size
+ * @region: region
+ *
+ * Function configures BO handle within intel_buf structure passed by the caller
+ * (with all its metadata - width, height, ...). Useful if BO was created
+ * outside. Allows passing real size which caller is aware of.
+ *
+ * Note: intel_buf_close() can be used because intel_buf is aware it is not
+ * buffer owner so it won't close it underneath.
+ */
+void intel_buf_init_full(struct buf_ops *bops,
+ uint32_t handle,
+ struct intel_buf *buf,
+ int width, int height,
+ int bpp, int alignment,
+ uint32_t req_tiling,
+ uint32_t compression,
+ uint64_t size,
+ uint64_t region)
+{
+ __intel_buf_init(bops, handle, buf, width, height, bpp, alignment,
+ req_tiling, compression, size, 0, region);
+}
+
/**
* intel_buf_create
* @bops: pointer to buf_ops
@@ -1423,6 +1474,18 @@ static struct buf_ops *__buf_ops_create(int fd, bool check_idempotency)
igt_debug("generation: %d, supported tiles: 0x%02x\n",
bops->intel_gen, bops->supported_tiles);
+ /* No tiling support in XE. */
+ if (is_xe_device(fd)) {
+ bops->supported_hw_tiles = TILE_NONE;
+
+ bops->linear_to_x = copy_linear_to_x;
+ bops->x_to_linear = copy_x_to_linear;
+ bops->linear_to_y = copy_linear_to_y;
+ bops->y_to_linear = copy_y_to_linear;
+
+ return bops;
+ }
+
/*
* Warning!
*
diff --git a/lib/intel_bufops.h b/lib/intel_bufops.h
index 25b430739..0b6e025ca 100644
--- a/lib/intel_bufops.h
+++ b/lib/intel_bufops.h
@@ -43,6 +43,7 @@ struct intel_buf {
} addr;
uint64_t bo_size;
+ uint64_t region;
/* Tracking */
struct intel_bb *ibb;
@@ -135,7 +136,7 @@ void intel_buf_init_in_region(struct buf_ops *bops,
struct intel_buf *buf,
int width, int height, int bpp, int alignment,
uint32_t tiling, uint32_t compression,
- uint32_t region);
+ uint64_t region);
void intel_buf_close(struct buf_ops *bops, struct intel_buf *buf);
void intel_buf_init_using_handle(struct buf_ops *bops,
@@ -143,6 +144,15 @@ void intel_buf_init_using_handle(struct buf_ops *bops,
struct intel_buf *buf,
int width, int height, int bpp, int alignment,
uint32_t req_tiling, uint32_t compression);
+void intel_buf_init_full(struct buf_ops *bops,
+ uint32_t handle,
+ struct intel_buf *buf,
+ int width, int height,
+ int bpp, int alignment,
+ uint32_t req_tiling,
+ uint32_t compression,
+ uint64_t size,
+ uint64_t region);
struct intel_buf *intel_buf_create(struct buf_ops *bops,
int width, int height,
@@ -164,6 +174,7 @@ struct intel_buf *intel_buf_create_using_handle_and_size(struct buf_ops *bops,
uint32_t compression,
uint64_t size,
int stride);
+
void intel_buf_destroy(struct intel_buf *buf);
static inline void intel_buf_set_pxp(struct intel_buf *buf, bool new_pxp_state)
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 06/45] lib/intel_batchbuffer: Add Xe support in intel-bb
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (4 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 05/45] lib/intel_bufops: Add Xe support in bufops Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 07/45] tests/xe_intel_bb: Check if intel-bb Xe support correctness Bhanuprakash Modem
` (42 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Intention of creating intel-bb was to replace libdrm for i915.
Due to many code relies on it (kms for example) most rational way
is to extend and add Xe path to it.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
lib/gpu_cmds.c | 2 +-
lib/intel_aux_pgtable.c | 2 +-
lib/intel_batchbuffer.c | 430 ++++++++++++++++++++++++++++++---------
lib/intel_batchbuffer.h | 28 ++-
tests/i915/gem_caching.c | 4 +-
tests/i915/gem_pxp.c | 2 +-
6 files changed, 355 insertions(+), 113 deletions(-)
diff --git a/lib/gpu_cmds.c b/lib/gpu_cmds.c
index cee81555d..afb26d299 100644
--- a/lib/gpu_cmds.c
+++ b/lib/gpu_cmds.c
@@ -251,7 +251,7 @@ gen7_fill_binding_table(struct intel_bb *ibb,
{
uint32_t binding_table_offset;
uint32_t *binding_table;
- uint32_t devid = intel_get_drm_devid(ibb->i915);
+ uint32_t devid = intel_get_drm_devid(ibb->fd);
intel_bb_ptr_align(ibb, 64);
binding_table_offset = intel_bb_offset(ibb);
diff --git a/lib/intel_aux_pgtable.c b/lib/intel_aux_pgtable.c
index 520568708..946ca60b9 100644
--- a/lib/intel_aux_pgtable.c
+++ b/lib/intel_aux_pgtable.c
@@ -481,7 +481,7 @@ intel_aux_pgtable_create(struct intel_bb *ibb,
intel_bb_add_intel_buf_with_alignment(ibb, pgt->buf,
pgt->max_align, false);
- pgt_map(ibb->i915, pgt);
+ pgt_map(ibb->fd, pgt);
pgt_populate_entries(pgt, bufs, buf_count);
pgt_unmap(pgt);
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index a4eb4c2bb..47ab579da 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -29,6 +29,8 @@
#include <glib.h>
#include "i915/gem_create.h"
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
#include "intel_batchbuffer.h"
#include "intel_bufops.h"
#include "intel_chipset.h"
@@ -38,6 +40,9 @@
#include "veboxcopy.h"
#include "sw_sync.h"
#include "gpgpu_fill.h"
+#include "igt_aux.h"
+#include "igt_syncobj.h"
+#include "i830_reg.h"
#include "huc_copy.h"
#include "i915/i915_blt.h"
@@ -828,21 +833,22 @@ static inline uint64_t __intel_bb_get_offset(struct intel_bb *ibb,
/**
* __intel_bb_create:
- * @i915: drm fd
+ * @fd: drm fd - i915 or xe
* @ctx: context id
- * @cfg: intel_ctx configuration, NULL for default context or legacy mode
+ * @cfg: for i915 intel_ctx configuration, NULL for default context or legacy mode,
+ * unused for xe
* @size: size of the batchbuffer
* @do_relocs: use relocations or allocator
* @allocator_type: allocator type, must be INTEL_ALLOCATOR_NONE for relocations
*
* intel-bb assumes it will work in one of two modes - with relocations or
- * with using allocator (currently RANDOM and SIMPLE are implemented).
+ * with using allocator (currently RELOC and SIMPLE are implemented).
* Some description is required to describe how they maintain the addresses.
*
* Before entering into each scenarios generic rule is intel-bb keeps objects
* and their offsets in the internal cache and reuses in subsequent execs.
*
- * 1. intel-bb with relocations
+ * 1. intel-bb with relocations (i915 only)
*
* Creating new intel-bb adds handle to cache implicitly and sets its address
* to 0. Objects added to intel-bb later also have address 0 set for first run.
@@ -850,14 +856,15 @@ static inline uint64_t __intel_bb_get_offset(struct intel_bb *ibb,
* works in reloc mode addresses are only suggestion to the driver and we
* cannot be sure they won't change at next exec.
*
- * 2. with allocator
+ * 2. with allocator (i915 or xe)
*
* This mode is valid only for ppgtt. Addresses are acquired from allocator
- * and softpinned. intel-bb cache must be then coherent with allocator
- * (simple is coherent, random is not due to fact we don't keep its state).
+ * and softpinned (i915) or vm-binded (xe). intel-bb cache must be then
+ * coherent with allocator (simple is coherent, reloc partially [doesn't
+ * support address reservation]).
* When we do intel-bb reset with purging cache it has to reacquire addresses
* from allocator (allocator should return same address - what is true for
- * simple allocator and false for random as mentioned before).
+ * simple and reloc allocators).
*
* If we do reset without purging caches we use addresses from intel-bb cache
* during execbuf objects construction.
@@ -873,7 +880,7 @@ static inline uint64_t __intel_bb_get_offset(struct intel_bb *ibb,
* Pointer the intel_bb, asserts on failure.
*/
static struct intel_bb *
-__intel_bb_create(int i915, uint32_t ctx, const intel_ctx_cfg_t *cfg,
+__intel_bb_create(int fd, uint32_t ctx, const intel_ctx_cfg_t *cfg,
uint32_t size, bool do_relocs,
uint64_t start, uint64_t end,
uint8_t allocator_type, enum allocator_strategy strategy)
@@ -883,48 +890,86 @@ __intel_bb_create(int i915, uint32_t ctx, const intel_ctx_cfg_t *cfg,
igt_assert(ibb);
- ibb->uses_full_ppgtt = gem_uses_full_ppgtt(i915);
- ibb->devid = intel_get_drm_devid(i915);
+ ibb->devid = intel_get_drm_devid(fd);
ibb->gen = intel_gen(ibb->devid);
+ ibb->ctx = ctx;
+
+ ibb->fd = fd;
+ ibb->driver = is_i915_device(fd) ? INTEL_DRIVER_I915 :
+ is_xe_device(fd) ? INTEL_DRIVER_XE : 0;
+ igt_assert(ibb->driver);
/*
* If we don't have full ppgtt driver can change our addresses
* so allocator is useless in this case. Just enforce relocations
* for such gens and don't use allocator at all.
*/
- if (!ibb->uses_full_ppgtt)
- do_relocs = true;
+ if (ibb->driver == INTEL_DRIVER_I915) {
+ ibb->uses_full_ppgtt = gem_uses_full_ppgtt(fd);
- /*
- * For softpin mode allocator has full control over offsets allocation
- * so we want kernel to not interfere with this.
- */
- if (do_relocs)
- ibb->allows_obj_alignment = gem_allows_obj_alignment(i915);
+ if (!ibb->uses_full_ppgtt)
+ do_relocs = true;
- /* Use safe start offset instead assuming 0x0 is safe */
- start = max_t(uint64_t, start, gem_detect_safe_start_offset(i915));
+ /*
+ * For softpin mode allocator has full control over offsets allocation
+ * so we want kernel to not interfere with this.
+ */
+ if (do_relocs) {
+ ibb->allows_obj_alignment = gem_allows_obj_alignment(fd);
+ allocator_type = INTEL_ALLOCATOR_NONE;
+ } else {
+ /* if relocs are set we won't use an allocator */
+ ibb->allocator_handle =
+ intel_allocator_open_full(fd, ctx,
+ start, end,
+ allocator_type,
+ strategy, 0);
+ }
+
+ /* Use safe start offset instead assuming 0x0 is safe */
+ start = max_t(uint64_t, start, gem_detect_safe_start_offset(fd));
+
+ ibb->vm_id = 0;
+ } else {
+ igt_assert(!do_relocs);
+
+ if (!ctx)
+ ctx = xe_vm_create(fd, DRM_XE_VM_CREATE_ASYNC_BIND_OPS, 0);
+
+ ibb->uses_full_ppgtt = 1;
+ ibb->allocator_handle =
+ intel_allocator_open_full(fd, ctx, start, end,
+ allocator_type,
+ strategy,
+ xe_get_default_alignment(fd));
+ ibb->vm_id = ctx;
+ ibb->last_engine = ~0U;
+ }
- /* if relocs are set we won't use an allocator */
- if (do_relocs)
- allocator_type = INTEL_ALLOCATOR_NONE;
- else
- ibb->allocator_handle = intel_allocator_open_full(i915, ctx,
- start, end,
- allocator_type,
- strategy, 0);
ibb->allocator_type = allocator_type;
ibb->allocator_strategy = strategy;
ibb->allocator_start = start;
ibb->allocator_end = end;
- ibb->i915 = i915;
ibb->enforce_relocs = do_relocs;
- ibb->handle = gem_create(i915, size);
+ igt_assert(ibb->driver == INTEL_DRIVER_I915 ||
+ (ibb->driver == INTEL_DRIVER_XE && !do_relocs));
+
+ if (ibb->driver == INTEL_DRIVER_I915) {
+ ibb->handle = gem_create(fd, size);
+ ibb->alignment = gem_detect_safe_alignment(fd);
+ ibb->gtt_size = gem_aperture_size(fd);
+ } else {
+ ibb->alignment = xe_get_default_alignment(fd);
+ size = ALIGN(size, ibb->alignment);
+ ibb->handle = xe_bo_create_flags(fd, 0, size,
+ xe_has_vram(fd) ?
+ vram_memory(fd, 0) :
+ system_memory(fd));
+ ibb->gtt_size = 1ull << xe_va_bits(fd);
+ }
+
ibb->size = size;
- ibb->alignment = gem_detect_safe_alignment(i915);
- ibb->ctx = ctx;
- ibb->vm_id = 0;
ibb->batch = calloc(1, size);
igt_assert(ibb->batch);
ibb->ptr = ibb->batch;
@@ -937,7 +982,6 @@ __intel_bb_create(int i915, uint32_t ctx, const intel_ctx_cfg_t *cfg,
memcpy(ibb->cfg, cfg, sizeof(*cfg));
}
- ibb->gtt_size = gem_aperture_size(i915);
if ((ibb->gtt_size - 1) >> 32)
ibb->supports_48b_address = true;
@@ -961,13 +1005,13 @@ __intel_bb_create(int i915, uint32_t ctx, const intel_ctx_cfg_t *cfg,
/**
* intel_bb_create_full:
- * @i915: drm fd
+ * @fd: drm fd - i915 or xe
* @ctx: context
* @cfg: intel_ctx configuration, NULL for default context or legacy mode
* @size: size of the batchbuffer
* @start: allocator vm start address
* @end: allocator vm start address
- * @allocator_type: allocator type, SIMPLE, RANDOM, ...
+ * @allocator_type: allocator type, SIMPLE, RELOC, ...
* @strategy: allocation strategy
*
* Creates bb with context passed in @ctx, size in @size and allocator type
@@ -980,19 +1024,19 @@ __intel_bb_create(int i915, uint32_t ctx, const intel_ctx_cfg_t *cfg,
*
* Pointer the intel_bb, asserts on failure.
*/
-struct intel_bb *intel_bb_create_full(int i915, uint32_t ctx,
+struct intel_bb *intel_bb_create_full(int fd, uint32_t ctx,
const intel_ctx_cfg_t *cfg, uint32_t size,
uint64_t start, uint64_t end,
uint8_t allocator_type,
enum allocator_strategy strategy)
{
- return __intel_bb_create(i915, ctx, cfg, size, false, start, end,
+ return __intel_bb_create(fd, ctx, cfg, size, false, start, end,
allocator_type, strategy);
}
/**
* intel_bb_create_with_allocator:
- * @i915: drm fd
+ * @fd: drm fd - i915 or xe
* @ctx: context
* @cfg: intel_ctx configuration, NULL for default context or legacy mode
* @size: size of the batchbuffer
@@ -1006,18 +1050,18 @@ struct intel_bb *intel_bb_create_full(int i915, uint32_t ctx,
*
* Pointer the intel_bb, asserts on failure.
*/
-struct intel_bb *intel_bb_create_with_allocator(int i915, uint32_t ctx,
+struct intel_bb *intel_bb_create_with_allocator(int fd, uint32_t ctx,
const intel_ctx_cfg_t *cfg,
uint32_t size,
uint8_t allocator_type)
{
- return __intel_bb_create(i915, ctx, cfg, size, false, 0, 0,
+ return __intel_bb_create(fd, ctx, cfg, size, false, 0, 0,
allocator_type, ALLOC_STRATEGY_HIGH_TO_LOW);
}
-static bool aux_needs_softpin(int i915)
+static bool aux_needs_softpin(int fd)
{
- return intel_gen(intel_get_drm_devid(i915)) >= 12;
+ return intel_gen(intel_get_drm_devid(fd)) >= 12;
}
static bool has_ctx_cfg(struct intel_bb *ibb)
@@ -1027,7 +1071,7 @@ static bool has_ctx_cfg(struct intel_bb *ibb)
/**
* intel_bb_create:
- * @i915: drm fd
+ * @fd: drm fd - i915 or xe
* @size: size of the batchbuffer
*
* Creates bb with default context.
@@ -1045,19 +1089,19 @@ static bool has_ctx_cfg(struct intel_bb *ibb)
* connection to it inside intel_bb is not valid anymore.
* Trying to use it leads to catastrofic errors.
*/
-struct intel_bb *intel_bb_create(int i915, uint32_t size)
+struct intel_bb *intel_bb_create(int fd, uint32_t size)
{
- bool relocs = gem_has_relocations(i915);
+ bool relocs = is_i915_device(fd) && gem_has_relocations(fd);
- return __intel_bb_create(i915, 0, NULL, size,
- relocs && !aux_needs_softpin(i915), 0, 0,
+ return __intel_bb_create(fd, 0, NULL, size,
+ relocs && !aux_needs_softpin(fd), 0, 0,
INTEL_ALLOCATOR_SIMPLE,
ALLOC_STRATEGY_HIGH_TO_LOW);
}
/**
* intel_bb_create_with_context:
- * @i915: drm fd
+ * @fd: drm fd - i915 or xe
* @ctx: context id
* @cfg: intel_ctx configuration, NULL for default context or legacy mode
* @size: size of the batchbuffer
@@ -1070,20 +1114,20 @@ struct intel_bb *intel_bb_create(int i915, uint32_t size)
* Pointer the intel_bb, asserts on failure.
*/
struct intel_bb *
-intel_bb_create_with_context(int i915, uint32_t ctx,
+intel_bb_create_with_context(int fd, uint32_t ctx,
const intel_ctx_cfg_t *cfg, uint32_t size)
{
- bool relocs = gem_has_relocations(i915);
+ bool relocs = is_i915_device(fd) && gem_has_relocations(fd);
- return __intel_bb_create(i915, ctx, cfg, size,
- relocs && !aux_needs_softpin(i915), 0, 0,
+ return __intel_bb_create(fd, ctx, cfg, size,
+ relocs && !aux_needs_softpin(fd), 0, 0,
INTEL_ALLOCATOR_SIMPLE,
ALLOC_STRATEGY_HIGH_TO_LOW);
}
/**
* intel_bb_create_with_relocs:
- * @i915: drm fd
+ * @fd: drm fd - i915
* @size: size of the batchbuffer
*
* Creates bb which will disable passing addresses.
@@ -1093,17 +1137,17 @@ intel_bb_create_with_context(int i915, uint32_t ctx,
*
* Pointer the intel_bb, asserts on failure.
*/
-struct intel_bb *intel_bb_create_with_relocs(int i915, uint32_t size)
+struct intel_bb *intel_bb_create_with_relocs(int fd, uint32_t size)
{
- igt_require(gem_has_relocations(i915));
+ igt_require(is_i915_device(fd) && gem_has_relocations(fd));
- return __intel_bb_create(i915, 0, NULL, size, true, 0, 0,
+ return __intel_bb_create(fd, 0, NULL, size, true, 0, 0,
INTEL_ALLOCATOR_NONE, ALLOC_STRATEGY_NONE);
}
/**
* intel_bb_create_with_relocs_and_context:
- * @i915: drm fd
+ * @fd: drm fd - i915
* @ctx: context
* @cfg: intel_ctx configuration, NULL for default context or legacy mode
* @size: size of the batchbuffer
@@ -1116,19 +1160,19 @@ struct intel_bb *intel_bb_create_with_relocs(int i915, uint32_t size)
* Pointer the intel_bb, asserts on failure.
*/
struct intel_bb *
-intel_bb_create_with_relocs_and_context(int i915, uint32_t ctx,
+intel_bb_create_with_relocs_and_context(int fd, uint32_t ctx,
const intel_ctx_cfg_t *cfg,
uint32_t size)
{
- igt_require(gem_has_relocations(i915));
+ igt_require(is_i915_device(fd) && gem_has_relocations(fd));
- return __intel_bb_create(i915, ctx, cfg, size, true, 0, 0,
+ return __intel_bb_create(fd, ctx, cfg, size, true, 0, 0,
INTEL_ALLOCATOR_NONE, ALLOC_STRATEGY_NONE);
}
/**
* intel_bb_create_no_relocs:
- * @i915: drm fd
+ * @fd: drm fd - i915 or xe
* @size: size of the batchbuffer
*
* Creates bb with disabled relocations.
@@ -1138,11 +1182,12 @@ intel_bb_create_with_relocs_and_context(int i915, uint32_t ctx,
*
* Pointer the intel_bb, asserts on failure.
*/
-struct intel_bb *intel_bb_create_no_relocs(int i915, uint32_t size)
+struct intel_bb *intel_bb_create_no_relocs(int fd, uint32_t size)
{
- igt_require(gem_uses_full_ppgtt(i915));
+ igt_require(is_xe_device(fd) ||
+ (is_i915_device(fd) && gem_uses_full_ppgtt(fd)));
- return __intel_bb_create(i915, 0, NULL, size, false, 0, 0,
+ return __intel_bb_create(fd, 0, NULL, size, false, 0, 0,
INTEL_ALLOCATOR_SIMPLE,
ALLOC_STRATEGY_HIGH_TO_LOW);
}
@@ -1217,16 +1262,80 @@ void intel_bb_destroy(struct intel_bb *ibb)
intel_allocator_free(ibb->allocator_handle, ibb->handle);
intel_allocator_close(ibb->allocator_handle);
}
- gem_close(ibb->i915, ibb->handle);
+ gem_close(ibb->fd, ibb->handle);
if (ibb->fence >= 0)
close(ibb->fence);
+ if (ibb->engine_syncobj)
+ syncobj_destroy(ibb->fd, ibb->engine_syncobj);
+ if (ibb->vm_id && !ibb->ctx)
+ xe_vm_destroy(ibb->fd, ibb->vm_id);
free(ibb->batch);
free(ibb->cfg);
free(ibb);
}
+static struct drm_xe_vm_bind_op *xe_alloc_bind_ops(struct intel_bb *ibb,
+ uint32_t op, uint32_t region)
+{
+ struct drm_i915_gem_exec_object2 **objects = ibb->objects;
+ struct drm_xe_vm_bind_op *bind_ops, *ops;
+ bool set_obj = (op & 0xffff) == XE_VM_BIND_OP_MAP;
+
+ bind_ops = calloc(ibb->num_objects, sizeof(*bind_ops));
+ igt_assert(bind_ops);
+
+ igt_debug("bind_ops: %s\n", set_obj ? "MAP" : "UNMAP");
+ for (int i = 0; i < ibb->num_objects; i++) {
+ ops = &bind_ops[i];
+
+ if (set_obj)
+ ops->obj = objects[i]->handle;
+
+ ops->op = op;
+ ops->obj_offset = 0;
+ ops->addr = objects[i]->offset;
+ ops->range = objects[i]->rsvd1;
+ ops->region = region;
+
+ igt_debug(" [%d]: handle: %u, offset: %llx, size: %llx\n",
+ i, ops->obj, (long long)ops->addr, (long long)ops->range);
+ }
+
+ return bind_ops;
+}
+
+static void __unbind_xe_objects(struct intel_bb *ibb)
+{
+ struct drm_xe_sync syncs[2] = {
+ { .flags = DRM_XE_SYNC_SYNCOBJ },
+ { .flags = DRM_XE_SYNC_SYNCOBJ | DRM_XE_SYNC_SIGNAL, },
+ };
+ int ret;
+
+ syncs[0].handle = ibb->engine_syncobj;
+ syncs[1].handle = syncobj_create(ibb->fd, 0);
+
+ if (ibb->num_objects > 1) {
+ struct drm_xe_vm_bind_op *bind_ops;
+ uint32_t op = XE_VM_BIND_OP_UNMAP | XE_VM_BIND_FLAG_ASYNC;
+
+ bind_ops = xe_alloc_bind_ops(ibb, op, 0);
+ xe_vm_bind_array(ibb->fd, ibb->vm_id, 0, bind_ops,
+ ibb->num_objects, syncs, 2);
+ free(bind_ops);
+ } else {
+ xe_vm_unbind_async(ibb->fd, ibb->vm_id, 0, 0,
+ ibb->batch_offset, ibb->size, syncs, 2);
+ }
+ ret = syncobj_wait_err(ibb->fd, &syncs[1].handle, 1, INT64_MAX, 0);
+ igt_assert_eq(ret, 0);
+ syncobj_destroy(ibb->fd, syncs[1].handle);
+
+ ibb->xe_bound = false;
+}
+
/*
* intel_bb_reset:
* @ibb: pointer to intel_bb
@@ -1238,7 +1347,6 @@ void intel_bb_destroy(struct intel_bb *ibb)
* from intel-bb tracking list. Removing intel_bufs releases their addresses
* in the allocator.
*/
-
void intel_bb_reset(struct intel_bb *ibb, bool purge_objects_cache)
{
uint32_t i;
@@ -1258,6 +1366,9 @@ void intel_bb_reset(struct intel_bb *ibb, bool purge_objects_cache)
for (i = 0; i < ibb->num_objects; i++)
ibb->objects[i]->flags &= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+ if (is_xe_device(ibb->fd) && ibb->xe_bound)
+ __unbind_xe_objects(ibb);
+
__intel_bb_destroy_relocations(ibb);
__intel_bb_destroy_objects(ibb);
__reallocate_objects(ibb);
@@ -1277,11 +1388,16 @@ void intel_bb_reset(struct intel_bb *ibb, bool purge_objects_cache)
intel_bb_remove_object(ibb, ibb->handle, ibb->batch_offset,
ibb->size);
- gem_close(ibb->i915, ibb->handle);
- ibb->handle = gem_create(ibb->i915, ibb->size);
+ gem_close(ibb->fd, ibb->handle);
+ if (is_i915_device(ibb->fd))
+ ibb->handle = gem_create(ibb->fd, ibb->size);
+ else
+ ibb->handle = xe_bo_create_flags(ibb->fd, 0, ibb->size,
+ vram_if_possible(ibb->fd, 0));
- /* Keep address for bb in reloc mode and RANDOM allocator */
- if (ibb->allocator_type == INTEL_ALLOCATOR_SIMPLE)
+ /* Reacquire offset for RELOC and SIMPLE */
+ if (ibb->allocator_type == INTEL_ALLOCATOR_SIMPLE ||
+ ibb->allocator_type == INTEL_ALLOCATOR_RELOC)
ibb->batch_offset = __intel_bb_get_offset(ibb,
ibb->handle,
ibb->size,
@@ -1304,13 +1420,19 @@ int intel_bb_sync(struct intel_bb *ibb)
{
int ret;
- if (ibb->fence < 0)
+ if (ibb->fence < 0 && !ibb->engine_syncobj)
return 0;
- ret = sync_fence_wait(ibb->fence, -1);
- if (ret == 0) {
- close(ibb->fence);
- ibb->fence = -1;
+ if (ibb->fence >= 0) {
+ ret = sync_fence_wait(ibb->fence, -1);
+ if (ret == 0) {
+ close(ibb->fence);
+ ibb->fence = -1;
+ }
+ } else {
+ igt_assert_neq(ibb->engine_syncobj, 0);
+ ret = syncobj_wait_err(ibb->fd, &ibb->engine_syncobj,
+ 1, INT64_MAX, 0);
}
return ret;
@@ -1325,7 +1447,7 @@ int intel_bb_sync(struct intel_bb *ibb)
void intel_bb_print(struct intel_bb *ibb)
{
igt_info("drm fd: %d, gen: %d, devid: %u, debug: %d\n",
- ibb->i915, ibb->gen, ibb->devid, ibb->debug);
+ ibb->fd, ibb->gen, ibb->devid, ibb->debug);
igt_info("handle: %u, size: %u, batch: %p, ptr: %p\n",
ibb->handle, ibb->size, ibb->batch, ibb->ptr);
igt_info("gtt_size: %" PRIu64 ", supports 48bit: %d\n",
@@ -1350,7 +1472,7 @@ void intel_bb_dump(struct intel_bb *ibb, const char *filename)
FILE *out;
void *ptr;
- ptr = gem_mmap__device_coherent(ibb->i915, ibb->handle, 0, ibb->size,
+ ptr = gem_mmap__device_coherent(ibb->fd, ibb->handle, 0, ibb->size,
PROT_READ);
out = fopen(filename, "wb");
igt_assert(out);
@@ -1501,7 +1623,7 @@ static void __remove_from_objects(struct intel_bb *ibb,
}
/**
- * intel_bb_add_object:
+ * __intel_bb_add_object:
* @ibb: pointer to intel_bb
* @handle: which handle to add to objects array
* @size: object size
@@ -1513,9 +1635,9 @@ static void __remove_from_objects(struct intel_bb *ibb,
* in the object tree. When object is a render target it has to
* be marked with EXEC_OBJECT_WRITE flag.
*/
-struct drm_i915_gem_exec_object2 *
-intel_bb_add_object(struct intel_bb *ibb, uint32_t handle, uint64_t size,
- uint64_t offset, uint64_t alignment, bool write)
+static struct drm_i915_gem_exec_object2 *
+__intel_bb_add_object(struct intel_bb *ibb, uint32_t handle, uint64_t size,
+ uint64_t offset, uint64_t alignment, bool write)
{
struct drm_i915_gem_exec_object2 *object;
@@ -1523,8 +1645,12 @@ intel_bb_add_object(struct intel_bb *ibb, uint32_t handle, uint64_t size,
|| ALIGN(offset, alignment) == offset);
igt_assert(is_power_of_two(alignment));
+ if (ibb->driver == INTEL_DRIVER_I915)
+ alignment = max_t(uint64_t, alignment, gem_detect_safe_alignment(ibb->fd));
+ else if (ibb->driver == INTEL_DRIVER_XE)
+ alignment = max_t(uint64_t, ibb->alignment, alignment);
+
object = __add_to_cache(ibb, handle);
- alignment = max_t(uint64_t, alignment, gem_detect_safe_alignment(ibb->i915));
__add_to_objects(ibb, object);
/*
@@ -1584,9 +1710,27 @@ intel_bb_add_object(struct intel_bb *ibb, uint32_t handle, uint64_t size,
if (ibb->allows_obj_alignment)
object->alignment = alignment;
+ if (ibb->driver == INTEL_DRIVER_XE) {
+ object->alignment = alignment;
+ object->rsvd1 = size;
+ }
+
return object;
}
+struct drm_i915_gem_exec_object2 *
+intel_bb_add_object(struct intel_bb *ibb, uint32_t handle, uint64_t size,
+ uint64_t offset, uint64_t alignment, bool write)
+{
+ struct drm_i915_gem_exec_object2 *obj = NULL;
+
+ obj = __intel_bb_add_object(ibb, handle, size, offset,
+ alignment, write);
+ igt_assert(obj);
+
+ return obj;
+}
+
bool intel_bb_remove_object(struct intel_bb *ibb, uint32_t handle,
uint64_t offset, uint64_t size)
{
@@ -1999,7 +2143,7 @@ static void intel_bb_dump_execbuf(struct intel_bb *ibb,
uint64_t address;
igt_debug("execbuf [pid: %ld, fd: %d, ctx: %u]\n",
- (long) getpid(), ibb->i915, ibb->ctx);
+ (long) getpid(), ibb->fd, ibb->ctx);
igt_debug("execbuf batch len: %u, start offset: 0x%x, "
"DR1: 0x%x, DR4: 0x%x, "
"num clip: %u, clipptr: 0x%llx, "
@@ -2135,6 +2279,83 @@ static void update_offsets(struct intel_bb *ibb,
}
#define LINELEN 76
+
+static int
+__xe_bb_exec(struct intel_bb *ibb, uint32_t end_offset,
+ uint64_t flags, bool sync)
+{
+ uint32_t engine = flags & (I915_EXEC_BSD_MASK | I915_EXEC_RING_MASK);
+ uint32_t engine_id;
+ struct drm_xe_sync syncs[2] = {
+ { .flags = DRM_XE_SYNC_SYNCOBJ | DRM_XE_SYNC_SIGNAL, },
+ { .flags = DRM_XE_SYNC_SYNCOBJ | DRM_XE_SYNC_SIGNAL, },
+ };
+ struct drm_xe_vm_bind_op *bind_ops;
+ void *map;
+
+ igt_assert_eq(ibb->num_relocs, 0);
+ igt_assert_eq(ibb->xe_bound, false);
+
+ if (ibb->last_engine != engine) {
+ struct drm_xe_engine_class_instance inst = { };
+
+ inst.engine_instance =
+ (flags & I915_EXEC_BSD_MASK) >> I915_EXEC_BSD_SHIFT;
+
+ switch (flags & I915_EXEC_RING_MASK) {
+ case I915_EXEC_DEFAULT:
+ case I915_EXEC_BLT:
+ inst.engine_class = DRM_XE_ENGINE_CLASS_COPY;
+ break;
+ case I915_EXEC_BSD:
+ inst.engine_class = DRM_XE_ENGINE_CLASS_VIDEO_DECODE;
+ break;
+ case I915_EXEC_RENDER:
+ inst.engine_class = DRM_XE_ENGINE_CLASS_RENDER;
+ break;
+ case I915_EXEC_VEBOX:
+ inst.engine_class = DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE;
+ break;
+ default:
+ igt_assert(false);
+ }
+ igt_debug("Run on %s\n", xe_engine_class_string(inst.engine_class));
+
+ ibb->engine_id = engine_id =
+ xe_engine_create(ibb->fd, ibb->vm_id, &inst, 0);
+ } else {
+ engine_id = ibb->engine_id;
+ }
+ ibb->last_engine = engine;
+
+ map = xe_bo_map(ibb->fd, ibb->handle, ibb->size);
+ memcpy(map, ibb->batch, ibb->size);
+ gem_munmap(map, ibb->size);
+
+ syncs[0].handle = syncobj_create(ibb->fd, 0);
+ if (ibb->num_objects > 1) {
+ bind_ops = xe_alloc_bind_ops(ibb, XE_VM_BIND_OP_MAP | XE_VM_BIND_FLAG_ASYNC, 0);
+ xe_vm_bind_array(ibb->fd, ibb->vm_id, 0, bind_ops,
+ ibb->num_objects, syncs, 1);
+ ibb->xe_bound = true;
+ free(bind_ops);
+ } else {
+ xe_vm_bind_async(ibb->fd, ibb->vm_id, 0, ibb->handle, 0,
+ ibb->batch_offset, ibb->size, syncs, 1);
+ }
+
+ syncs[0].flags &= ~DRM_XE_SYNC_SIGNAL;
+ ibb->engine_syncobj = syncobj_create(ibb->fd, 0);
+ syncs[1].handle = ibb->engine_syncobj;
+
+ xe_exec_sync(ibb->fd, engine_id, ibb->batch_offset, syncs, 2);
+
+ if (sync)
+ intel_bb_sync(ibb);
+
+ return 0;
+}
+
/*
* __intel_bb_exec:
* @ibb: pointer to intel_bb
@@ -2160,7 +2381,7 @@ int __intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset,
ibb->objects[0]->handle = ibb->handle;
ibb->objects[0]->offset = ibb->batch_offset;
- gem_write(ibb->i915, ibb->handle, 0, ibb->batch, ibb->size);
+ gem_write(ibb->fd, ibb->handle, 0, ibb->batch, ibb->size);
memset(&execbuf, 0, sizeof(execbuf));
objects = create_objects_array(ibb);
@@ -2173,13 +2394,10 @@ int __intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset,
execbuf.flags &= ~I915_EXEC_NO_RELOC;
execbuf.rsvd2 = 0;
- if (ibb->dump_base64)
- intel_bb_dump_base64(ibb, LINELEN);
-
/* For debugging on CI, remove in final series */
intel_bb_dump_execbuf(ibb, &execbuf);
- ret = __gem_execbuf_wr(ibb->i915, &execbuf);
+ ret = __gem_execbuf_wr(ibb->fd, &execbuf);
if (ret) {
intel_bb_dump_execbuf(ibb, &execbuf);
free(objects);
@@ -2230,7 +2448,13 @@ int __intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset,
void intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset,
uint64_t flags, bool sync)
{
- igt_assert_eq(__intel_bb_exec(ibb, end_offset, flags, sync), 0);
+ if (ibb->dump_base64)
+ intel_bb_dump_base64(ibb, LINELEN);
+
+ if (ibb->driver == INTEL_DRIVER_I915)
+ igt_assert_eq(__intel_bb_exec(ibb, end_offset, flags, sync), 0);
+ else
+ igt_assert_eq(__xe_bb_exec(ibb, end_offset, flags, sync), 0);
}
/**
@@ -2409,13 +2633,13 @@ uint32_t intel_bb_copy_data(struct intel_bb *ibb,
*/
void intel_bb_blit_start(struct intel_bb *ibb, uint32_t flags)
{
- if (blt_has_xy_src_copy(ibb->i915))
+ if (blt_has_xy_src_copy(ibb->fd))
intel_bb_out(ibb, XY_SRC_COPY_BLT_CMD |
XY_SRC_COPY_BLT_WRITE_ALPHA |
XY_SRC_COPY_BLT_WRITE_RGB |
flags |
(6 + 2 * (ibb->gen >= 8)));
- else if (blt_has_fast_copy(ibb->i915))
+ else if (blt_has_fast_copy(ibb->fd))
intel_bb_out(ibb, XY_FAST_COPY_BLT | flags);
else
igt_assert_f(0, "No supported blit command found\n");
@@ -2456,9 +2680,9 @@ void intel_bb_emit_blt_copy(struct intel_bb *ibb,
if (gen >= 4 && src->tiling != I915_TILING_NONE) {
src_pitch /= 4;
- if (blt_has_xy_src_copy(ibb->i915))
+ if (blt_has_xy_src_copy(ibb->fd))
cmd_bits |= XY_SRC_COPY_BLT_SRC_TILED;
- else if (blt_has_fast_copy(ibb->i915))
+ else if (blt_has_fast_copy(ibb->fd))
cmd_bits |= fast_copy_dword0(src->tiling, dst->tiling);
else
igt_assert_f(0, "No supported blit command found\n");
@@ -2466,7 +2690,7 @@ void intel_bb_emit_blt_copy(struct intel_bb *ibb,
if (gen >= 4 && dst->tiling != I915_TILING_NONE) {
dst_pitch /= 4;
- if (blt_has_xy_src_copy(ibb->i915))
+ if (blt_has_xy_src_copy(ibb->fd))
cmd_bits |= XY_SRC_COPY_BLT_DST_TILED;
else
cmd_bits |= fast_copy_dword0(src->tiling, dst->tiling);
@@ -2480,7 +2704,7 @@ void intel_bb_emit_blt_copy(struct intel_bb *ibb,
CHECK_RANGE(src_pitch); CHECK_RANGE(dst_pitch);
br13_bits = 0;
- if (blt_has_xy_src_copy(ibb->i915)) {
+ if (blt_has_xy_src_copy(ibb->fd)) {
switch (bpp) {
case 8:
break;
@@ -2496,7 +2720,7 @@ void intel_bb_emit_blt_copy(struct intel_bb *ibb,
igt_fail(IGT_EXIT_FAILURE);
}
} else {
- br13_bits = fast_copy_dword1(ibb->i915, src->tiling, dst->tiling, bpp);
+ br13_bits = fast_copy_dword1(ibb->fd, src->tiling, dst->tiling, bpp);
}
if ((src->tiling | dst->tiling) >= I915_TILING_Y) {
@@ -2628,14 +2852,20 @@ void intel_bb_track(bool do_tracking)
static void __intel_bb_reinit_alloc(struct intel_bb *ibb)
{
+ uint64_t alignment = 0;
+
if (ibb->allocator_type == INTEL_ALLOCATOR_NONE)
return;
- ibb->allocator_handle = intel_allocator_open_full(ibb->i915, ibb->ctx,
+ if (ibb->driver == INTEL_DRIVER_XE)
+ alignment = xe_get_default_alignment(ibb->fd);
+
+ ibb->allocator_handle = intel_allocator_open_full(ibb->fd, ibb->ctx,
ibb->allocator_start, ibb->allocator_end,
ibb->allocator_type,
ibb->allocator_strategy,
- 0);
+ alignment);
+
intel_bb_reset(ibb, true);
}
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index 10e412660..e2566d822 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -235,6 +235,11 @@ struct igt_pxp {
uint32_t appid;
};
+enum intel_driver {
+ INTEL_DRIVER_I915 = 1,
+ INTEL_DRIVER_XE,
+};
+
/*
* Batchbuffer without libdrm dependency
*/
@@ -246,7 +251,9 @@ struct intel_bb {
uint8_t allocator_type;
enum allocator_strategy allocator_strategy;
- int i915;
+ enum intel_driver driver;
+ int fd;
+
unsigned int gen;
bool debug;
bool dump_base64;
@@ -268,6 +275,11 @@ struct intel_bb {
uint32_t ctx;
uint32_t vm_id;
+ bool xe_bound;
+ uint32_t engine_syncobj;
+ uint32_t engine_id;
+ uint32_t last_engine;
+
/* Context configuration */
intel_ctx_cfg_t *cfg;
@@ -299,21 +311,21 @@ struct intel_bb {
};
struct intel_bb *
-intel_bb_create_full(int i915, uint32_t ctx, const intel_ctx_cfg_t *cfg,
+intel_bb_create_full(int fd, uint32_t ctx, const intel_ctx_cfg_t *cfg,
uint32_t size, uint64_t start, uint64_t end,
uint8_t allocator_type, enum allocator_strategy strategy);
struct intel_bb *
-intel_bb_create_with_allocator(int i915, uint32_t ctx, const intel_ctx_cfg_t *cfg,
+intel_bb_create_with_allocator(int fd, uint32_t ctx, const intel_ctx_cfg_t *cfg,
uint32_t size, uint8_t allocator_type);
-struct intel_bb *intel_bb_create(int i915, uint32_t size);
+struct intel_bb *intel_bb_create(int fd, uint32_t size);
struct intel_bb *
-intel_bb_create_with_context(int i915, uint32_t ctx, const intel_ctx_cfg_t *cfg,
+intel_bb_create_with_context(int fd, uint32_t ctx, const intel_ctx_cfg_t *cfg,
uint32_t size);
-struct intel_bb *intel_bb_create_with_relocs(int i915, uint32_t size);
+struct intel_bb *intel_bb_create_with_relocs(int fd, uint32_t size);
struct intel_bb *
-intel_bb_create_with_relocs_and_context(int i915, uint32_t ctx,
+intel_bb_create_with_relocs_and_context(int fd, uint32_t ctx,
const intel_ctx_cfg_t *cfg, uint32_t size);
-struct intel_bb *intel_bb_create_no_relocs(int i915, uint32_t size);
+struct intel_bb *intel_bb_create_no_relocs(int fd, uint32_t size);
void intel_bb_destroy(struct intel_bb *ibb);
/* make it safe to use intel_allocator after failed test */
diff --git a/tests/i915/gem_caching.c b/tests/i915/gem_caching.c
index b6ecd8346..6e944f0ac 100644
--- a/tests/i915/gem_caching.c
+++ b/tests/i915/gem_caching.c
@@ -83,7 +83,7 @@ copy_bo(struct intel_bb *ibb, struct intel_buf *src, struct intel_buf *dst)
intel_bb_add_intel_buf(ibb, src, false);
intel_bb_add_intel_buf(ibb, dst, true);
- if (blt_has_xy_src_copy(ibb->i915)) {
+ if (blt_has_xy_src_copy(ibb->fd)) {
intel_bb_out(ibb,
XY_SRC_COPY_BLT_CMD |
XY_SRC_COPY_BLT_WRITE_ALPHA |
@@ -93,7 +93,7 @@ copy_bo(struct intel_bb *ibb, struct intel_buf *src, struct intel_buf *dst)
intel_bb_out(ibb, (3 << 24) | /* 32 bits */
(0xcc << 16) | /* copy ROP */
4096);
- } else if (blt_has_fast_copy(ibb->i915)) {
+ } else if (blt_has_fast_copy(ibb->fd)) {
intel_bb_out(ibb, XY_FAST_COPY_BLT);
intel_bb_out(ibb, XY_FAST_COPY_COLOR_DEPTH_32 | 4096);
} else {
diff --git a/tests/i915/gem_pxp.c b/tests/i915/gem_pxp.c
index af657d0e1..2f27abd58 100644
--- a/tests/i915/gem_pxp.c
+++ b/tests/i915/gem_pxp.c
@@ -809,7 +809,7 @@ static int gem_execbuf_flush_store_dw(int i915, struct intel_bb *ibb, uint32_t c
ret = __intel_bb_exec(ibb, intel_bb_offset(ibb),
I915_EXEC_RENDER | I915_EXEC_NO_RELOC, false);
if (ret == 0) {
- gem_sync(ibb->i915, fence->handle);
+ gem_sync(ibb->fd, fence->handle);
assert_pipectl_storedw_done(i915, fence->handle);
}
return ret;
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 07/45] tests/xe_intel_bb: Check if intel-bb Xe support correctness
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (5 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 06/45] lib/intel_batchbuffer: Add Xe support in intel-bb Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 08/45] tests/xe-fast-feedback: Add xe_intel_bb test to BAT Bhanuprakash Modem
` (41 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
As we're reusing intel-bb for Xe we need to check it behaves correctly
for buffer handling and submission.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
tests/meson.build | 1 +
tests/xe/xe_intel_bb.c | 1181 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 1182 insertions(+)
create mode 100644 tests/xe/xe_intel_bb.c
diff --git a/tests/meson.build b/tests/meson.build
index da31e7824..3ec440710 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -255,6 +255,7 @@ xe_progs = [
'xe_exec_threads',
'xe_guc_pc',
'xe_huc_copy',
+ 'xe_intel_bb',
'xe_mmap',
'xe_mmio',
'xe_module_load',
diff --git a/tests/xe/xe_intel_bb.c b/tests/xe/xe_intel_bb.c
new file mode 100644
index 000000000..42ba09f37
--- /dev/null
+++ b/tests/xe/xe_intel_bb.c
@@ -0,0 +1,1181 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include "igt.h"
+#include "igt_crc.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <cairo.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <glib.h>
+#include <zlib.h>
+#include "intel_bufops.h"
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+
+/**
+ * TEST: Basic tests for intel-bb xe functionality
+ * Category: Software building block
+ * Sub-category: xe
+ * Test category: functionality test
+ */
+
+#define PAGE_SIZE 4096
+
+#define WIDTH 64
+#define HEIGHT 64
+#define STRIDE (WIDTH * 4)
+#define SIZE (HEIGHT * STRIDE)
+
+#define COLOR_00 0x00
+#define COLOR_33 0x33
+#define COLOR_77 0x77
+#define COLOR_CC 0xcc
+
+IGT_TEST_DESCRIPTION("xe_intel_bb API check.");
+
+static bool debug_bb;
+static bool write_png;
+static bool buf_info;
+static bool print_base64;
+
+static void *alloc_aligned(uint64_t size)
+{
+ void *p;
+
+ igt_assert_eq(posix_memalign(&p, 16, size), 0);
+
+ return p;
+}
+
+static void fill_buf(struct intel_buf *buf, uint8_t color)
+{
+ uint8_t *ptr;
+ int xe = buf_ops_get_fd(buf->bops);
+ int i;
+
+ ptr = xe_bo_map(xe, buf->handle, buf->surface[0].size);
+
+ for (i = 0; i < buf->surface[0].size; i++)
+ ptr[i] = color;
+
+ munmap(ptr, buf->surface[0].size);
+}
+
+static void check_buf(struct intel_buf *buf, uint8_t color)
+{
+ uint8_t *ptr;
+ int xe = buf_ops_get_fd(buf->bops);
+ int i;
+
+ ptr = xe_bo_map(xe, buf->handle, buf->surface[0].size);
+
+ for (i = 0; i < buf->surface[0].size; i++)
+ igt_assert(ptr[i] == color);
+
+ munmap(ptr, buf->surface[0].size);
+}
+
+static struct intel_buf *
+create_buf(struct buf_ops *bops, int width, int height, uint8_t color)
+{
+ struct intel_buf *buf;
+
+ buf = calloc(1, sizeof(*buf));
+ igt_assert(buf);
+
+ intel_buf_init(bops, buf, width/4, height, 32, 0, I915_TILING_NONE, 0);
+ fill_buf(buf, color);
+
+ return buf;
+}
+
+static void print_buf(struct intel_buf *buf, const char *name)
+{
+ uint8_t *ptr;
+ int xe = buf_ops_get_fd(buf->bops);
+
+ ptr = xe_bo_map(xe, buf->handle, buf->surface[0].size);
+
+ igt_debug("[%s] Buf handle: %d, size: %" PRIu64
+ ", v: 0x%02x, presumed_addr: %p\n",
+ name, buf->handle, buf->surface[0].size, ptr[0],
+ from_user_pointer(buf->addr.offset));
+ munmap(ptr, buf->surface[0].size);
+}
+
+/**
+ * SUBTEST: reset-bb
+ * Description: check bb reset
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static void reset_bb(struct buf_ops *bops)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ intel_bb_reset(ibb, false);
+ intel_bb_destroy(ibb);
+}
+
+/**
+ * SUBTEST: purge-bb
+ * Description: check bb reset == full (purge)
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static void purge_bb(struct buf_ops *bops)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_buf *buf;
+ struct intel_bb *ibb;
+ uint64_t offset0, offset1;
+
+ buf = intel_buf_create(bops, 512, 512, 32, 0, I915_TILING_NONE,
+ I915_COMPRESSION_NONE);
+ ibb = intel_bb_create(xe, 4096);
+ intel_bb_set_debug(ibb, true);
+
+ intel_bb_add_intel_buf(ibb, buf, false);
+ offset0 = buf->addr.offset;
+
+ intel_bb_reset(ibb, true);
+ buf->addr.offset = INTEL_BUF_INVALID_ADDRESS;
+
+ intel_bb_add_intel_buf(ibb, buf, false);
+ offset1 = buf->addr.offset;
+
+ igt_assert(offset0 == offset1);
+
+ intel_buf_destroy(buf);
+ intel_bb_destroy(ibb);
+}
+
+/**
+ * SUBTEST: simple-%s
+ * Description: Run simple bb xe %arg[1] test
+ * Run type: BAT
+ *
+ * arg[1]:
+ *
+ * @bb: bb
+ * @bb-ctx: bb-ctx
+ */
+static void simple_bb(struct buf_ops *bops, bool new_context)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ uint32_t ctx = 0;
+
+ ibb = intel_bb_create_with_allocator(xe, ctx, NULL, PAGE_SIZE,
+ INTEL_ALLOCATOR_SIMPLE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ intel_bb_out(ibb, MI_BATCH_BUFFER_END);
+ intel_bb_ptr_align(ibb, 8);
+
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+
+ /* Check we're safe with reset and no double-free will occur */
+ intel_bb_reset(ibb, true);
+ intel_bb_reset(ibb, false);
+ intel_bb_reset(ibb, true);
+
+ if (new_context) {
+ ctx = xe_vm_create(xe, DRM_XE_VM_CREATE_ASYNC_BIND_OPS, 0);
+ intel_bb_destroy(ibb);
+ ibb = intel_bb_create_with_context(xe, ctx, NULL, PAGE_SIZE);
+ intel_bb_out(ibb, MI_BATCH_BUFFER_END);
+ intel_bb_ptr_align(ibb, 8);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC,
+ true);
+ xe_vm_destroy(xe, ctx);
+ }
+
+ intel_bb_destroy(ibb);
+}
+
+/**
+ * SUBTEST: bb-with-allocator
+ * Description: check bb with passed allocator
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static void bb_with_allocator(struct buf_ops *bops)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ struct intel_buf *src, *dst;
+ uint32_t ctx = 0;
+
+ ibb = intel_bb_create_with_allocator(xe, ctx, NULL, PAGE_SIZE,
+ INTEL_ALLOCATOR_SIMPLE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ src = intel_buf_create(bops, 4096/32, 32, 8, 0, I915_TILING_NONE,
+ I915_COMPRESSION_NONE);
+ dst = intel_buf_create(bops, 4096/32, 32, 8, 0, I915_TILING_NONE,
+ I915_COMPRESSION_NONE);
+
+ intel_bb_add_intel_buf(ibb, src, false);
+ intel_bb_add_intel_buf(ibb, dst, true);
+ intel_bb_copy_intel_buf(ibb, dst, src, 4096);
+ intel_bb_remove_intel_buf(ibb, src);
+ intel_bb_remove_intel_buf(ibb, dst);
+
+ intel_buf_destroy(src);
+ intel_buf_destroy(dst);
+ intel_bb_destroy(ibb);
+}
+
+/**
+ * SUBTEST: lot-of-buffers
+ * Description: check running bb with many buffers
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+#define NUM_BUFS 500
+static void lot_of_buffers(struct buf_ops *bops)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ struct intel_buf *buf[NUM_BUFS];
+ int i;
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ intel_bb_out(ibb, MI_BATCH_BUFFER_END);
+ intel_bb_ptr_align(ibb, 8);
+
+ for (i = 0; i < NUM_BUFS; i++) {
+ buf[i] = intel_buf_create(bops, 4096, 1, 8, 0, I915_TILING_NONE,
+ I915_COMPRESSION_NONE);
+ if (i % 2)
+ intel_bb_add_intel_buf(ibb, buf[i], false);
+ else
+ intel_bb_add_intel_buf_with_alignment(ibb, buf[i],
+ 0x4000, false);
+ }
+
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ intel_bb_reset(ibb, false);
+
+ for (i = 0; i < NUM_BUFS; i++)
+ intel_buf_destroy(buf[i]);
+
+ intel_bb_destroy(ibb);
+}
+
+/**
+ * SUBTEST: add-remove-objects
+ * Description: check bb object manipulation (add + remove)
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static void add_remove_objects(struct buf_ops *bops)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ struct intel_buf *src, *mid, *dst;
+ uint32_t offset;
+ const uint32_t width = 512;
+ const uint32_t height = 512;
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ src = intel_buf_create(bops, width, height, 32, 0,
+ I915_TILING_NONE, I915_COMPRESSION_NONE);
+ mid = intel_buf_create(bops, width, height, 32, 0,
+ I915_TILING_NONE, I915_COMPRESSION_NONE);
+ dst = intel_buf_create(bops, width, height, 32, 0,
+ I915_TILING_NONE, I915_COMPRESSION_NONE);
+
+ intel_bb_add_intel_buf(ibb, src, false);
+ intel_bb_add_intel_buf(ibb, mid, true);
+ intel_bb_remove_intel_buf(ibb, mid);
+ intel_bb_remove_intel_buf(ibb, mid);
+ intel_bb_remove_intel_buf(ibb, mid);
+ intel_bb_add_intel_buf(ibb, dst, true);
+
+ offset = intel_bb_emit_bbe(ibb);
+ intel_bb_exec(ibb, offset,
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ intel_bb_reset(ibb, false);
+
+ intel_buf_destroy(src);
+ intel_buf_destroy(mid);
+ intel_buf_destroy(dst);
+ intel_bb_destroy(ibb);
+}
+
+/**
+ * SUBTEST: destroy-bb
+ * Description: check bb destroy/create
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static void destroy_bb(struct buf_ops *bops)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ struct intel_buf *src, *mid, *dst;
+ uint32_t offset;
+ const uint32_t width = 512;
+ const uint32_t height = 512;
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ src = intel_buf_create(bops, width, height, 32, 0,
+ I915_TILING_NONE, I915_COMPRESSION_NONE);
+ mid = intel_buf_create(bops, width, height, 32, 0,
+ I915_TILING_NONE, I915_COMPRESSION_NONE);
+ dst = intel_buf_create(bops, width, height, 32, 0,
+ I915_TILING_NONE, I915_COMPRESSION_NONE);
+
+ intel_bb_add_intel_buf(ibb, src, false);
+ intel_bb_add_intel_buf(ibb, mid, true);
+ intel_bb_add_intel_buf(ibb, dst, true);
+
+ offset = intel_bb_emit_bbe(ibb);
+ intel_bb_exec(ibb, offset,
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ intel_bb_reset(ibb, false);
+
+ /* Check destroy will detach intel_bufs */
+ intel_bb_destroy(ibb);
+ igt_assert(src->addr.offset == INTEL_BUF_INVALID_ADDRESS);
+ igt_assert(src->ibb == NULL);
+ igt_assert(mid->addr.offset == INTEL_BUF_INVALID_ADDRESS);
+ igt_assert(mid->ibb == NULL);
+ igt_assert(dst->addr.offset == INTEL_BUF_INVALID_ADDRESS);
+ igt_assert(dst->ibb == NULL);
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ intel_bb_add_intel_buf(ibb, src, false);
+ offset = intel_bb_emit_bbe(ibb);
+ intel_bb_exec(ibb, offset,
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ intel_bb_reset(ibb, false);
+
+ intel_bb_destroy(ibb);
+ intel_buf_destroy(src);
+ intel_buf_destroy(mid);
+ intel_buf_destroy(dst);
+}
+
+/**
+ * SUBTEST: create-in-region
+ * Description: check size validation on available regions
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static void create_in_region(struct buf_ops *bops, uint64_t region)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ struct intel_buf buf = {};
+ uint32_t handle, offset;
+ uint64_t size;
+ int width = 64;
+ int height = 64;
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ size = xe_min_page_size(xe, system_memory(xe));
+ handle = xe_bo_create_flags(xe, 0, size, system_memory(xe));
+ intel_buf_init_full(bops, handle, &buf,
+ width/4, height, 32, 0,
+ I915_TILING_NONE, 0,
+ size, region);
+ intel_buf_set_ownership(&buf, true);
+
+ intel_bb_add_intel_buf(ibb, &buf, false);
+ offset = intel_bb_emit_bbe(ibb);
+ intel_bb_exec(ibb, offset,
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ intel_bb_reset(ibb, false);
+
+ intel_buf_close(bops, &buf);
+ intel_bb_destroy(ibb);
+}
+
+static void __emit_blit(struct intel_bb *ibb,
+ struct intel_buf *src, struct intel_buf *dst)
+{
+ intel_bb_emit_blt_copy(ibb,
+ src, 0, 0, src->surface[0].stride,
+ dst, 0, 0, dst->surface[0].stride,
+ intel_buf_width(dst),
+ intel_buf_height(dst),
+ dst->bpp);
+}
+
+/**
+ * SUBTEST: blit-%s
+ * Description: Run blit on %arg[1] allocator
+ * Run type: BAT
+ *
+ * arg[1]:
+ *
+ * @simple: simple
+ * @reloc: reloc
+ */
+static void blit(struct buf_ops *bops, uint8_t allocator_type)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ struct intel_buf *src, *dst;
+ uint64_t poff_src, poff_dst;
+ uint64_t flags = 0;
+
+ ibb = intel_bb_create_with_allocator(xe, 0, NULL, PAGE_SIZE,
+ allocator_type);
+ flags |= I915_EXEC_NO_RELOC;
+
+ src = create_buf(bops, WIDTH, HEIGHT, COLOR_CC);
+ dst = create_buf(bops, WIDTH, HEIGHT, COLOR_00);
+
+ if (buf_info) {
+ print_buf(src, "src");
+ print_buf(dst, "dst");
+ }
+
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ __emit_blit(ibb, src, dst);
+ intel_bb_emit_bbe(ibb);
+ intel_bb_flush_blit(ibb);
+ intel_bb_sync(ibb);
+ intel_bb_reset(ibb, false);
+ check_buf(dst, COLOR_CC);
+
+ poff_src = intel_bb_get_object_offset(ibb, src->handle);
+ poff_dst = intel_bb_get_object_offset(ibb, dst->handle);
+
+ /* Add buffers again */
+ intel_bb_add_intel_buf(ibb, src, false);
+ intel_bb_add_intel_buf(ibb, dst, true);
+
+ igt_assert_f(poff_src == src->addr.offset,
+ "prev src addr: %" PRIx64 " <> src addr %" PRIx64 "\n",
+ poff_src, src->addr.offset);
+ igt_assert_f(poff_dst == dst->addr.offset,
+ "prev dst addr: %" PRIx64 " <> dst addr %" PRIx64 "\n",
+ poff_dst, dst->addr.offset);
+
+ fill_buf(src, COLOR_77);
+ fill_buf(dst, COLOR_00);
+
+ __emit_blit(ibb, src, dst);
+ intel_bb_emit_bbe(ibb);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ intel_bb_reset(ibb, false);
+ check_buf(dst, COLOR_77);
+
+ intel_bb_emit_bbe(ibb);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ intel_bb_reset(ibb, false);
+ check_buf(dst, COLOR_77);
+
+ intel_buf_destroy(src);
+ intel_buf_destroy(dst);
+ intel_bb_destroy(ibb);
+}
+
+static void scratch_buf_init(struct buf_ops *bops,
+ struct intel_buf *buf,
+ int width, int height,
+ uint32_t req_tiling,
+ enum i915_compression compression)
+{
+ int bpp = 32;
+
+ intel_buf_init(bops, buf, width, height, bpp, 0,
+ req_tiling, compression);
+
+ igt_assert(intel_buf_width(buf) == width);
+ igt_assert(intel_buf_height(buf) == height);
+}
+
+static void scratch_buf_draw_pattern(struct buf_ops *bops,
+ struct intel_buf *buf,
+ int x, int y, int w, int h,
+ int cx, int cy, int cw, int ch,
+ bool use_alternate_colors)
+{
+ cairo_surface_t *surface;
+ cairo_pattern_t *pat;
+ cairo_t *cr;
+ void *linear;
+
+ linear = alloc_aligned(buf->surface[0].size);
+
+ surface = cairo_image_surface_create_for_data(linear,
+ CAIRO_FORMAT_RGB24,
+ intel_buf_width(buf),
+ intel_buf_height(buf),
+ buf->surface[0].stride);
+
+ cr = cairo_create(surface);
+
+ cairo_rectangle(cr, cx, cy, cw, ch);
+ cairo_clip(cr);
+
+ pat = cairo_pattern_create_mesh();
+ cairo_mesh_pattern_begin_patch(pat);
+ cairo_mesh_pattern_move_to(pat, x, y);
+ cairo_mesh_pattern_line_to(pat, x+w, y);
+ cairo_mesh_pattern_line_to(pat, x+w, y+h);
+ cairo_mesh_pattern_line_to(pat, x, y+h);
+ if (use_alternate_colors) {
+ cairo_mesh_pattern_set_corner_color_rgb(pat, 0, 0.0, 1.0, 1.0);
+ cairo_mesh_pattern_set_corner_color_rgb(pat, 1, 1.0, 0.0, 1.0);
+ cairo_mesh_pattern_set_corner_color_rgb(pat, 2, 1.0, 1.0, 0.0);
+ cairo_mesh_pattern_set_corner_color_rgb(pat, 3, 0.0, 0.0, 0.0);
+ } else {
+ cairo_mesh_pattern_set_corner_color_rgb(pat, 0, 1.0, 0.0, 0.0);
+ cairo_mesh_pattern_set_corner_color_rgb(pat, 1, 0.0, 1.0, 0.0);
+ cairo_mesh_pattern_set_corner_color_rgb(pat, 2, 0.0, 0.0, 1.0);
+ cairo_mesh_pattern_set_corner_color_rgb(pat, 3, 1.0, 1.0, 1.0);
+ }
+ cairo_mesh_pattern_end_patch(pat);
+
+ cairo_rectangle(cr, x, y, w, h);
+ cairo_set_source(cr, pat);
+ cairo_fill(cr);
+ cairo_pattern_destroy(pat);
+
+ cairo_destroy(cr);
+
+ cairo_surface_destroy(surface);
+
+ linear_to_intel_buf(bops, buf, linear);
+
+ free(linear);
+}
+
+#define GROUP_SIZE 4096
+static int compare_detail(const uint32_t *ptr1, uint32_t *ptr2,
+ uint32_t size)
+{
+ int i, ok = 0, fail = 0;
+ int groups = size / GROUP_SIZE;
+ int *hist = calloc(GROUP_SIZE, groups);
+
+ igt_debug("size: %d, group_size: %d, groups: %d\n",
+ size, GROUP_SIZE, groups);
+
+ for (i = 0; i < size / sizeof(uint32_t); i++) {
+ if (ptr1[i] == ptr2[i]) {
+ ok++;
+ } else {
+ fail++;
+ hist[i * sizeof(uint32_t) / GROUP_SIZE]++;
+ }
+ }
+
+ for (i = 0; i < groups; i++) {
+ if (hist[i])
+ igt_debug("[group %4x]: %d\n", i, hist[i]);
+ }
+ free(hist);
+
+ igt_debug("ok: %d, fail: %d\n", ok, fail);
+
+ return fail;
+}
+
+static int compare_bufs(struct intel_buf *buf1, struct intel_buf *buf2,
+ bool detail_compare)
+{
+ void *ptr1, *ptr2;
+ int fd1, fd2, ret;
+
+ igt_assert(buf1->surface[0].size == buf2->surface[0].size);
+
+ fd1 = buf_ops_get_fd(buf1->bops);
+ fd2 = buf_ops_get_fd(buf2->bops);
+
+ ptr1 = xe_bo_map(fd1, buf1->handle, buf1->surface[0].size);
+ ptr2 = xe_bo_map(fd2, buf2->handle, buf2->surface[0].size);
+ ret = memcmp(ptr1, ptr2, buf1->surface[0].size);
+ if (detail_compare)
+ ret = compare_detail(ptr1, ptr2, buf1->surface[0].size);
+
+ munmap(ptr1, buf1->surface[0].size);
+ munmap(ptr2, buf2->surface[0].size);
+
+ return ret;
+}
+
+#define LINELEN 76ul
+static int dump_base64(const char *name, struct intel_buf *buf)
+{
+ void *ptr;
+ int fd, ret;
+ uLongf outsize = buf->surface[0].size * 3 / 2;
+ Bytef *destbuf = malloc(outsize);
+ gchar *str, *pos;
+
+ fd = buf_ops_get_fd(buf->bops);
+
+ ptr = gem_mmap__device_coherent(fd, buf->handle, 0,
+ buf->surface[0].size, PROT_READ);
+
+ ret = compress2(destbuf, &outsize, ptr, buf->surface[0].size,
+ Z_BEST_COMPRESSION);
+ if (ret != Z_OK) {
+ igt_warn("error compressing, ret: %d\n", ret);
+ } else {
+ igt_info("compressed %" PRIu64 " -> %lu\n",
+ buf->surface[0].size, outsize);
+
+ igt_info("--- %s ---\n", name);
+ pos = str = g_base64_encode(destbuf, outsize);
+ outsize = strlen(str);
+ while (pos) {
+ char line[LINELEN + 1];
+ int to_copy = min(LINELEN, outsize);
+
+ memcpy(line, pos, to_copy);
+ line[to_copy] = 0;
+ igt_info("%s\n", line);
+ pos += LINELEN;
+ outsize -= to_copy;
+
+ if (outsize == 0)
+ break;
+ }
+ free(str);
+ }
+
+ munmap(ptr, buf->surface[0].size);
+ free(destbuf);
+
+ return ret;
+}
+
+static int __do_intel_bb_blit(struct buf_ops *bops, uint32_t tiling)
+{
+ struct intel_bb *ibb;
+ const int width = 1024;
+ const int height = 1024;
+ struct intel_buf src, dst, final;
+ char name[128];
+ int xe = buf_ops_get_fd(bops), fails;
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ scratch_buf_init(bops, &src, width, height, I915_TILING_NONE,
+ I915_COMPRESSION_NONE);
+ scratch_buf_init(bops, &dst, width, height, tiling,
+ I915_COMPRESSION_NONE);
+ scratch_buf_init(bops, &final, width, height, I915_TILING_NONE,
+ I915_COMPRESSION_NONE);
+
+ if (buf_info) {
+ intel_buf_print(&src);
+ intel_buf_print(&dst);
+ }
+
+ scratch_buf_draw_pattern(bops, &src,
+ 0, 0, width, height,
+ 0, 0, width, height, 0);
+
+ intel_bb_blt_copy(ibb,
+ &src, 0, 0, src.surface[0].stride,
+ &dst, 0, 0, dst.surface[0].stride,
+ intel_buf_width(&dst),
+ intel_buf_height(&dst),
+ dst.bpp);
+
+ intel_bb_blt_copy(ibb,
+ &dst, 0, 0, dst.surface[0].stride,
+ &final, 0, 0, final.surface[0].stride,
+ intel_buf_width(&dst),
+ intel_buf_height(&dst),
+ dst.bpp);
+
+ igt_assert(intel_bb_sync(ibb) == 0);
+ intel_bb_destroy(ibb);
+
+ if (write_png) {
+ snprintf(name, sizeof(name) - 1,
+ "bb_blit_dst_tiling_%d.png", tiling);
+ intel_buf_write_to_png(&src, "bb_blit_src_tiling_none.png");
+ intel_buf_write_to_png(&dst, name);
+ intel_buf_write_to_png(&final, "bb_blit_final_tiling_none.png");
+ }
+
+ /* We'll fail on src <-> final compare so just warn */
+ if (tiling == I915_TILING_NONE) {
+ if (compare_bufs(&src, &dst, false) > 0)
+ igt_warn("none->none blit failed!");
+ } else {
+ if (compare_bufs(&src, &dst, false) == 0)
+ igt_warn("none->tiled blit failed!");
+ }
+
+ fails = compare_bufs(&src, &final, true);
+
+ intel_buf_close(bops, &src);
+ intel_buf_close(bops, &dst);
+ intel_buf_close(bops, &final);
+
+ return fails;
+}
+
+/**
+ * SUBTEST: intel-bb-blit-%s
+ * Description: Run simple bb xe %arg[1] test
+ * Run type: BAT
+ *
+ * arg[1]:
+ *
+ * @none: none
+ * @x: x
+ * @y: y
+ */
+static void do_intel_bb_blit(struct buf_ops *bops, int loops, uint32_t tiling)
+{
+ int i, fails = 0, xe = buf_ops_get_fd(bops);
+
+ /* We'll fix it for gen2/3 later. */
+ igt_require(intel_gen(intel_get_drm_devid(xe)) > 3);
+
+ for (i = 0; i < loops; i++)
+ fails += __do_intel_bb_blit(bops, tiling);
+
+ igt_assert_f(fails == 0, "intel-bb-blit (tiling: %d) fails: %d\n",
+ tiling, fails);
+}
+
+/**
+ * SUBTEST: offset-control
+ * Description: check offset is kept on default simple allocator
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static void offset_control(struct buf_ops *bops)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ struct intel_buf *src, *dst1, *dst2, *dst3;
+ uint64_t poff_src, poff_dst1, poff_dst2;
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ src = create_buf(bops, WIDTH, HEIGHT, COLOR_CC);
+ dst1 = create_buf(bops, WIDTH, HEIGHT, COLOR_00);
+ dst2 = create_buf(bops, WIDTH, HEIGHT, COLOR_77);
+
+ intel_bb_add_object(ibb, src->handle, intel_buf_bo_size(src),
+ src->addr.offset, 0, false);
+ intel_bb_add_object(ibb, dst1->handle, intel_buf_bo_size(dst1),
+ dst1->addr.offset, 0, true);
+ intel_bb_add_object(ibb, dst2->handle, intel_buf_bo_size(dst2),
+ dst2->addr.offset, 0, true);
+
+ intel_bb_out(ibb, MI_BATCH_BUFFER_END);
+ intel_bb_ptr_align(ibb, 8);
+
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, false);
+
+ if (buf_info) {
+ print_buf(src, "src ");
+ print_buf(dst1, "dst1");
+ print_buf(dst2, "dst2");
+ }
+
+ poff_src = src->addr.offset;
+ poff_dst1 = dst1->addr.offset;
+ poff_dst2 = dst2->addr.offset;
+ intel_bb_reset(ibb, true);
+
+ dst3 = create_buf(bops, WIDTH, HEIGHT, COLOR_33);
+ intel_bb_add_object(ibb, dst3->handle, intel_buf_bo_size(dst3),
+ dst3->addr.offset, 0, true);
+ intel_bb_add_object(ibb, src->handle, intel_buf_bo_size(src),
+ src->addr.offset, 0, false);
+ intel_bb_add_object(ibb, dst1->handle, intel_buf_bo_size(dst1),
+ dst1->addr.offset, 0, true);
+ intel_bb_add_object(ibb, dst2->handle, intel_buf_bo_size(dst2),
+ dst2->addr.offset, 0, true);
+
+ intel_bb_out(ibb, MI_BATCH_BUFFER_END);
+ intel_bb_ptr_align(ibb, 8);
+
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, false);
+ intel_bb_sync(ibb);
+ intel_bb_reset(ibb, true);
+
+ igt_assert(poff_src == src->addr.offset);
+ igt_assert(poff_dst1 == dst1->addr.offset);
+ igt_assert(poff_dst2 == dst2->addr.offset);
+
+ if (buf_info) {
+ print_buf(src, "src ");
+ print_buf(dst1, "dst1");
+ print_buf(dst2, "dst2");
+ }
+
+ intel_buf_destroy(src);
+ intel_buf_destroy(dst1);
+ intel_buf_destroy(dst2);
+ intel_buf_destroy(dst3);
+ intel_bb_destroy(ibb);
+}
+
+/*
+ * Idea of the test is to verify delta is properly added to address
+ * when emit_reloc() is called.
+ */
+
+/**
+ * SUBTEST: delta-check
+ * Description: check delta is honoured in intel-bb pipelines
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+#define DELTA_BUFFERS 3
+static void delta_check(struct buf_ops *bops)
+{
+ const uint32_t expected = 0x1234abcd;
+ int xe = buf_ops_get_fd(bops);
+ uint32_t *ptr, hi, lo, val;
+ struct intel_buf *buf;
+ struct intel_bb *ibb;
+ uint64_t offset;
+ uint64_t obj_size = xe_get_default_alignment(xe) + 0x2000;
+ uint64_t obj_offset = (1ULL << 32) - xe_get_default_alignment(xe);
+ uint64_t delta = xe_get_default_alignment(xe) + 0x1000;
+
+ ibb = intel_bb_create_with_allocator(xe, 0, NULL, PAGE_SIZE,
+ INTEL_ALLOCATOR_SIMPLE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ buf = create_buf(bops, obj_size, 0x1, COLOR_CC);
+ buf->addr.offset = obj_offset;
+ intel_bb_add_object(ibb, buf->handle, intel_buf_bo_size(buf),
+ buf->addr.offset, 0, false);
+
+ intel_bb_out(ibb, MI_STORE_DWORD_IMM_GEN4);
+ intel_bb_emit_reloc(ibb, buf->handle,
+ I915_GEM_DOMAIN_RENDER,
+ I915_GEM_DOMAIN_RENDER,
+ delta, buf->addr.offset);
+ intel_bb_out(ibb, expected);
+
+ intel_bb_out(ibb, MI_BATCH_BUFFER_END);
+ intel_bb_ptr_align(ibb, 8);
+
+ intel_bb_exec(ibb, intel_bb_offset(ibb), I915_EXEC_DEFAULT, false);
+ intel_bb_sync(ibb);
+
+ /* Buffer should be @ obj_offset */
+ offset = intel_bb_get_object_offset(ibb, buf->handle);
+ igt_assert_eq_u64(offset, obj_offset);
+
+ ptr = xe_bo_map(xe, ibb->handle, ibb->size);
+ lo = ptr[1];
+ hi = ptr[2];
+ gem_munmap(ptr, ibb->size);
+
+ ptr = xe_bo_map(xe, buf->handle, intel_buf_size(buf));
+ val = ptr[delta / sizeof(uint32_t)];
+ gem_munmap(ptr, intel_buf_size(buf));
+
+ intel_buf_destroy(buf);
+ intel_bb_destroy(ibb);
+
+ /* Assert after all resources are freed */
+ igt_assert_f(lo == 0x1000 && hi == 0x1,
+ "intel-bb doesn't properly handle delta in emit relocation\n");
+ igt_assert_f(val == expected,
+ "Address doesn't contain expected [%x] value [%x]\n",
+ expected, val);
+}
+
+/**
+ * SUBTEST: full-batch
+ * Description: check bb totally filled is executing correct
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static void full_batch(struct buf_ops *bops)
+{
+ int xe = buf_ops_get_fd(bops);
+ struct intel_bb *ibb;
+ int i;
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ for (i = 0; i < PAGE_SIZE / sizeof(uint32_t) - 1; i++)
+ intel_bb_out(ibb, 0);
+ intel_bb_emit_bbe(ibb);
+
+ igt_assert(intel_bb_offset(ibb) == PAGE_SIZE);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ intel_bb_reset(ibb, false);
+
+ intel_bb_destroy(ibb);
+}
+
+/**
+ * SUBTEST: render
+ * Description: check intel-bb render pipeline
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+static int render(struct buf_ops *bops, uint32_t tiling,
+ uint32_t width, uint32_t height)
+{
+ struct intel_bb *ibb;
+ struct intel_buf src, dst, final;
+ int xe = buf_ops_get_fd(bops);
+ uint32_t fails = 0;
+ char name[128];
+ uint32_t devid = intel_get_drm_devid(xe);
+ igt_render_copyfunc_t render_copy = NULL;
+
+ igt_debug("%s() gen: %d\n", __func__, intel_gen(devid));
+
+ ibb = intel_bb_create(xe, PAGE_SIZE);
+
+ if (debug_bb)
+ intel_bb_set_debug(ibb, true);
+
+ if (print_base64)
+ intel_bb_set_dump_base64(ibb, true);
+
+ scratch_buf_init(bops, &src, width, height, I915_TILING_NONE,
+ I915_COMPRESSION_NONE);
+ scratch_buf_init(bops, &dst, width, height, tiling,
+ I915_COMPRESSION_NONE);
+ scratch_buf_init(bops, &final, width, height, I915_TILING_NONE,
+ I915_COMPRESSION_NONE);
+
+ scratch_buf_draw_pattern(bops, &src,
+ 0, 0, width, height,
+ 0, 0, width, height, 0);
+
+ render_copy = igt_get_render_copyfunc(devid);
+ igt_assert(render_copy);
+
+ render_copy(ibb,
+ &src,
+ 0, 0, width, height,
+ &dst,
+ 0, 0);
+
+ render_copy(ibb,
+ &dst,
+ 0, 0, width, height,
+ &final,
+ 0, 0);
+
+ intel_bb_sync(ibb);
+ intel_bb_destroy(ibb);
+
+ if (write_png) {
+ snprintf(name, sizeof(name) - 1,
+ "render_dst_tiling_%d.png", tiling);
+ intel_buf_write_to_png(&src, "render_src_tiling_none.png");
+ intel_buf_write_to_png(&dst, name);
+ intel_buf_write_to_png(&final, "render_final_tiling_none.png");
+ }
+
+ /* We'll fail on src <-> final compare so just warn */
+ if (tiling == I915_TILING_NONE) {
+ if (compare_bufs(&src, &dst, false) > 0)
+ igt_warn("%s: none->none failed!\n", __func__);
+ } else {
+ if (compare_bufs(&src, &dst, false) == 0)
+ igt_warn("%s: none->tiled failed!\n", __func__);
+ }
+
+ fails = compare_bufs(&src, &final, true);
+
+ if (fails && print_base64) {
+ dump_base64("src", &src);
+ dump_base64("dst", &dst);
+ dump_base64("final", &final);
+ }
+
+ intel_buf_close(bops, &src);
+ intel_buf_close(bops, &dst);
+ intel_buf_close(bops, &final);
+
+ igt_assert_f(fails == 0, "%s: (tiling: %d) fails: %d\n",
+ __func__, tiling, fails);
+
+ return fails;
+}
+
+static int opt_handler(int opt, int opt_index, void *data)
+{
+ switch (opt) {
+ case 'd':
+ debug_bb = true;
+ break;
+ case 'p':
+ write_png = true;
+ break;
+ case 'i':
+ buf_info = true;
+ break;
+ case 'b':
+ print_base64 = true;
+ break;
+ default:
+ return IGT_OPT_HANDLER_ERROR;
+ }
+
+ return IGT_OPT_HANDLER_SUCCESS;
+}
+
+const char *help_str =
+ " -d\tDebug bb\n"
+ " -p\tWrite surfaces to png\n"
+ " -i\tPrint buffer info\n"
+ " -b\tDump to base64 (bb and images)\n"
+ " -c n\tCalculate crc up to (1 << n)\n"
+ ;
+
+igt_main_args("dpib", NULL, help_str, opt_handler, NULL)
+{
+ int xe, i;
+ struct buf_ops *bops;
+ uint32_t width;
+
+ struct test {
+ uint32_t tiling;
+ const char *tiling_name;
+ } tests[] = {
+ { I915_TILING_NONE, "none" },
+ { I915_TILING_X, "x" },
+ { I915_TILING_Y, "y" },
+ };
+
+ igt_fixture {
+ xe = drm_open_driver(DRIVER_XE);
+ bops = buf_ops_create(xe);
+ xe_device_get(xe);
+ }
+
+ igt_describe("Ensure reset is possible on fresh bb");
+ igt_subtest("reset-bb")
+ reset_bb(bops);
+
+ igt_subtest_f("purge-bb")
+ purge_bb(bops);
+
+ igt_subtest("simple-bb")
+ simple_bb(bops, false);
+
+ igt_subtest("simple-bb-ctx")
+ simple_bb(bops, true);
+
+ igt_subtest("bb-with-allocator")
+ bb_with_allocator(bops);
+
+ igt_subtest("lot-of-buffers")
+ lot_of_buffers(bops);
+
+ igt_subtest("add-remove-objects")
+ add_remove_objects(bops);
+
+ igt_subtest("destroy-bb")
+ destroy_bb(bops);
+
+ igt_subtest_with_dynamic("create-in-region") {
+ uint64_t memreg = all_memory_regions(xe), region;
+
+ xe_for_each_mem_region(fd, memreg, region)
+ igt_dynamic_f("region-%s", xe_region_name(region))
+ create_in_region(bops, region);
+ }
+
+ igt_subtest("blit-simple")
+ blit(bops, INTEL_ALLOCATOR_SIMPLE);
+
+ igt_subtest("blit-reloc")
+ blit(bops, INTEL_ALLOCATOR_RELOC);
+
+ igt_subtest("intel-bb-blit-none")
+ do_intel_bb_blit(bops, 3, I915_TILING_NONE);
+
+ igt_subtest("intel-bb-blit-x")
+ do_intel_bb_blit(bops, 3, I915_TILING_X);
+
+ igt_subtest("intel-bb-blit-y") {
+ igt_require(intel_gen(intel_get_drm_devid(xe)) >= 6);
+ do_intel_bb_blit(bops, 3, I915_TILING_Y);
+ }
+
+ igt_subtest("offset-control")
+ offset_control(bops);
+
+ igt_subtest("delta-check")
+ delta_check(bops);
+
+ igt_subtest("full-batch")
+ full_batch(bops);
+
+ igt_subtest_with_dynamic("render") {
+ for (i = 0; i < ARRAY_SIZE(tests); i++) {
+ const struct test *t = &tests[i];
+
+ for (width = 512; width <= 1024; width += 512) {
+ igt_dynamic_f("render-%s-%u", t->tiling_name, width) {
+ render(bops, t->tiling, width, width);
+ }
+ }
+ }
+ }
+
+ igt_fixture {
+ xe_device_put(xe);
+ buf_ops_destroy(bops);
+ close(xe);
+ }
+}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 08/45] tests/xe-fast-feedback: Add xe_intel_bb test to BAT
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (6 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 07/45] tests/xe_intel_bb: Check if intel-bb Xe support correctness Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 09/45] lib/gpgpu_fill: Use RENDER engine flag to work on Xe Bhanuprakash Modem
` (40 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Verifies intel-bb integration with xe.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
tests/intel-ci/xe-fast-feedback.testlist | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tests/intel-ci/xe-fast-feedback.testlist b/tests/intel-ci/xe-fast-feedback.testlist
index 5db27c634..019804b57 100644
--- a/tests/intel-ci/xe-fast-feedback.testlist
+++ b/tests/intel-ci/xe-fast-feedback.testlist
@@ -1,6 +1,24 @@
# Should be the first test
igt@xe_module_load@load
+igt@xe_intel_bb@reset-bb
+igt@xe_intel_bb@purge-bb
+igt@xe_intel_bb@simple-bb
+igt@xe_intel_bb@simple-bb-ctx
+igt@xe_intel_bb@bb-with-allocator
+igt@xe_intel_bb@lot-of-buffers
+igt@xe_intel_bb@add-remove-objects
+igt@xe_intel_bb@destroy-bb
+igt@xe_intel_bb@create-in-region
+igt@xe_intel_bb@blit-simple
+igt@xe_intel_bb@blit-reloc
+igt@xe_intel_bb@intel-bb-blit-none
+igt@xe_intel_bb@intel-bb-blit-x
+igt@xe_intel_bb@intel-bb-blit-y
+igt@xe_intel_bb@offset-control
+igt@xe_intel_bb@delta-check
+igt@xe_intel_bb@full-batch
+igt@xe_intel_bb@render
igt@xe_compute@compute-square
igt@xe_debugfs@base
igt@xe_debugfs@gt
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 09/45] lib/gpgpu_fill: Use RENDER engine flag to work on Xe
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (7 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 08/45] tests/xe-fast-feedback: Add xe_intel_bb test to BAT Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 10/45] tests/xe_gpgpu_fill: Exercise gpgpu fill " Bhanuprakash Modem
` (39 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Using I915_EXEC_DEFAULT works fine for i915 selecting appropriate
command streamer. Unfortunately this cannot be used on Xe as it
requires explicit engine selection. Submitting gpgpu work on
render is fine so change to I915_EXEC_RENDER doesn't break i915
and allows run on valid engine on Xe.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
lib/gpgpu_fill.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
index 4f7bab68f..4db877514 100644
--- a/lib/gpgpu_fill.c
+++ b/lib/gpgpu_fill.c
@@ -288,7 +288,7 @@ __gen9_gpgpu_fillfunc(int i915,
intel_bb_ptr_align(ibb, 32);
intel_bb_exec(ibb, intel_bb_offset(ibb),
- I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ I915_EXEC_RENDER | I915_EXEC_NO_RELOC, true);
intel_bb_destroy(ibb);
}
@@ -329,7 +329,7 @@ __xehp_gpgpu_fillfunc(int i915,
intel_bb_ptr_align(ibb, 32);
intel_bb_exec(ibb, intel_bb_offset(ibb),
- I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, true);
+ I915_EXEC_RENDER | I915_EXEC_NO_RELOC, true);
intel_bb_destroy(ibb);
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 10/45] tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (8 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 09/45] lib/gpgpu_fill: Use RENDER engine flag to work on Xe Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 11/45] lib: Use i915 namespace for XE debugfs Bhanuprakash Modem
` (38 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reuse gpgpu fill already exercised on i915 on Xe.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
tests/intel-ci/xe-fast-feedback.testlist | 1 +
tests/meson.build | 1 +
tests/xe/xe_gpgpu_fill.c | 133 +++++++++++++++++++++++
3 files changed, 135 insertions(+)
create mode 100644 tests/xe/xe_gpgpu_fill.c
diff --git a/tests/intel-ci/xe-fast-feedback.testlist b/tests/intel-ci/xe-fast-feedback.testlist
index 019804b57..e3ebce70b 100644
--- a/tests/intel-ci/xe-fast-feedback.testlist
+++ b/tests/intel-ci/xe-fast-feedback.testlist
@@ -118,6 +118,7 @@ igt@xe_exec_threads@threads-mixed-fd-basic
igt@xe_exec_threads@threads-bal-mixed-basic
igt@xe_exec_threads@threads-bal-mixed-shared-vm-basic
igt@xe_exec_threads@threads-bal-mixed-fd-basic
+igt@xe_gpgpu_fill@basic
igt@xe_guc_pc@freq_basic_api
igt@xe_guc_pc@freq_fixed_idle
igt@xe_guc_pc@freq_range_idle
diff --git a/tests/meson.build b/tests/meson.build
index 3ec440710..a6642b9dc 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -253,6 +253,7 @@ xe_progs = [
'xe_exec_fault_mode',
'xe_exec_reset',
'xe_exec_threads',
+ 'xe_gpgpu_fill',
'xe_guc_pc',
'xe_huc_copy',
'xe_intel_bb',
diff --git a/tests/xe/xe_gpgpu_fill.c b/tests/xe/xe_gpgpu_fill.c
new file mode 100644
index 000000000..d9a932fde
--- /dev/null
+++ b/tests/xe/xe_gpgpu_fill.c
@@ -0,0 +1,133 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+/**
+ * TEST: Basic tests for gpgpu functionality
+ * Category: Software building block
+ * Sub-category: gpgpu
+ * Test category: functionality test
+ */
+
+#include <stdbool.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/ioctl.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+
+#include "drm.h"
+#include "i915/gem.h"
+#include "igt.h"
+#include "igt_collection.h"
+#include "intel_bufops.h"
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+
+#define WIDTH 64
+#define HEIGHT 64
+#define STRIDE (WIDTH)
+#define SIZE (HEIGHT*STRIDE)
+#define COLOR_C4 0xc4
+#define COLOR_4C 0x4c
+
+typedef struct {
+ int drm_fd;
+ uint32_t devid;
+ struct buf_ops *bops;
+} data_t;
+
+static struct intel_buf *
+create_buf(data_t *data, int width, int height, uint8_t color, uint64_t region)
+{
+ struct intel_buf *buf;
+ uint8_t *ptr;
+ int i;
+
+ buf = calloc(1, sizeof(*buf));
+ igt_assert(buf);
+
+ buf = intel_buf_create(data->bops, width/4, height, 32, 0,
+ I915_TILING_NONE, 0);
+
+ ptr = xe_bo_map(data->drm_fd, buf->handle, buf->surface[0].size);
+
+ for (i = 0; i < buf->surface[0].size; i++)
+ ptr[i] = color;
+
+ munmap(ptr, buf->surface[0].size);
+
+ return buf;
+}
+
+static void buf_check(uint8_t *ptr, int x, int y, uint8_t color)
+{
+ uint8_t val;
+
+ val = ptr[y * WIDTH + x];
+ igt_assert_f(val == color,
+ "Expected 0x%02x, found 0x%02x at (%d,%d)\n",
+ color, val, x, y);
+}
+
+/**
+ * SUBTEST: basic
+ * Description: run gpgpu fill
+ * Run type: FULL
+ * TODO: change ``'Run type' == FULL`` to a better category
+ */
+
+static void gpgpu_fill(data_t *data, igt_fillfunc_t fill, uint32_t region)
+{
+ struct intel_buf *buf;
+ uint8_t *ptr;
+ int i, j;
+
+ buf = create_buf(data, WIDTH, HEIGHT, COLOR_C4, region);
+ ptr = xe_bo_map(data->drm_fd, buf->handle, buf->surface[0].size);
+
+ for (i = 0; i < WIDTH; i++)
+ for (j = 0; j < HEIGHT; j++)
+ buf_check(ptr, i, j, COLOR_C4);
+
+ fill(data->drm_fd, buf, 0, 0, WIDTH / 2, HEIGHT / 2, COLOR_4C);
+
+ for (i = 0; i < WIDTH; i++)
+ for (j = 0; j < HEIGHT; j++)
+ if (i < WIDTH / 2 && j < HEIGHT / 2)
+ buf_check(ptr, i, j, COLOR_4C);
+ else
+ buf_check(ptr, i, j, COLOR_C4);
+
+ munmap(ptr, buf->surface[0].size);
+}
+
+igt_main
+{
+ data_t data = {0, };
+ igt_fillfunc_t fill_fn = NULL;
+
+ igt_fixture {
+ data.drm_fd = drm_open_driver_render(DRIVER_XE);
+ data.devid = intel_get_drm_devid(data.drm_fd);
+ data.bops = buf_ops_create(data.drm_fd);
+
+ fill_fn = igt_get_gpgpu_fillfunc(data.devid);
+ xe_device_get(data.drm_fd);
+ }
+
+ igt_subtest("basic") {
+ gpgpu_fill(&data, fill_fn, 0);
+ }
+
+ igt_fixture {
+ xe_device_put(data.drm_fd);
+ buf_ops_destroy(data.bops);
+ }
+}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 11/45] lib: Use i915 namespace for XE debugfs
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (9 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 10/45] tests/xe_gpgpu_fill: Exercise gpgpu fill " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 12/45] lib/igt_fb: Add copy engine support for XE Bhanuprakash Modem
` (37 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
As of now XE is going to use i915 namespace for their debugfs.
Example: i915_current_bpc is applicable for both i915 & XE
V2: - Rebase
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
---
lib/igt_kms.c | 4 ++--
lib/igt_psr.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 4b3eeffc7..a169b3288 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -5706,7 +5706,7 @@ unsigned int igt_get_pipe_current_bpc(int drmfd, enum pipe pipe)
fd = igt_debugfs_pipe_dir(drmfd, pipe, O_RDONLY);
igt_assert(fd >= 0);
- if (is_i915_device(drmfd))
+ if (is_intel_device(drmfd))
strcpy(debugfs_name, "i915_current_bpc");
else if (is_amdgpu_device(drmfd))
strcpy(debugfs_name, "amdgpu_current_bpc");
@@ -5828,7 +5828,7 @@ int igt_get_max_dotclock(int fd)
char *s;
int dir, res, max_dotclock = 0;
- if (!is_i915_device(fd))
+ if (!is_intel_device(fd))
return max_dotclock;
dir = igt_debugfs_dir(fd);
diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index a2d880312..13f7c567d 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -277,7 +277,7 @@ bool i915_psr2_selective_fetch_check(int drm_fd)
int debugfs_fd;
bool ret;
- if (!is_i915_device(drm_fd))
+ if (!is_intel_device(drm_fd))
return false;
debugfs_fd = igt_debugfs_dir(drm_fd);
@@ -303,7 +303,7 @@ bool i915_psr2_sel_fetch_to_psr1(int drm_fd)
int debugfs_fd;
bool ret = false;
- if (!is_i915_device(drm_fd))
+ if (!is_intel_device(drm_fd))
return ret;
debugfs_fd = igt_debugfs_dir(drm_fd);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 12/45] lib/igt_fb: Add copy engine support for XE
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (10 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 11/45] lib: Use i915 namespace for XE debugfs Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 13/45] lib/igt_draw: Add gpu draw routine " Bhanuprakash Modem
` (36 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add copy engine support for kms framebuffer mappings.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
lib/igt_fb.c | 30 ++++++++++++++++++++++++++----
lib/igt_fb.h | 2 ++
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 7379b99aa..28197cdc4 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -45,6 +45,7 @@
#include "igt_amd.h"
#include "igt_x86.h"
#include "igt_nouveau.h"
+#include "igt_syncobj.h"
#include "ioctl_wrappers.h"
#include "intel_batchbuffer.h"
#include "intel_chipset.h"
@@ -2489,12 +2490,13 @@ static bool blitter_ok(const struct igt_fb *fb)
static bool use_enginecopy(const struct igt_fb *fb)
{
- if (blitter_ok(fb))
+ if (!is_xe_device(fb->fd) && blitter_ok(fb))
return false;
return fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
is_ccs_modifier(fb->modifier) ||
- !gem_has_mappable_ggtt(fb->fd);
+ (is_xe_device(fb->fd) && fb->modifier == DRM_FORMAT_MOD_LINEAR) ||
+ (is_i915_device(fb->fd) && !gem_has_mappable_ggtt(fb->fd));
}
static bool use_blitter(const struct igt_fb *fb)
@@ -2504,7 +2506,7 @@ static bool use_blitter(const struct igt_fb *fb)
return fb->modifier == I915_FORMAT_MOD_Y_TILED ||
fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
- !gem_has_mappable_ggtt(fb->fd);
+ (is_i915_device(fb->fd) && !gem_has_mappable_ggtt(fb->fd));
}
static void init_buf_ccs(struct intel_buf *buf, int ccs_idx,
@@ -2701,7 +2703,7 @@ static void blitcopy(const struct igt_fb *dst_fb,
src_tiling = igt_fb_mod_to_tiling(src_fb->modifier);
dst_tiling = igt_fb_mod_to_tiling(dst_fb->modifier);
- if (!gem_has_relocations(dst_fb->fd)) {
+ if (is_i915_device(dst_fb->fd) && !gem_has_relocations(dst_fb->fd)) {
igt_require(gem_has_contexts(dst_fb->fd));
ctx = gem_context_create(dst_fb->fd);
ahnd = get_reloc_ahnd(dst_fb->fd, ctx);
@@ -2781,6 +2783,12 @@ static void free_linear_mapping(struct fb_blit_upload *blit)
} else if (is_nouveau_device(fd)) {
igt_nouveau_fb_blit(fb, &linear->fb);
igt_nouveau_delete_bo(&linear->fb);
+ } else if (is_xe_device(fd)) {
+ gem_munmap(linear->map, linear->fb.size);
+ copy_with_engine(blit, fb, &linear->fb);
+
+ syncobj_wait(fd, &blit->ibb->engine_syncobj, 1, INT64_MAX, 0, NULL);
+ gem_close(fd, linear->fb.gem_handle);
} else {
gem_munmap(linear->map, linear->fb.size);
gem_set_domain(fd, linear->fb.gem_handle,
@@ -2858,6 +2866,11 @@ static void setup_linear_mapping(struct fb_blit_upload *blit)
igt_nouveau_fb_blit(&linear->fb, fb);
linear->map = igt_nouveau_mmap_bo(&linear->fb, PROT_READ | PROT_WRITE);
+ } else if (is_xe_device(fd)) {
+ copy_with_engine(blit, &linear->fb, fb);
+
+ linear->map = xe_bo_mmap_ext(fd, linear->fb.gem_handle,
+ linear->fb.size, PROT_READ | PROT_WRITE);
} else {
/* Copy fb content to linear BO */
gem_set_domain(fd, linear->fb.gem_handle,
@@ -2915,6 +2928,9 @@ static void create_cairo_surface__gpu(int fd, struct igt_fb *fb)
*/
int igt_dirty_fb(int fd, struct igt_fb *fb)
{
+ if (fb->syncobj)
+ syncobj_wait(fd, &fb->syncobj, 1, INT64_MAX, 0, NULL);
+
return drmModeDirtyFB(fb->fd, fb->fb_id, NULL, 0);
}
@@ -2964,6 +2980,9 @@ static void *map_bo(int fd, struct igt_fb *fb)
PROT_READ | PROT_WRITE);
else if (is_nouveau_device(fd))
ptr = igt_nouveau_mmap_bo(fb, PROT_READ | PROT_WRITE);
+ else if (is_xe_device(fd))
+ ptr = xe_bo_mmap_ext(fd, fb->gem_handle,
+ fb->size, PROT_READ | PROT_WRITE);
else
igt_assert(false);
@@ -4248,6 +4267,9 @@ void igt_remove_fb(int fd, struct igt_fb *fb)
if (!fb || !fb->fb_id)
return;
+ if (fb->syncobj)
+ syncobj_destroy(fd, fb->syncobj);
+
cairo_surface_destroy(fb->cairo_surface);
do_or_die(drmModeRmFB(fd, fb->fb_id));
if (fb->is_dumb)
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 73bdfc866..a127a8128 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -62,6 +62,7 @@ typedef struct _igt_crc igt_crc_t;
* @fb_id: KMS ID of the framebuffer
* @fd: DRM device fd this framebuffer is created on
* @gem_handle: GEM handler of the underlying backing storage
+ * @syncobj: Syncobj to sync to for last drawing operation
* @is_dumb: Whether this framebuffer was allocated using the dumb buffer API
* @drm_format: DRM FOURCC code
* @width: width in pixels
@@ -84,6 +85,7 @@ typedef struct igt_fb {
uint32_t fb_id;
int fd;
uint32_t gem_handle;
+ uint32_t syncobj;
bool is_dumb;
uint32_t drm_format;
int width;
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 13/45] lib/igt_draw: Add gpu draw routine support for XE
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (11 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 12/45] lib/igt_fb: Add copy engine support for XE Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 14/45] tests/i915/kms_big_fb: Add XE support Bhanuprakash Modem
` (35 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add GPU blt, render & WC draw routine support for XE driver.
Credits-to: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
lib/igt_draw.c | 82 +++++++++++++++++++++++++++++++++++---------------
lib/igt_draw.h | 2 ++
2 files changed, 60 insertions(+), 24 deletions(-)
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index ac512fac5..1b793c0df 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -37,6 +37,8 @@
#include "i915/gem_create.h"
#include "i915/gem_mman.h"
#include "i915/intel_mocs.h"
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
#ifndef PAGE_ALIGN
#ifndef PAGE_SIZE
@@ -493,24 +495,29 @@ static void draw_rect_mmap_wc(int fd, struct buf_data *buf, struct rect *rect,
{
uint32_t *ptr;
- gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_GTT,
- I915_GEM_DOMAIN_GTT);
-
- /* We didn't implement suport for the older tiling methods yet. */
- if (tiling != I915_TILING_NONE)
- igt_require(intel_display_ver(intel_get_drm_devid(fd)) >= 5);
-
- if (gem_has_lmem(fd))
- ptr = gem_mmap_offset__fixed(fd, buf->handle, 0,
- PAGE_ALIGN(buf->size),
- PROT_READ | PROT_WRITE);
- else if (gem_has_legacy_mmap(fd))
- ptr = gem_mmap__wc(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
- PROT_READ | PROT_WRITE);
- else
- ptr = gem_mmap_offset__wc(fd, buf->handle, 0,
- PAGE_ALIGN(buf->size),
- PROT_READ | PROT_WRITE);
+ if (is_i915_device(fd)) {
+ gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_GTT,
+ I915_GEM_DOMAIN_GTT);
+
+ /* We didn't implement suport for the older tiling methods yet. */
+ if (tiling != I915_TILING_NONE)
+ igt_require(intel_display_ver(intel_get_drm_devid(fd)) >= 5);
+
+ if (gem_has_lmem(fd))
+ ptr = gem_mmap_offset__fixed(fd, buf->handle, 0,
+ PAGE_ALIGN(buf->size),
+ PROT_READ | PROT_WRITE);
+ else if (gem_has_legacy_mmap(fd))
+ ptr = gem_mmap__wc(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
+ PROT_READ | PROT_WRITE);
+ else
+ ptr = gem_mmap_offset__wc(fd, buf->handle, 0,
+ PAGE_ALIGN(buf->size),
+ PROT_READ | PROT_WRITE);
+ } else {
+ ptr = xe_bo_mmap_ext(fd, buf->handle, buf->size,
+ PROT_READ | PROT_WRITE);
+ }
switch (tiling) {
case I915_TILING_NONE:
@@ -663,11 +670,14 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
int gen = intel_gen(devid);
int pitch;
+ if (tiling)
+ igt_require_i915(fd);
+
dst = create_buf(fd, cmd_data->bops, buf, tiling);
ibb = intel_bb_create(fd, PAGE_SIZE);
intel_bb_add_intel_buf(ibb, dst, true);
- if (HAS_4TILE(intel_get_drm_devid(fd))) {
+ if (is_i915_device(fd) && HAS_4TILE(intel_get_drm_devid(fd))) {
int buf_height = buf->size / buf->stride;
switch (buf->bpp) {
@@ -772,11 +782,21 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
/* We create a temporary buffer and copy from it using rendercopy. */
tmp.size = rect->w * rect->h * pixel_size;
- tmp.handle = gem_create(fd, tmp.size);
+ if (is_i915_device(fd))
+ tmp.handle = gem_create(fd, tmp.size);
+ else
+ tmp.handle = xe_bo_create_flags(fd, 0,
+ ALIGN(tmp.size, xe_get_default_alignment(fd)),
+ vram_if_possible(fd, 0));
+
tmp.stride = rect->w * pixel_size;
tmp.bpp = buf->bpp;
- draw_rect_mmap_cpu(fd, &tmp, &(struct rect){0, 0, rect->w, rect->h},
- I915_TILING_NONE, I915_BIT_6_SWIZZLE_NONE, color);
+ if (is_i915_device(fd))
+ draw_rect_mmap_cpu(fd, &tmp, &(struct rect){0, 0, rect->w, rect->h},
+ I915_TILING_NONE, I915_BIT_6_SWIZZLE_NONE, color);
+ else
+ draw_rect_mmap_wc(fd, &tmp, &(struct rect){0, 0, rect->w, rect->h},
+ I915_TILING_NONE, I915_BIT_6_SWIZZLE_NONE, color);
src = create_buf(fd, cmd_data->bops, &tmp, I915_TILING_NONE);
dst = create_buf(fd, cmd_data->bops, buf, tiling);
@@ -904,7 +924,21 @@ void igt_draw_rect_fb(int fd, struct buf_ops *bops,
void igt_draw_fill_fb(int fd, struct igt_fb *fb, uint32_t color)
{
igt_draw_rect_fb(fd, NULL, 0, fb,
- gem_has_mappable_ggtt(fd) ? IGT_DRAW_MMAP_GTT :
- IGT_DRAW_MMAP_WC,
+ igt_draw_supports_method(fd, IGT_DRAW_MMAP_GTT) ?
+ IGT_DRAW_MMAP_GTT : IGT_DRAW_MMAP_WC,
0, 0, fb->width, fb->height, color);
}
+
+bool igt_draw_supports_method(int fd, enum igt_draw_method method)
+{
+ if (method == IGT_DRAW_MMAP_GTT)
+ return is_i915_device(fd) && gem_has_mappable_ggtt(fd);
+
+ if (method == IGT_DRAW_MMAP_WC)
+ return (is_i915_device(fd) && gem_mmap__has_wc(fd)) || is_xe_device(fd);
+
+ if (method == IGT_DRAW_MMAP_CPU || method == IGT_DRAW_PWRITE)
+ return is_i915_device(fd);
+
+ return true;
+}
diff --git a/lib/igt_draw.h b/lib/igt_draw.h
index 2d18ef6c9..fe7531b79 100644
--- a/lib/igt_draw.h
+++ b/lib/igt_draw.h
@@ -50,6 +50,8 @@ enum igt_draw_method {
const char *igt_draw_get_method_name(enum igt_draw_method method);
+bool igt_draw_supports_method(int fd, enum igt_draw_method method);
+
void igt_draw_rect(int fd, struct buf_ops *bops, uint32_t ctx,
uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,
uint32_t tiling, enum igt_draw_method method,
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 14/45] tests/i915/kms_big_fb: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (12 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 13/45] lib/igt_draw: Add gpu draw routine " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 15/45] tests/i915/kms_big_joiner: " Bhanuprakash Modem
` (34 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_big_fb.c | 75 ++++++++++++++++++++++++++++++++---------
1 file changed, 60 insertions(+), 15 deletions(-)
diff --git a/tests/i915/kms_big_fb.c b/tests/i915/kms_big_fb.c
index a29a05a28..9c7673de9 100644
--- a/tests/i915/kms_big_fb.c
+++ b/tests/i915/kms_big_fb.c
@@ -28,6 +28,8 @@
#include <string.h>
#include "i915/gem_create.h"
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
IGT_TEST_DESCRIPTION("Test big framebuffers");
@@ -98,10 +100,12 @@ static void copy_pattern(data_t *data,
src = init_buf(data, src_fb, "big fb src");
dst = init_buf(data, dst_fb, "big fb dst");
- gem_set_domain(data->drm_fd, dst_fb->gem_handle,
- I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
- gem_set_domain(data->drm_fd, src_fb->gem_handle,
- I915_GEM_DOMAIN_GTT, 0);
+ if (is_i915_device(data->drm_fd)) {
+ gem_set_domain(data->drm_fd, dst_fb->gem_handle,
+ I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
+ gem_set_domain(data->drm_fd, src_fb->gem_handle,
+ I915_GEM_DOMAIN_GTT, 0);
+ }
/*
* We expect the kernel to limit the max fb
@@ -632,7 +636,7 @@ test_size_overflow(data_t *data)
data->modifier));
/*
- * Try to hit a specific integer overflow in i915 fb size
+ * Try to hit a specific integer overflow in intel fb size
* calculations. 256k * 16k == 1<<32 which is checked
* against the bo size. The check should fail on account
* of the bo being smaller, but due to the overflow the
@@ -641,8 +645,13 @@ test_size_overflow(data_t *data)
igt_require(data->max_fb_width >= 16383 &&
data->max_fb_height >= 16383);
- bo = gem_buffer_create_fb_obj(data->drm_fd, (1ULL << 32) - 4096);
-
+ if (is_i915_device(data->drm_fd))
+ bo = gem_buffer_create_fb_obj(data->drm_fd, (1ULL << 32) - 4096);
+ else
+ bo = xe_bo_create_flags(data->drm_fd, 0,
+ ALIGN(((1ULL << 32) - 4096),
+ xe_get_default_alignment(data->drm_fd)),
+ vram_if_possible(data->drm_fd, 0));
igt_require(bo);
ret = __kms_addfb(data->drm_fd, bo,
@@ -671,7 +680,7 @@ test_size_offset_overflow(data_t *data)
data->modifier));
/*
- * Try to hit a specific integer overflow in i915 fb size
+ * Try to hit a specific integer overflow in intel fb size
* calculations. This time it's offsets[1] + the tile
* aligned chroma plane size that overflows and
* incorrectly passes the bo size check.
@@ -680,7 +689,13 @@ test_size_offset_overflow(data_t *data)
DRM_FORMAT_NV12,
data->modifier));
- bo = gem_buffer_create_fb_obj(data->drm_fd, (1ULL << 32) - 4096);
+ if (is_i915_device(data->drm_fd))
+ bo = gem_buffer_create_fb_obj(data->drm_fd, (1ULL << 32) - 4096);
+ else
+ bo = xe_bo_create_flags(data->drm_fd, 0,
+ ALIGN(((1ULL << 32) - 4096),
+ xe_get_default_alignment(data->drm_fd)),
+ vram_if_possible(data->drm_fd, 0));
igt_require(bo);
offsets[0] = 0;
@@ -739,10 +754,15 @@ test_addfb(data_t *data)
format, data->modifier,
&size, &strides[0]);
- bo = gem_buffer_create_fb_obj(data->drm_fd, size);
+ if (is_i915_device(data->drm_fd))
+ bo = gem_buffer_create_fb_obj(data->drm_fd, size);
+ else
+ bo = xe_bo_create_flags(data->drm_fd, 0,
+ ALIGN(size, xe_get_default_alignment(data->drm_fd)),
+ vram_if_possible(data->drm_fd, 0));
igt_require(bo);
- if (intel_display_ver(data->devid) < 4)
+ if (is_i915_device(data->drm_fd) && intel_display_ver(data->devid) < 4)
gem_set_tiling(data->drm_fd, bo,
igt_fb_mod_to_tiling(data->modifier), strides[0]);
@@ -838,9 +858,9 @@ igt_main
igt_fixture {
drmModeResPtr res;
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
- igt_require(is_i915_device(data.drm_fd));
+ igt_require(is_intel_device(data.drm_fd));
data.devid = intel_get_drm_devid(data.drm_fd);
@@ -862,7 +882,11 @@ igt_main
data.max_fb_width, data.max_fb_height);
data.ram_size = igt_get_total_ram_mb() << 20;
- data.aper_size = gem_aperture_size(data.drm_fd);
+
+ if (is_i915_device(data.drm_fd))
+ data.aper_size = gem_aperture_size(data.drm_fd);
+ else
+ data.aper_size = (1ULL << xe_va_bits(data.drm_fd));
data.mappable_size = gem_mappable_aperture_size(data.drm_fd);
igt_info("RAM: %"PRIu64" MiB, GPU address space: %"PRId64" MiB, GGTT mappable size: %"PRId64" MiB\n",
@@ -899,6 +923,10 @@ igt_main
for (int i = 1; i < ARRAY_SIZE(modifiers); i++) {
igt_subtest_f("%s-addfb-size-overflow",
modifiers[i].name) {
+ /* No tiling support in XE. */
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ modifiers[i].modifier != DRM_FORMAT_MOD_LINEAR);
+
data.modifier = modifiers[i].modifier;
test_size_overflow(&data);
}
@@ -908,6 +936,10 @@ igt_main
for (int i = 1; i < ARRAY_SIZE(modifiers); i++) {
igt_subtest_f("%s-addfb-size-offset-overflow",
modifiers[i].name) {
+ /* No tiling support in XE. */
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ modifiers[i].modifier != DRM_FORMAT_MOD_LINEAR);
+
data.modifier = modifiers[i].modifier;
test_size_offset_overflow(&data);
}
@@ -916,6 +948,10 @@ igt_main
igt_describe("Sanity check if addfb ioctl works correctly for given size and strides of fb");
for (int i = 0; i < ARRAY_SIZE(modifiers); i++) {
igt_subtest_f("%s-addfb", modifiers[i].name) {
+ /* No tiling support in XE. */
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ modifiers[i].modifier != DRM_FORMAT_MOD_LINEAR);
+
data.modifier = modifiers[i].modifier;
test_addfb(&data);
}
@@ -933,8 +969,13 @@ igt_main
igt_describe("Sanity check if addfb ioctl works correctly for given "
"combination of modifier formats and rotation");
igt_subtest_f("%s-%dbpp-rotate-%d", modifiers[i].name,
- formats[j].bpp, rotations[k].angle)
+ formats[j].bpp, rotations[k].angle) {
+ /* No tiling support in XE. */
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ data.modifier != DRM_FORMAT_MOD_LINEAR);
+
test_scanout(&data);
+ }
}
igt_fixture
@@ -976,6 +1017,10 @@ igt_main
igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 5);
data.max_hw_fb_width = min(data.hw_stride / (formats[j].bpp >> 3), data.max_fb_width);
+ /* No tiling support in XE. */
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ modifiers[i].modifier != DRM_FORMAT_MOD_LINEAR);
+
test_scanout(&data);
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 15/45] tests/i915/kms_big_joiner: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (13 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 14/45] tests/i915/kms_big_fb: Add XE support Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 16/45] tests/i915/kms_cdclk: " Bhanuprakash Modem
` (33 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_big_joiner.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/i915/kms_big_joiner.c b/tests/i915/kms_big_joiner.c
index 8be60ea11..b9dda58f6 100644
--- a/tests/i915/kms_big_joiner.c
+++ b/tests/i915/kms_big_joiner.c
@@ -188,7 +188,7 @@ igt_main
enum pipe pipe_seq[IGT_MAX_PIPES];
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
kmstest_set_vt_graphics_mode();
igt_display_require(&data.display, data.drm_fd);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 16/45] tests/i915/kms_cdclk: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (14 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 15/45] tests/i915/kms_big_joiner: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-21 9:47 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 17/45] tests/i915/kms_draw_crc: " Bhanuprakash Modem
` (32 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_cdclk.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/i915/kms_cdclk.c b/tests/i915/kms_cdclk.c
index bb0036802..0f9b8dc58 100644
--- a/tests/i915/kms_cdclk.c
+++ b/tests/i915/kms_cdclk.c
@@ -65,6 +65,9 @@ static int get_current_cdclk_freq(int debugfs_fd)
* Display specific clock frequency info is moved to i915_cdclk_info,
* On older kernels if this debugfs is not found, fallback to read from
* i915_frequency_info.
+ *
+ * FIXME: As of now, XE debugfs is still using i915 namespace, once the
+ * Kernel changes are landed, update this to use the XE specific debugfs.
*/
res = igt_debugfs_simple_read(debugfs_fd, "i915_cdclk_info",
buf, sizeof(buf));
@@ -368,7 +371,7 @@ igt_main
data_t data = {};
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
igt_require(data.drm_fd >= 0);
data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
igt_require(data.debugfs_fd);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 17/45] tests/i915/kms_draw_crc: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (15 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 16/45] tests/i915/kms_cdclk: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 18/45] tests/i915/kms_dsc: " Bhanuprakash Modem
` (31 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for differnt draw methods.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_draw_crc.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/tests/i915/kms_draw_crc.c b/tests/i915/kms_draw_crc.c
index 3a3cd99a0..db6d71f2e 100644
--- a/tests/i915/kms_draw_crc.c
+++ b/tests/i915/kms_draw_crc.c
@@ -149,8 +149,8 @@ static void draw_method_subtest(enum igt_draw_method method,
* comparison. Cache the value so we don't recompute it for every single
* subtest. */
if (!base_crcs[format_index].set) {
- get_method_crc(gem_has_mappable_ggtt(drm_fd) ? IGT_DRAW_MMAP_GTT :
- IGT_DRAW_MMAP_WC,
+ get_method_crc(igt_draw_supports_method(drm_fd, IGT_DRAW_MMAP_GTT) ?
+ IGT_DRAW_MMAP_GTT : IGT_DRAW_MMAP_WC,
formats[format_index],
DRM_FORMAT_MOD_LINEAR,
&base_crcs[format_index].crc);
@@ -195,8 +195,8 @@ static void fill_fb_subtest(void)
igt_plane_set_fb(primary, &fb);
igt_draw_rect_fb(drm_fd, bops, 0, &fb,
- gem_has_mappable_ggtt(drm_fd) ? IGT_DRAW_MMAP_GTT :
- IGT_DRAW_MMAP_WC,
+ igt_draw_supports_method(drm_fd, IGT_DRAW_MMAP_GTT) ?
+ IGT_DRAW_MMAP_GTT : IGT_DRAW_MMAP_WC,
0, 0, fb.width, fb.height, 0xFF);
rc = igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
@@ -222,7 +222,7 @@ static void fill_fb_subtest(void)
static void setup_environment(void)
{
- drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
igt_require(drm_fd >= 0);
igt_display_require(&display, drm_fd);
igt_display_require_output(&display);
@@ -289,13 +289,17 @@ igt_main
"method (%s) with different modifiers & DRM formats.",
igt_draw_get_method_name(method));
igt_subtest_with_dynamic_f("draw-method-%s", igt_draw_get_method_name(method)) {
- igt_skip_on(method == IGT_DRAW_MMAP_WC && !gem_mmap__has_wc(drm_fd));
- igt_skip_on(method == IGT_DRAW_MMAP_GTT && !gem_has_mappable_ggtt(drm_fd));
+ if (!igt_draw_supports_method(drm_fd, method))
+ continue;
- for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
- for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
- modifier = modifiers[modifier_idx];
+ for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
+ modifier = modifiers[modifier_idx];
+ /* No tiling support in XE. */
+ if (is_xe_device(drm_fd) && modifier != DRM_FORMAT_MOD_LINEAR)
+ continue;
+
+ for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
if (!igt_display_has_format_mod(&display, formats[format_idx], modifier))
continue;
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 18/45] tests/i915/kms_dsc: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (16 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 17/45] tests/i915/kms_draw_crc: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-21 9:51 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 19/45] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
` (30 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_dsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index cf34dc8a8..c4dfc9251 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -212,7 +212,7 @@ igt_main
data_t data = {};
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.devid = intel_get_drm_devid(data.drm_fd);
data.disp_ver = intel_display_ver(data.devid);
kmstest_set_vt_graphics_mode();
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 19/45] tests/i915/kms_flip_scaled_crc: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (17 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 18/45] tests/i915/kms_dsc: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-21 8:07 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 20/45] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
` (29 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_flip_scaled_crc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/i915/kms_flip_scaled_crc.c b/tests/i915/kms_flip_scaled_crc.c
index 7f7a59b93..f5dc430e3 100644
--- a/tests/i915/kms_flip_scaled_crc.c
+++ b/tests/i915/kms_flip_scaled_crc.c
@@ -623,7 +623,7 @@ igt_main
drmModeModeInfoPtr modetoset = NULL;
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.gen = intel_display_ver(intel_get_drm_devid(data.drm_fd));
igt_require(data.gen >= 9);
igt_display_require(&data.display, data.drm_fd);
@@ -644,6 +644,12 @@ igt_main
for (int index = 0; index < ARRAY_SIZE(flip_scenario_test); index++) {
igt_describe(flip_scenario_test[index].describe);
igt_subtest_with_dynamic(flip_scenario_test[index].name) {
+ /* No tiling support in XE. */
+ if (is_xe_device(data.drm_fd) &&
+ (flip_scenario_test[index].firstmodifier != DRM_FORMAT_MOD_LINEAR ||
+ flip_scenario_test[index].secondmodifier != DRM_FORMAT_MOD_LINEAR))
+ continue;
+
free_fbs(&data);
for_each_pipe(&data.display, pipe) {
bool found = false;
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 20/45] tests/i915/kms_flip_tiling: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (18 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 19/45] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-21 9:57 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 21/45] tests/i915/kms_mmap_write_crc: " Bhanuprakash Modem
` (28 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_flip_tiling.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/i915/kms_flip_tiling.c b/tests/i915/kms_flip_tiling.c
index 4cc063f63..a22f12382 100644
--- a/tests/i915/kms_flip_tiling.c
+++ b/tests/i915/kms_flip_tiling.c
@@ -177,7 +177,7 @@ igt_output_t *output;
igt_main
{
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.gen = intel_display_ver(intel_get_drm_devid(data.drm_fd));
data.testformat = DRM_FORMAT_XRGB8888;
@@ -217,6 +217,12 @@ igt_main
if (plane->formats[j] != data.testformat)
continue;
+ /* No tiling support in XE. */
+ if (is_xe_device(data.drm_fd) &&
+ (plane->modifiers[i] != DRM_FORMAT_MOD_LINEAR ||
+ plane->modifiers[j] != DRM_FORMAT_MOD_LINEAR))
+ continue;
+
igt_dynamic_f("%s-pipe-%s-%s-to-%s",
igt_output_name(output),
kmstest_pipe_name(pipe),
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 21/45] tests/i915/kms_mmap_write_crc: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (19 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 20/45] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 22/45] tests/i915/kms_psr*: " Bhanuprakash Modem
` (27 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_mmap_write_crc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c
index 4f7a86bf4..bc51975f6 100644
--- a/tests/i915/kms_mmap_write_crc.c
+++ b/tests/i915/kms_mmap_write_crc.c
@@ -102,7 +102,7 @@ static void test(data_t *data)
igt_plane_set_fb(data->primary, &data->fb[0]);
igt_display_commit(display);
- if (!gem_has_lmem(data->drm_fd)) {
+ if (is_i915_device(data->drm_fd) && !gem_has_lmem(data->drm_fd)) {
uint32_t caching;
/* make sure caching mode has become UC/WT */
@@ -259,7 +259,7 @@ igt_main_args("n", NULL, NULL, opt_handler, NULL)
enum pipe pipe;
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.devid = intel_get_drm_devid(data.drm_fd);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 22/45] tests/i915/kms_psr*: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (20 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 21/45] tests/i915/kms_mmap_write_crc: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 23/45] tests/kms_3d: " Bhanuprakash Modem
` (26 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
V2: - Fix unknown subtest error on CI
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_psr.c | 40 +++++++++++++++++++++++++++-----
tests/i915/kms_psr2_sf.c | 2 +-
tests/i915/kms_psr2_su.c | 2 +-
tests/i915/kms_psr_stress_test.c | 2 +-
4 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/tests/i915/kms_psr.c b/tests/i915/kms_psr.c
index 3efe1faec..4565acd8a 100644
--- a/tests/i915/kms_psr.c
+++ b/tests/i915/kms_psr.c
@@ -29,6 +29,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
+#include "xe/xe_ioctl.h"
enum operations {
PAGE_FLIP,
@@ -181,7 +182,8 @@ static void fill_blt(data_t *data, const struct igt_fb *fb, unsigned char color)
intel_bb_destroy(ibb);
intel_buf_destroy(dst);
- gem_bo_busy(data->drm_fd, fb->gem_handle);
+ if (is_i915_device(data->drm_fd))
+ gem_bo_busy(data->drm_fd, fb->gem_handle);
}
static void fill_render(data_t *data, const struct igt_fb *fb,
@@ -204,7 +206,16 @@ static void fill_render(data_t *data, const struct igt_fb *fb,
src = intel_buf_create(data->bops, width, height, fb->plane_bpp[0],
0, tiling, 0);
- gem_write(data->drm_fd, src->handle, 0, buf, 4);
+
+ if (is_i915_device(data->drm_fd)) {
+ gem_write(data->drm_fd, src->handle, 0, buf, 4);
+ } else {
+ void *map = xe_bo_mmap_ext(data->drm_fd, src->handle, 4,
+ PROT_READ | PROT_WRITE);
+
+ memcpy(map, buf, 4);
+ gem_munmap(map, 4);
+ }
rendercopy(ibb,
src, 0, 0, 0xff, 0xff,
@@ -214,7 +225,8 @@ static void fill_render(data_t *data, const struct igt_fb *fb,
intel_buf_destroy(src);
intel_buf_destroy(dst);
- gem_bo_busy(data->drm_fd, fb->gem_handle);
+ if (is_i915_device(data->drm_fd))
+ gem_bo_busy(data->drm_fd, fb->gem_handle);
}
static bool sink_support(data_t *data, enum psr_mode mode)
@@ -256,6 +268,11 @@ static bool drrs_disabled(data_t *data)
{
char buf[512];
+ /*
+ * FIXME: As of now, XE's debugfs is using i915 namespace, once Kernel
+ * changes got landed, please update this logic to use XE specific
+ * debugfs.
+ */
igt_debugfs_simple_read(data->debugfs_fd, "i915_drrs_status",
buf, sizeof(buf));
@@ -388,7 +405,8 @@ static void setup_test_plane(data_t *data, int test_plane)
igt_create_color_fb(data->drm_fd,
data->mode->hdisplay, data->mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_FORMAT_MOD_X_TILED,
+ is_i915_device(data->drm_fd) ?
+ I915_FORMAT_MOD_X_TILED : DRM_FORMAT_MOD_LINEAR,
0.0, 1.0, 0.0,
&data->fb_green);
@@ -416,7 +434,8 @@ static void setup_test_plane(data_t *data, int test_plane)
igt_create_color_fb(data->drm_fd,
white_h, white_v,
DRM_FORMAT_XRGB8888,
- I915_FORMAT_MOD_X_TILED,
+ is_i915_device(data->drm_fd) ?
+ I915_FORMAT_MOD_X_TILED : DRM_FORMAT_MOD_LINEAR,
1.0, 1.0, 1.0,
&data->fb_white);
break;
@@ -510,7 +529,7 @@ igt_main_args("", long_options, help_str, opt_handler, &data)
};
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
kmstest_set_vt_graphics_mode();
data.devid = intel_get_drm_devid(data.drm_fd);
@@ -547,6 +566,9 @@ igt_main_args("", long_options, help_str, opt_handler, &data)
igt_subtest_f("%sprimary_%s",
append_subtest_name[data.op_psr_mode],
op_str(op)) {
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ (op == MMAP_CPU || op == MMAP_GTT));
+
data.op = op;
data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
test_setup(&data);
@@ -561,6 +583,9 @@ igt_main_args("", long_options, help_str, opt_handler, &data)
igt_subtest_f("%ssprite_%s",
append_subtest_name[data.op_psr_mode],
op_str(op)) {
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ (op == MMAP_CPU || op == MMAP_GTT));
+
data.op = op;
data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
test_setup(&data);
@@ -573,6 +598,9 @@ igt_main_args("", long_options, help_str, opt_handler, &data)
igt_subtest_f("%scursor_%s",
append_subtest_name[data.op_psr_mode],
op_str(op)) {
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ (op == MMAP_CPU || op == MMAP_GTT));
+
data.op = op;
data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
test_setup(&data);
diff --git a/tests/i915/kms_psr2_sf.c b/tests/i915/kms_psr2_sf.c
index ffaae68b3..4cf986440 100644
--- a/tests/i915/kms_psr2_sf.c
+++ b/tests/i915/kms_psr2_sf.c
@@ -898,7 +898,7 @@ igt_main
igt_fixture {
drmModeResPtr res;
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
kmstest_set_vt_graphics_mode();
diff --git a/tests/i915/kms_psr2_su.c b/tests/i915/kms_psr2_su.c
index 3e0a78f24..65e67b8c9 100644
--- a/tests/i915/kms_psr2_su.c
+++ b/tests/i915/kms_psr2_su.c
@@ -297,7 +297,7 @@ igt_main
igt_fixture {
struct itimerspec interval;
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
kmstest_set_vt_graphics_mode();
diff --git a/tests/i915/kms_psr_stress_test.c b/tests/i915/kms_psr_stress_test.c
index 26e222a27..a4cb3194e 100644
--- a/tests/i915/kms_psr_stress_test.c
+++ b/tests/i915/kms_psr_stress_test.c
@@ -331,7 +331,7 @@ igt_main
data_t data = {};
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
data.bops = buf_ops_create(data.drm_fd);
kmstest_set_vt_graphics_mode();
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 23/45] tests/kms_3d: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (21 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 22/45] tests/i915/kms_psr*: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 24/45] tests/kms_async_flips: No " Bhanuprakash Modem
` (25 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_3d.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/kms_3d.c b/tests/kms_3d.c
index c6bef67c1..437c8a481 100644
--- a/tests/kms_3d.c
+++ b/tests/kms_3d.c
@@ -23,6 +23,7 @@
*/
#include "igt.h"
+#include "xe/xe_query.h"
IGT_TEST_DESCRIPTION("Tests 3D mode setting.");
@@ -36,6 +37,9 @@ igt_simple_main
drm_fd = drm_open_driver_master(DRIVER_ANY);
+ if (is_xe_device(drm_fd))
+ xe_device_get(drm_fd);
+
res = drmModeGetResources(drm_fd);
igt_require(res);
@@ -111,5 +115,9 @@ igt_simple_main
kmstest_force_edid(drm_fd, connector, NULL);
drmModeFreeConnector(connector);
+
+ if (is_xe_device(drm_fd))
+ xe_device_put(drm_fd);
+
close(drm_fd);
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 24/45] tests/kms_async_flips: No XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (22 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 23/45] tests/kms_3d: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-21 9:15 ` Karthik B S
2023-04-18 16:44 ` [igt-dev] [i-g-t 25/45] tests/kms_atomic_transition: Add " Bhanuprakash Modem
` (24 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Async flips won't work with linear buffers on Intel hardware,
hence don't run tests on XE device as XE won't support tiling.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_async_flips.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index 1e6506e3d..51ffa523a 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -592,7 +592,13 @@ igt_main_args("e", NULL, help_str, opt_handler, &data)
int i;
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+ /*
+ * FIXME: As of now, Async flips won't work with linear buffers
+ * on Intel hardware, hence don't run tests on XE device as XE
+ * won't support tiling.
+ * Once Kernel changes got landed, please update this logic.
+ */
+ data.drm_fd = drm_open_driver_master(DRIVER_ANY & ~DRIVER_XE);
kmstest_set_vt_graphics_mode();
igt_display_require(&data.display, data.drm_fd);
igt_display_require_output(&data.display);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 25/45] tests/kms_atomic_transition: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (23 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 24/45] tests/kms_async_flips: No " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 26/45] tests/color: " Bhanuprakash Modem
` (23 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_atomic_transition.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 7c7be578c..9f39d033d 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -136,7 +136,7 @@ static bool skip_plane(data_t *data, igt_plane_t *plane)
if (data->extended)
return false;
- if (!is_i915_device(data->drm_fd))
+ if (!is_intel_device(data->drm_fd))
return false;
if (plane->type == DRM_PLANE_TYPE_CURSOR)
@@ -848,7 +848,7 @@ retry:
/* count enable pipes to set max iteration */
j += 1;
- if (is_i915_device(data->drm_fd))
+ if (is_intel_device(data->drm_fd))
data->pipe_crcs[i] = igt_pipe_crc_new(data->drm_fd, i,
IGT_PIPE_CRC_SOURCE_AUTO);
@@ -943,7 +943,7 @@ retry:
commit_display(data, i, nonblocking);
collect_crcs_mask(data->pipe_crcs, i, crcs[4]);
- if (!is_i915_device(data->drm_fd))
+ if (!is_intel_device(data->drm_fd))
continue;
for (int k = 0; k < IGT_MAX_PIPES; k++) {
@@ -996,7 +996,7 @@ static void run_modeset_transition(data_t *data, int requested_outputs, bool non
unset_output_pipe(&data->display);
igt_display_commit2(&data->display, COMMIT_ATOMIC);
- if (is_i915_device(data->drm_fd)) {
+ if (is_intel_device(data->drm_fd)) {
for_each_pipe(&data->display, pipe)
igt_pipe_crc_free(data->pipe_crcs[pipe]);
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 26/45] tests/color: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (24 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 25/45] tests/kms_atomic_transition: Add " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-24 8:00 ` [igt-dev] [i-g-t,26/45] " Joshi, Kunal1
2023-04-18 16:44 ` [igt-dev] [i-g-t 27/45] tests/kms_concurrent: " Bhanuprakash Modem
` (22 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/chamelium/kms_chamelium_color.c | 2 +-
tests/kms_color.c | 10 +++++-----
tests/kms_color_helper.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/chamelium/kms_chamelium_color.c b/tests/chamelium/kms_chamelium_color.c
index b7c84ae4d..26239a6b8 100644
--- a/tests/chamelium/kms_chamelium_color.c
+++ b/tests/chamelium/kms_chamelium_color.c
@@ -680,7 +680,7 @@ igt_main
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
- if (is_i915_device(data.drm_fd))
+ if (is_intel_device(data.drm_fd))
data.devid = intel_get_drm_devid(data.drm_fd);
igt_display_require(&data.display, data.drm_fd);
diff --git a/tests/kms_color.c b/tests/kms_color.c
index cd03c1354..fdc7120c7 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -499,11 +499,11 @@ static bool test_pipe_ctm(data_t *data,
disable_gamma(primary->pipe);
/*
- * Only program LUT's for i915, but not for max CTM as limitation of
+ * Only program LUT's for intel, but not for max CTM as limitation of
* representing intermediate values between 0 and 1.0 causes
* rounding issues and inaccuracies leading to crc mismatch.
*/
- if (is_i915_device(data->drm_fd) && memcmp(before, after, sizeof(color_t))) {
+ if (is_intel_device(data->drm_fd) && memcmp(before, after, sizeof(color_t))) {
igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
@@ -813,7 +813,7 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
0.0, 1.0, 0.0,
1.0, 0.0, 1.0 };
- if (is_i915_device(data->drm_fd))
+ if (is_intel_device(data->drm_fd))
igt_require_f((intel_display_ver(data->devid) >= 11),
"At least GEN 11 is required to validate Deep-color.\n");
@@ -833,7 +833,7 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
igt_output_set_prop_value(output, IGT_CONNECTOR_MAX_BPC, 10);
igt_output_set_pipe(output, p);
- if (is_i915_device(data->drm_fd) &&
+ if (is_intel_device(data->drm_fd) &&
!igt_max_bpc_constraint(&data->display, p, output, 10))
continue;
@@ -1054,7 +1054,7 @@ igt_main
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
- if (is_i915_device(data.drm_fd))
+ if (is_intel_device(data.drm_fd))
data.devid = intel_get_drm_devid(data.drm_fd);
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_color_helper.c b/tests/kms_color_helper.c
index 2f9950f80..b01c38ef6 100644
--- a/tests/kms_color_helper.c
+++ b/tests/kms_color_helper.c
@@ -181,7 +181,7 @@ struct drm_color_lut *coeffs_to_lut(data_t *data,
uint32_t max_value = (1 << 16) - 1;
uint32_t mask;
- if (is_i915_device(data->drm_fd))
+ if (is_intel_device(data->drm_fd))
mask = ((1 << color_depth) - 1) << (16 - color_depth);
else
mask = max_value;
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 27/45] tests/kms_concurrent: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (25 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 26/45] tests/color: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-24 8:08 ` [igt-dev] [i-g-t,27/45] " Joshi, Kunal1
2023-04-18 16:44 ` [igt-dev] [i-g-t 28/45] tests/kms_content_protection: " Bhanuprakash Modem
` (21 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_concurrent.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index e6d61a84d..e1e581723 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -387,7 +387,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
kmstest_set_vt_graphics_mode();
igt_display_require(&data.display, data.drm_fd);
igt_require(data.display.is_atomic);
- if (is_i915_device(data.drm_fd))
+ if (is_intel_device(data.drm_fd))
intel_allocator_multiprocess_start();
}
@@ -397,7 +397,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
}
igt_fixture {
- if (is_i915_device(data.drm_fd))
+ if (is_intel_device(data.drm_fd))
intel_allocator_multiprocess_stop();
igt_display_fini(&data.display);
close(data.drm_fd);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 28/45] tests/kms_content_protection: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (26 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 27/45] tests/kms_concurrent: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-24 9:02 ` [igt-dev] [i-g-t, " Joshi, Kunal1
2023-04-18 16:44 ` [igt-dev] [i-g-t 29/45] tests/kms_cursor_crc: " Bhanuprakash Modem
` (20 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_content_protection.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 638e1301a..344cac505 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -392,7 +392,12 @@ static bool sink_hdcp_capable(igt_output_t *output)
if (fd < 0)
return false;
- if (is_i915_device(data.drm_fd))
+ /*
+ * FIXME: As of now XE's debugfs is using i915 namespace. Once Kernel
+ * changes got landed, please update this logic to use XE specific
+ * debugfs.
+ */
+ if (is_intel_device(data.drm_fd))
debugfs_read(fd, "i915_hdcp_sink_capability", buf);
else
debugfs_read(fd, "hdcp_sink_capability", buf);
@@ -413,7 +418,8 @@ static bool sink_hdcp2_capable(igt_output_t *output)
if (fd < 0)
return false;
- if (is_i915_device(data.drm_fd))
+ /* FIXME: XE specific debugfs as mentioned above. */
+ if (is_intel_device(data.drm_fd))
debugfs_read(fd, "i915_hdcp_sink_capability", buf);
else
debugfs_read(fd, "hdcp_sink_capability", buf);
@@ -763,7 +769,7 @@ static const struct {
.content_type = HDCP_CONTENT_TYPE_1,
},
{ .desc = "Test the teardown and rebuild of the interface between "
- "I915 and mei hdcp.",
+ "Intel and mei hdcp.",
.name = "mei_interface",
.cp_tests = CP_MEI_RELOAD,
.content_type = HDCP_CONTENT_TYPE_1,
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 29/45] tests/kms_cursor_crc: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (27 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 28/45] tests/kms_content_protection: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 30/45] tests/kms_cursor_legacy: " Bhanuprakash Modem
` (19 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_cursor_crc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index cc9dfcb1d..3a353a032 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -143,7 +143,7 @@ static bool chv_cursor_broken(data_t *data, int x)
{
uint32_t devid;
- if (!is_i915_device(data->drm_fd))
+ if (!is_intel_device(data->drm_fd))
return false;
devid = intel_get_drm_devid(data->drm_fd);
@@ -152,7 +152,7 @@ static bool chv_cursor_broken(data_t *data, int x)
* CHV gets a FIFO underrun on pipe C when cursor x coordinate
* is negative and the cursor visible.
*
- * i915 is fixed to return -EINVAL on cursor updates with those
+ * intel is fixed to return -EINVAL on cursor updates with those
* negative coordinates, so require cursor update to fail with
* -EINVAL in that case.
*
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 30/45] tests/kms_cursor_legacy: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (28 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 29/45] tests/kms_cursor_crc: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 31/45] tests/kms_flip: " Bhanuprakash Modem
` (18 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
V2: - Drop redundant check for i915 device
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
---
tests/kms_cursor_legacy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 5f4300908..7df6a6125 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -308,7 +308,7 @@ enum flip_test {
static bool cursor_slowpath(igt_display_t *display, enum flip_test mode)
{
/* Intel display 9 and newer will handle cursor movement as fastsets */
- if (is_i915_device(display->drm_fd) &&
+ if (is_intel_device(display->drm_fd) &&
intel_display_ver(intel_get_drm_devid(display->drm_fd)) >= 9)
return true;
@@ -1465,7 +1465,6 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
igt_output_t *output;
igt_plane_t *cursor;
- igt_require_intel(display->drm_fd);
ahnd = get_reloc_ahnd(display->drm_fd, 0);
if (atomic)
@@ -1708,6 +1707,7 @@ igt_main
igt_describe("this test perform a busy bo update followed by a cursor update");
igt_subtest_group {
igt_fixture {
+ igt_require_i915(display.drm_fd);
igt_require_pipe_crc(display.drm_fd);
igt_display_require_output(&display);
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 31/45] tests/kms_flip: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (29 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 30/45] tests/kms_cursor_legacy: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 32/45] tests/kms_flip_event_leak: " Bhanuprakash Modem
` (17 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
V2: - Minor cleanups
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_flip.c | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 5e82f4a2f..d048f2f12 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -44,6 +44,7 @@
#include "i915/gem_create.h"
#include "igt_stats.h"
+#include "xe/xe_query.h"
#define TEST_DPMS (1 << 0)
@@ -1347,15 +1348,21 @@ restart:
o->fb_width *= 2;
modifier = DRM_FORMAT_MOD_LINEAR;
- if (o->flags & TEST_FENCE_STRESS)
+ if (o->flags & TEST_FENCE_STRESS) {
+ igt_skip_on(is_xe_device(drm_fd));
modifier = I915_FORMAT_MOD_X_TILED;
+ }
/* 256 MB is usually the maximum mappable aperture,
* (make it 4x times that to ensure failure) */
if (o->flags & TEST_BO_TOOBIG) {
- igt_skip_on(!is_i915_device(drm_fd));
+ igt_skip_on(!is_intel_device(drm_fd));
bo_size = 4*gem_mappable_aperture_size(drm_fd);
- igt_require(bo_size < gem_global_aperture_size(drm_fd));
+
+ if (is_i915_device(drm_fd))
+ igt_require(bo_size < gem_global_aperture_size(drm_fd));
+ else
+ igt_require(bo_size < (1ULL << xe_va_bits(drm_fd)));
}
o->fb_ids[0] = igt_create_fb(drm_fd, o->fb_width, o->fb_height,
@@ -1557,9 +1564,10 @@ static int run_test(int duration, int flags)
struct test_output o;
int i, n, modes = 0;
- igt_require((flags & TEST_HANG) == 0 || !is_wedged(drm_fd));
+ igt_require((flags & TEST_HANG) == 0 ||
+ (is_i915_device(drm_fd) && !is_wedged(drm_fd)));
igt_require(!(flags & TEST_FENCE_STRESS) ||
- gem_available_fences(drm_fd));
+ (is_i915_device(drm_fd) && gem_available_fences(drm_fd)));
resources = drmModeGetResources(drm_fd);
igt_require(resources);
@@ -1626,9 +1634,10 @@ static int run_pair(int duration, int flags)
struct test_output o;
int i, j, m, n, modes = 0;
- igt_require((flags & TEST_HANG) == 0 || !is_wedged(drm_fd));
+ igt_require((flags & TEST_HANG) == 0 ||
+ (is_i915_device(drm_fd) && !is_wedged(drm_fd)));
igt_require(!(flags & TEST_FENCE_STRESS) ||
- gem_available_fences(drm_fd));
+ (is_i915_device(drm_fd) && gem_available_fences(drm_fd)));
resources = drmModeGetResources(drm_fd);
igt_require(resources);
@@ -1813,6 +1822,9 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
igt_install_exit_handler(kms_flip_exit_handler);
get_timestamp_format();
+ if (is_xe_device(drm_fd))
+ xe_device_get(drm_fd);
+
if (is_i915_device(drm_fd)) {
bops = buf_ops_create(drm_fd);
}
@@ -1878,6 +1890,10 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
}
igt_stop_signal_helper();
- igt_fixture
+ igt_fixture {
+ if (is_xe_device(drm_fd))
+ xe_device_put(drm_fd);
+
close(drm_fd);
+ }
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 32/45] tests/kms_flip_event_leak: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (30 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 31/45] tests/kms_flip: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 33/45] tests/kms_getfb: " Bhanuprakash Modem
` (16 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_flip_event_leak.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/kms_flip_event_leak.c b/tests/kms_flip_event_leak.c
index bc26597de..b79cd5030 100644
--- a/tests/kms_flip_event_leak.c
+++ b/tests/kms_flip_event_leak.c
@@ -29,6 +29,7 @@
#include <string.h>
#include "igt_device.h"
+#include "xe/xe_query.h"
typedef struct {
int drm_fd;
@@ -64,6 +65,8 @@ static void test(data_t *data, enum pipe pipe, igt_output_t *output)
igt_device_drop_master(data->drm_fd);
igt_device_set_master(fd);
+ if (is_xe_device(fd))
+ xe_device_get(fd);
igt_create_fb(fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
@@ -74,6 +77,8 @@ static void test(data_t *data, enum pipe pipe, igt_output_t *output)
data);
igt_assert_eq(ret, 0);
+ if (is_xe_device(fd))
+ xe_device_put(fd);
ret = close(fd);
igt_assert_eq(ret, 0);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 33/45] tests/kms_getfb: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (31 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 32/45] tests/kms_flip_event_leak: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 34/45] tests/kms_hdmi_inject: " Bhanuprakash Modem
` (15 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_getfb.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c
index 813417e77..4adc7eee2 100644
--- a/tests/kms_getfb.c
+++ b/tests/kms_getfb.c
@@ -42,6 +42,7 @@
#include "drm_fourcc.h"
#include "i915/gem_create.h"
#include "igt_device.h"
+#include "xe/xe_query.h"
IGT_TEST_DESCRIPTION("Tests GETFB and GETFB2 ioctls.");
@@ -91,7 +92,6 @@ static void get_ccs_fb(int fd, struct drm_mode_fb_cmd2 *ret)
uint32_t devid;
igt_require(has_addfb2_iface(fd));
- igt_require_intel(fd);
devid = intel_get_drm_devid(fd);
if (HAS_FLATCCS(devid)) {
@@ -265,7 +265,7 @@ static void test_duplicate_handles(int fd)
struct drm_mode_fb_cmd2 add_ccs = { };
struct drm_mode_fb_cmd get = { };
- igt_require(is_i915_device(fd));
+ igt_require_i915(fd);
igt_require_f(!HAS_FLATCCS(intel_get_drm_devid(fd)),
"skip because flat ccs has only one buffer.\n");
@@ -340,6 +340,7 @@ static void test_getfb2(int fd)
struct drm_mode_fb_cmd2 get = { };
int i;
+ igt_require_i915(fd);
get_ccs_fb(fd, &add_ccs);
igt_require(add_ccs.fb_id != 0);
get.fb_id = add_ccs.fb_id;
@@ -398,6 +399,9 @@ static void test_handle_protection(void) {
igt_fixture {
non_master_fd = drm_open_driver(DRIVER_ANY);
+ if (is_xe_device(non_master_fd))
+ xe_device_get(non_master_fd);
+
non_master_add.width = 1024;
non_master_add.height = 1024;
non_master_add.pixel_format = DRM_FORMAT_XRGB8888;
@@ -444,6 +448,11 @@ static void test_handle_protection(void) {
igt_fixture {
do_ioctl(non_master_fd, DRM_IOCTL_MODE_RMFB, &non_master_add.fb_id);
gem_close(non_master_fd, non_master_add.handles[0]);
+
+ if (is_xe_device(non_master_fd))
+ xe_device_get(non_master_fd);
+
+ close(non_master_fd);
}
}
@@ -454,6 +463,9 @@ igt_main
igt_fixture {
fd = drm_open_driver_master(DRIVER_ANY);
igt_require(has_getfb_iface(fd));
+
+ if (is_xe_device(fd))
+ xe_device_get(fd);
}
igt_subtest_group
@@ -468,6 +480,10 @@ igt_main
igt_subtest_group
test_handle_protection();
- igt_fixture
+ igt_fixture {
+ if (is_xe_device(fd))
+ xe_device_put(fd);
+
close(fd);
+ }
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 34/45] tests/kms_hdmi_inject: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (32 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 33/45] tests/kms_getfb: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 35/45] tests/kms_hdr: " Bhanuprakash Modem
` (14 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_hdmi_inject.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/kms_hdmi_inject.c b/tests/kms_hdmi_inject.c
index b6418faf0..2085d1453 100644
--- a/tests/kms_hdmi_inject.c
+++ b/tests/kms_hdmi_inject.c
@@ -29,6 +29,7 @@
#include "igt.h"
#include "igt_edid.h"
#include "igt_eld.h"
+#include "xe/xe_query.h"
#define HDISPLAY_4K 3840
#define VDISPLAY_4K 2160
@@ -83,7 +84,7 @@ hdmi_inject_4k(int drm_fd, drmModeConnector *connector)
struct igt_fb fb;
uint8_t found_4k_mode = 0;
- if (is_i915_device(drm_fd)) {
+ if (is_intel_device(drm_fd)) {
uint32_t devid = intel_get_drm_devid(drm_fd);
/* 4K requires at least HSW */
@@ -205,6 +206,9 @@ igt_main
igt_require(connector);
kmstest_unset_all_crtcs(drm_fd, res);
+
+ if (is_xe_device(drm_fd))
+ xe_device_get(drm_fd);
}
igt_describe("Make sure that 4K modes exposed by DRM match the "
@@ -219,6 +223,10 @@ igt_main
igt_fixture {
drmModeFreeConnector(connector);
+
+ if (is_xe_device(drm_fd))
+ xe_device_put(drm_fd);
+
close(drm_fd);
}
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 35/45] tests/kms_hdr: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (33 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 34/45] tests/kms_hdmi_inject: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-21 10:09 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 36/45] tests/kms_panel_fitting: " Bhanuprakash Modem
` (13 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_hdr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index 23f12c14a..81a32dbf8 100644
--- a/tests/kms_hdr.c
+++ b/tests/kms_hdr.c
@@ -226,7 +226,7 @@ static void test_bpc_switch(data_t *data, uint32_t flags)
if (igt_pipe_connector_valid(pipe, output)) {
prepare_test(data, output, pipe);
- if (is_i915_device(data->fd) &&
+ if (is_intel_device(data->fd) &&
!igt_max_bpc_constraint(display, pipe, output, 10)) {
test_fini(data);
break;
@@ -503,7 +503,7 @@ static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output)
igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
/* Change the mastering information, no modeset allowed
- * for amd driver, whereas a modeset is required for i915
+ * for amd driver, whereas a modeset is required for intel
* driver. */
hdr.hdmi_metadata_type1.max_display_mastering_luminance = 200;
hdr.hdmi_metadata_type1.max_fall = 200;
@@ -517,7 +517,7 @@ static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output)
/* Enter SDR via metadata, no modeset allowed for
* amd driver, whereas a modeset is required for
- * i915 driver. */
+ * intel driver. */
fill_hdr_output_metadata_sdr(&hdr);
set_hdr_output_metadata(data, &hdr);
if (is_amdgpu_device(data->fd))
@@ -590,7 +590,7 @@ static void test_hdr(data_t *data, uint32_t flags)
if (igt_pipe_connector_valid(pipe, output)) {
prepare_test(data, output, pipe);
- if (is_i915_device(data->fd) &&
+ if (is_intel_device(data->fd) &&
!igt_max_bpc_constraint(display, pipe, output, 10)) {
test_fini(data);
break;
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 36/45] tests/kms_panel_fitting: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (34 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 35/45] tests/kms_hdr: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-21 10:17 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 37/45] tests/kms_plane: " Bhanuprakash Modem
` (12 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_panel_fitting.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
index 2d0590da2..97ef1ae48 100644
--- a/tests/kms_panel_fitting.c
+++ b/tests/kms_panel_fitting.c
@@ -23,6 +23,7 @@
*/
#include "igt.h"
+#include <limits.h>
#include <math.h>
#include <sys/stat.h>
@@ -133,7 +134,7 @@ test_panel_fitting_legacy(data_t *d, igt_display_t *display,
igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-200, d->fb2.height-200);
igt_plane_set_position(d->plane2, 100, 100);
- if (is_i915_device(display->drm_fd)) {
+ if (is_intel_device(display->drm_fd)) {
uint32_t devid = intel_get_drm_devid(display->drm_fd);
/*
* Most of gen7 and all of gen8 doesn't support plane scaling
@@ -233,10 +234,15 @@ static void test_panel_fitting(data_t *data, enum test_type type)
struct stat sb;
if (type == TEST_ATOMIC) {
- igt_require_f(is_i915_device(display->drm_fd), "not valid for non-i915 devices\n");
+ char path[PATH_MAX];
+
+ igt_require_f(is_intel_device(display->drm_fd), "not valid for non-intel devices\n");
/* Until this is force enabled, force modeset evasion. */
- if (stat("/sys/module/i915/parameters/fastboot", &sb) == 0)
+ snprintf(path, PATH_MAX, "/sys/module/%s/parameters/fastboot",
+ is_i915_device(data->drm_fd) ? "i915" : "xe");
+
+ if (stat(path, &sb) == 0)
igt_set_module_param_int(data->drm_fd, "fastboot", 1);
igt_require(intel_display_ver(intel_get_drm_devid(display->drm_fd)) >= 5);
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 37/45] tests/kms_plane: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (35 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 36/45] tests/kms_panel_fitting: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 38/45] tests/kms_plane_lowers: " Bhanuprakash Modem
` (11 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_plane.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 62aee9ad0..10e16b638 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -30,6 +30,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
+#include "xe/xe_query.h"
/*
* Throw away enough lsbs in pixel formats tests
@@ -399,6 +400,18 @@ test_plane_panning(data_t *data, enum pipe pipe)
}
+ if (is_xe_device(data->drm_fd)) {
+ struct drm_xe_query_mem_region *memregion;
+ uint64_t memreg = all_memory_regions(data->drm_fd), region;
+
+ xe_for_each_mem_region(data->drm_fd, memreg, region) {
+ memregion = xe_mem_region(data->drm_fd, region);
+
+ if (XE_IS_CLASS_VRAM(memregion))
+ mem_size = memregion->total_size;
+ }
+ }
+
for_each_connector_mode(output) {
drmModeModeInfo *m = &output->config.connector->modes[j__];
uint32_t fb_size = m->hdisplay * m->vdisplay * 4;
@@ -976,6 +989,10 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
.modifier = plane->modifiers[i],
};
+ if (is_xe_device(data->drm_fd) &&
+ f.modifier != DRM_FORMAT_MOD_LINEAR)
+ continue;
+
if (f.format == ref.format &&
f.modifier == ref.modifier)
continue;
@@ -1050,7 +1067,7 @@ static bool skip_plane(data_t *data, igt_plane_t *plane)
if (data->extended)
return false;
- if (!is_i915_device(data->drm_fd))
+ if (!is_intel_device(data->drm_fd))
return false;
if (plane->type == DRM_PLANE_TYPE_CURSOR)
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 38/45] tests/kms_plane_lowers: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (36 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 37/45] tests/kms_plane: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 39/45] tests/kms_plane_scaling: " Bhanuprakash Modem
` (10 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_plane_lowres.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 958d3ec6f..db9f5a54c 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -266,8 +266,11 @@ static void run_test(data_t *data, uint64_t modifier)
enum pipe pipe;
igt_output_t *output;
- igt_skip_on(!igt_display_has_format_mod(&data->display,
- DRM_FORMAT_XRGB8888, modifier));
+ if(!igt_display_has_format_mod(&data->display, DRM_FORMAT_XRGB8888, modifier))
+ return;
+
+ if (is_xe_device(data->drm_fd) && modifier != DRM_FORMAT_MOD_LINEAR)
+ return;
for_each_pipe(&data->display, pipe) {
for_each_valid_output_on_pipe(&data->display, pipe, output) {
@@ -318,7 +321,7 @@ igt_main
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
- data.devid = is_i915_device(data.drm_fd) ?
+ data.devid = is_intel_device(data.drm_fd) ?
intel_get_drm_devid(data.drm_fd) : 0;
kmstest_set_vt_graphics_mode();
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 39/45] tests/kms_plane_scaling: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (37 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 38/45] tests/kms_plane_lowers: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 40/45] tests/kms_prime: " Bhanuprakash Modem
` (9 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_plane_scaling.c | 41 ++++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 5008cd931..753029cac 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -52,9 +52,9 @@ struct invalid_paramtests {
} params[8];
};
-static const struct invalid_paramtests i915_paramtests[] = {
+static const struct invalid_paramtests intel_paramtests[] = {
{
- .testname = "i915-max-src-size",
+ .testname = "intel-max-src-size",
.planesize = {3840, 2160},
},
};
@@ -463,7 +463,7 @@ static const igt_rotation_t rotations[] = {
static bool can_scale(data_t *d, unsigned format)
{
- if (!is_i915_device(d->drm_fd))
+ if (!is_intel_device(d->drm_fd))
return true;
switch (format) {
@@ -488,7 +488,7 @@ static bool test_format(data_t *data,
if (!igt_fb_supported_format(format))
return false;
- if (!is_i915_device(data->drm_fd) ||
+ if (!is_intel_device(data->drm_fd) ||
data->extended)
return true;
@@ -505,7 +505,7 @@ static bool test_format(data_t *data,
static bool test_pipe_iteration(data_t *data, enum pipe pipe, int iteration)
{
- if (!is_i915_device(data->drm_fd) ||
+ if (!is_intel_device(data->drm_fd) ||
data->extended)
return true;
@@ -544,6 +544,10 @@ static void test_scaler_with_modifier_pipe(data_t *d,
for (int i = 0; i < ARRAY_SIZE(modifiers); i++) {
uint64_t modifier = modifiers[i];
+ if (is_xe_device(d->drm_fd) &&
+ modifier != DRM_FORMAT_MOD_LINEAR)
+ continue;
+
if (igt_plane_has_format_mod(plane, format, modifier))
check_scaling_pipe_plane_rot(d, plane,
format, modifier,
@@ -831,11 +835,12 @@ test_invalid_num_scalers(data_t *d, enum pipe pipe, igt_output_t *output)
igt_plane_set_size(plane[1], mode->hdisplay, mode->vdisplay);
igt_plane_set_size(plane[2], mode->hdisplay, mode->vdisplay);
- /* This commit is expected to fail for i915 devices. i915 devices support
+ /*
+ * This commit is expected to fail for intel devices. intel devices support
* max 2 scalers/pipe. In dmesg we can find: Too many scaling requests 3 > 2.
- * For devices (non-i915, or possible future i915) that are able to perform this
- * amount of scaling; handle that case aswell.
- * */
+ * For devices (non-intel, or possible future intel) that are able to perform
+ * this amount of scaling; handle that case aswell.
+ */
ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
igt_skip_on_f(ret == 0, "Cannot test handling of too many scaling ops, the device supports a large amount.\n");
igt_assert_eq(ret, -EINVAL);
@@ -1012,7 +1017,7 @@ static drmModeModeInfo *find_mode(data_t *data, igt_output_t *output, const uint
}
/*
- * Max source/destination width/height for i915 driver.
+ * Max source/destination width/height for intel driver.
* These numbers are coming from
* drivers/gpu/drm/i915/display/skl_scaler.c in kernel sources.
*
@@ -1040,8 +1045,8 @@ static drmModeModeInfo *find_mode(data_t *data, igt_output_t *output, const uint
* max_dst_w = 8192
* max_dst_h = 8192
*/
-static void i915_max_source_size_test(data_t *d, enum pipe pipe, igt_output_t *output,
- drmModeModeInfo *mode, const uint32_t planesize[])
+static void intel_max_source_size_test(data_t *d, enum pipe pipe, igt_output_t *output,
+ drmModeModeInfo *mode, const uint32_t planesize[])
{
igt_fb_t fb;
igt_plane_t *plane;
@@ -1119,7 +1124,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
igt_display_require(&data.display, data.drm_fd);
- data.devid = is_i915_device(data.drm_fd) ?
+ data.devid = is_intel_device(data.drm_fd) ?
intel_get_drm_devid(data.drm_fd) : 0;
igt_require(data.display.is_atomic);
}
@@ -1273,9 +1278,9 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
}
}
- for (int index = 0; index < ARRAY_SIZE(i915_paramtests); index++) {
+ for (int index = 0; index < ARRAY_SIZE(intel_paramtests); index++) {
igt_describe("Test for validating max source size.");
- igt_subtest_with_dynamic(i915_paramtests[index].testname) {
+ igt_subtest_with_dynamic(intel_paramtests[index].testname) {
igt_require_intel(data.drm_fd);
for_each_pipe(&data.display, pipe) {
for_each_valid_output_on_pipe(&data.display, pipe, output) {
@@ -1284,12 +1289,12 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
* Need to find mode with lowest vrefresh else
* we can exceed cdclk limits.
*/
- mode = find_mode(&data, output, i915_paramtests[index].planesize);
+ mode = find_mode(&data, output, intel_paramtests[index].planesize);
if (mode) {
igt_dynamic_f("pipe-%s-%s",
kmstest_pipe_name(pipe), igt_output_name(output))
- i915_max_source_size_test(&data, pipe, output, mode,
- i915_paramtests[index].planesize);
+ intel_max_source_size_test(&data, pipe, output, mode,
+ intel_paramtests[index].planesize);
}
continue;
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 40/45] tests/kms_prime: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (38 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 39/45] tests/kms_plane_scaling: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-25 4:16 ` Karthik B S
2023-04-18 16:44 ` [igt-dev] [i-g-t 41/45] tests/kms_rotation_crc: " Bhanuprakash Modem
` (8 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_prime.c | 241 ++++++++++++++++++++++++++++++++++++----------
1 file changed, 190 insertions(+), 51 deletions(-)
diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index dd5ab993e..bc7d42638 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -27,9 +27,12 @@
#include "igt_sysfs.h"
#include <fcntl.h>
+#include <limits.h>
#include <sys/ioctl.h>
#include <sys/poll.h>
#include <time.h>
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
#define KMS_HELPER "/sys/module/drm_kms_helper/parameters/"
#define KMS_POLL_DISABLE 0
@@ -112,7 +115,29 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
scratch->height = mode->vdisplay;
scratch->bpp = 32;
- if (!is_i915_device(exporter_fd)) {
+ if (is_intel_device(exporter_fd)) {
+ igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_MOD_LINEAR, &scratch->size, &scratch->pitch);
+
+ if (is_i915_device(exporter_fd)) {
+ if (gem_has_lmem(exporter_fd))
+ scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
+ REGION_LMEM(0), REGION_SMEM);
+ else
+ scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
+ REGION_SMEM);
+
+ ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0,
+ scratch->size, PROT_WRITE | PROT_READ);
+ } else {
+ scratch->handle = xe_bo_create_flags(exporter_fd, 0,
+ ALIGN(scratch->size, xe_get_default_alignment(exporter_fd)),
+ vram_if_possible(exporter_fd, 0));
+
+ ptr = xe_bo_mmap_ext(exporter_fd, scratch->handle,
+ scratch->size, PROT_READ | PROT_WRITE);
+ }
+ } else {
scratch->handle = kmstest_dumb_create(exporter_fd,
ALIGN(scratch->width, 256),
scratch->height, scratch->bpp,
@@ -120,18 +145,6 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
ptr = kmstest_dumb_map_buffer(exporter_fd, scratch->handle,
scratch->size, PROT_WRITE);
- } else {
- igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
- DRM_FORMAT_MOD_LINEAR, &scratch->size, &scratch->pitch);
- if (gem_has_lmem(exporter_fd))
- scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
- REGION_LMEM(0), REGION_SMEM);
- else
- scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
- REGION_SMEM);
-
- ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0, scratch->size,
- PROT_WRITE | PROT_READ);
}
for (size_t idx = 0; idx < scratch->size / sizeof(*ptr); ++idx)
@@ -150,35 +163,76 @@ static void prepare_fb(int importer_fd, struct dumb_bo *scratch, struct igt_fb *
color_encoding, color_range);
}
+static struct intel_buf * create_buf(int fd, struct buf_ops *bops, int width,
+ int height, uint32_t gem_handle)
+{
+ struct intel_buf *buf;
+ uint32_t name, handle;
+
+ name = gem_flink(fd,gem_handle);
+ handle = gem_open(fd, name);
+
+ buf = intel_buf_create_using_handle(bops, handle,
+ width, height, 32, 0,
+ I915_TILING_NONE, 0);
+
+ /* Make sure we close handle on destroy path */
+ intel_buf_set_ownership(buf, true);
+ return buf;
+}
+
static void import_fb(int importer_fd, struct igt_fb *fb,
int dmabuf_fd, uint32_t pitch)
{
uint32_t offsets[4] = {}, pitches[4] = {}, handles[4] = {}, temp_buf_handle;
int ret;
-
- if (is_i915_device(importer_fd)) {
- if (gem_has_lmem(importer_fd)) {
- uint64_t ahnd = get_reloc_ahnd(importer_fd, 0);
- uint64_t fb_size = 0;
-
- igt_info("Importer is dGPU\n");
- temp_buf_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
- igt_assert(temp_buf_handle > 0);
- fb->gem_handle = igt_create_bo_with_dimensions(importer_fd, fb->width, fb->height,
- fb->drm_format, fb->modifier, pitch, &fb_size, NULL, NULL);
- igt_assert(fb->gem_handle > 0);
-
- igt_blitter_src_copy(importer_fd, ahnd, 0, NULL, temp_buf_handle,
- 0, pitch, fb->modifier, 0, 0, fb_size, fb->width,
- fb->height, 32, fb->gem_handle, 0, pitch, fb->modifier,
- 0, 0, fb_size);
-
- gem_sync(importer_fd, fb->gem_handle);
- gem_close(importer_fd, temp_buf_handle);
- put_ahnd(ahnd);
- } else {
- fb->gem_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
- }
+ uint64_t fb_size = 0;
+
+ if (is_i915_device(importer_fd) && gem_has_lmem(importer_fd)) {
+ uint64_t ahnd = get_reloc_ahnd(importer_fd, 0);
+
+ igt_info("Importer is dGPU\n");
+ temp_buf_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
+ igt_assert(temp_buf_handle > 0);
+ fb->gem_handle = igt_create_bo_with_dimensions(importer_fd, fb->width, fb->height,
+ fb->drm_format, fb->modifier, pitch, &fb_size, NULL, NULL);
+ igt_assert(fb->gem_handle > 0);
+
+ igt_blitter_src_copy(importer_fd, ahnd, 0, NULL, temp_buf_handle,
+ 0, pitch, fb->modifier, 0, 0, fb_size, fb->width,
+ fb->height, 32, fb->gem_handle, 0, pitch, fb->modifier,
+ 0, 0, fb_size);
+
+ gem_sync(importer_fd, fb->gem_handle);
+ gem_close(importer_fd, temp_buf_handle);
+ put_ahnd(ahnd);
+ } else if (is_xe_device(importer_fd) && xe_has_vram(importer_fd)) {
+ uint32_t devid = intel_get_drm_devid(importer_fd);
+ struct buf_ops *bops = buf_ops_create(importer_fd);
+ igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
+ struct intel_bb *ibb = intel_bb_create(importer_fd, 4096);
+ struct intel_buf *src, *dst;
+ uint32_t *ptr;
+
+ igt_info("Importer is dGPU\n");
+ temp_buf_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
+ igt_assert(temp_buf_handle > 0);
+ fb->gem_handle = igt_create_bo_with_dimensions(importer_fd, fb->width, fb->height,
+ fb->drm_format, fb->modifier, pitch, &fb_size, NULL, NULL);
+ igt_assert(fb->gem_handle > 0);
+
+ ptr = xe_bo_mmap_ext(importer_fd, temp_buf_handle, fb_size, PROT_READ | PROT_WRITE);
+
+ src = create_buf(importer_fd, bops, fb->width, fb->height, temp_buf_handle);
+ dst = create_buf(importer_fd, bops, fb->width, fb->height, fb->gem_handle);
+ rendercopy(ibb, src, 0, 0, fb->width, fb->height, dst, 0, 0);
+
+ igt_assert(gem_munmap(ptr, fb_size) == 0);
+ intel_bb_destroy(ibb);
+ intel_buf_destroy(src);
+ intel_buf_destroy(dst);
+ buf_ops_destroy(bops);
+ gem_close(importer_fd, temp_buf_handle);
} else {
fb->gem_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
}
@@ -330,12 +384,6 @@ static bool has_connected_output(int drm_fd)
return false;
}
-static void validate_d3_hot(int drm_fd)
-{
- igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "GPU idle: yes"));
- igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "PCI device power state: D3hot [3]"));
-}
-
static void kms_poll_state_restore(void)
{
int sysfs_fd;
@@ -357,6 +405,88 @@ static void kms_poll_disable(void)
close(sysfs_fd);
}
+static bool runtime_usage_available(struct pci_device *pci)
+{
+ char name[PATH_MAX];
+ snprintf(name, PATH_MAX, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/runtime_usage",
+ pci->domain, pci->bus, pci->dev, pci->func);
+ return access(name, F_OK) == 0;
+}
+
+static bool in_d3_hot(struct pci_device *pci)
+{
+ uint16_t val;
+
+ /* We need to wait for the autosuspend to kick in before we can check */
+ if (!igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED))
+ return false;
+
+ if (runtime_usage_available(pci) &&
+ igt_pm_get_runtime_usage(pci) != 0)
+ return false;
+
+ igt_assert_eq(pci_device_cfg_read_u16(pci, &val, 0xd4), 0);
+
+ return (val & 0x3) == 0x3;
+}
+
+static void validate_d3_hot(int drm_fd, struct pci_device *pci)
+{
+ if (is_i915_device(drm_fd)) {
+ igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "GPU idle: yes"));
+ igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "PCI device power state: D3hot [3]"));
+ } else {
+ igt_assert(in_d3_hot(pci));
+ }
+}
+
+static int open_d3_allowed(struct pci_device *pci)
+{
+ char name[PATH_MAX];
+ int fd;
+
+ snprintf(name, PATH_MAX, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/d3cold_allowed",
+ pci->domain, pci->bus, pci->dev, pci->func);
+
+ fd = open(name, O_RDWR);
+ igt_assert_f(fd >= 0, "Can't open %s\n", name);
+
+ return fd;
+}
+
+static void get_d3_allowed(struct pci_device *pci, char *d3_allowed)
+{
+ int fd = open_d3_allowed(pci);
+
+ igt_assert(read(fd, d3_allowed, 2));
+ close(fd);
+}
+
+static void set_d3_allowed(struct pci_device *pci, const char *d3_allowed)
+{
+ int fd = open_d3_allowed(pci);
+
+ igt_assert(write(fd, d3_allowed, 2));
+ close(fd);
+}
+
+static void setup_d3_hot(int fd, struct pci_device *pci)
+{
+ if (is_xe_device(fd)) {
+ igt_assert(igt_setup_runtime_pm(fd));
+
+ set_d3_allowed(pci, "0\n");
+
+ igt_assert(in_d3_hot(pci));
+ } else {
+ igt_set_timeout(10, "Wait for dGPU to enter D3hot before starting the subtest");
+ while (!igt_debugfs_search(fd,
+ "i915_runtime_pm_status",
+ "PCI device power state: D3hot [3]"));
+ igt_reset_timeout();
+ }
+}
+
igt_main
{
int first_fd = -1;
@@ -410,21 +540,28 @@ igt_main
igt_describe("Validate pci state of dGPU when dGPU is idle and scanout is on iGPU");
igt_subtest("D3hot") {
- igt_require_f(is_i915_device(second_fd_hybrid), "i915 device required\n");
- igt_require_f(gem_has_lmem(second_fd_hybrid), "Second GPU is not dGPU\n");
+ char d3_allowed[2];
+ struct pci_device *pci;
+
+ igt_require_f(is_intel_device(second_fd_hybrid), "intel device required\n");
+ if (is_i915_device(second_fd_hybrid))
+ igt_require_f(gem_has_lmem(second_fd_hybrid), "Second GPU is not dGPU\n");
+ if (is_xe_device(second_fd_hybrid))
+ igt_require_f(xe_has_vram(second_fd_hybrid), "Second GPU is not dGPU\n");
igt_require_f(first_output, "No display connected to iGPU\n");
igt_require_f(!second_output, "Display connected to dGPU\n");
kms_poll_disable();
- igt_set_timeout(10, "Wait for dGPU to enter D3hot before starting the subtest");
- while (!igt_debugfs_search(second_fd_hybrid,
- "i915_runtime_pm_status",
- "PCI device power state: D3hot [3]"));
- igt_reset_timeout();
+ pci = igt_device_get_pci_device(second_fd_hybrid);
+ get_d3_allowed(pci, d3_allowed);
+
+ setup_d3_hot(second_fd_hybrid, pci);
test_basic_modeset(first_fd);
- validate_d3_hot(second_fd_hybrid);
+ validate_d3_hot(second_fd_hybrid, pci);
+
+ set_d3_allowed(pci, d3_allowed);
}
igt_fixture {
@@ -442,6 +579,8 @@ igt_main
igt_require(second_fd_vgem >= 0);
if (is_i915_device(first_fd))
igt_require(!gem_has_lmem(first_fd));
+ if (is_xe_device(first_fd))
+ igt_require(!xe_has_vram(first_fd));
}
igt_describe("Make a dumb color buffer, export to another device and"
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 41/45] tests/kms_rotation_crc: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (39 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 40/45] tests/kms_prime: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 42/45] tests/kms_setmode: " Bhanuprakash Modem
` (7 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_rotation_crc.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 295aed762..23c18c242 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -459,7 +459,7 @@ static bool test_format(data_t *data,
if (!igt_fb_supported_format(format))
return false;
- if (!is_i915_device(data->gfx_fd) ||
+ if (!is_intel_device(data->gfx_fd) ||
data->extended)
return true;
@@ -545,14 +545,14 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION));
igt_require(igt_plane_has_rotation(plane, data->rotation));
/* CHV can't rotate and reflect simultaneously */
- igt_require(!is_i915_device(data->gfx_fd) ||
+ igt_require(!is_intel_device(data->gfx_fd) ||
!IS_CHERRYVIEW(data->devid) ||
data->rotation != (IGT_ROTATION_180 | IGT_REFLECT_X));
prepare_crtc(data, output, pipe, plane, true);
for (i = 0; i < num_rectangle_types; i++) {
- /* Unsupported on i915 */
+ /* Unsupported on intel */
if (plane_type == DRM_PLANE_TYPE_CURSOR &&
i != square)
continue;
@@ -560,9 +560,8 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
/* Only support partial covering primary plane on gen9+ */
if (is_amdgpu_device(data->gfx_fd) ||
(plane_type == DRM_PLANE_TYPE_PRIMARY &&
- is_i915_device(data->gfx_fd) &&
- intel_display_ver(
- intel_get_drm_devid(data->gfx_fd)) < 9)) {
+ is_intel_device(data->gfx_fd) &&
+ intel_display_ver(data->devid) < 9)) {
if (i != rectangle)
continue;
else
@@ -592,7 +591,7 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
data->override_fmt, test_bad_format);
}
}
- if (is_i915_device(data->gfx_fd)) {
+ if (is_intel_device(data->gfx_fd)) {
igt_pipe_crc_stop(data->pipe_crc);
}
}
@@ -841,6 +840,10 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_pipe_crc_start(data->pipe_crc);
for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ if (is_xe_device(data->gfx_fd) &&
+ planeconfigs[i].modifier != DRM_FORMAT_MOD_LINEAR)
+ continue;
+
p[0].fbinfo = &planeconfigs[i];
pointlocation(data, p, mode, 0);
@@ -1137,7 +1140,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
igt_fixture {
data.gfx_fd = drm_open_driver_master(DRIVER_ANY);
- if (is_i915_device(data.gfx_fd)) {
+ if (is_intel_device(data.gfx_fd)) {
data.devid = intel_get_drm_devid(data.gfx_fd);
gen = intel_display_ver(data.devid);
}
@@ -1193,6 +1196,8 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
igt_describe("Checking unsupported tiling for gen9+ with 90 degree of rotation");
igt_subtest_f("bad-tiling") {
+ igt_require_i915(data.gfx_fd);
+
data.rotation = IGT_ROTATION_90;
data.override_modifier = I915_FORMAT_MOD_X_TILED;
test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, true);
@@ -1201,6 +1206,9 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
igt_describe("Tiling and Rotation test for gen 10+ for primary plane");
for (reflect_x = reflect_x_subtests; reflect_x->modifier; reflect_x++) {
+ igt_fixture
+ igt_require_i915(data.gfx_fd);
+
igt_subtest_f("primary-%s-reflect-x-%s",
modifier_test_str(reflect_x->modifier),
rot_test_str(reflect_x->rot)) {
@@ -1260,6 +1268,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
enum pipe pipe;
igt_output_t *output;
+ igt_require_i915(data.gfx_fd);
igt_display_require_output(&data.display);
for_each_pipe_with_valid_output(&data.display, pipe, output) {
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 42/45] tests/kms_setmode: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (40 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 41/45] tests/kms_rotation_crc: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 43/45] tests/kms_universal_plane: " Bhanuprakash Modem
` (6 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_setmode.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index bfa108916..a611d9382 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -30,6 +30,7 @@
#include <string.h>
#include <sys/time.h>
#include <math.h>
+#include "xe/xe_query.h"
#define MAX_CONNECTORS 10
#define MAX_CRTCS 6
@@ -954,6 +955,9 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
drm_resources = drmModeGetResources(drm_fd);
igt_require(drm_resources);
+
+ if (is_xe_device(drm_fd))
+ xe_device_get(drm_fd);
}
for (i = 0; i < ARRAY_SIZE(tests); i++) {
@@ -971,6 +975,9 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
igt_fixture {
drmModeFreeResources(drm_resources);
+ if (is_xe_device(drm_fd))
+ xe_device_put(drm_fd);
+
close(drm_fd);
}
}
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 43/45] tests/kms_universal_plane: Add XE support
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (41 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 42/45] tests/kms_setmode: " Bhanuprakash Modem
@ 2023-04-18 16:44 ` Bhanuprakash Modem
2023-04-18 16:45 ` [igt-dev] [i-g-t 44/45] tests/kms: Move intel specific kms tests to new dir Bhanuprakash Modem
` (5 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:44 UTC (permalink / raw)
To: igt-dev
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_universal_plane.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 114918d97..ddd356eda 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -576,13 +576,18 @@ cursor_leak_test_fini(data_t *data,
}
static int
-i915_gem_fb_count(data_t *data)
+intel_gem_fb_count(data_t *data)
{
char buf[1024];
FILE *fp;
int fd;
int count = 0;
+ /*
+ * FIXME: As of now, XE's debugfs is using i915 namespace. Once Kernel
+ * changes got landed, please update this logic to use XE specific
+ * debugfs.
+ */
fd = igt_debugfs_open(data->drm_fd, "i915_gem_framebuffer", O_RDONLY);
fp = fdopen(fd, "r");
igt_require(fp);
@@ -617,7 +622,7 @@ cursor_leak_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
mode = igt_output_get_mode(output);
/* Count GEM framebuffers before creating our cursor FB's */
- count1 = i915_gem_fb_count(data);
+ count1 = intel_gem_fb_count(data);
/* Black background FB */
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
@@ -675,7 +680,7 @@ cursor_leak_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
cursor_leak_test_fini(data, output, &background_fb, cursor_fb);
/* We should be back to the same framebuffer count as when we started */
- count2 = i915_gem_fb_count(data);
+ count2 = intel_gem_fb_count(data);
igt_assert_eq(count1, count2);
}
@@ -737,7 +742,7 @@ pageflip_win_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
int ret = 0;
- igt_skip_on(is_i915_device(data->drm_fd) && data->display_ver < 9);
+ igt_skip_on(is_intel_device(data->drm_fd) && data->display_ver < 9);
igt_require_pipe(&data->display, pipe);
igt_info("Using (pipe %s + %s) to run the subtest.\n",
@@ -895,7 +900,7 @@ igt_main
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
- if (is_i915_device(data.drm_fd))
+ if (is_intel_device(data.drm_fd))
data.display_ver = intel_display_ver(intel_get_drm_devid(data.drm_fd));
kmstest_set_vt_graphics_mode();
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 44/45] tests/kms: Move intel specific kms tests to new dir
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (42 preceding siblings ...)
2023-04-18 16:44 ` [igt-dev] [i-g-t 43/45] tests/kms_universal_plane: " Bhanuprakash Modem
@ 2023-04-18 16:45 ` Bhanuprakash Modem
2023-04-18 16:45 ` [igt-dev] [i-g-t 45/45] xe-fast-feedback: Add kms tests to XE BAT Bhanuprakash Modem
` (4 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:45 UTC (permalink / raw)
To: igt-dev
Move all kms tests those supports both i915 & XE to new dir
called tests/intel.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/{i915 => intel}/kms_big_fb.c | 0
tests/{i915 => intel}/kms_big_joiner.c | 0
tests/{i915 => intel}/kms_cdclk.c | 0
tests/{i915 => intel}/kms_draw_crc.c | 0
tests/{i915 => intel}/kms_dsc.c | 0
tests/{i915 => intel}/kms_dsc_helper.c | 0
tests/{i915 => intel}/kms_dsc_helper.h | 0
tests/{i915 => intel}/kms_flip_scaled_crc.c | 0
tests/{i915 => intel}/kms_flip_tiling.c | 0
tests/{i915 => intel}/kms_mmap_write_crc.c | 0
tests/{i915 => intel}/kms_psr.c | 0
tests/{i915 => intel}/kms_psr2_sf.c | 0
tests/{i915 => intel}/kms_psr2_su.c | 0
tests/{i915 => intel}/kms_psr_stress_test.c | 0
tests/meson.build | 37 ++++++++++++++-------
15 files changed, 25 insertions(+), 12 deletions(-)
rename tests/{i915 => intel}/kms_big_fb.c (100%)
rename tests/{i915 => intel}/kms_big_joiner.c (100%)
rename tests/{i915 => intel}/kms_cdclk.c (100%)
rename tests/{i915 => intel}/kms_draw_crc.c (100%)
rename tests/{i915 => intel}/kms_dsc.c (100%)
rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
rename tests/{i915 => intel}/kms_flip_scaled_crc.c (100%)
rename tests/{i915 => intel}/kms_flip_tiling.c (100%)
rename tests/{i915 => intel}/kms_mmap_write_crc.c (100%)
rename tests/{i915 => intel}/kms_psr.c (100%)
rename tests/{i915 => intel}/kms_psr2_sf.c (100%)
rename tests/{i915 => intel}/kms_psr2_su.c (100%)
rename tests/{i915 => intel}/kms_psr_stress_test.c (100%)
diff --git a/tests/i915/kms_big_fb.c b/tests/intel/kms_big_fb.c
similarity index 100%
rename from tests/i915/kms_big_fb.c
rename to tests/intel/kms_big_fb.c
diff --git a/tests/i915/kms_big_joiner.c b/tests/intel/kms_big_joiner.c
similarity index 100%
rename from tests/i915/kms_big_joiner.c
rename to tests/intel/kms_big_joiner.c
diff --git a/tests/i915/kms_cdclk.c b/tests/intel/kms_cdclk.c
similarity index 100%
rename from tests/i915/kms_cdclk.c
rename to tests/intel/kms_cdclk.c
diff --git a/tests/i915/kms_draw_crc.c b/tests/intel/kms_draw_crc.c
similarity index 100%
rename from tests/i915/kms_draw_crc.c
rename to tests/intel/kms_draw_crc.c
diff --git a/tests/i915/kms_dsc.c b/tests/intel/kms_dsc.c
similarity index 100%
rename from tests/i915/kms_dsc.c
rename to tests/intel/kms_dsc.c
diff --git a/tests/i915/kms_dsc_helper.c b/tests/intel/kms_dsc_helper.c
similarity index 100%
rename from tests/i915/kms_dsc_helper.c
rename to tests/intel/kms_dsc_helper.c
diff --git a/tests/i915/kms_dsc_helper.h b/tests/intel/kms_dsc_helper.h
similarity index 100%
rename from tests/i915/kms_dsc_helper.h
rename to tests/intel/kms_dsc_helper.h
diff --git a/tests/i915/kms_flip_scaled_crc.c b/tests/intel/kms_flip_scaled_crc.c
similarity index 100%
rename from tests/i915/kms_flip_scaled_crc.c
rename to tests/intel/kms_flip_scaled_crc.c
diff --git a/tests/i915/kms_flip_tiling.c b/tests/intel/kms_flip_tiling.c
similarity index 100%
rename from tests/i915/kms_flip_tiling.c
rename to tests/intel/kms_flip_tiling.c
diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/intel/kms_mmap_write_crc.c
similarity index 100%
rename from tests/i915/kms_mmap_write_crc.c
rename to tests/intel/kms_mmap_write_crc.c
diff --git a/tests/i915/kms_psr.c b/tests/intel/kms_psr.c
similarity index 100%
rename from tests/i915/kms_psr.c
rename to tests/intel/kms_psr.c
diff --git a/tests/i915/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
similarity index 100%
rename from tests/i915/kms_psr2_sf.c
rename to tests/intel/kms_psr2_sf.c
diff --git a/tests/i915/kms_psr2_su.c b/tests/intel/kms_psr2_su.c
similarity index 100%
rename from tests/i915/kms_psr2_su.c
rename to tests/intel/kms_psr2_su.c
diff --git a/tests/i915/kms_psr_stress_test.c b/tests/intel/kms_psr_stress_test.c
similarity index 100%
rename from tests/i915/kms_psr_stress_test.c
rename to tests/intel/kms_psr_stress_test.c
diff --git a/tests/meson.build b/tests/meson.build
index a6642b9dc..75fdda84a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -217,23 +217,13 @@ i915_progs = [
'i915_query',
'i915_selftest',
'i915_suspend',
- 'kms_big_fb',
- 'kms_big_joiner' ,
'kms_busy',
'kms_ccs',
- 'kms_cdclk',
- 'kms_draw_crc',
'kms_fbcon_fbt',
'kms_fence_pin_leak',
- 'kms_flip_scaled_crc',
- 'kms_flip_tiling',
'kms_frontbuffer_tracking',
'kms_legacy_colorkey',
- 'kms_mmap_write_crc',
'kms_pipe_b_c_ivb',
- 'kms_psr',
- 'kms_psr2_su',
- 'kms_psr_stress_test',
'kms_pwrite_crc',
'sysfs_defaults',
'sysfs_heartbeat_interval',
@@ -241,6 +231,19 @@ i915_progs = [
'sysfs_timeslice_duration',
]
+intel_progs = [
+ 'kms_big_fb',
+ 'kms_big_joiner' ,
+ 'kms_cdclk',
+ 'kms_draw_crc',
+ 'kms_flip_scaled_crc',
+ 'kms_flip_tiling',
+ 'kms_mmap_write_crc',
+ 'kms_psr',
+ 'kms_psr2_su',
+ 'kms_psr_stress_test',
+]
+
xe_progs = [
'xe_create',
'xe_compute',
@@ -316,6 +319,16 @@ foreach prog : i915_progs
test_list += prog
endforeach
+foreach prog : intel_progs
+ test_executables += executable(prog,
+ join_paths('intel', prog + '.c'),
+ dependencies : test_deps,
+ install_dir : libexecdir,
+ install_rpath : libexecdir_rpathdir,
+ install : true)
+ test_list += prog
+endforeach
+
foreach prog : xe_progs
test_executables += executable(prog,
join_paths('xe', prog + '.c'),
@@ -474,7 +487,7 @@ test_executables += executable('kms_color',
test_list += 'kms_color'
test_executables += executable('kms_dsc',
- [ join_paths('i915', 'kms_dsc.c'), join_paths ('i915', 'kms_dsc_helper.c')],
+ [ join_paths('intel', 'kms_dsc.c'), join_paths ('intel', 'kms_dsc_helper.c')],
dependencies : test_deps,
install_dir : libexecdir,
install_rpath : libexecdir_rpathdir,
@@ -482,7 +495,7 @@ test_executables += executable('kms_dsc',
test_list += 'kms_dsc'
test_executables += executable('kms_psr2_sf',
- [ join_paths('i915', 'kms_psr2_sf.c'), join_paths ('i915', 'kms_dsc_helper.c')],
+ [ join_paths('intel', 'kms_psr2_sf.c'), join_paths ('intel', 'kms_dsc_helper.c')],
dependencies : test_deps,
install_dir : libexecdir,
install_rpath : libexecdir_rpathdir,
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* [igt-dev] [i-g-t 45/45] xe-fast-feedback: Add kms tests to XE BAT
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (43 preceding siblings ...)
2023-04-18 16:45 ` [igt-dev] [i-g-t 44/45] tests/kms: Move intel specific kms tests to new dir Bhanuprakash Modem
@ 2023-04-18 16:45 ` Bhanuprakash Modem
2023-04-18 16:58 ` [igt-dev] [i-g-t 00/45] Add IGT display support for XE Ville Syrjälä
` (3 subsequent siblings)
48 siblings, 0 replies; 72+ messages in thread
From: Bhanuprakash Modem @ 2023-04-18 16:45 UTC (permalink / raw)
To: igt-dev
Add kms tests to XE BAT.
- kms_chamelium_*
- kms_cursor_legacy
- kms_flip
- kms_pipe_crc_basic
- kms_psr
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
---
tests/intel-ci/xe-fast-feedback.testlist | 31 ++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/tests/intel-ci/xe-fast-feedback.testlist b/tests/intel-ci/xe-fast-feedback.testlist
index e3ebce70b..f05bc1162 100644
--- a/tests/intel-ci/xe-fast-feedback.testlist
+++ b/tests/intel-ci/xe-fast-feedback.testlist
@@ -184,8 +184,39 @@ igt@kms_addfb_basic@unused-handle
igt@kms_addfb_basic@unused-modifier
igt@kms_addfb_basic@unused-offsets
igt@kms_addfb_basic@unused-pitches
+igt@kms_chamelium_edid@dp-edid-read
+igt@kms_chamelium_edid@hdmi-edid-read
+igt@kms_chamelium_edid@vga-edid-read
+igt@kms_chamelium_frames@dp-crc-fast
+igt@kms_chamelium_frames@hdmi-crc-fast
+igt@kms_chamelium_hpd@common-hpd-after-suspend
+igt@kms_chamelium_hpd@dp-hpd-fast
+igt@kms_chamelium_hpd@hdmi-hpd-fast
+igt@kms_chamelium_hpd@vga-hpd-fast
+igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic
+igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy
+igt@kms_cursor_legacy@basic-flip-after-cursor-atomic
+igt@kms_cursor_legacy@basic-flip-after-cursor-legacy
+igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size
+igt@kms_cursor_legacy@basic-flip-before-cursor-atomic
+igt@kms_cursor_legacy@basic-flip-before-cursor-legacy
+igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size
+igt@kms_flip@basic-flip-vs-dpms
+igt@kms_flip@basic-flip-vs-modeset
+igt@kms_flip@basic-flip-vs-wf_vblank
+igt@kms_flip@basic-plain-flip
igt@kms_force_connector_basic@force-connector-state
igt@kms_force_connector_basic@force-edid
igt@kms_force_connector_basic@force-load-detect
igt@kms_force_connector_basic@prune-stale-modes
+igt@kms_pipe_crc_basic@compare-crc-sanitycheck
+igt@kms_pipe_crc_basic@hang-read-crc
+igt@kms_pipe_crc_basic@nonblocking-crc
+igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence
+igt@kms_pipe_crc_basic@read-crc
+igt@kms_pipe_crc_basic@read-crc-frame-sequence
+igt@kms_pipe_crc_basic@suspend-read-crc
igt@kms_prop_blob@basic
+igt@kms_psr@primary_page_flip
+igt@kms_psr@cursor_plane_move
+igt@kms_psr@sprite_plane_onoff
--
2.40.0
^ permalink raw reply related [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (44 preceding siblings ...)
2023-04-18 16:45 ` [igt-dev] [i-g-t 45/45] xe-fast-feedback: Add kms tests to XE BAT Bhanuprakash Modem
@ 2023-04-18 16:58 ` Ville Syrjälä
2023-04-19 7:01 ` Zbigniew Kempczyński
2023-04-18 17:24 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (2 subsequent siblings)
48 siblings, 1 reply; 72+ messages in thread
From: Ville Syrjälä @ 2023-04-18 16:58 UTC (permalink / raw)
To: Bhanuprakash Modem; +Cc: igt-dev
On Tue, Apr 18, 2023 at 10:14:16PM +0530, Bhanuprakash Modem wrote:
> Add IGT support to work kms tests on XE driver.
>
> TODO: Spin, BUSY & HANG related tests.
>
> Bhanuprakash Modem (35):
> lib: Use i915 namespace for XE debugfs
> lib/igt_fb: Add copy engine support for XE
> lib/igt_draw: Add gpu draw routine support for XE
> tests/i915/kms_big_fb: Add XE support
> tests/i915/kms_big_joiner: Add XE support
> tests/i915/kms_cdclk: Add XE support
> tests/i915/kms_draw_crc: Add XE support
> tests/i915/kms_dsc: Add XE support
> tests/i915/kms_flip_scaled_crc: Add XE support
> tests/i915/kms_flip_tiling: Add XE support
> tests/i915/kms_mmap_write_crc: Add XE support
> tests/i915/kms_psr*: Add XE support
> tests/kms_3d: Add XE support
> tests/kms_async_flips: No XE support
> tests/kms_atomic_transition: Add XE support
> tests/color: Add XE support
> tests/kms_concurrent: Add XE support
> tests/kms_content_protection: Add XE support
> tests/kms_cursor_crc: Add XE support
> tests/kms_cursor_legacy: Add XE support
> tests/kms_flip: Add XE support
> tests/kms_flip_event_leak: Add XE support
> tests/kms_getfb: Add XE support
> tests/kms_hdmi_inject: Add XE support
> tests/kms_hdr: Add XE support
> tests/kms_panel_fitting: Add XE support
> tests/kms_plane: Add XE support
> tests/kms_plane_lowers: Add XE support
> tests/kms_plane_scaling: Add XE support
> tests/kms_prime: Add XE support
> tests/kms_rotation_crc: Add XE support
> tests/kms_setmode: Add XE support
> tests/kms_universal_plane: Add XE support
> tests/kms: Move intel specific kms tests to new dir
Feels like the whole xe lib/ stuff is basically
a failure if we need to touch that many things
> xe-fast-feedback: Add kms tests to XE BAT
>
> Zbigniew Kempczyński (10):
> lib/xe_ioctl: Add missing header for direct resolving
> lib/xe_query: Add region helpers and missing doc
> lib/xe_query: Remove commented out function prototype
> lib/intel_allocator: Add allocator support for Xe
> lib/intel_bufops: Add Xe support in bufops
> lib/intel_batchbuffer: Add Xe support in intel-bb
> tests/xe_intel_bb: Check if intel-bb Xe support correctness
> tests/xe-fast-feedback: Add xe_intel_bb test to BAT
> lib/gpgpu_fill: Use RENDER engine flag to work on Xe
> tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
>
> lib/gpgpu_fill.c | 4 +-
> lib/gpu_cmds.c | 2 +-
> lib/igt_draw.c | 82 +-
> lib/igt_draw.h | 2 +
> lib/igt_fb.c | 30 +-
> lib/igt_fb.h | 2 +
> lib/igt_kms.c | 4 +-
> lib/igt_psr.c | 4 +-
> lib/intel_allocator.c | 49 +-
> lib/intel_aux_pgtable.c | 2 +-
> lib/intel_batchbuffer.c | 430 +++++--
> lib/intel_batchbuffer.h | 28 +-
> lib/intel_bufops.c | 73 +-
> lib/intel_bufops.h | 13 +-
> lib/xe/xe_ioctl.h | 1 +
> lib/xe/xe_query.c | 45 +
> lib/xe/xe_query.h | 3 +-
> tests/chamelium/kms_chamelium_color.c | 2 +-
> tests/i915/gem_caching.c | 4 +-
> tests/i915/gem_pxp.c | 2 +-
> tests/intel-ci/xe-fast-feedback.testlist | 50 +
> tests/{i915 => intel}/kms_big_fb.c | 75 +-
> tests/{i915 => intel}/kms_big_joiner.c | 2 +-
> tests/{i915 => intel}/kms_cdclk.c | 5 +-
> tests/{i915 => intel}/kms_draw_crc.c | 24 +-
> tests/{i915 => intel}/kms_dsc.c | 2 +-
> tests/{i915 => intel}/kms_dsc_helper.c | 0
> tests/{i915 => intel}/kms_dsc_helper.h | 0
> tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
> tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
> tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
> tests/{i915 => intel}/kms_psr.c | 40 +-
> tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
> tests/{i915 => intel}/kms_psr2_su.c | 2 +-
> tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
> tests/kms_3d.c | 8 +
> tests/kms_async_flips.c | 8 +-
> tests/kms_atomic_transition.c | 8 +-
> tests/kms_color.c | 10 +-
> tests/kms_color_helper.c | 2 +-
> tests/kms_concurrent.c | 4 +-
> tests/kms_content_protection.c | 12 +-
> tests/kms_cursor_crc.c | 4 +-
> tests/kms_cursor_legacy.c | 4 +-
> tests/kms_flip.c | 32 +-
> tests/kms_flip_event_leak.c | 5 +
> tests/kms_getfb.c | 22 +-
> tests/kms_hdmi_inject.c | 10 +-
> tests/kms_hdr.c | 8 +-
> tests/kms_panel_fitting.c | 12 +-
> tests/kms_plane.c | 19 +-
> tests/kms_plane_lowres.c | 9 +-
> tests/kms_plane_scaling.c | 41 +-
> tests/kms_prime.c | 241 +++-
> tests/kms_rotation_crc.c | 25 +-
> tests/kms_setmode.c | 7 +
> tests/kms_universal_plane.c | 15 +-
> tests/meson.build | 39 +-
> tests/xe/xe_gpgpu_fill.c | 133 +++
> tests/xe/xe_intel_bb.c | 1181 +++++++++++++++++++
> 60 files changed, 2513 insertions(+), 352 deletions(-)
> rename tests/{i915 => intel}/kms_big_fb.c (92%)
> rename tests/{i915 => intel}/kms_big_joiner.c (99%)
> rename tests/{i915 => intel}/kms_cdclk.c (98%)
> rename tests/{i915 => intel}/kms_draw_crc.c (92%)
> rename tests/{i915 => intel}/kms_dsc.c (99%)
> rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
> rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
> rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
> rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
> rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
> rename tests/{i915 => intel}/kms_psr.c (93%)
> rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
> rename tests/{i915 => intel}/kms_psr2_su.c (99%)
> rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
> create mode 100644 tests/xe/xe_gpgpu_fill.c
> create mode 100644 tests/xe/xe_intel_bb.c
>
> --
> 2.40.0
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 72+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for Add IGT display support for XE
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (45 preceding siblings ...)
2023-04-18 16:58 ` [igt-dev] [i-g-t 00/45] Add IGT display support for XE Ville Syrjälä
@ 2023-04-18 17:24 ` Patchwork
2023-04-18 21:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-04-21 16:43 ` [igt-dev] [i-g-t 00/45] " Kamil Konieczny
48 siblings, 0 replies; 72+ messages in thread
From: Patchwork @ 2023-04-18 17:24 UTC (permalink / raw)
To: Bhanuprakash Modem; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 2974 bytes --]
== Series Details ==
Series: Add IGT display support for XE
URL : https://patchwork.freedesktop.org/series/116658/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13026 -> IGTPW_8818
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/index.html
Participating hosts (38 -> 36)
------------------------------
Missing (2): bat-rpls-2 fi-snb-2520m
Known issues
------------
Here are the changes found in IGTPW_8818 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@reset:
- bat-rpls-1: [PASS][1] -> [ABORT][2] ([i915#4983])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/bat-rpls-1/igt@i915_selftest@live@reset.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/bat-rpls-1/igt@i915_selftest@live@reset.html
#### Possible fixes ####
* igt@i915_selftest@live@migrate:
- bat-dg2-11: [DMESG-WARN][3] ([i915#7699]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/bat-dg2-11/igt@i915_selftest@live@migrate.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/bat-dg2-11/igt@i915_selftest@live@migrate.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7259 -> IGTPW_8818
CI-20190529: 20190529
CI_DRM_13026: 45bed7de41ad8bd909a82382a8fc4cb65e04ad56 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8818: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/index.html
IGT_7259: 3d3a7f1c041d3f8d84d7457abf96adef0ea071cb @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@kms_plane_scaling@intel-max-src-size
+igt@xe_gpgpu_fill@basic
+igt@xe_intel_bb@add-remove-objects
+igt@xe_intel_bb@bb-with-allocator
+igt@xe_intel_bb@blit-reloc
+igt@xe_intel_bb@blit-simple
+igt@xe_intel_bb@create-in-region
+igt@xe_intel_bb@delta-check
+igt@xe_intel_bb@destroy-bb
+igt@xe_intel_bb@full-batch
+igt@xe_intel_bb@intel-bb-blit-none
+igt@xe_intel_bb@intel-bb-blit-x
+igt@xe_intel_bb@intel-bb-blit-y
+igt@xe_intel_bb@lot-of-buffers
+igt@xe_intel_bb@offset-control
+igt@xe_intel_bb@purge-bb
+igt@xe_intel_bb@render
+igt@xe_intel_bb@reset-bb
+igt@xe_intel_bb@simple-bb
+igt@xe_intel_bb@simple-bb-ctx
-igt@kms_display_modes@mst-extended-mode-negative
-igt@kms_plane_scaling@i915-max-src-size
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/index.html
[-- Attachment #2: Type: text/html, Size: 3582 bytes --]
^ permalink raw reply [flat|nested] 72+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for Add IGT display support for XE
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (46 preceding siblings ...)
2023-04-18 17:24 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2023-04-18 21:28 ` Patchwork
2023-04-21 16:43 ` [igt-dev] [i-g-t 00/45] " Kamil Konieczny
48 siblings, 0 replies; 72+ messages in thread
From: Patchwork @ 2023-04-18 21:28 UTC (permalink / raw)
To: Bhanuprakash Modem; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 21375 bytes --]
== Series Details ==
Series: Add IGT display support for XE
URL : https://patchwork.freedesktop.org/series/116658/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13026_full -> IGTPW_8818_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/index.html
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8818_full:
### IGT changes ###
#### Possible regressions ####
* {igt@kms_plane_scaling@intel-max-src-size} (NEW):
- {shard-tglu}: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-tglu-7/igt@kms_plane_scaling@intel-max-src-size.html
- {shard-rkl}: NOTRUN -> [SKIP][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-rkl-2/igt@kms_plane_scaling@intel-max-src-size.html
- {shard-dg1}: NOTRUN -> [SKIP][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-dg1-16/igt@kms_plane_scaling@intel-max-src-size.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@api_intel_bb@blit-reloc-purge-cache:
- {shard-dg1}: NOTRUN -> [SKIP][4] +58 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-dg1-16/igt@api_intel_bb@blit-reloc-purge-cache.html
* igt@api_intel_bb@object-reloc-keep-cache:
- {shard-rkl}: [SKIP][5] ([i915#3281]) -> [SKIP][6] +5 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-rkl-4/igt@api_intel_bb@object-reloc-keep-cache.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-rkl-2/igt@api_intel_bb@object-reloc-keep-cache.html
* igt@api_intel_bb@object-reloc-purge-cache:
- {shard-dg1}: [SKIP][7] ([i915#3281]) -> [SKIP][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-dg1-16/igt@api_intel_bb@object-reloc-purge-cache.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-dg1-16/igt@api_intel_bb@object-reloc-purge-cache.html
* igt@gem_set_tiling_vs_blt@tiled-to-tiled:
- {shard-rkl}: NOTRUN -> [SKIP][9]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-rkl-7/igt@gem_set_tiling_vs_blt@tiled-to-tiled.html
* igt@kms_draw_crc@draw-method-mmap-wc:
- {shard-dg1}: [SKIP][10] ([i915#8155]) -> [SKIP][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-dg1-15/igt@kms_draw_crc@draw-method-mmap-wc.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-dg1-16/igt@kms_draw_crc@draw-method-mmap-wc.html
* igt@kms_flip@2x-flip-vs-fences-interruptible:
- {shard-dg1}: [SKIP][12] ([i915#4859]) -> [SKIP][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-dg1-15/igt@kms_flip@2x-flip-vs-fences-interruptible.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-dg1-16/igt@kms_flip@2x-flip-vs-fences-interruptible.html
* igt@kms_plane_lowres@tiling-4:
- {shard-tglu}: [SKIP][14] ([fdo#112054] / [i915#5288]) -> [SKIP][15] +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-tglu-10/igt@kms_plane_lowres@tiling-4.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-tglu-2/igt@kms_plane_lowres@tiling-4.html
* igt@kms_plane_lowres@tiling-yf:
- {shard-rkl}: [SKIP][16] ([fdo#112054] / [i915#5288]) -> [SKIP][17] +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-rkl-7/igt@kms_plane_lowres@tiling-yf.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-rkl-1/igt@kms_plane_lowres@tiling-yf.html
* igt@kms_vblank@pipe-g-query-busy:
- {shard-tglu}: NOTRUN -> [SKIP][18] +8 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-tglu-3/igt@kms_vblank@pipe-g-query-busy.html
New tests
---------
New tests have been introduced between CI_DRM_13026_full and IGTPW_8818_full:
### New IGT tests (1) ###
* igt@kms_plane_scaling@intel-max-src-size:
- Statuses : 6 skip(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_8818_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@core_hotunplug@unbind-rebind:
- shard-snb: [PASS][19] -> [ABORT][20] ([i915#4528])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-snb6/igt@core_hotunplug@unbind-rebind.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-snb2/igt@core_hotunplug@unbind-rebind.html
* igt@gem_barrier_race@remote-request@rcs0:
- shard-glk: [PASS][21] -> [ABORT][22] ([i915#8211])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-glk7/igt@gem_barrier_race@remote-request@rcs0.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-glk7/igt@gem_barrier_race@remote-request@rcs0.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][23] -> [FAIL][24] ([i915#2842])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-glk8/igt@gem_exec_fair@basic-pace-share@rcs0.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-glk5/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@i915_pm_rps@reset:
- shard-snb: [PASS][25] -> [INCOMPLETE][26] ([i915#7790])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-snb1/igt@i915_pm_rps@reset.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-snb4/igt@i915_pm_rps@reset.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-apl: [PASS][27] -> [FAIL][28] ([i915#2346])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-apl4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-apl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
* igt@kms_fbcon_fbt@fbc-suspend:
- shard-glk: NOTRUN -> [FAIL][29] ([i915#4767])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-glk8/igt@kms_fbcon_fbt@fbc-suspend.html
* {igt@kms_plane_scaling@intel-max-src-size} (NEW):
- shard-apl: NOTRUN -> [SKIP][30] ([fdo#109271]) +5 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-apl2/igt@kms_plane_scaling@intel-max-src-size.html
* igt@kms_plane_scaling@plane-upscale-with-modifiers-factor-0-25@pipe-a-vga-1:
- shard-snb: NOTRUN -> [SKIP][31] ([fdo#109271]) +41 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-snb6/igt@kms_plane_scaling@plane-upscale-with-modifiers-factor-0-25@pipe-a-vga-1.html
* igt@kms_vblank@pipe-g-query-forked:
- shard-glk: NOTRUN -> [SKIP][32] ([fdo#109271]) +9 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-glk9/igt@kms_vblank@pipe-g-query-forked.html
#### Possible fixes ####
* igt@drm_fdinfo@most-busy-check-all@rcs0:
- {shard-rkl}: [FAIL][33] ([i915#7742]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-rkl-1/igt@drm_fdinfo@most-busy-check-all@rcs0.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-rkl-6/igt@drm_fdinfo@most-busy-check-all@rcs0.html
* igt@gem_barrier_race@remote-request@rcs0:
- {shard-tglu}: [ABORT][35] ([i915#8211]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-tglu-9/igt@gem_barrier_race@remote-request@rcs0.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-tglu-10/igt@gem_barrier_race@remote-request@rcs0.html
* igt@gem_eio@unwedge-stress:
- {shard-dg1}: [FAIL][37] ([i915#5784]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-dg1-16/igt@gem_eio@unwedge-stress.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-dg1-16/igt@gem_eio@unwedge-stress.html
* igt@gem_exec_fair@basic-deadline:
- shard-apl: [FAIL][39] ([i915#2846]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-apl2/igt@gem_exec_fair@basic-deadline.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-apl4/igt@gem_exec_fair@basic-deadline.html
* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [FAIL][41] ([i915#2842]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-apl1/igt@gem_exec_fair@basic-none-solo@rcs0.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-apl1/igt@gem_exec_fair@basic-none-solo@rcs0.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- {shard-rkl}: [FAIL][43] ([i915#2842]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-rkl-4/igt@gem_exec_fair@basic-pace-share@rcs0.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-rkl-7/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@gem_exec_fair@basic-pace@vcs0:
- shard-glk: [FAIL][45] ([i915#2842]) -> [PASS][46] +2 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-glk5/igt@gem_exec_fair@basic-pace@vcs0.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-glk7/igt@gem_exec_fair@basic-pace@vcs0.html
* igt@gem_exec_suspend@basic-s4-devices@lmem0:
- {shard-dg1}: [ABORT][47] ([i915#7975]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-dg1-14/igt@gem_exec_suspend@basic-s4-devices@lmem0.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-dg1-15/igt@gem_exec_suspend@basic-s4-devices@lmem0.html
* igt@i915_pm_dc@dc9-dpms:
- {shard-tglu}: [SKIP][49] ([i915#4281]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-tglu-7/igt@i915_pm_dc@dc9-dpms.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-tglu-2/igt@i915_pm_dc@dc9-dpms.html
* igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- {shard-rkl}: [SKIP][51] ([i915#1397]) -> [PASS][52] +2 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-rkl-1/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-rkl-7/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html
* igt@i915_pm_rpm@modeset-non-lpsp:
- {shard-dg1}: [SKIP][53] ([i915#1397]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-dg1-14/igt@i915_pm_rpm@modeset-non-lpsp.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-dg1-18/igt@i915_pm_rpm@modeset-non-lpsp.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [FAIL][55] ([i915#2346]) -> [PASS][56] +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-glk1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-glk6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
* igt@kms_cursor_legacy@single-bo@pipe-b:
- {shard-rkl}: [INCOMPLETE][57] ([i915#8011]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-rkl-7/igt@kms_cursor_legacy@single-bo@pipe-b.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-rkl-1/igt@kms_cursor_legacy@single-bo@pipe-b.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2:
- shard-glk: [FAIL][59] ([i915#79]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13026/shard-glk2/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/shard-glk6/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#3023]: https://gitlab.freedesktop.org/drm/intel/issues/3023
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3743]: https://gitlab.freedesktop.org/drm/intel/issues/3743
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7790]: https://gitlab.freedesktop.org/drm/intel/issues/7790
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8155]: https://gitlab.freedesktop.org/drm/intel/issues/8155
[i915#8211]: https://gitlab.freedesktop.org/drm/intel/issues/8211
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7259 -> IGTPW_8818
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_13026: 45bed7de41ad8bd909a82382a8fc4cb65e04ad56 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8818: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/index.html
IGT_7259: 3d3a7f1c041d3f8d84d7457abf96adef0ea071cb @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8818/index.html
[-- Attachment #2: Type: text/html, Size: 16658 bytes --]
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-18 16:58 ` [igt-dev] [i-g-t 00/45] Add IGT display support for XE Ville Syrjälä
@ 2023-04-19 7:01 ` Zbigniew Kempczyński
2023-04-19 11:57 ` Modem, Bhanuprakash
0 siblings, 1 reply; 72+ messages in thread
From: Zbigniew Kempczyński @ 2023-04-19 7:01 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: igt-dev
On Tue, Apr 18, 2023 at 07:58:08PM +0300, Ville Syrjälä wrote:
> On Tue, Apr 18, 2023 at 10:14:16PM +0530, Bhanuprakash Modem wrote:
> > Add IGT support to work kms tests on XE driver.
> >
> > TODO: Spin, BUSY & HANG related tests.
> >
> > Bhanuprakash Modem (35):
> > lib: Use i915 namespace for XE debugfs
> > lib/igt_fb: Add copy engine support for XE
> > lib/igt_draw: Add gpu draw routine support for XE
> > tests/i915/kms_big_fb: Add XE support
> > tests/i915/kms_big_joiner: Add XE support
> > tests/i915/kms_cdclk: Add XE support
> > tests/i915/kms_draw_crc: Add XE support
> > tests/i915/kms_dsc: Add XE support
> > tests/i915/kms_flip_scaled_crc: Add XE support
> > tests/i915/kms_flip_tiling: Add XE support
> > tests/i915/kms_mmap_write_crc: Add XE support
> > tests/i915/kms_psr*: Add XE support
> > tests/kms_3d: Add XE support
> > tests/kms_async_flips: No XE support
> > tests/kms_atomic_transition: Add XE support
> > tests/color: Add XE support
> > tests/kms_concurrent: Add XE support
> > tests/kms_content_protection: Add XE support
> > tests/kms_cursor_crc: Add XE support
> > tests/kms_cursor_legacy: Add XE support
> > tests/kms_flip: Add XE support
> > tests/kms_flip_event_leak: Add XE support
> > tests/kms_getfb: Add XE support
> > tests/kms_hdmi_inject: Add XE support
> > tests/kms_hdr: Add XE support
> > tests/kms_panel_fitting: Add XE support
> > tests/kms_plane: Add XE support
> > tests/kms_plane_lowers: Add XE support
> > tests/kms_plane_scaling: Add XE support
> > tests/kms_prime: Add XE support
> > tests/kms_rotation_crc: Add XE support
> > tests/kms_setmode: Add XE support
> > tests/kms_universal_plane: Add XE support
> > tests/kms: Move intel specific kms tests to new dir
>
> Feels like the whole xe lib/ stuff is basically
> a failure if we need to touch that many things
Why you think so? Changes:
- if (is_i915_device(data->drm_fd))
+ if (is_intel_device(data->drm_fd))
which checks intel (i915 or xe) looks good for me. I mean
I wouldn't like to handle xe in is_i915_device() check.
--
Zbigniew
>
> > xe-fast-feedback: Add kms tests to XE BAT
> >
> > Zbigniew Kempczyński (10):
> > lib/xe_ioctl: Add missing header for direct resolving
> > lib/xe_query: Add region helpers and missing doc
> > lib/xe_query: Remove commented out function prototype
> > lib/intel_allocator: Add allocator support for Xe
> > lib/intel_bufops: Add Xe support in bufops
> > lib/intel_batchbuffer: Add Xe support in intel-bb
> > tests/xe_intel_bb: Check if intel-bb Xe support correctness
> > tests/xe-fast-feedback: Add xe_intel_bb test to BAT
> > lib/gpgpu_fill: Use RENDER engine flag to work on Xe
> > tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
> >
> > lib/gpgpu_fill.c | 4 +-
> > lib/gpu_cmds.c | 2 +-
> > lib/igt_draw.c | 82 +-
> > lib/igt_draw.h | 2 +
> > lib/igt_fb.c | 30 +-
> > lib/igt_fb.h | 2 +
> > lib/igt_kms.c | 4 +-
> > lib/igt_psr.c | 4 +-
> > lib/intel_allocator.c | 49 +-
> > lib/intel_aux_pgtable.c | 2 +-
> > lib/intel_batchbuffer.c | 430 +++++--
> > lib/intel_batchbuffer.h | 28 +-
> > lib/intel_bufops.c | 73 +-
> > lib/intel_bufops.h | 13 +-
> > lib/xe/xe_ioctl.h | 1 +
> > lib/xe/xe_query.c | 45 +
> > lib/xe/xe_query.h | 3 +-
> > tests/chamelium/kms_chamelium_color.c | 2 +-
> > tests/i915/gem_caching.c | 4 +-
> > tests/i915/gem_pxp.c | 2 +-
> > tests/intel-ci/xe-fast-feedback.testlist | 50 +
> > tests/{i915 => intel}/kms_big_fb.c | 75 +-
> > tests/{i915 => intel}/kms_big_joiner.c | 2 +-
> > tests/{i915 => intel}/kms_cdclk.c | 5 +-
> > tests/{i915 => intel}/kms_draw_crc.c | 24 +-
> > tests/{i915 => intel}/kms_dsc.c | 2 +-
> > tests/{i915 => intel}/kms_dsc_helper.c | 0
> > tests/{i915 => intel}/kms_dsc_helper.h | 0
> > tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
> > tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
> > tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
> > tests/{i915 => intel}/kms_psr.c | 40 +-
> > tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
> > tests/{i915 => intel}/kms_psr2_su.c | 2 +-
> > tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
> > tests/kms_3d.c | 8 +
> > tests/kms_async_flips.c | 8 +-
> > tests/kms_atomic_transition.c | 8 +-
> > tests/kms_color.c | 10 +-
> > tests/kms_color_helper.c | 2 +-
> > tests/kms_concurrent.c | 4 +-
> > tests/kms_content_protection.c | 12 +-
> > tests/kms_cursor_crc.c | 4 +-
> > tests/kms_cursor_legacy.c | 4 +-
> > tests/kms_flip.c | 32 +-
> > tests/kms_flip_event_leak.c | 5 +
> > tests/kms_getfb.c | 22 +-
> > tests/kms_hdmi_inject.c | 10 +-
> > tests/kms_hdr.c | 8 +-
> > tests/kms_panel_fitting.c | 12 +-
> > tests/kms_plane.c | 19 +-
> > tests/kms_plane_lowres.c | 9 +-
> > tests/kms_plane_scaling.c | 41 +-
> > tests/kms_prime.c | 241 +++-
> > tests/kms_rotation_crc.c | 25 +-
> > tests/kms_setmode.c | 7 +
> > tests/kms_universal_plane.c | 15 +-
> > tests/meson.build | 39 +-
> > tests/xe/xe_gpgpu_fill.c | 133 +++
> > tests/xe/xe_intel_bb.c | 1181 +++++++++++++++++++
> > 60 files changed, 2513 insertions(+), 352 deletions(-)
> > rename tests/{i915 => intel}/kms_big_fb.c (92%)
> > rename tests/{i915 => intel}/kms_big_joiner.c (99%)
> > rename tests/{i915 => intel}/kms_cdclk.c (98%)
> > rename tests/{i915 => intel}/kms_draw_crc.c (92%)
> > rename tests/{i915 => intel}/kms_dsc.c (99%)
> > rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
> > rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
> > rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
> > rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
> > rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
> > rename tests/{i915 => intel}/kms_psr.c (93%)
> > rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
> > rename tests/{i915 => intel}/kms_psr2_su.c (99%)
> > rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
> > create mode 100644 tests/xe/xe_gpgpu_fill.c
> > create mode 100644 tests/xe/xe_intel_bb.c
> >
> > --
> > 2.40.0
>
> --
> Ville Syrjälä
> Intel
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-19 7:01 ` Zbigniew Kempczyński
@ 2023-04-19 11:57 ` Modem, Bhanuprakash
2023-04-19 16:19 ` Zbigniew Kempczyński
2023-04-21 6:47 ` Nautiyal, Ankit K
0 siblings, 2 replies; 72+ messages in thread
From: Modem, Bhanuprakash @ 2023-04-19 11:57 UTC (permalink / raw)
To: Zbigniew Kempczyński, Ville Syrjälä; +Cc: igt-dev
Hi,
On Wed-19-04-2023 12:31 pm, Zbigniew Kempczyński wrote:
> On Tue, Apr 18, 2023 at 07:58:08PM +0300, Ville Syrjälä wrote:
>> On Tue, Apr 18, 2023 at 10:14:16PM +0530, Bhanuprakash Modem wrote:
>>> Add IGT support to work kms tests on XE driver.
>>>
>>> TODO: Spin, BUSY & HANG related tests.
>>>
>>> Bhanuprakash Modem (35):
>>> lib: Use i915 namespace for XE debugfs
>>> lib/igt_fb: Add copy engine support for XE
>>> lib/igt_draw: Add gpu draw routine support for XE
>>> tests/i915/kms_big_fb: Add XE support
>>> tests/i915/kms_big_joiner: Add XE support
>>> tests/i915/kms_cdclk: Add XE support
>>> tests/i915/kms_draw_crc: Add XE support
>>> tests/i915/kms_dsc: Add XE support
>>> tests/i915/kms_flip_scaled_crc: Add XE support
>>> tests/i915/kms_flip_tiling: Add XE support
>>> tests/i915/kms_mmap_write_crc: Add XE support
>>> tests/i915/kms_psr*: Add XE support
>>> tests/kms_3d: Add XE support
>>> tests/kms_async_flips: No XE support
>>> tests/kms_atomic_transition: Add XE support
>>> tests/color: Add XE support
>>> tests/kms_concurrent: Add XE support
>>> tests/kms_content_protection: Add XE support
>>> tests/kms_cursor_crc: Add XE support
>>> tests/kms_cursor_legacy: Add XE support
>>> tests/kms_flip: Add XE support
>>> tests/kms_flip_event_leak: Add XE support
>>> tests/kms_getfb: Add XE support
>>> tests/kms_hdmi_inject: Add XE support
>>> tests/kms_hdr: Add XE support
>>> tests/kms_panel_fitting: Add XE support
>>> tests/kms_plane: Add XE support
>>> tests/kms_plane_lowers: Add XE support
>>> tests/kms_plane_scaling: Add XE support
>>> tests/kms_prime: Add XE support
>>> tests/kms_rotation_crc: Add XE support
>>> tests/kms_setmode: Add XE support
>>> tests/kms_universal_plane: Add XE support
>>> tests/kms: Move intel specific kms tests to new dir
>>
>> Feels like the whole xe lib/ stuff is basically
>> a failure if we need to touch that many things
>
> Why you think so? Changes:
>
> - if (is_i915_device(data->drm_fd))
> + if (is_intel_device(data->drm_fd))
Yes most of the changes are to update *i915* to *intel* and few
unavoidable changes like:
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
Also, there are few xe_device specific changes like:
+ if (is_xe_device(drm_fd))
+ xe_device_get(drm_fd);
+ if (is_xe_device(drm_fd))
+ xe_device_put(drm_fd);
@Zbigniew, How about moving xe_device_get() to drm_open_driver()?
So that, no need to call xe_device_get() in test level.
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -601,6 +601,9 @@ int drm_open_driver(int chipset)
}
}
+ if (is_xe_device(fd))
+ xe_device_get(fd);
+
return fd;
}
Ofcourse we need some efforts to handle xe_device_put():
1- Create a new helper maybe drm_close(fd)
drm_close(int fd) {
if (is_xe_device(fd))
xe_device_put(fd);
close(fd);
}
2- Update both kms & gem tests to use s/close(fd)/drm_close(fd)/
- Bhanu
>
> which checks intel (i915 or xe) looks good for me. I mean
> I wouldn't like to handle xe in is_i915_device() check.
>
> --
> Zbigniew
>
>
>>
>>> xe-fast-feedback: Add kms tests to XE BAT
>>>
>>> Zbigniew Kempczyński (10):
>>> lib/xe_ioctl: Add missing header for direct resolving
>>> lib/xe_query: Add region helpers and missing doc
>>> lib/xe_query: Remove commented out function prototype
>>> lib/intel_allocator: Add allocator support for Xe
>>> lib/intel_bufops: Add Xe support in bufops
>>> lib/intel_batchbuffer: Add Xe support in intel-bb
>>> tests/xe_intel_bb: Check if intel-bb Xe support correctness
>>> tests/xe-fast-feedback: Add xe_intel_bb test to BAT
>>> lib/gpgpu_fill: Use RENDER engine flag to work on Xe
>>> tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
>>>
>>> lib/gpgpu_fill.c | 4 +-
>>> lib/gpu_cmds.c | 2 +-
>>> lib/igt_draw.c | 82 +-
>>> lib/igt_draw.h | 2 +
>>> lib/igt_fb.c | 30 +-
>>> lib/igt_fb.h | 2 +
>>> lib/igt_kms.c | 4 +-
>>> lib/igt_psr.c | 4 +-
>>> lib/intel_allocator.c | 49 +-
>>> lib/intel_aux_pgtable.c | 2 +-
>>> lib/intel_batchbuffer.c | 430 +++++--
>>> lib/intel_batchbuffer.h | 28 +-
>>> lib/intel_bufops.c | 73 +-
>>> lib/intel_bufops.h | 13 +-
>>> lib/xe/xe_ioctl.h | 1 +
>>> lib/xe/xe_query.c | 45 +
>>> lib/xe/xe_query.h | 3 +-
>>> tests/chamelium/kms_chamelium_color.c | 2 +-
>>> tests/i915/gem_caching.c | 4 +-
>>> tests/i915/gem_pxp.c | 2 +-
>>> tests/intel-ci/xe-fast-feedback.testlist | 50 +
>>> tests/{i915 => intel}/kms_big_fb.c | 75 +-
>>> tests/{i915 => intel}/kms_big_joiner.c | 2 +-
>>> tests/{i915 => intel}/kms_cdclk.c | 5 +-
>>> tests/{i915 => intel}/kms_draw_crc.c | 24 +-
>>> tests/{i915 => intel}/kms_dsc.c | 2 +-
>>> tests/{i915 => intel}/kms_dsc_helper.c | 0
>>> tests/{i915 => intel}/kms_dsc_helper.h | 0
>>> tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
>>> tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
>>> tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
>>> tests/{i915 => intel}/kms_psr.c | 40 +-
>>> tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
>>> tests/{i915 => intel}/kms_psr2_su.c | 2 +-
>>> tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
>>> tests/kms_3d.c | 8 +
>>> tests/kms_async_flips.c | 8 +-
>>> tests/kms_atomic_transition.c | 8 +-
>>> tests/kms_color.c | 10 +-
>>> tests/kms_color_helper.c | 2 +-
>>> tests/kms_concurrent.c | 4 +-
>>> tests/kms_content_protection.c | 12 +-
>>> tests/kms_cursor_crc.c | 4 +-
>>> tests/kms_cursor_legacy.c | 4 +-
>>> tests/kms_flip.c | 32 +-
>>> tests/kms_flip_event_leak.c | 5 +
>>> tests/kms_getfb.c | 22 +-
>>> tests/kms_hdmi_inject.c | 10 +-
>>> tests/kms_hdr.c | 8 +-
>>> tests/kms_panel_fitting.c | 12 +-
>>> tests/kms_plane.c | 19 +-
>>> tests/kms_plane_lowres.c | 9 +-
>>> tests/kms_plane_scaling.c | 41 +-
>>> tests/kms_prime.c | 241 +++-
>>> tests/kms_rotation_crc.c | 25 +-
>>> tests/kms_setmode.c | 7 +
>>> tests/kms_universal_plane.c | 15 +-
>>> tests/meson.build | 39 +-
>>> tests/xe/xe_gpgpu_fill.c | 133 +++
>>> tests/xe/xe_intel_bb.c | 1181 +++++++++++++++++++
>>> 60 files changed, 2513 insertions(+), 352 deletions(-)
>>> rename tests/{i915 => intel}/kms_big_fb.c (92%)
>>> rename tests/{i915 => intel}/kms_big_joiner.c (99%)
>>> rename tests/{i915 => intel}/kms_cdclk.c (98%)
>>> rename tests/{i915 => intel}/kms_draw_crc.c (92%)
>>> rename tests/{i915 => intel}/kms_dsc.c (99%)
>>> rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
>>> rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
>>> rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
>>> rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
>>> rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
>>> rename tests/{i915 => intel}/kms_psr.c (93%)
>>> rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
>>> rename tests/{i915 => intel}/kms_psr2_su.c (99%)
>>> rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
>>> create mode 100644 tests/xe/xe_gpgpu_fill.c
>>> create mode 100644 tests/xe/xe_intel_bb.c
>>>
>>> --
>>> 2.40.0
>>
>> --
>> Ville Syrjälä
>> Intel
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-19 11:57 ` Modem, Bhanuprakash
@ 2023-04-19 16:19 ` Zbigniew Kempczyński
2023-04-21 6:47 ` Nautiyal, Ankit K
1 sibling, 0 replies; 72+ messages in thread
From: Zbigniew Kempczyński @ 2023-04-19 16:19 UTC (permalink / raw)
To: Modem, Bhanuprakash; +Cc: igt-dev
On Wed, Apr 19, 2023 at 05:27:24PM +0530, Modem, Bhanuprakash wrote:
<cut>
> @Zbigniew, How about moving xe_device_get() to drm_open_driver()?
> So that, no need to call xe_device_get() in test level.
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -601,6 +601,9 @@ int drm_open_driver(int chipset)
> }
> }
>
> + if (is_xe_device(fd))
> + xe_device_get(fd);
> +
> return fd;
> }
>
> Ofcourse we need some efforts to handle xe_device_put():
> 1- Create a new helper maybe drm_close(fd)
> drm_close(int fd) {
> if (is_xe_device(fd))
> xe_device_put(fd);
>
> close(fd);
> }
> 2- Update both kms & gem tests to use s/close(fd)/drm_close(fd)/
>
> - Bhanu
>
I got no strong preference to call this helper but if you plan to
do so I think __drm_open_driver_another() is better place to put
this into. I mean with using filters you can omit drm_open_driver().
And yes, drm_close() might need to be added also to call freeing
helper.
Just try out, let's see what will happen on CI. I don't think
you'll regress i915, only xe path may need some tweaks.
--
Zbigniew
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t, 17/45] tests/i915/kms_draw_crc: Add XE support
@ 2023-04-20 9:01 Gupta, Nidhi1
0 siblings, 0 replies; 72+ messages in thread
From: Gupta, Nidhi1 @ 2023-04-20 9:01 UTC (permalink / raw)
To: igt-dev@lists.freedesktop.org
[-- Attachment #1: Type: text/plain, Size: 5034 bytes --]
On 2023-04-18 at 09:10 PM, Bhanuprakash Modem wrote:
kms_draw_crc is failing with xe changes, initially to collect CRC the draw function igt_draw_rect() is failing due to failure of
xe_vm_bind_array function in xe_ioctl file.
Test assertion failure function xe_vm_bind_array, file ../lib/xe/xe_ioctl.c:88
Are we missing something here?
>Add XE driver support for differnt draw methods.
Spelling of "different" is not correct.
>
>Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
>---
>tests/i915/kms_draw_crc.c | 24 ++++++++++++++----------
> 1 file changed, 14 insertions(+), 10 deletions(-)
>
>diff --git a/tests/i915/kms_draw_crc.c b/tests/i915/kms_draw_crc.c
>index 3a3cd99a0..db6d71f2e 100644
>--- a/tests/i915/kms_draw_crc.c
>+++ b/tests/i915/kms_draw_crc.c
>@@ -149,8 +149,8 @@ static void draw_method_subtest(enum igt_draw_method method,
> * comparison. Cache the value so we don't recompute it for every single
> * subtest. */
> if (!base_crcs[format_index].set) {
>- get_method_crc(gem_has_mappable_ggtt(drm_fd) ? IGT_DRAW_MMAP_GTT :
>- IGT_DRAW_MMAP_WC,
>+ get_method_crc(igt_draw_supports_method(drm_fd, IGT_DRAW_MMAP_GTT) ?
>+ IGT_DRAW_MMAP_GTT : IGT_DRAW_MMAP_WC,
> formats[format_index],
> DRM_FORMAT_MOD_LINEAR,
> &base_crcs[format_index].crc);
>@@ -195,8 +195,8 @@ static void fill_fb_subtest(void)
> igt_plane_set_fb(primary, &fb);
>
> igt_draw_rect_fb(drm_fd, bops, 0, &fb,
>- gem_has_mappable_ggtt(drm_fd) ? IGT_DRAW_MMAP_GTT :
>- IGT_DRAW_MMAP_WC,
>+ igt_draw_supports_method(drm_fd, IGT_DRAW_MMAP_GTT) ?
>+ IGT_DRAW_MMAP_GTT : IGT_DRAW_MMAP_WC,
> 0, 0, fb.width, fb.height, 0xFF);
Why igt_draw_supports_method is used here?
-Nidhi
>
> rc = igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>@@ -222,7 +222,7 @@ static void fill_fb_subtest(void)
>
>static void setup_environment(void)
> {
>- drm_fd = drm_open_driver_master(DRIVER_INTEL);
>+ drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
> igt_require(drm_fd >= 0);
> igt_display_require(&display, drm_fd);
> igt_display_require_output(&display);
>@@ -289,13 +289,17 @@ igt_main
> "method (%s) with different modifiers & DRM formats.",
> igt_draw_get_method_name(method));
> igt_subtest_with_dynamic_f("draw-method-%s", igt_draw_get_method_name(method)) {
>- igt_skip_on(method == IGT_DRAW_MMAP_WC && !gem_mmap__has_wc(drm_fd));
>- igt_skip_on(method == IGT_DRAW_MMAP_GTT && !gem_has_mappable_ggtt(drm_fd));
>+ if (!igt_draw_supports_method(drm_fd, method))
>+ continue;
>
>- for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
>- for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
>- modifier = modifiers[modifier_idx];
>+ for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
>+ modifier = modifiers[modifier_idx];
>
>+ /* No tiling support in XE. */
>+ if (is_xe_device(drm_fd) && modifier != DRM_FORMAT_MOD_LINEAR)
>+ continue;
>+
>+ for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
> if (!igt_display_has_format_mod(&display, formats[format_idx], modifier))
> continue;
[-- Attachment #2: Type: text/html, Size: 18582 bytes --]
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-19 11:57 ` Modem, Bhanuprakash
2023-04-19 16:19 ` Zbigniew Kempczyński
@ 2023-04-21 6:47 ` Nautiyal, Ankit K
2023-04-21 7:33 ` Modem, Bhanuprakash
1 sibling, 1 reply; 72+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-21 6:47 UTC (permalink / raw)
To: igt-dev
On 4/19/2023 5:27 PM, Modem, Bhanuprakash wrote:
> Hi,
>
> On Wed-19-04-2023 12:31 pm, Zbigniew Kempczyński wrote:
>> On Tue, Apr 18, 2023 at 07:58:08PM +0300, Ville Syrjälä wrote:
>>> On Tue, Apr 18, 2023 at 10:14:16PM +0530, Bhanuprakash Modem wrote:
>>>> Add IGT support to work kms tests on XE driver.
>>>>
>>>> TODO: Spin, BUSY & HANG related tests.
>>>>
>>>> Bhanuprakash Modem (35):
>>>> lib: Use i915 namespace for XE debugfs
>>>> lib/igt_fb: Add copy engine support for XE
>>>> lib/igt_draw: Add gpu draw routine support for XE
>>>> tests/i915/kms_big_fb: Add XE support
>>>> tests/i915/kms_big_joiner: Add XE support
>>>> tests/i915/kms_cdclk: Add XE support
>>>> tests/i915/kms_draw_crc: Add XE support
>>>> tests/i915/kms_dsc: Add XE support
>>>> tests/i915/kms_flip_scaled_crc: Add XE support
>>>> tests/i915/kms_flip_tiling: Add XE support
>>>> tests/i915/kms_mmap_write_crc: Add XE support
>>>> tests/i915/kms_psr*: Add XE support
>>>> tests/kms_3d: Add XE support
>>>> tests/kms_async_flips: No XE support
>>>> tests/kms_atomic_transition: Add XE support
>>>> tests/color: Add XE support
>>>> tests/kms_concurrent: Add XE support
>>>> tests/kms_content_protection: Add XE support
>>>> tests/kms_cursor_crc: Add XE support
>>>> tests/kms_cursor_legacy: Add XE support
>>>> tests/kms_flip: Add XE support
>>>> tests/kms_flip_event_leak: Add XE support
>>>> tests/kms_getfb: Add XE support
>>>> tests/kms_hdmi_inject: Add XE support
>>>> tests/kms_hdr: Add XE support
>>>> tests/kms_panel_fitting: Add XE support
>>>> tests/kms_plane: Add XE support
>>>> tests/kms_plane_lowers: Add XE support
>>>> tests/kms_plane_scaling: Add XE support
>>>> tests/kms_prime: Add XE support
>>>> tests/kms_rotation_crc: Add XE support
>>>> tests/kms_setmode: Add XE support
>>>> tests/kms_universal_plane: Add XE support
>>>> tests/kms: Move intel specific kms tests to new dir
>>>
>>> Feels like the whole xe lib/ stuff is basically
>>> a failure if we need to touch that many things
>>
>> Why you think so? Changes:
>>
>> - if (is_i915_device(data->drm_fd))
>> + if (is_intel_device(data->drm_fd))
>
> Yes most of the changes are to update *i915* to *intel* and few
> unavoidable changes like:
> - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
>
>
> Also, there are few xe_device specific changes like:
> + if (is_xe_device(drm_fd))
> + xe_device_get(drm_fd);
>
> + if (is_xe_device(drm_fd))
> + xe_device_put(drm_fd);
>
>
> @Zbigniew, How about moving xe_device_get() to drm_open_driver()?
> So that, no need to call xe_device_get() in test level.
I agree, with this approach.
Currently a new test that is meant to run on any drm driver will need to
add this explicitly, so that it runs on XE driver.
As mentioned by Bhanu, will need to have a wrapper around close(drm_fd),
where we can do xe_device_put().
Regards,
Ankit
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -601,6 +601,9 @@ int drm_open_driver(int chipset)
> }
> }
>
> + if (is_xe_device(fd))
> + xe_device_get(fd);
> +
> return fd;
> }
>
> Ofcourse we need some efforts to handle xe_device_put():
> 1- Create a new helper maybe drm_close(fd)
> drm_close(int fd) {
> if (is_xe_device(fd))
> xe_device_put(fd);
>
> close(fd);
> }
> 2- Update both kms & gem tests to use s/close(fd)/drm_close(fd)/
>
> - Bhanu
>
>>
>> which checks intel (i915 or xe) looks good for me. I mean
>> I wouldn't like to handle xe in is_i915_device() check.
>>
>> --
>> Zbigniew
>>
>>
>>>
>>>> xe-fast-feedback: Add kms tests to XE BAT
>>>>
>>>> Zbigniew Kempczyński (10):
>>>> lib/xe_ioctl: Add missing header for direct resolving
>>>> lib/xe_query: Add region helpers and missing doc
>>>> lib/xe_query: Remove commented out function prototype
>>>> lib/intel_allocator: Add allocator support for Xe
>>>> lib/intel_bufops: Add Xe support in bufops
>>>> lib/intel_batchbuffer: Add Xe support in intel-bb
>>>> tests/xe_intel_bb: Check if intel-bb Xe support correctness
>>>> tests/xe-fast-feedback: Add xe_intel_bb test to BAT
>>>> lib/gpgpu_fill: Use RENDER engine flag to work on Xe
>>>> tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
>>>>
>>>> lib/gpgpu_fill.c | 4 +-
>>>> lib/gpu_cmds.c | 2 +-
>>>> lib/igt_draw.c | 82 +-
>>>> lib/igt_draw.h | 2 +
>>>> lib/igt_fb.c | 30 +-
>>>> lib/igt_fb.h | 2 +
>>>> lib/igt_kms.c | 4 +-
>>>> lib/igt_psr.c | 4 +-
>>>> lib/intel_allocator.c | 49 +-
>>>> lib/intel_aux_pgtable.c | 2 +-
>>>> lib/intel_batchbuffer.c | 430 +++++--
>>>> lib/intel_batchbuffer.h | 28 +-
>>>> lib/intel_bufops.c | 73 +-
>>>> lib/intel_bufops.h | 13 +-
>>>> lib/xe/xe_ioctl.h | 1 +
>>>> lib/xe/xe_query.c | 45 +
>>>> lib/xe/xe_query.h | 3 +-
>>>> tests/chamelium/kms_chamelium_color.c | 2 +-
>>>> tests/i915/gem_caching.c | 4 +-
>>>> tests/i915/gem_pxp.c | 2 +-
>>>> tests/intel-ci/xe-fast-feedback.testlist | 50 +
>>>> tests/{i915 => intel}/kms_big_fb.c | 75 +-
>>>> tests/{i915 => intel}/kms_big_joiner.c | 2 +-
>>>> tests/{i915 => intel}/kms_cdclk.c | 5 +-
>>>> tests/{i915 => intel}/kms_draw_crc.c | 24 +-
>>>> tests/{i915 => intel}/kms_dsc.c | 2 +-
>>>> tests/{i915 => intel}/kms_dsc_helper.c | 0
>>>> tests/{i915 => intel}/kms_dsc_helper.h | 0
>>>> tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
>>>> tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
>>>> tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
>>>> tests/{i915 => intel}/kms_psr.c | 40 +-
>>>> tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
>>>> tests/{i915 => intel}/kms_psr2_su.c | 2 +-
>>>> tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
>>>> tests/kms_3d.c | 8 +
>>>> tests/kms_async_flips.c | 8 +-
>>>> tests/kms_atomic_transition.c | 8 +-
>>>> tests/kms_color.c | 10 +-
>>>> tests/kms_color_helper.c | 2 +-
>>>> tests/kms_concurrent.c | 4 +-
>>>> tests/kms_content_protection.c | 12 +-
>>>> tests/kms_cursor_crc.c | 4 +-
>>>> tests/kms_cursor_legacy.c | 4 +-
>>>> tests/kms_flip.c | 32 +-
>>>> tests/kms_flip_event_leak.c | 5 +
>>>> tests/kms_getfb.c | 22 +-
>>>> tests/kms_hdmi_inject.c | 10 +-
>>>> tests/kms_hdr.c | 8 +-
>>>> tests/kms_panel_fitting.c | 12 +-
>>>> tests/kms_plane.c | 19 +-
>>>> tests/kms_plane_lowres.c | 9 +-
>>>> tests/kms_plane_scaling.c | 41 +-
>>>> tests/kms_prime.c | 241 +++-
>>>> tests/kms_rotation_crc.c | 25 +-
>>>> tests/kms_setmode.c | 7 +
>>>> tests/kms_universal_plane.c | 15 +-
>>>> tests/meson.build | 39 +-
>>>> tests/xe/xe_gpgpu_fill.c | 133 +++
>>>> tests/xe/xe_intel_bb.c | 1181
>>>> +++++++++++++++++++
>>>> 60 files changed, 2513 insertions(+), 352 deletions(-)
>>>> rename tests/{i915 => intel}/kms_big_fb.c (92%)
>>>> rename tests/{i915 => intel}/kms_big_joiner.c (99%)
>>>> rename tests/{i915 => intel}/kms_cdclk.c (98%)
>>>> rename tests/{i915 => intel}/kms_draw_crc.c (92%)
>>>> rename tests/{i915 => intel}/kms_dsc.c (99%)
>>>> rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
>>>> rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
>>>> rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
>>>> rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
>>>> rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
>>>> rename tests/{i915 => intel}/kms_psr.c (93%)
>>>> rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
>>>> rename tests/{i915 => intel}/kms_psr2_su.c (99%)
>>>> rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
>>>> create mode 100644 tests/xe/xe_gpgpu_fill.c
>>>> create mode 100644 tests/xe/xe_intel_bb.c
>>>>
>>>> --
>>>> 2.40.0
>>>
>>> --
>>> Ville Syrjälä
>>> Intel
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-21 6:47 ` Nautiyal, Ankit K
@ 2023-04-21 7:33 ` Modem, Bhanuprakash
2023-04-21 9:33 ` Nautiyal, Ankit K
0 siblings, 1 reply; 72+ messages in thread
From: Modem, Bhanuprakash @ 2023-04-21 7:33 UTC (permalink / raw)
To: Nautiyal, Ankit K, igt-dev
On Fri-21-04-2023 12:17 pm, Nautiyal, Ankit K wrote:
>
> On 4/19/2023 5:27 PM, Modem, Bhanuprakash wrote:
>> Hi,
>>
>> On Wed-19-04-2023 12:31 pm, Zbigniew Kempczyński wrote:
>>> On Tue, Apr 18, 2023 at 07:58:08PM +0300, Ville Syrjälä wrote:
>>>> On Tue, Apr 18, 2023 at 10:14:16PM +0530, Bhanuprakash Modem wrote:
>>>>> Add IGT support to work kms tests on XE driver.
>>>>>
>>>>> TODO: Spin, BUSY & HANG related tests.
>>>>>
>>>>> Bhanuprakash Modem (35):
>>>>> lib: Use i915 namespace for XE debugfs
>>>>> lib/igt_fb: Add copy engine support for XE
>>>>> lib/igt_draw: Add gpu draw routine support for XE
>>>>> tests/i915/kms_big_fb: Add XE support
>>>>> tests/i915/kms_big_joiner: Add XE support
>>>>> tests/i915/kms_cdclk: Add XE support
>>>>> tests/i915/kms_draw_crc: Add XE support
>>>>> tests/i915/kms_dsc: Add XE support
>>>>> tests/i915/kms_flip_scaled_crc: Add XE support
>>>>> tests/i915/kms_flip_tiling: Add XE support
>>>>> tests/i915/kms_mmap_write_crc: Add XE support
>>>>> tests/i915/kms_psr*: Add XE support
>>>>> tests/kms_3d: Add XE support
>>>>> tests/kms_async_flips: No XE support
>>>>> tests/kms_atomic_transition: Add XE support
>>>>> tests/color: Add XE support
>>>>> tests/kms_concurrent: Add XE support
>>>>> tests/kms_content_protection: Add XE support
>>>>> tests/kms_cursor_crc: Add XE support
>>>>> tests/kms_cursor_legacy: Add XE support
>>>>> tests/kms_flip: Add XE support
>>>>> tests/kms_flip_event_leak: Add XE support
>>>>> tests/kms_getfb: Add XE support
>>>>> tests/kms_hdmi_inject: Add XE support
>>>>> tests/kms_hdr: Add XE support
>>>>> tests/kms_panel_fitting: Add XE support
>>>>> tests/kms_plane: Add XE support
>>>>> tests/kms_plane_lowers: Add XE support
>>>>> tests/kms_plane_scaling: Add XE support
>>>>> tests/kms_prime: Add XE support
>>>>> tests/kms_rotation_crc: Add XE support
>>>>> tests/kms_setmode: Add XE support
>>>>> tests/kms_universal_plane: Add XE support
>>>>> tests/kms: Move intel specific kms tests to new dir
>>>>
>>>> Feels like the whole xe lib/ stuff is basically
>>>> a failure if we need to touch that many things
>>>
>>> Why you think so? Changes:
>>>
>>> - if (is_i915_device(data->drm_fd))
>>> + if (is_intel_device(data->drm_fd))
>>
>> Yes most of the changes are to update *i915* to *intel* and few
>> unavoidable changes like:
>> - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
>> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
>>
>>
>> Also, there are few xe_device specific changes like:
>> + if (is_xe_device(drm_fd))
>> + xe_device_get(drm_fd);
>>
>> + if (is_xe_device(drm_fd))
>> + xe_device_put(drm_fd);
>>
>>
>> @Zbigniew, How about moving xe_device_get() to drm_open_driver()?
>> So that, no need to call xe_device_get() in test level.
>
>
> I agree, with this approach.
>
> Currently a new test that is meant to run on any drm driver will need to
> add this explicitly, so that it runs on XE driver.
>
> As mentioned by Bhanu, will need to have a wrapper around close(drm_fd),
> where we can do xe_device_put().
For most of the kms tests, igt_display_require() & igt_display_fini()
will takecare of xe_device.
Few kms tests those are not using igt_display_require() must takecare of
xe_device explictly.
- Bhanu
>
> Regards,
>
> Ankit
>
>> --- a/lib/drmtest.c
>> +++ b/lib/drmtest.c
>> @@ -601,6 +601,9 @@ int drm_open_driver(int chipset)
>> }
>> }
>>
>> + if (is_xe_device(fd))
>> + xe_device_get(fd);
>> +
>> return fd;
>> }
>>
>> Ofcourse we need some efforts to handle xe_device_put():
>> 1- Create a new helper maybe drm_close(fd)
>> drm_close(int fd) {
>> if (is_xe_device(fd))
>> xe_device_put(fd);
>>
>> close(fd);
>> }
>> 2- Update both kms & gem tests to use s/close(fd)/drm_close(fd)/
>>
>> - Bhanu
>>
>>>
>>> which checks intel (i915 or xe) looks good for me. I mean
>>> I wouldn't like to handle xe in is_i915_device() check.
>>>
>>> --
>>> Zbigniew
>>>
>>>
>>>>
>>>>> xe-fast-feedback: Add kms tests to XE BAT
>>>>>
>>>>> Zbigniew Kempczyński (10):
>>>>> lib/xe_ioctl: Add missing header for direct resolving
>>>>> lib/xe_query: Add region helpers and missing doc
>>>>> lib/xe_query: Remove commented out function prototype
>>>>> lib/intel_allocator: Add allocator support for Xe
>>>>> lib/intel_bufops: Add Xe support in bufops
>>>>> lib/intel_batchbuffer: Add Xe support in intel-bb
>>>>> tests/xe_intel_bb: Check if intel-bb Xe support correctness
>>>>> tests/xe-fast-feedback: Add xe_intel_bb test to BAT
>>>>> lib/gpgpu_fill: Use RENDER engine flag to work on Xe
>>>>> tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
>>>>>
>>>>> lib/gpgpu_fill.c | 4 +-
>>>>> lib/gpu_cmds.c | 2 +-
>>>>> lib/igt_draw.c | 82 +-
>>>>> lib/igt_draw.h | 2 +
>>>>> lib/igt_fb.c | 30 +-
>>>>> lib/igt_fb.h | 2 +
>>>>> lib/igt_kms.c | 4 +-
>>>>> lib/igt_psr.c | 4 +-
>>>>> lib/intel_allocator.c | 49 +-
>>>>> lib/intel_aux_pgtable.c | 2 +-
>>>>> lib/intel_batchbuffer.c | 430 +++++--
>>>>> lib/intel_batchbuffer.h | 28 +-
>>>>> lib/intel_bufops.c | 73 +-
>>>>> lib/intel_bufops.h | 13 +-
>>>>> lib/xe/xe_ioctl.h | 1 +
>>>>> lib/xe/xe_query.c | 45 +
>>>>> lib/xe/xe_query.h | 3 +-
>>>>> tests/chamelium/kms_chamelium_color.c | 2 +-
>>>>> tests/i915/gem_caching.c | 4 +-
>>>>> tests/i915/gem_pxp.c | 2 +-
>>>>> tests/intel-ci/xe-fast-feedback.testlist | 50 +
>>>>> tests/{i915 => intel}/kms_big_fb.c | 75 +-
>>>>> tests/{i915 => intel}/kms_big_joiner.c | 2 +-
>>>>> tests/{i915 => intel}/kms_cdclk.c | 5 +-
>>>>> tests/{i915 => intel}/kms_draw_crc.c | 24 +-
>>>>> tests/{i915 => intel}/kms_dsc.c | 2 +-
>>>>> tests/{i915 => intel}/kms_dsc_helper.c | 0
>>>>> tests/{i915 => intel}/kms_dsc_helper.h | 0
>>>>> tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
>>>>> tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
>>>>> tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
>>>>> tests/{i915 => intel}/kms_psr.c | 40 +-
>>>>> tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
>>>>> tests/{i915 => intel}/kms_psr2_su.c | 2 +-
>>>>> tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
>>>>> tests/kms_3d.c | 8 +
>>>>> tests/kms_async_flips.c | 8 +-
>>>>> tests/kms_atomic_transition.c | 8 +-
>>>>> tests/kms_color.c | 10 +-
>>>>> tests/kms_color_helper.c | 2 +-
>>>>> tests/kms_concurrent.c | 4 +-
>>>>> tests/kms_content_protection.c | 12 +-
>>>>> tests/kms_cursor_crc.c | 4 +-
>>>>> tests/kms_cursor_legacy.c | 4 +-
>>>>> tests/kms_flip.c | 32 +-
>>>>> tests/kms_flip_event_leak.c | 5 +
>>>>> tests/kms_getfb.c | 22 +-
>>>>> tests/kms_hdmi_inject.c | 10 +-
>>>>> tests/kms_hdr.c | 8 +-
>>>>> tests/kms_panel_fitting.c | 12 +-
>>>>> tests/kms_plane.c | 19 +-
>>>>> tests/kms_plane_lowres.c | 9 +-
>>>>> tests/kms_plane_scaling.c | 41 +-
>>>>> tests/kms_prime.c | 241 +++-
>>>>> tests/kms_rotation_crc.c | 25 +-
>>>>> tests/kms_setmode.c | 7 +
>>>>> tests/kms_universal_plane.c | 15 +-
>>>>> tests/meson.build | 39 +-
>>>>> tests/xe/xe_gpgpu_fill.c | 133 +++
>>>>> tests/xe/xe_intel_bb.c | 1181
>>>>> +++++++++++++++++++
>>>>> 60 files changed, 2513 insertions(+), 352 deletions(-)
>>>>> rename tests/{i915 => intel}/kms_big_fb.c (92%)
>>>>> rename tests/{i915 => intel}/kms_big_joiner.c (99%)
>>>>> rename tests/{i915 => intel}/kms_cdclk.c (98%)
>>>>> rename tests/{i915 => intel}/kms_draw_crc.c (92%)
>>>>> rename tests/{i915 => intel}/kms_dsc.c (99%)
>>>>> rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
>>>>> rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
>>>>> rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
>>>>> rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
>>>>> rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
>>>>> rename tests/{i915 => intel}/kms_psr.c (93%)
>>>>> rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
>>>>> rename tests/{i915 => intel}/kms_psr2_su.c (99%)
>>>>> rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
>>>>> create mode 100644 tests/xe/xe_gpgpu_fill.c
>>>>> create mode 100644 tests/xe/xe_intel_bb.c
>>>>>
>>>>> --
>>>>> 2.40.0
>>>>
>>>> --
>>>> Ville Syrjälä
>>>> Intel
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 19/45] tests/i915/kms_flip_scaled_crc: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 19/45] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
@ 2023-04-21 8:07 ` Nautiyal, Ankit K
0 siblings, 0 replies; 72+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-21 8:07 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
LGTM.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/i915/kms_flip_scaled_crc.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/kms_flip_scaled_crc.c b/tests/i915/kms_flip_scaled_crc.c
> index 7f7a59b93..f5dc430e3 100644
> --- a/tests/i915/kms_flip_scaled_crc.c
> +++ b/tests/i915/kms_flip_scaled_crc.c
> @@ -623,7 +623,7 @@ igt_main
> drmModeModeInfoPtr modetoset = NULL;
>
> igt_fixture {
> - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
> data.gen = intel_display_ver(intel_get_drm_devid(data.drm_fd));
> igt_require(data.gen >= 9);
> igt_display_require(&data.display, data.drm_fd);
> @@ -644,6 +644,12 @@ igt_main
> for (int index = 0; index < ARRAY_SIZE(flip_scenario_test); index++) {
> igt_describe(flip_scenario_test[index].describe);
> igt_subtest_with_dynamic(flip_scenario_test[index].name) {
> + /* No tiling support in XE. */
> + if (is_xe_device(data.drm_fd) &&
> + (flip_scenario_test[index].firstmodifier != DRM_FORMAT_MOD_LINEAR ||
> + flip_scenario_test[index].secondmodifier != DRM_FORMAT_MOD_LINEAR))
> + continue;
> +
> free_fbs(&data);
> for_each_pipe(&data.display, pipe) {
> bool found = false;
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 24/45] tests/kms_async_flips: No XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 24/45] tests/kms_async_flips: No " Bhanuprakash Modem
@ 2023-04-21 9:15 ` Karthik B S
0 siblings, 0 replies; 72+ messages in thread
From: Karthik B S @ 2023-04-21 9:15 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Async flips won't work with linear buffers on Intel hardware,
> hence don't run tests on XE device as XE won't support tiling.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
> tests/kms_async_flips.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index 1e6506e3d..51ffa523a 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -592,7 +592,13 @@ igt_main_args("e", NULL, help_str, opt_handler, &data)
> int i;
>
> igt_fixture {
> - data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> + /*
> + * FIXME: As of now, Async flips won't work with linear buffers
> + * on Intel hardware, hence don't run tests on XE device as XE
> + * won't support tiling.
> + * Once Kernel changes got landed, please update this logic.
> + */
> + data.drm_fd = drm_open_driver_master(DRIVER_ANY & ~DRIVER_XE);
> kmstest_set_vt_graphics_mode();
> igt_display_require(&data.display, data.drm_fd);
> igt_display_require_output(&data.display);
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-21 7:33 ` Modem, Bhanuprakash
@ 2023-04-21 9:33 ` Nautiyal, Ankit K
0 siblings, 0 replies; 72+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-21 9:33 UTC (permalink / raw)
To: Modem, Bhanuprakash, igt-dev
On 4/21/2023 1:03 PM, Modem, Bhanuprakash wrote:
>
> On Fri-21-04-2023 12:17 pm, Nautiyal, Ankit K wrote:
>>
>> On 4/19/2023 5:27 PM, Modem, Bhanuprakash wrote:
>>> Hi,
>>>
>>> On Wed-19-04-2023 12:31 pm, Zbigniew Kempczyński wrote:
>>>> On Tue, Apr 18, 2023 at 07:58:08PM +0300, Ville Syrjälä wrote:
>>>>> On Tue, Apr 18, 2023 at 10:14:16PM +0530, Bhanuprakash Modem wrote:
>>>>>> Add IGT support to work kms tests on XE driver.
>>>>>>
>>>>>> TODO: Spin, BUSY & HANG related tests.
>>>>>>
>>>>>> Bhanuprakash Modem (35):
>>>>>> lib: Use i915 namespace for XE debugfs
>>>>>> lib/igt_fb: Add copy engine support for XE
>>>>>> lib/igt_draw: Add gpu draw routine support for XE
>>>>>> tests/i915/kms_big_fb: Add XE support
>>>>>> tests/i915/kms_big_joiner: Add XE support
>>>>>> tests/i915/kms_cdclk: Add XE support
>>>>>> tests/i915/kms_draw_crc: Add XE support
>>>>>> tests/i915/kms_dsc: Add XE support
>>>>>> tests/i915/kms_flip_scaled_crc: Add XE support
>>>>>> tests/i915/kms_flip_tiling: Add XE support
>>>>>> tests/i915/kms_mmap_write_crc: Add XE support
>>>>>> tests/i915/kms_psr*: Add XE support
>>>>>> tests/kms_3d: Add XE support
>>>>>> tests/kms_async_flips: No XE support
>>>>>> tests/kms_atomic_transition: Add XE support
>>>>>> tests/color: Add XE support
>>>>>> tests/kms_concurrent: Add XE support
>>>>>> tests/kms_content_protection: Add XE support
>>>>>> tests/kms_cursor_crc: Add XE support
>>>>>> tests/kms_cursor_legacy: Add XE support
>>>>>> tests/kms_flip: Add XE support
>>>>>> tests/kms_flip_event_leak: Add XE support
>>>>>> tests/kms_getfb: Add XE support
>>>>>> tests/kms_hdmi_inject: Add XE support
>>>>>> tests/kms_hdr: Add XE support
>>>>>> tests/kms_panel_fitting: Add XE support
>>>>>> tests/kms_plane: Add XE support
>>>>>> tests/kms_plane_lowers: Add XE support
>>>>>> tests/kms_plane_scaling: Add XE support
>>>>>> tests/kms_prime: Add XE support
>>>>>> tests/kms_rotation_crc: Add XE support
>>>>>> tests/kms_setmode: Add XE support
>>>>>> tests/kms_universal_plane: Add XE support
>>>>>> tests/kms: Move intel specific kms tests to new dir
>>>>>
>>>>> Feels like the whole xe lib/ stuff is basically
>>>>> a failure if we need to touch that many things
>>>>
>>>> Why you think so? Changes:
>>>>
>>>> - if (is_i915_device(data->drm_fd))
>>>> + if (is_intel_device(data->drm_fd))
>>>
>>> Yes most of the changes are to update *i915* to *intel* and few
>>> unavoidable changes like:
>>> - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
>>> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
>>>
>>>
>>> Also, there are few xe_device specific changes like:
>>> + if (is_xe_device(drm_fd))
>>> + xe_device_get(drm_fd);
>>>
>>> + if (is_xe_device(drm_fd))
>>> + xe_device_put(drm_fd);
>>>
>>>
>>> @Zbigniew, How about moving xe_device_get() to drm_open_driver()?
>>> So that, no need to call xe_device_get() in test level.
>>
>>
>> I agree, with this approach.
>>
>> Currently a new test that is meant to run on any drm driver will need
>> to add this explicitly, so that it runs on XE driver.
>>
>> As mentioned by Bhanu, will need to have a wrapper around
>> close(drm_fd), where we can do xe_device_put().
>
> For most of the kms tests, igt_display_require() & igt_display_fini()
> will takecare of xe_device.
>
> Few kms tests those are not using igt_display_require() must takecare
> of xe_device explictly.
>
> - Bhanu
Apart from that in function gem_set_domain() is it possible to just
return, in case of xe device.
Similarly in gem_buffer_create_fb_obj have a check for xe_device and
call xe_bo_create_flags.
This will help to avoid changes in the test files.
Regards,
Ankit
>
>>
>> Regards,
>>
>> Ankit
>>
>>> --- a/lib/drmtest.c
>>> +++ b/lib/drmtest.c
>>> @@ -601,6 +601,9 @@ int drm_open_driver(int chipset)
>>> }
>>> }
>>>
>>> + if (is_xe_device(fd))
>>> + xe_device_get(fd);
>>> +
>>> return fd;
>>> }
>>>
>>> Ofcourse we need some efforts to handle xe_device_put():
>>> 1- Create a new helper maybe drm_close(fd)
>>> drm_close(int fd) {
>>> if (is_xe_device(fd))
>>> xe_device_put(fd);
>>>
>>> close(fd);
>>> }
>>> 2- Update both kms & gem tests to use s/close(fd)/drm_close(fd)/
>>>
>>> - Bhanu
>>>
>>>>
>>>> which checks intel (i915 or xe) looks good for me. I mean
>>>> I wouldn't like to handle xe in is_i915_device() check.
>>>>
>>>> --
>>>> Zbigniew
>>>>
>>>>
>>>>>
>>>>>> xe-fast-feedback: Add kms tests to XE BAT
>>>>>>
>>>>>> Zbigniew Kempczyński (10):
>>>>>> lib/xe_ioctl: Add missing header for direct resolving
>>>>>> lib/xe_query: Add region helpers and missing doc
>>>>>> lib/xe_query: Remove commented out function prototype
>>>>>> lib/intel_allocator: Add allocator support for Xe
>>>>>> lib/intel_bufops: Add Xe support in bufops
>>>>>> lib/intel_batchbuffer: Add Xe support in intel-bb
>>>>>> tests/xe_intel_bb: Check if intel-bb Xe support correctness
>>>>>> tests/xe-fast-feedback: Add xe_intel_bb test to BAT
>>>>>> lib/gpgpu_fill: Use RENDER engine flag to work on Xe
>>>>>> tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
>>>>>>
>>>>>> lib/gpgpu_fill.c | 4 +-
>>>>>> lib/gpu_cmds.c | 2 +-
>>>>>> lib/igt_draw.c | 82 +-
>>>>>> lib/igt_draw.h | 2 +
>>>>>> lib/igt_fb.c | 30 +-
>>>>>> lib/igt_fb.h | 2 +
>>>>>> lib/igt_kms.c | 4 +-
>>>>>> lib/igt_psr.c | 4 +-
>>>>>> lib/intel_allocator.c | 49 +-
>>>>>> lib/intel_aux_pgtable.c | 2 +-
>>>>>> lib/intel_batchbuffer.c | 430 +++++--
>>>>>> lib/intel_batchbuffer.h | 28 +-
>>>>>> lib/intel_bufops.c | 73 +-
>>>>>> lib/intel_bufops.h | 13 +-
>>>>>> lib/xe/xe_ioctl.h | 1 +
>>>>>> lib/xe/xe_query.c | 45 +
>>>>>> lib/xe/xe_query.h | 3 +-
>>>>>> tests/chamelium/kms_chamelium_color.c | 2 +-
>>>>>> tests/i915/gem_caching.c | 4 +-
>>>>>> tests/i915/gem_pxp.c | 2 +-
>>>>>> tests/intel-ci/xe-fast-feedback.testlist | 50 +
>>>>>> tests/{i915 => intel}/kms_big_fb.c | 75 +-
>>>>>> tests/{i915 => intel}/kms_big_joiner.c | 2 +-
>>>>>> tests/{i915 => intel}/kms_cdclk.c | 5 +-
>>>>>> tests/{i915 => intel}/kms_draw_crc.c | 24 +-
>>>>>> tests/{i915 => intel}/kms_dsc.c | 2 +-
>>>>>> tests/{i915 => intel}/kms_dsc_helper.c | 0
>>>>>> tests/{i915 => intel}/kms_dsc_helper.h | 0
>>>>>> tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
>>>>>> tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
>>>>>> tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
>>>>>> tests/{i915 => intel}/kms_psr.c | 40 +-
>>>>>> tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
>>>>>> tests/{i915 => intel}/kms_psr2_su.c | 2 +-
>>>>>> tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
>>>>>> tests/kms_3d.c | 8 +
>>>>>> tests/kms_async_flips.c | 8 +-
>>>>>> tests/kms_atomic_transition.c | 8 +-
>>>>>> tests/kms_color.c | 10 +-
>>>>>> tests/kms_color_helper.c | 2 +-
>>>>>> tests/kms_concurrent.c | 4 +-
>>>>>> tests/kms_content_protection.c | 12 +-
>>>>>> tests/kms_cursor_crc.c | 4 +-
>>>>>> tests/kms_cursor_legacy.c | 4 +-
>>>>>> tests/kms_flip.c | 32 +-
>>>>>> tests/kms_flip_event_leak.c | 5 +
>>>>>> tests/kms_getfb.c | 22 +-
>>>>>> tests/kms_hdmi_inject.c | 10 +-
>>>>>> tests/kms_hdr.c | 8 +-
>>>>>> tests/kms_panel_fitting.c | 12 +-
>>>>>> tests/kms_plane.c | 19 +-
>>>>>> tests/kms_plane_lowres.c | 9 +-
>>>>>> tests/kms_plane_scaling.c | 41 +-
>>>>>> tests/kms_prime.c | 241 +++-
>>>>>> tests/kms_rotation_crc.c | 25 +-
>>>>>> tests/kms_setmode.c | 7 +
>>>>>> tests/kms_universal_plane.c | 15 +-
>>>>>> tests/meson.build | 39 +-
>>>>>> tests/xe/xe_gpgpu_fill.c | 133 +++
>>>>>> tests/xe/xe_intel_bb.c | 1181
>>>>>> +++++++++++++++++++
>>>>>> 60 files changed, 2513 insertions(+), 352 deletions(-)
>>>>>> rename tests/{i915 => intel}/kms_big_fb.c (92%)
>>>>>> rename tests/{i915 => intel}/kms_big_joiner.c (99%)
>>>>>> rename tests/{i915 => intel}/kms_cdclk.c (98%)
>>>>>> rename tests/{i915 => intel}/kms_draw_crc.c (92%)
>>>>>> rename tests/{i915 => intel}/kms_dsc.c (99%)
>>>>>> rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
>>>>>> rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
>>>>>> rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
>>>>>> rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
>>>>>> rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
>>>>>> rename tests/{i915 => intel}/kms_psr.c (93%)
>>>>>> rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
>>>>>> rename tests/{i915 => intel}/kms_psr2_su.c (99%)
>>>>>> rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
>>>>>> create mode 100644 tests/xe/xe_gpgpu_fill.c
>>>>>> create mode 100644 tests/xe/xe_intel_bb.c
>>>>>>
>>>>>> --
>>>>>> 2.40.0
>>>>>
>>>>> --
>>>>> Ville Syrjälä
>>>>> Intel
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 16/45] tests/i915/kms_cdclk: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 16/45] tests/i915/kms_cdclk: " Bhanuprakash Modem
@ 2023-04-21 9:47 ` Nautiyal, Ankit K
0 siblings, 0 replies; 72+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-21 9:47 UTC (permalink / raw)
To: igt-dev
LGTM.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/i915/kms_cdclk.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/kms_cdclk.c b/tests/i915/kms_cdclk.c
> index bb0036802..0f9b8dc58 100644
> --- a/tests/i915/kms_cdclk.c
> +++ b/tests/i915/kms_cdclk.c
> @@ -65,6 +65,9 @@ static int get_current_cdclk_freq(int debugfs_fd)
> * Display specific clock frequency info is moved to i915_cdclk_info,
> * On older kernels if this debugfs is not found, fallback to read from
> * i915_frequency_info.
> + *
> + * FIXME: As of now, XE debugfs is still using i915 namespace, once the
> + * Kernel changes are landed, update this to use the XE specific debugfs.
> */
> res = igt_debugfs_simple_read(debugfs_fd, "i915_cdclk_info",
> buf, sizeof(buf));
> @@ -368,7 +371,7 @@ igt_main
> data_t data = {};
>
> igt_fixture {
> - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
> igt_require(data.drm_fd >= 0);
> data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
> igt_require(data.debugfs_fd);
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 18/45] tests/i915/kms_dsc: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 18/45] tests/i915/kms_dsc: " Bhanuprakash Modem
@ 2023-04-21 9:51 ` Nautiyal, Ankit K
0 siblings, 0 replies; 72+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-21 9:51 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
LGTM.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/i915/kms_dsc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
> index cf34dc8a8..c4dfc9251 100644
> --- a/tests/i915/kms_dsc.c
> +++ b/tests/i915/kms_dsc.c
> @@ -212,7 +212,7 @@ igt_main
> data_t data = {};
>
> igt_fixture {
> - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
> data.devid = intel_get_drm_devid(data.drm_fd);
> data.disp_ver = intel_display_ver(data.devid);
> kmstest_set_vt_graphics_mode();
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 20/45] tests/i915/kms_flip_tiling: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 20/45] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
@ 2023-04-21 9:57 ` Nautiyal, Ankit K
0 siblings, 0 replies; 72+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-21 9:57 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
LGTM.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/i915/kms_flip_tiling.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/kms_flip_tiling.c b/tests/i915/kms_flip_tiling.c
> index 4cc063f63..a22f12382 100644
> --- a/tests/i915/kms_flip_tiling.c
> +++ b/tests/i915/kms_flip_tiling.c
> @@ -177,7 +177,7 @@ igt_output_t *output;
> igt_main
> {
> igt_fixture {
> - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
> data.gen = intel_display_ver(intel_get_drm_devid(data.drm_fd));
>
> data.testformat = DRM_FORMAT_XRGB8888;
> @@ -217,6 +217,12 @@ igt_main
> if (plane->formats[j] != data.testformat)
> continue;
>
> + /* No tiling support in XE. */
> + if (is_xe_device(data.drm_fd) &&
> + (plane->modifiers[i] != DRM_FORMAT_MOD_LINEAR ||
> + plane->modifiers[j] != DRM_FORMAT_MOD_LINEAR))
> + continue;
> +
> igt_dynamic_f("%s-pipe-%s-%s-to-%s",
> igt_output_name(output),
> kmstest_pipe_name(pipe),
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 35/45] tests/kms_hdr: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 35/45] tests/kms_hdr: " Bhanuprakash Modem
@ 2023-04-21 10:09 ` Nautiyal, Ankit K
0 siblings, 0 replies; 72+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-21 10:09 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
LGTM.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/kms_hdr.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
> index 23f12c14a..81a32dbf8 100644
> --- a/tests/kms_hdr.c
> +++ b/tests/kms_hdr.c
> @@ -226,7 +226,7 @@ static void test_bpc_switch(data_t *data, uint32_t flags)
> if (igt_pipe_connector_valid(pipe, output)) {
> prepare_test(data, output, pipe);
>
> - if (is_i915_device(data->fd) &&
> + if (is_intel_device(data->fd) &&
> !igt_max_bpc_constraint(display, pipe, output, 10)) {
> test_fini(data);
> break;
> @@ -503,7 +503,7 @@ static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output)
> igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
>
> /* Change the mastering information, no modeset allowed
> - * for amd driver, whereas a modeset is required for i915
> + * for amd driver, whereas a modeset is required for intel
> * driver. */
> hdr.hdmi_metadata_type1.max_display_mastering_luminance = 200;
> hdr.hdmi_metadata_type1.max_fall = 200;
> @@ -517,7 +517,7 @@ static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output)
>
> /* Enter SDR via metadata, no modeset allowed for
> * amd driver, whereas a modeset is required for
> - * i915 driver. */
> + * intel driver. */
> fill_hdr_output_metadata_sdr(&hdr);
> set_hdr_output_metadata(data, &hdr);
> if (is_amdgpu_device(data->fd))
> @@ -590,7 +590,7 @@ static void test_hdr(data_t *data, uint32_t flags)
> if (igt_pipe_connector_valid(pipe, output)) {
> prepare_test(data, output, pipe);
>
> - if (is_i915_device(data->fd) &&
> + if (is_intel_device(data->fd) &&
> !igt_max_bpc_constraint(display, pipe, output, 10)) {
> test_fini(data);
> break;
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 36/45] tests/kms_panel_fitting: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 36/45] tests/kms_panel_fitting: " Bhanuprakash Modem
@ 2023-04-21 10:17 ` Nautiyal, Ankit K
0 siblings, 0 replies; 72+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-21 10:17 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
LGTM.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/kms_panel_fitting.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> index 2d0590da2..97ef1ae48 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -23,6 +23,7 @@
> */
>
> #include "igt.h"
> +#include <limits.h>
> #include <math.h>
> #include <sys/stat.h>
>
> @@ -133,7 +134,7 @@ test_panel_fitting_legacy(data_t *d, igt_display_t *display,
> igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-200, d->fb2.height-200);
> igt_plane_set_position(d->plane2, 100, 100);
>
> - if (is_i915_device(display->drm_fd)) {
> + if (is_intel_device(display->drm_fd)) {
> uint32_t devid = intel_get_drm_devid(display->drm_fd);
> /*
> * Most of gen7 and all of gen8 doesn't support plane scaling
> @@ -233,10 +234,15 @@ static void test_panel_fitting(data_t *data, enum test_type type)
> struct stat sb;
>
> if (type == TEST_ATOMIC) {
> - igt_require_f(is_i915_device(display->drm_fd), "not valid for non-i915 devices\n");
> + char path[PATH_MAX];
> +
> + igt_require_f(is_intel_device(display->drm_fd), "not valid for non-intel devices\n");
>
> /* Until this is force enabled, force modeset evasion. */
> - if (stat("/sys/module/i915/parameters/fastboot", &sb) == 0)
> + snprintf(path, PATH_MAX, "/sys/module/%s/parameters/fastboot",
> + is_i915_device(data->drm_fd) ? "i915" : "xe");
> +
> + if (stat(path, &sb) == 0)
> igt_set_module_param_int(data->drm_fd, "fastboot", 1);
>
> igt_require(intel_display_ver(intel_get_drm_devid(display->drm_fd)) >= 5);
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
` (47 preceding siblings ...)
2023-04-18 21:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2023-04-21 16:43 ` Kamil Konieczny
2023-04-24 5:21 ` Modem, Bhanuprakash
48 siblings, 1 reply; 72+ messages in thread
From: Kamil Konieczny @ 2023-04-21 16:43 UTC (permalink / raw)
To: igt-dev
Hi Bhanuprakash,
On 2023-04-18 at 22:14:16 +0530, Bhanuprakash Modem wrote:
> Add IGT support to work kms tests on XE driver.
>
> TODO: Spin, BUSY & HANG related tests.
>
> Bhanuprakash Modem (35):
> lib: Use i915 namespace for XE debugfs
> lib/igt_fb: Add copy engine support for XE
> lib/igt_draw: Add gpu draw routine support for XE
> tests/i915/kms_big_fb: Add XE support
> tests/i915/kms_big_joiner: Add XE support
> tests/i915/kms_cdclk: Add XE support
> tests/i915/kms_draw_crc: Add XE support
> tests/i915/kms_dsc: Add XE support
> tests/i915/kms_flip_scaled_crc: Add XE support
> tests/i915/kms_flip_tiling: Add XE support
> tests/i915/kms_mmap_write_crc: Add XE support
> tests/i915/kms_psr*: Add XE support
> tests/kms_3d: Add XE support
> tests/kms_async_flips: No XE support
> tests/kms_atomic_transition: Add XE support
> tests/color: Add XE support
> tests/kms_concurrent: Add XE support
> tests/kms_content_protection: Add XE support
> tests/kms_cursor_crc: Add XE support
> tests/kms_cursor_legacy: Add XE support
> tests/kms_flip: Add XE support
> tests/kms_flip_event_leak: Add XE support
> tests/kms_getfb: Add XE support
> tests/kms_hdmi_inject: Add XE support
> tests/kms_hdr: Add XE support
> tests/kms_panel_fitting: Add XE support
> tests/kms_plane: Add XE support
> tests/kms_plane_lowers: Add XE support
> tests/kms_plane_scaling: Add XE support
> tests/kms_prime: Add XE support
> tests/kms_rotation_crc: Add XE support
> tests/kms_setmode: Add XE support
> tests/kms_universal_plane: Add XE support
> tests/kms: Move intel specific kms tests to new dir
> xe-fast-feedback: Add kms tests to XE BAT
>
> Zbigniew Kempczyński (10):
> lib/xe_ioctl: Add missing header for direct resolving
> lib/xe_query: Add region helpers and missing doc
> lib/xe_query: Remove commented out function prototype
> lib/intel_allocator: Add allocator support for Xe
> lib/intel_bufops: Add Xe support in bufops
> lib/intel_batchbuffer: Add Xe support in intel-bb
> tests/xe_intel_bb: Check if intel-bb Xe support correctness
> tests/xe-fast-feedback: Add xe_intel_bb test to BAT
> lib/gpgpu_fill: Use RENDER engine flag to work on Xe
> tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
>
> lib/gpgpu_fill.c | 4 +-
> lib/gpu_cmds.c | 2 +-
> lib/igt_draw.c | 82 +-
> lib/igt_draw.h | 2 +
> lib/igt_fb.c | 30 +-
> lib/igt_fb.h | 2 +
> lib/igt_kms.c | 4 +-
> lib/igt_psr.c | 4 +-
> lib/intel_allocator.c | 49 +-
> lib/intel_aux_pgtable.c | 2 +-
> lib/intel_batchbuffer.c | 430 +++++--
> lib/intel_batchbuffer.h | 28 +-
> lib/intel_bufops.c | 73 +-
> lib/intel_bufops.h | 13 +-
> lib/xe/xe_ioctl.h | 1 +
> lib/xe/xe_query.c | 45 +
> lib/xe/xe_query.h | 3 +-
> tests/chamelium/kms_chamelium_color.c | 2 +-
> tests/i915/gem_caching.c | 4 +-
> tests/i915/gem_pxp.c | 2 +-
> tests/intel-ci/xe-fast-feedback.testlist | 50 +
> tests/{i915 => intel}/kms_big_fb.c | 75 +-
> tests/{i915 => intel}/kms_big_joiner.c | 2 +-
> tests/{i915 => intel}/kms_cdclk.c | 5 +-
> tests/{i915 => intel}/kms_draw_crc.c | 24 +-
> tests/{i915 => intel}/kms_dsc.c | 2 +-
> tests/{i915 => intel}/kms_dsc_helper.c | 0
> tests/{i915 => intel}/kms_dsc_helper.h | 0
> tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
> tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
> tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
> tests/{i915 => intel}/kms_psr.c | 40 +-
> tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
> tests/{i915 => intel}/kms_psr2_su.c | 2 +-
> tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
--------- ^^^^^^^^^^^^^
Do we really need to move them ? If yes, I would prefer
to see that in separate patch with cc to CI.
Regards,
Kamil
> tests/kms_3d.c | 8 +
> tests/kms_async_flips.c | 8 +-
> tests/kms_atomic_transition.c | 8 +-
> tests/kms_color.c | 10 +-
> tests/kms_color_helper.c | 2 +-
> tests/kms_concurrent.c | 4 +-
> tests/kms_content_protection.c | 12 +-
> tests/kms_cursor_crc.c | 4 +-
> tests/kms_cursor_legacy.c | 4 +-
> tests/kms_flip.c | 32 +-
> tests/kms_flip_event_leak.c | 5 +
> tests/kms_getfb.c | 22 +-
> tests/kms_hdmi_inject.c | 10 +-
> tests/kms_hdr.c | 8 +-
> tests/kms_panel_fitting.c | 12 +-
> tests/kms_plane.c | 19 +-
> tests/kms_plane_lowres.c | 9 +-
> tests/kms_plane_scaling.c | 41 +-
> tests/kms_prime.c | 241 +++-
> tests/kms_rotation_crc.c | 25 +-
> tests/kms_setmode.c | 7 +
> tests/kms_universal_plane.c | 15 +-
> tests/meson.build | 39 +-
> tests/xe/xe_gpgpu_fill.c | 133 +++
> tests/xe/xe_intel_bb.c | 1181 +++++++++++++++++++
> 60 files changed, 2513 insertions(+), 352 deletions(-)
> rename tests/{i915 => intel}/kms_big_fb.c (92%)
> rename tests/{i915 => intel}/kms_big_joiner.c (99%)
> rename tests/{i915 => intel}/kms_cdclk.c (98%)
> rename tests/{i915 => intel}/kms_draw_crc.c (92%)
> rename tests/{i915 => intel}/kms_dsc.c (99%)
> rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
> rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
> rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
> rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
> rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
> rename tests/{i915 => intel}/kms_psr.c (93%)
> rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
> rename tests/{i915 => intel}/kms_psr2_su.c (99%)
> rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
> create mode 100644 tests/xe/xe_gpgpu_fill.c
> create mode 100644 tests/xe/xe_intel_bb.c
>
> --
> 2.40.0
>
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-21 16:43 ` [igt-dev] [i-g-t 00/45] " Kamil Konieczny
@ 2023-04-24 5:21 ` Modem, Bhanuprakash
2023-04-24 9:45 ` Kamil Konieczny
0 siblings, 1 reply; 72+ messages in thread
From: Modem, Bhanuprakash @ 2023-04-24 5:21 UTC (permalink / raw)
To: Kamil Konieczny, igt-dev
Hi Kamil,
On Fri-21-04-2023 10:13 pm, Kamil Konieczny wrote:
> Hi Bhanuprakash,
>
> On 2023-04-18 at 22:14:16 +0530, Bhanuprakash Modem wrote:
>> Add IGT support to work kms tests on XE driver.
>>
>> TODO: Spin, BUSY & HANG related tests.
>>
>> Bhanuprakash Modem (35):
>> lib: Use i915 namespace for XE debugfs
>> lib/igt_fb: Add copy engine support for XE
>> lib/igt_draw: Add gpu draw routine support for XE
>> tests/i915/kms_big_fb: Add XE support
>> tests/i915/kms_big_joiner: Add XE support
>> tests/i915/kms_cdclk: Add XE support
>> tests/i915/kms_draw_crc: Add XE support
>> tests/i915/kms_dsc: Add XE support
>> tests/i915/kms_flip_scaled_crc: Add XE support
>> tests/i915/kms_flip_tiling: Add XE support
>> tests/i915/kms_mmap_write_crc: Add XE support
>> tests/i915/kms_psr*: Add XE support
>> tests/kms_3d: Add XE support
>> tests/kms_async_flips: No XE support
>> tests/kms_atomic_transition: Add XE support
>> tests/color: Add XE support
>> tests/kms_concurrent: Add XE support
>> tests/kms_content_protection: Add XE support
>> tests/kms_cursor_crc: Add XE support
>> tests/kms_cursor_legacy: Add XE support
>> tests/kms_flip: Add XE support
>> tests/kms_flip_event_leak: Add XE support
>> tests/kms_getfb: Add XE support
>> tests/kms_hdmi_inject: Add XE support
>> tests/kms_hdr: Add XE support
>> tests/kms_panel_fitting: Add XE support
>> tests/kms_plane: Add XE support
>> tests/kms_plane_lowers: Add XE support
>> tests/kms_plane_scaling: Add XE support
>> tests/kms_prime: Add XE support
>> tests/kms_rotation_crc: Add XE support
>> tests/kms_setmode: Add XE support
>> tests/kms_universal_plane: Add XE support
>> tests/kms: Move intel specific kms tests to new dir
>> xe-fast-feedback: Add kms tests to XE BAT
>>
>> Zbigniew Kempczyński (10):
>> lib/xe_ioctl: Add missing header for direct resolving
>> lib/xe_query: Add region helpers and missing doc
>> lib/xe_query: Remove commented out function prototype
>> lib/intel_allocator: Add allocator support for Xe
>> lib/intel_bufops: Add Xe support in bufops
>> lib/intel_batchbuffer: Add Xe support in intel-bb
>> tests/xe_intel_bb: Check if intel-bb Xe support correctness
>> tests/xe-fast-feedback: Add xe_intel_bb test to BAT
>> lib/gpgpu_fill: Use RENDER engine flag to work on Xe
>> tests/xe_gpgpu_fill: Exercise gpgpu fill on Xe
>>
>> lib/gpgpu_fill.c | 4 +-
>> lib/gpu_cmds.c | 2 +-
>> lib/igt_draw.c | 82 +-
>> lib/igt_draw.h | 2 +
>> lib/igt_fb.c | 30 +-
>> lib/igt_fb.h | 2 +
>> lib/igt_kms.c | 4 +-
>> lib/igt_psr.c | 4 +-
>> lib/intel_allocator.c | 49 +-
>> lib/intel_aux_pgtable.c | 2 +-
>> lib/intel_batchbuffer.c | 430 +++++--
>> lib/intel_batchbuffer.h | 28 +-
>> lib/intel_bufops.c | 73 +-
>> lib/intel_bufops.h | 13 +-
>> lib/xe/xe_ioctl.h | 1 +
>> lib/xe/xe_query.c | 45 +
>> lib/xe/xe_query.h | 3 +-
>> tests/chamelium/kms_chamelium_color.c | 2 +-
>> tests/i915/gem_caching.c | 4 +-
>> tests/i915/gem_pxp.c | 2 +-
>> tests/intel-ci/xe-fast-feedback.testlist | 50 +
>> tests/{i915 => intel}/kms_big_fb.c | 75 +-
>> tests/{i915 => intel}/kms_big_joiner.c | 2 +-
>> tests/{i915 => intel}/kms_cdclk.c | 5 +-
>> tests/{i915 => intel}/kms_draw_crc.c | 24 +-
>> tests/{i915 => intel}/kms_dsc.c | 2 +-
>> tests/{i915 => intel}/kms_dsc_helper.c | 0
>> tests/{i915 => intel}/kms_dsc_helper.h | 0
>> tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
>> tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
>> tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
>> tests/{i915 => intel}/kms_psr.c | 40 +-
>> tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
>> tests/{i915 => intel}/kms_psr2_su.c | 2 +-
>> tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
> --------- ^^^^^^^^^^^^^
> Do we really need to move them ? If yes, I would prefer
> to see that in separate patch with cc to CI.
Yes, I would prefer to move these tests to new dir because these kms
tests supports both i915 & XE. Currently, dir tests/i915/ contains only
i915 specific tests, similarly tests/xe/ contains XE specific.
Else we can have a new dir structure as below:
tests/intel/i915/*.c: i915 specific tests.
tests/intel/xe/*.c: XE specific tests.
tests/intel/*.c: Tests supports both i915 & XE.
Also, why do we need to include CI folks? We are just moving tests to
different dir, and binaries location is still unchanged (<build
dir>/tests/).
- Bhanu
>
> Regards,
> Kamil
>
>> tests/kms_3d.c | 8 +
>> tests/kms_async_flips.c | 8 +-
>> tests/kms_atomic_transition.c | 8 +-
>> tests/kms_color.c | 10 +-
>> tests/kms_color_helper.c | 2 +-
>> tests/kms_concurrent.c | 4 +-
>> tests/kms_content_protection.c | 12 +-
>> tests/kms_cursor_crc.c | 4 +-
>> tests/kms_cursor_legacy.c | 4 +-
>> tests/kms_flip.c | 32 +-
>> tests/kms_flip_event_leak.c | 5 +
>> tests/kms_getfb.c | 22 +-
>> tests/kms_hdmi_inject.c | 10 +-
>> tests/kms_hdr.c | 8 +-
>> tests/kms_panel_fitting.c | 12 +-
>> tests/kms_plane.c | 19 +-
>> tests/kms_plane_lowres.c | 9 +-
>> tests/kms_plane_scaling.c | 41 +-
>> tests/kms_prime.c | 241 +++-
>> tests/kms_rotation_crc.c | 25 +-
>> tests/kms_setmode.c | 7 +
>> tests/kms_universal_plane.c | 15 +-
>> tests/meson.build | 39 +-
>> tests/xe/xe_gpgpu_fill.c | 133 +++
>> tests/xe/xe_intel_bb.c | 1181 +++++++++++++++++++
>> 60 files changed, 2513 insertions(+), 352 deletions(-)
>> rename tests/{i915 => intel}/kms_big_fb.c (92%)
>> rename tests/{i915 => intel}/kms_big_joiner.c (99%)
>> rename tests/{i915 => intel}/kms_cdclk.c (98%)
>> rename tests/{i915 => intel}/kms_draw_crc.c (92%)
>> rename tests/{i915 => intel}/kms_dsc.c (99%)
>> rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
>> rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
>> rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
>> rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
>> rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
>> rename tests/{i915 => intel}/kms_psr.c (93%)
>> rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
>> rename tests/{i915 => intel}/kms_psr2_su.c (99%)
>> rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
>> create mode 100644 tests/xe/xe_gpgpu_fill.c
>> create mode 100644 tests/xe/xe_intel_bb.c
>>
>> --
>> 2.40.0
>>
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t,26/45] tests/color: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 26/45] tests/color: " Bhanuprakash Modem
@ 2023-04-24 8:00 ` Joshi, Kunal1
2023-04-24 8:13 ` Modem, Bhanuprakash
0 siblings, 1 reply; 72+ messages in thread
From: Joshi, Kunal1 @ 2023-04-24 8:00 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/chamelium/kms_chamelium_color.c | 2 +-
> tests/kms_color.c | 10 +++++-----
> tests/kms_color_helper.c | 2 +-
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
Function i915_pipe_output_combo_valid in tests/kms_color_helper.c should
be renamed to intel_pipe_output_combo_valid
Please ignore if already part of other series
Failures seen on newer platforms are expected due to pipe rounding issue
LGTM
Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t,27/45] tests/kms_concurrent: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 27/45] tests/kms_concurrent: " Bhanuprakash Modem
@ 2023-04-24 8:08 ` Joshi, Kunal1
0 siblings, 0 replies; 72+ messages in thread
From: Joshi, Kunal1 @ 2023-04-24 8:08 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/kms_concurrent.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
LGTM
Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t,26/45] tests/color: Add XE support
2023-04-24 8:00 ` [igt-dev] [i-g-t,26/45] " Joshi, Kunal1
@ 2023-04-24 8:13 ` Modem, Bhanuprakash
0 siblings, 0 replies; 72+ messages in thread
From: Modem, Bhanuprakash @ 2023-04-24 8:13 UTC (permalink / raw)
To: Joshi, Kunal1, igt-dev
Hi Kunal,
On Mon-24-04-2023 01:30 pm, Joshi, Kunal1 wrote:
>
> On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
>> Add XE driver support for kms tests.
>>
>> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
>> ---
>> tests/chamelium/kms_chamelium_color.c | 2 +-
>> tests/kms_color.c | 10 +++++-----
>> tests/kms_color_helper.c | 2 +-
>> 3 files changed, 7 insertions(+), 7 deletions(-)
>>
> Function i915_pipe_output_combo_valid in tests/kms_color_helper.c should
> be renamed to intel_pipe_output_combo_valid
> Please ignore if already part of other series
This renaming task is not included in any series. Will plan after
merging this XE series.
- Bhanu
>
> Failures seen on newer platforms are expected due to pipe rounding issue
> LGTM
> Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t, 28/45] tests/kms_content_protection: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 28/45] tests/kms_content_protection: " Bhanuprakash Modem
@ 2023-04-24 9:02 ` Joshi, Kunal1
0 siblings, 0 replies; 72+ messages in thread
From: Joshi, Kunal1 @ 2023-04-24 9:02 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/kms_content_protection.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
LGTM
Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-24 5:21 ` Modem, Bhanuprakash
@ 2023-04-24 9:45 ` Kamil Konieczny
2023-04-24 10:05 ` Modem, Bhanuprakash
0 siblings, 1 reply; 72+ messages in thread
From: Kamil Konieczny @ 2023-04-24 9:45 UTC (permalink / raw)
To: igt-dev
Hi Bhanuprakash,
On 2023-04-24 at 10:51:46 +0530, Modem, Bhanuprakash wrote:
> Hi Kamil,
>
> On Fri-21-04-2023 10:13 pm, Kamil Konieczny wrote:
> > Hi Bhanuprakash,
> >
> > On 2023-04-18 at 22:14:16 +0530, Bhanuprakash Modem wrote:
> > > Add IGT support to work kms tests on XE driver.
> > >
> > > TODO: Spin, BUSY & HANG related tests.
> > >
> > > Bhanuprakash Modem (35):
> > > lib: Use i915 namespace for XE debugfs
> > > lib/igt_fb: Add copy engine support for XE
> > > lib/igt_draw: Add gpu draw routine support for XE
> > > tests/i915/kms_big_fb: Add XE support
> > > tests/i915/kms_big_joiner: Add XE support
[...]
> > > lib/xe/xe_query.c | 45 +
> > > lib/xe/xe_query.h | 3 +-
> > > tests/chamelium/kms_chamelium_color.c | 2 +-
> > > tests/i915/gem_caching.c | 4 +-
> > > tests/i915/gem_pxp.c | 2 +-
> > > tests/intel-ci/xe-fast-feedback.testlist | 50 +
> > > tests/{i915 => intel}/kms_big_fb.c | 75 +-
> > > tests/{i915 => intel}/kms_big_joiner.c | 2 +-
> > > tests/{i915 => intel}/kms_cdclk.c | 5 +-
> > > tests/{i915 => intel}/kms_draw_crc.c | 24 +-
> > > tests/{i915 => intel}/kms_dsc.c | 2 +-
> > > tests/{i915 => intel}/kms_dsc_helper.c | 0
> > > tests/{i915 => intel}/kms_dsc_helper.h | 0
> > > tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
> > > tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
> > > tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
> > > tests/{i915 => intel}/kms_psr.c | 40 +-
> > > tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
> > > tests/{i915 => intel}/kms_psr2_su.c | 2 +-
> > > tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
> > --------- ^^^^^^^^^^^^^
> > Do we really need to move them ? If yes, I would prefer
> > to see that in separate patch with cc to CI.
>
> Yes, I would prefer to move these tests to new dir because these kms tests
> supports both i915 & XE. Currently, dir tests/i915/ contains only i915
> specific tests, similarly tests/xe/ contains XE specific.
Ok. The only thing to avoid would be moving them back and forth
between folders xe/ and i915/
My main point is to do this movement in separate patchset.
>
> Else we can have a new dir structure as below:
> tests/intel/i915/*.c: i915 specific tests.
> tests/intel/xe/*.c: XE specific tests.
> tests/intel/*.c: Tests supports both i915 & XE.
Looks bad, too many folders.
>
> Also, why do we need to include CI folks? We are just moving tests to
> different dir, and binaries location is still unchanged (<build
> dir>/tests/).
>
> - Bhanu
You are right, I forgot we put all execs in build/tests/
Regards,
Kamil
>
> >
> > Regards,
> > Kamil
> >
> > > tests/kms_3d.c | 8 +
> > > tests/kms_async_flips.c | 8 +-
> > > tests/kms_atomic_transition.c | 8 +-
> > > tests/kms_color.c | 10 +-
> > > tests/kms_color_helper.c | 2 +-
> > > tests/kms_concurrent.c | 4 +-
> > > tests/kms_content_protection.c | 12 +-
> > > tests/kms_cursor_crc.c | 4 +-
> > > tests/kms_cursor_legacy.c | 4 +-
> > > tests/kms_flip.c | 32 +-
> > > tests/kms_flip_event_leak.c | 5 +
> > > tests/kms_getfb.c | 22 +-
> > > tests/kms_hdmi_inject.c | 10 +-
> > > tests/kms_hdr.c | 8 +-
> > > tests/kms_panel_fitting.c | 12 +-
> > > tests/kms_plane.c | 19 +-
> > > tests/kms_plane_lowres.c | 9 +-
> > > tests/kms_plane_scaling.c | 41 +-
> > > tests/kms_prime.c | 241 +++-
> > > tests/kms_rotation_crc.c | 25 +-
> > > tests/kms_setmode.c | 7 +
> > > tests/kms_universal_plane.c | 15 +-
> > > tests/meson.build | 39 +-
> > > tests/xe/xe_gpgpu_fill.c | 133 +++
> > > tests/xe/xe_intel_bb.c | 1181 +++++++++++++++++++
> > > 60 files changed, 2513 insertions(+), 352 deletions(-)
> > > rename tests/{i915 => intel}/kms_big_fb.c (92%)
> > > rename tests/{i915 => intel}/kms_big_joiner.c (99%)
> > > rename tests/{i915 => intel}/kms_cdclk.c (98%)
> > > rename tests/{i915 => intel}/kms_draw_crc.c (92%)
> > > rename tests/{i915 => intel}/kms_dsc.c (99%)
> > > rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
> > > rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
> > > rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
> > > rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
> > > rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
> > > rename tests/{i915 => intel}/kms_psr.c (93%)
> > > rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
> > > rename tests/{i915 => intel}/kms_psr2_su.c (99%)
> > > rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
> > > create mode 100644 tests/xe/xe_gpgpu_fill.c
> > > create mode 100644 tests/xe/xe_intel_bb.c
> > >
> > > --
> > > 2.40.0
> > >
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 00/45] Add IGT display support for XE
2023-04-24 9:45 ` Kamil Konieczny
@ 2023-04-24 10:05 ` Modem, Bhanuprakash
0 siblings, 0 replies; 72+ messages in thread
From: Modem, Bhanuprakash @ 2023-04-24 10:05 UTC (permalink / raw)
To: Kamil Konieczny, igt-dev
Hi Kamil,
On Mon-24-04-2023 03:15 pm, Kamil Konieczny wrote:
> Hi Bhanuprakash,
>
> On 2023-04-24 at 10:51:46 +0530, Modem, Bhanuprakash wrote:
>> Hi Kamil,
>>
>> On Fri-21-04-2023 10:13 pm, Kamil Konieczny wrote:
>>> Hi Bhanuprakash,
>>>
>>> On 2023-04-18 at 22:14:16 +0530, Bhanuprakash Modem wrote:
>>>> Add IGT support to work kms tests on XE driver.
>>>>
>>>> TODO: Spin, BUSY & HANG related tests.
>>>>
>>>> Bhanuprakash Modem (35):
>>>> lib: Use i915 namespace for XE debugfs
>>>> lib/igt_fb: Add copy engine support for XE
>>>> lib/igt_draw: Add gpu draw routine support for XE
>>>> tests/i915/kms_big_fb: Add XE support
>>>> tests/i915/kms_big_joiner: Add XE support
>
> [...]
>
>>>> lib/xe/xe_query.c | 45 +
>>>> lib/xe/xe_query.h | 3 +-
>>>> tests/chamelium/kms_chamelium_color.c | 2 +-
>>>> tests/i915/gem_caching.c | 4 +-
>>>> tests/i915/gem_pxp.c | 2 +-
>>>> tests/intel-ci/xe-fast-feedback.testlist | 50 +
>>>> tests/{i915 => intel}/kms_big_fb.c | 75 +-
>>>> tests/{i915 => intel}/kms_big_joiner.c | 2 +-
>>>> tests/{i915 => intel}/kms_cdclk.c | 5 +-
>>>> tests/{i915 => intel}/kms_draw_crc.c | 24 +-
>>>> tests/{i915 => intel}/kms_dsc.c | 2 +-
>>>> tests/{i915 => intel}/kms_dsc_helper.c | 0
>>>> tests/{i915 => intel}/kms_dsc_helper.h | 0
>>>> tests/{i915 => intel}/kms_flip_scaled_crc.c | 8 +-
>>>> tests/{i915 => intel}/kms_flip_tiling.c | 8 +-
>>>> tests/{i915 => intel}/kms_mmap_write_crc.c | 4 +-
>>>> tests/{i915 => intel}/kms_psr.c | 40 +-
>>>> tests/{i915 => intel}/kms_psr2_sf.c | 2 +-
>>>> tests/{i915 => intel}/kms_psr2_su.c | 2 +-
>>>> tests/{i915 => intel}/kms_psr_stress_test.c | 2 +-
>>> --------- ^^^^^^^^^^^^^
>>> Do we really need to move them ? If yes, I would prefer
>>> to see that in separate patch with cc to CI.
>>
>> Yes, I would prefer to move these tests to new dir because these kms tests
>> supports both i915 & XE. Currently, dir tests/i915/ contains only i915
>> specific tests, similarly tests/xe/ contains XE specific.
>
> Ok. The only thing to avoid would be moving them back and forth
> between folders xe/ and i915/
> My main point is to do this movement in separate patchset.
Here is the new patch: https://patchwork.freedesktop.org/series/116874/
>
>>
>> Else we can have a new dir structure as below:
>> tests/intel/i915/*.c: i915 specific tests.
>> tests/intel/xe/*.c: XE specific tests.
>> tests/intel/*.c: Tests supports both i915 & XE.
>
> Looks bad, too many folders.
Yeah, but this approach will make intel specific tests well organized.
- Bhanu
>
>>
>> Also, why do we need to include CI folks? We are just moving tests to
>> different dir, and binaries location is still unchanged (<build
>> dir>/tests/).
>>
>> - Bhanu
>
> You are right, I forgot we put all execs in build/tests/
>
> Regards,
> Kamil
>
>>
>>>
>>> Regards,
>>> Kamil
>>>
>>>> tests/kms_3d.c | 8 +
>>>> tests/kms_async_flips.c | 8 +-
>>>> tests/kms_atomic_transition.c | 8 +-
>>>> tests/kms_color.c | 10 +-
>>>> tests/kms_color_helper.c | 2 +-
>>>> tests/kms_concurrent.c | 4 +-
>>>> tests/kms_content_protection.c | 12 +-
>>>> tests/kms_cursor_crc.c | 4 +-
>>>> tests/kms_cursor_legacy.c | 4 +-
>>>> tests/kms_flip.c | 32 +-
>>>> tests/kms_flip_event_leak.c | 5 +
>>>> tests/kms_getfb.c | 22 +-
>>>> tests/kms_hdmi_inject.c | 10 +-
>>>> tests/kms_hdr.c | 8 +-
>>>> tests/kms_panel_fitting.c | 12 +-
>>>> tests/kms_plane.c | 19 +-
>>>> tests/kms_plane_lowres.c | 9 +-
>>>> tests/kms_plane_scaling.c | 41 +-
>>>> tests/kms_prime.c | 241 +++-
>>>> tests/kms_rotation_crc.c | 25 +-
>>>> tests/kms_setmode.c | 7 +
>>>> tests/kms_universal_plane.c | 15 +-
>>>> tests/meson.build | 39 +-
>>>> tests/xe/xe_gpgpu_fill.c | 133 +++
>>>> tests/xe/xe_intel_bb.c | 1181 +++++++++++++++++++
>>>> 60 files changed, 2513 insertions(+), 352 deletions(-)
>>>> rename tests/{i915 => intel}/kms_big_fb.c (92%)
>>>> rename tests/{i915 => intel}/kms_big_joiner.c (99%)
>>>> rename tests/{i915 => intel}/kms_cdclk.c (98%)
>>>> rename tests/{i915 => intel}/kms_draw_crc.c (92%)
>>>> rename tests/{i915 => intel}/kms_dsc.c (99%)
>>>> rename tests/{i915 => intel}/kms_dsc_helper.c (100%)
>>>> rename tests/{i915 => intel}/kms_dsc_helper.h (100%)
>>>> rename tests/{i915 => intel}/kms_flip_scaled_crc.c (98%)
>>>> rename tests/{i915 => intel}/kms_flip_tiling.c (96%)
>>>> rename tests/{i915 => intel}/kms_mmap_write_crc.c (98%)
>>>> rename tests/{i915 => intel}/kms_psr.c (93%)
>>>> rename tests/{i915 => intel}/kms_psr2_sf.c (99%)
>>>> rename tests/{i915 => intel}/kms_psr2_su.c (99%)
>>>> rename tests/{i915 => intel}/kms_psr_stress_test.c (99%)
>>>> create mode 100644 tests/xe/xe_gpgpu_fill.c
>>>> create mode 100644 tests/xe/xe_intel_bb.c
>>>>
>>>> --
>>>> 2.40.0
>>>>
^ permalink raw reply [flat|nested] 72+ messages in thread
* Re: [igt-dev] [i-g-t 40/45] tests/kms_prime: Add XE support
2023-04-18 16:44 ` [igt-dev] [i-g-t 40/45] tests/kms_prime: " Bhanuprakash Modem
@ 2023-04-25 4:16 ` Karthik B S
0 siblings, 0 replies; 72+ messages in thread
From: Karthik B S @ 2023-04-25 4:16 UTC (permalink / raw)
To: Bhanuprakash Modem, igt-dev
On 4/18/2023 10:14 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/kms_prime.c | 241 ++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 190 insertions(+), 51 deletions(-)
>
> diff --git a/tests/kms_prime.c b/tests/kms_prime.c
> index dd5ab993e..bc7d42638 100644
> --- a/tests/kms_prime.c
> +++ b/tests/kms_prime.c
> @@ -27,9 +27,12 @@
> #include "igt_sysfs.h"
> #include <fcntl.h>
>
> +#include <limits.h>
> #include <sys/ioctl.h>
> #include <sys/poll.h>
> #include <time.h>
> +#include "xe/xe_ioctl.h"
> +#include "xe/xe_query.h"
>
> #define KMS_HELPER "/sys/module/drm_kms_helper/parameters/"
> #define KMS_POLL_DISABLE 0
> @@ -112,7 +115,29 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
> scratch->height = mode->vdisplay;
> scratch->bpp = 32;
>
> - if (!is_i915_device(exporter_fd)) {
> + if (is_intel_device(exporter_fd)) {
> + igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_MOD_LINEAR, &scratch->size, &scratch->pitch);
> +
> + if (is_i915_device(exporter_fd)) {
> + if (gem_has_lmem(exporter_fd))
> + scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
> + REGION_LMEM(0), REGION_SMEM);
> + else
> + scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
> + REGION_SMEM);
> +
> + ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0,
> + scratch->size, PROT_WRITE | PROT_READ);
> + } else {
> + scratch->handle = xe_bo_create_flags(exporter_fd, 0,
> + ALIGN(scratch->size, xe_get_default_alignment(exporter_fd)),
> + vram_if_possible(exporter_fd, 0));
> +
> + ptr = xe_bo_mmap_ext(exporter_fd, scratch->handle,
> + scratch->size, PROT_READ | PROT_WRITE);
> + }
> + } else {
> scratch->handle = kmstest_dumb_create(exporter_fd,
> ALIGN(scratch->width, 256),
> scratch->height, scratch->bpp,
> @@ -120,18 +145,6 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
>
> ptr = kmstest_dumb_map_buffer(exporter_fd, scratch->handle,
> scratch->size, PROT_WRITE);
> - } else {
> - igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
> - DRM_FORMAT_MOD_LINEAR, &scratch->size, &scratch->pitch);
> - if (gem_has_lmem(exporter_fd))
> - scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
> - REGION_LMEM(0), REGION_SMEM);
> - else
> - scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
> - REGION_SMEM);
> -
> - ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0, scratch->size,
> - PROT_WRITE | PROT_READ);
> }
>
> for (size_t idx = 0; idx < scratch->size / sizeof(*ptr); ++idx)
> @@ -150,35 +163,76 @@ static void prepare_fb(int importer_fd, struct dumb_bo *scratch, struct igt_fb *
> color_encoding, color_range);
> }
>
> +static struct intel_buf * create_buf(int fd, struct buf_ops *bops, int width,
> + int height, uint32_t gem_handle)
> +{
> + struct intel_buf *buf;
> + uint32_t name, handle;
> +
> + name = gem_flink(fd,gem_handle);
> + handle = gem_open(fd, name);
> +
> + buf = intel_buf_create_using_handle(bops, handle,
> + width, height, 32, 0,
> + I915_TILING_NONE, 0);
> +
> + /* Make sure we close handle on destroy path */
> + intel_buf_set_ownership(buf, true);
> + return buf;
> +}
> +
> static void import_fb(int importer_fd, struct igt_fb *fb,
> int dmabuf_fd, uint32_t pitch)
> {
> uint32_t offsets[4] = {}, pitches[4] = {}, handles[4] = {}, temp_buf_handle;
> int ret;
> -
> - if (is_i915_device(importer_fd)) {
> - if (gem_has_lmem(importer_fd)) {
> - uint64_t ahnd = get_reloc_ahnd(importer_fd, 0);
> - uint64_t fb_size = 0;
> -
> - igt_info("Importer is dGPU\n");
> - temp_buf_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
> - igt_assert(temp_buf_handle > 0);
> - fb->gem_handle = igt_create_bo_with_dimensions(importer_fd, fb->width, fb->height,
> - fb->drm_format, fb->modifier, pitch, &fb_size, NULL, NULL);
> - igt_assert(fb->gem_handle > 0);
> -
> - igt_blitter_src_copy(importer_fd, ahnd, 0, NULL, temp_buf_handle,
> - 0, pitch, fb->modifier, 0, 0, fb_size, fb->width,
> - fb->height, 32, fb->gem_handle, 0, pitch, fb->modifier,
> - 0, 0, fb_size);
> -
> - gem_sync(importer_fd, fb->gem_handle);
> - gem_close(importer_fd, temp_buf_handle);
> - put_ahnd(ahnd);
> - } else {
> - fb->gem_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
> - }
> + uint64_t fb_size = 0;
> +
> + if (is_i915_device(importer_fd) && gem_has_lmem(importer_fd)) {
> + uint64_t ahnd = get_reloc_ahnd(importer_fd, 0);
> +
> + igt_info("Importer is dGPU\n");
> + temp_buf_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
> + igt_assert(temp_buf_handle > 0);
> + fb->gem_handle = igt_create_bo_with_dimensions(importer_fd, fb->width, fb->height,
> + fb->drm_format, fb->modifier, pitch, &fb_size, NULL, NULL);
> + igt_assert(fb->gem_handle > 0);
> +
> + igt_blitter_src_copy(importer_fd, ahnd, 0, NULL, temp_buf_handle,
> + 0, pitch, fb->modifier, 0, 0, fb_size, fb->width,
> + fb->height, 32, fb->gem_handle, 0, pitch, fb->modifier,
> + 0, 0, fb_size);
> +
> + gem_sync(importer_fd, fb->gem_handle);
> + gem_close(importer_fd, temp_buf_handle);
> + put_ahnd(ahnd);
> + } else if (is_xe_device(importer_fd) && xe_has_vram(importer_fd)) {
> + uint32_t devid = intel_get_drm_devid(importer_fd);
> + struct buf_ops *bops = buf_ops_create(importer_fd);
> + igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
> + struct intel_bb *ibb = intel_bb_create(importer_fd, 4096);
> + struct intel_buf *src, *dst;
> + uint32_t *ptr;
> +
> + igt_info("Importer is dGPU\n");
> + temp_buf_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
> + igt_assert(temp_buf_handle > 0);
> + fb->gem_handle = igt_create_bo_with_dimensions(importer_fd, fb->width, fb->height,
> + fb->drm_format, fb->modifier, pitch, &fb_size, NULL, NULL);
> + igt_assert(fb->gem_handle > 0);
> +
> + ptr = xe_bo_mmap_ext(importer_fd, temp_buf_handle, fb_size, PROT_READ | PROT_WRITE);
> +
> + src = create_buf(importer_fd, bops, fb->width, fb->height, temp_buf_handle);
> + dst = create_buf(importer_fd, bops, fb->width, fb->height, fb->gem_handle);
> + rendercopy(ibb, src, 0, 0, fb->width, fb->height, dst, 0, 0);
> +
> + igt_assert(gem_munmap(ptr, fb_size) == 0);
> + intel_bb_destroy(ibb);
> + intel_buf_destroy(src);
> + intel_buf_destroy(dst);
> + buf_ops_destroy(bops);
> + gem_close(importer_fd, temp_buf_handle);
Hi,
Could the code duplication be avoided b/n i915 and Xe part as the delta
is mostly only in the copy.
Also, is it possible for i915 also to use the render copy only or do we
have any restriction there? If this is possible, we could change it to
use the same method for both i915 and Xe.
> } else {
> fb->gem_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
> }
> @@ -330,12 +384,6 @@ static bool has_connected_output(int drm_fd)
> return false;
> }
>
> -static void validate_d3_hot(int drm_fd)
> -{
> - igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "GPU idle: yes"));
> - igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "PCI device power state: D3hot [3]"));
> -}
> -
> static void kms_poll_state_restore(void)
> {
> int sysfs_fd;
> @@ -357,6 +405,88 @@ static void kms_poll_disable(void)
> close(sysfs_fd);
> }
>
> +static bool runtime_usage_available(struct pci_device *pci)
> +{
> + char name[PATH_MAX];
> + snprintf(name, PATH_MAX, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/runtime_usage",
> + pci->domain, pci->bus, pci->dev, pci->func);
> + return access(name, F_OK) == 0;
> +}
> +
> +static bool in_d3_hot(struct pci_device *pci)
> +{
> + uint16_t val;
> +
> + /* We need to wait for the autosuspend to kick in before we can check */
> + if (!igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED))
> + return false;
> +
> + if (runtime_usage_available(pci) &&
> + igt_pm_get_runtime_usage(pci) != 0)
> + return false;
> +
> + igt_assert_eq(pci_device_cfg_read_u16(pci, &val, 0xd4), 0);
> +
> + return (val & 0x3) == 0x3;
> +}
> +
> +static void validate_d3_hot(int drm_fd, struct pci_device *pci)
> +{
> + if (is_i915_device(drm_fd)) {
> + igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "GPU idle: yes"));
> + igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "PCI device power state: D3hot [3]"));
> + } else {
> + igt_assert(in_d3_hot(pci));
> + }
> +}
> +
> +static int open_d3_allowed(struct pci_device *pci)
> +{
> + char name[PATH_MAX];
> + int fd;
> +
> + snprintf(name, PATH_MAX, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/d3cold_allowed",
> + pci->domain, pci->bus, pci->dev, pci->func);
> +
> + fd = open(name, O_RDWR);
> + igt_assert_f(fd >= 0, "Can't open %s\n", name);
> +
> + return fd;
> +}
> +
> +static void get_d3_allowed(struct pci_device *pci, char *d3_allowed)
> +{
> + int fd = open_d3_allowed(pci);
> +
> + igt_assert(read(fd, d3_allowed, 2));
> + close(fd);
> +}
> +
> +static void set_d3_allowed(struct pci_device *pci, const char *d3_allowed)
> +{
> + int fd = open_d3_allowed(pci);
> +
> + igt_assert(write(fd, d3_allowed, 2));
> + close(fd);
> +}
> +
> +static void setup_d3_hot(int fd, struct pci_device *pci)
> +{
> + if (is_xe_device(fd)) {
> + igt_assert(igt_setup_runtime_pm(fd));
> +
> + set_d3_allowed(pci, "0\n");
> +
> + igt_assert(in_d3_hot(pci));
> + } else {
> + igt_set_timeout(10, "Wait for dGPU to enter D3hot before starting the subtest");
> + while (!igt_debugfs_search(fd,
> + "i915_runtime_pm_status",
> + "PCI device power state: D3hot [3]"));
> + igt_reset_timeout();
> + }
> +}
> +
> igt_main
> {
> int first_fd = -1;
> @@ -410,21 +540,28 @@ igt_main
>
> igt_describe("Validate pci state of dGPU when dGPU is idle and scanout is on iGPU");
> igt_subtest("D3hot") {
> - igt_require_f(is_i915_device(second_fd_hybrid), "i915 device required\n");
> - igt_require_f(gem_has_lmem(second_fd_hybrid), "Second GPU is not dGPU\n");
> + char d3_allowed[2];
> + struct pci_device *pci;
> +
> + igt_require_f(is_intel_device(second_fd_hybrid), "intel device required\n");
> + if (is_i915_device(second_fd_hybrid))
> + igt_require_f(gem_has_lmem(second_fd_hybrid), "Second GPU is not dGPU\n");
> + if (is_xe_device(second_fd_hybrid))
> + igt_require_f(xe_has_vram(second_fd_hybrid), "Second GPU is not dGPU\n");
As we're anyway having an intel check before this, could we use if-else
here instead of 2 if's.
Thanks,
Karthik.B.S
> igt_require_f(first_output, "No display connected to iGPU\n");
> igt_require_f(!second_output, "Display connected to dGPU\n");
>
> kms_poll_disable();
>
> - igt_set_timeout(10, "Wait for dGPU to enter D3hot before starting the subtest");
> - while (!igt_debugfs_search(second_fd_hybrid,
> - "i915_runtime_pm_status",
> - "PCI device power state: D3hot [3]"));
> - igt_reset_timeout();
> + pci = igt_device_get_pci_device(second_fd_hybrid);
> + get_d3_allowed(pci, d3_allowed);
> +
> + setup_d3_hot(second_fd_hybrid, pci);
>
> test_basic_modeset(first_fd);
> - validate_d3_hot(second_fd_hybrid);
> + validate_d3_hot(second_fd_hybrid, pci);
> +
> + set_d3_allowed(pci, d3_allowed);
> }
>
> igt_fixture {
> @@ -442,6 +579,8 @@ igt_main
> igt_require(second_fd_vgem >= 0);
> if (is_i915_device(first_fd))
> igt_require(!gem_has_lmem(first_fd));
> + if (is_xe_device(first_fd))
> + igt_require(!xe_has_vram(first_fd));
> }
>
> igt_describe("Make a dumb color buffer, export to another device and"
^ permalink raw reply [flat|nested] 72+ messages in thread
end of thread, other threads:[~2023-04-25 4:17 UTC | newest]
Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-18 16:44 [igt-dev] [i-g-t 00/45] Add IGT display support for XE Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 01/45] lib/xe_ioctl: Add missing header for direct resolving Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 02/45] lib/xe_query: Add region helpers and missing doc Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 03/45] lib/xe_query: Remove commented out function prototype Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 04/45] lib/intel_allocator: Add allocator support for Xe Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 05/45] lib/intel_bufops: Add Xe support in bufops Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 06/45] lib/intel_batchbuffer: Add Xe support in intel-bb Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 07/45] tests/xe_intel_bb: Check if intel-bb Xe support correctness Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 08/45] tests/xe-fast-feedback: Add xe_intel_bb test to BAT Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 09/45] lib/gpgpu_fill: Use RENDER engine flag to work on Xe Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 10/45] tests/xe_gpgpu_fill: Exercise gpgpu fill " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 11/45] lib: Use i915 namespace for XE debugfs Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 12/45] lib/igt_fb: Add copy engine support for XE Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 13/45] lib/igt_draw: Add gpu draw routine " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 14/45] tests/i915/kms_big_fb: Add XE support Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 15/45] tests/i915/kms_big_joiner: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 16/45] tests/i915/kms_cdclk: " Bhanuprakash Modem
2023-04-21 9:47 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 17/45] tests/i915/kms_draw_crc: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 18/45] tests/i915/kms_dsc: " Bhanuprakash Modem
2023-04-21 9:51 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 19/45] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
2023-04-21 8:07 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 20/45] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
2023-04-21 9:57 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 21/45] tests/i915/kms_mmap_write_crc: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 22/45] tests/i915/kms_psr*: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 23/45] tests/kms_3d: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 24/45] tests/kms_async_flips: No " Bhanuprakash Modem
2023-04-21 9:15 ` Karthik B S
2023-04-18 16:44 ` [igt-dev] [i-g-t 25/45] tests/kms_atomic_transition: Add " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 26/45] tests/color: " Bhanuprakash Modem
2023-04-24 8:00 ` [igt-dev] [i-g-t,26/45] " Joshi, Kunal1
2023-04-24 8:13 ` Modem, Bhanuprakash
2023-04-18 16:44 ` [igt-dev] [i-g-t 27/45] tests/kms_concurrent: " Bhanuprakash Modem
2023-04-24 8:08 ` [igt-dev] [i-g-t,27/45] " Joshi, Kunal1
2023-04-18 16:44 ` [igt-dev] [i-g-t 28/45] tests/kms_content_protection: " Bhanuprakash Modem
2023-04-24 9:02 ` [igt-dev] [i-g-t, " Joshi, Kunal1
2023-04-18 16:44 ` [igt-dev] [i-g-t 29/45] tests/kms_cursor_crc: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 30/45] tests/kms_cursor_legacy: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 31/45] tests/kms_flip: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 32/45] tests/kms_flip_event_leak: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 33/45] tests/kms_getfb: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 34/45] tests/kms_hdmi_inject: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 35/45] tests/kms_hdr: " Bhanuprakash Modem
2023-04-21 10:09 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 36/45] tests/kms_panel_fitting: " Bhanuprakash Modem
2023-04-21 10:17 ` Nautiyal, Ankit K
2023-04-18 16:44 ` [igt-dev] [i-g-t 37/45] tests/kms_plane: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 38/45] tests/kms_plane_lowers: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 39/45] tests/kms_plane_scaling: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 40/45] tests/kms_prime: " Bhanuprakash Modem
2023-04-25 4:16 ` Karthik B S
2023-04-18 16:44 ` [igt-dev] [i-g-t 41/45] tests/kms_rotation_crc: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 42/45] tests/kms_setmode: " Bhanuprakash Modem
2023-04-18 16:44 ` [igt-dev] [i-g-t 43/45] tests/kms_universal_plane: " Bhanuprakash Modem
2023-04-18 16:45 ` [igt-dev] [i-g-t 44/45] tests/kms: Move intel specific kms tests to new dir Bhanuprakash Modem
2023-04-18 16:45 ` [igt-dev] [i-g-t 45/45] xe-fast-feedback: Add kms tests to XE BAT Bhanuprakash Modem
2023-04-18 16:58 ` [igt-dev] [i-g-t 00/45] Add IGT display support for XE Ville Syrjälä
2023-04-19 7:01 ` Zbigniew Kempczyński
2023-04-19 11:57 ` Modem, Bhanuprakash
2023-04-19 16:19 ` Zbigniew Kempczyński
2023-04-21 6:47 ` Nautiyal, Ankit K
2023-04-21 7:33 ` Modem, Bhanuprakash
2023-04-21 9:33 ` Nautiyal, Ankit K
2023-04-18 17:24 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-18 21:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-04-21 16:43 ` [igt-dev] [i-g-t 00/45] " Kamil Konieczny
2023-04-24 5:21 ` Modem, Bhanuprakash
2023-04-24 9:45 ` Kamil Konieczny
2023-04-24 10:05 ` Modem, Bhanuprakash
-- strict thread matches above, loose matches on Subject: below --
2023-04-20 9:01 [igt-dev] [i-g-t, 17/45] tests/i915/kms_draw_crc: Add XE support Gupta, Nidhi1
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox