From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [i-g-t V3 14/20] tests/i915/kms_fb_coherancy: Add XE support
Date: Tue, 8 Aug 2023 01:24:54 +0530 [thread overview]
Message-ID: <20230807195500.4103092-15-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20230807195500.4103092-1-bhanuprakash.modem@intel.com>
Add XE driver support for kms tests. This patch will add a support
to call the corresponding apis based on the driver (i915/xe)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_fb_coherency.c | 43 +++++++++++++++++++----------------
1 file changed, 23 insertions(+), 20 deletions(-)
diff --git a/tests/i915/kms_fb_coherency.c b/tests/i915/kms_fb_coherency.c
index edb5ba460..1df3d90ff 100644
--- a/tests/i915/kms_fb_coherency.c
+++ b/tests/i915/kms_fb_coherency.c
@@ -15,6 +15,7 @@
#include <string.h>
#include "igt.h"
+#include "xe/xe_ioctl.h"
typedef struct {
int drm_fd;
@@ -90,7 +91,7 @@ static struct igt_fb *prepare_fb(data_t *data)
0, 0, fb->width, fb->height,
0, 0, fb->width << 16, fb->height << 16);
- 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 */
@@ -159,7 +160,10 @@ static void test_mmap_offset_wc(data_t *data)
fb = prepare_fb(data);
- buf = gem_mmap_offset__wc(data->drm_fd, fb->gem_handle, 0, fb->size, PROT_WRITE);
+ if (is_i915_device(data->drm_fd))
+ buf = gem_mmap_offset__wc(data->drm_fd, fb->gem_handle, 0, fb->size, PROT_WRITE);
+ else
+ buf = xe_bo_mmap_ext(data->drm_fd, fb->gem_handle, fb->size, PROT_WRITE);
check_buf_crc(data, buf, fb);
}
@@ -225,7 +229,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);
@@ -247,39 +251,38 @@ igt_main
* Functionality: gtt
*/
igt_subtest_with_dynamic("memset-crc") {
- if (gem_has_mappable_ggtt(data.drm_fd)) {
+ if (igt_draw_supports_method(data.drm_fd, IGT_DRAW_MMAP_GTT)) {
igt_dynamic("mmap-gtt")
test_mmap_gtt(&data);
cleanup_crtc(&data);
}
- if (gem_mmap_offset__has_wc(data.drm_fd)) {
+ if (igt_draw_supports_method(data.drm_fd, IGT_DRAW_MMAP_WC)) {
igt_dynamic("mmap-offset-wc")
test_mmap_offset_wc(&data);
cleanup_crtc(&data);
}
- if (gem_has_lmem(data.drm_fd)) {
- igt_dynamic("mmap-offset-fixed")
- test_mmap_offset_fixed(&data);
+ if (is_i915_device(data.drm_fd)) {
+ if (gem_has_lmem(data.drm_fd)) {
+ igt_dynamic("mmap-offset-fixed")
+ test_mmap_offset_fixed(&data);
+ } else if (gem_has_mmap_offset(data.drm_fd)) {
+ igt_dynamic("mmap-offset-uc")
+ test_mmap_offset_uc(&data);
+ }
cleanup_crtc(&data);
- } else if (gem_has_mmap_offset(data.drm_fd)) {
- igt_dynamic("mmap-offset-uc")
- test_mmap_offset_uc(&data);
+ if (gem_has_legacy_mmap(data.drm_fd) &&
+ gem_mmap__has_wc(data.drm_fd)) {
+ igt_dynamic("mmap-legacy-wc")
+ test_legacy_mmap_wc(&data);
- cleanup_crtc(&data);
- }
-
- if (gem_has_legacy_mmap(data.drm_fd) &&
- gem_mmap__has_wc(data.drm_fd)) {
- igt_dynamic("mmap-legacy-wc")
- test_legacy_mmap_wc(&data);
-
- cleanup_crtc(&data);
+ cleanup_crtc(&data);
+ }
}
}
--
2.40.0
next prev parent reply other threads:[~2023-08-07 20:02 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 19:54 [igt-dev] [i-g-t V3 00/20] Add XE suppor for display tests Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 01/20] lib: Add tiling support for XE Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 02/20] tests/kms_cursor_edge_walk: Fix intel specific checks Bhanuprakash Modem
2023-08-16 10:47 ` [igt-dev] [i-g-t, V3, " Joshi, Kunal1
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 03/20] tests/kms_getfb: Extended ccs tests to support XE Bhanuprakash Modem
2023-08-16 10:49 ` [igt-dev] [i-g-t, V3, " Joshi, Kunal1
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 04/20] tests/kms_addfb_basic: Add tiling support for XE Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 05/20] tests/kms_plane: " Bhanuprakash Modem
2023-08-16 10:55 ` [igt-dev] [i-g-t, V3, " Joshi, Kunal1
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 06/20] tests/kms_plane_lowres: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 07/20] tests/kms_plane_scaling: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 08/20] tests/kms_rotation_crc: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 09/20] tests/i915/kms_big_fb: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 10/20] tests/i915/kms_draw_crc: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 11/20] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 12/20] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 13/20] tests/i915/kms_ccs: Add XE support Bhanuprakash Modem
2023-08-07 19:54 ` Bhanuprakash Modem [this message]
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 15/20] tests/i915/kms_fbcon_fbt: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 16/20] tests/kms_async_flips: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 17/20] tests/kms_prime: " Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 18/20] tests/intel-ci: Update Xe ffb testlist & blocklist for kms_frontbuffer_tracking Bhanuprakash Modem
2023-08-07 19:54 ` [igt-dev] [i-g-t V3 19/20] tests/intel-ci: Drop tiling tests from xe blocklist Bhanuprakash Modem
2023-08-07 19:55 ` [igt-dev] [i-g-t V3 20/20] HAX: Run tiling tests in XE fast-feedback Bhanuprakash Modem
2023-08-07 20:44 ` [igt-dev] ○ CI.xeBAT: info for Add XE suppor for display tests (rev3) Patchwork
2023-08-07 20:50 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-08 0:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-08-14 6:21 ` [igt-dev] [i-g-t V3 00/20] Add XE suppor for display tests Juha-Pekka Heikkila
2023-08-16 12:08 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Add XE suppor for display tests (rev4) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230807195500.4103092-15-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox