From: Karthik B S <karthik.b.s@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
<igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [i-g-t V2 3/5] tests/kms_flip: Add XE support
Date: Wed, 19 Apr 2023 10:48:06 +0530 [thread overview]
Message-ID: <1e92092c-12b3-c2ce-6068-98b2f534ebeb@intel.com> (raw)
In-Reply-To: <20230418152822.1655272-4-bhanuprakash.modem@intel.com>
On 4/18/2023 8:58 PM, Bhanuprakash Modem wrote:
> 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 5e82f4a2f84..d048f2f125a 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;
Hi,
Would it be possible to move this check to the main function where we
can directly skip the test if we've TEST_FENCE_STRESS flag being used?
Or do we have any case where we use the TEST_FENCE_STRESS flag without
using tiled modifiers?
Just so that we skip the test right at the beginning instead of doing
all the setup before finally skipping.
Other than this, the patch LGTM.
Thanks,
Karthik.B.S
> + }
>
> /* 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);
> + }
> }
next prev parent reply other threads:[~2023-04-19 5:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 15:28 [igt-dev] [i-g-t V2 0/5] Enable KMS tests in XE BAT Bhanuprakash Modem
2023-04-18 15:28 ` [igt-dev] [i-g-t V2 1/5] lib: Use i915 namespace for XE debugfs Bhanuprakash Modem
2023-04-18 15:28 ` [igt-dev] [i-g-t V2 2/5] tests/kms_cursor_legacy: Add XE support Bhanuprakash Modem
2023-04-18 15:28 ` [igt-dev] [i-g-t V2 3/5] tests/kms_flip: " Bhanuprakash Modem
2023-04-19 5:18 ` Karthik B S [this message]
2023-04-19 6:30 ` [igt-dev] [i-g-t V3 " Bhanuprakash Modem
2023-04-19 10:22 ` Karthik B S
2023-04-18 15:28 ` [igt-dev] [i-g-t V2 4/5] tests/i915/kms_psr*: " Bhanuprakash Modem
2023-04-18 15:28 ` [igt-dev] [i-g-t V2 5/5] xe-fast-feedback: Add kms tests to XE BAT Bhanuprakash Modem
2023-04-18 16:26 ` [igt-dev] ✓ Fi.CI.BAT: success for Enable KMS tests in XE BAT (rev3) Patchwork
2023-04-18 19:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-04-19 7:14 ` [igt-dev] ✓ Fi.CI.BAT: success for Enable KMS tests in XE BAT (rev4) Patchwork
2023-04-19 8:33 ` [igt-dev] ✓ Fi.CI.IGT: " 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=1e92092c-12b3-c2ce-6068-98b2f534ebeb@intel.com \
--to=karthik.b.s@intel.com \
--cc=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