[igt-dev] [i-g-t, 17/45] tests/i915/kms_draw_crc: Add XE support
Gupta, Nidhi1
nidhi1.gupta at intel.com
Thu Apr 20 09:01:30 UTC 2023
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 at 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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20230420/6e4b21e3/attachment-0001.htm>
More information about the igt-dev
mailing list