From: Karthik B S <karthik.b.s@intel.com>
To: Swati Sharma <swati2.sharma@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [v2 5/6] tests/kms_atomic: check validity of pipe-output combo
Date: Fri, 13 Oct 2023 09:17:03 +0530 [thread overview]
Message-ID: <bcb7be7b-b75e-9d99-fe6c-ba6422aaab95@intel.com> (raw)
In-Reply-To: <20231010055940.41997-6-swati2.sharma@intel.com>
Hi,
On 10/10/2023 11:29 AM, Swati Sharma wrote:
> Check validity of pipe-output combination.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/kms_atomic.c | 43 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
>
> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
> index e9159ded2..bed468e4b 100644
> --- a/tests/kms_atomic.c
> +++ b/tests/kms_atomic.c
> @@ -1393,6 +1393,22 @@ static bool has_zpos(igt_plane_t *plane)
> return igt_plane_has_prop(plane, IGT_PLANE_ZPOS);
> }
>
> +static bool
> +pipe_output_combo_valid(igt_display_t *display,
> + enum pipe pipe, igt_output_t *output)
Could this be moved into lib? I see this is already being used in
kms_vblank as well. May be even other tests can use this?
Thanks,
Karthik.B.S
> +{
> + bool ret = true;
> +
> + igt_display_reset(display);
> +
> + igt_output_set_pipe(output, pipe);
> + if (!i915_pipe_output_combo_valid(display))
> + ret = false;
> + igt_output_set_pipe(output, PIPE_NONE);
> +
> + return ret;
> +}
> +
> igt_main
> {
> enum pipe pipe = PIPE_NONE;
> @@ -1415,6 +1431,8 @@ igt_main
> igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_OVERLAY);
> uint32_t format = plane_get_igt_format(overlay);
>
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> if (!overlay || !format)
> continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> @@ -1430,6 +1448,8 @@ igt_main
> "the legacy and atomic interfaces.");
> igt_subtest_with_dynamic("plane-primary-legacy") {
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> atomic_setup(&data, pipe, output);
> plane_primary(&data);
> @@ -1446,6 +1466,9 @@ igt_main
> igt_plane_t *overlay =
> igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_OVERLAY);
>
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> +
> atomic_setup(&data, pipe, output);
> if (!overlay)
> continue;
> @@ -1469,6 +1492,8 @@ igt_main
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> int n_planes = data.display.pipes[pipe].n_planes;
>
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> if (n_planes < 2)
> continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> @@ -1486,6 +1511,9 @@ igt_main
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> uint32_t format;
>
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> +
> atomic_setup(&data, pipe, output);
> format = plane_get_igt_format(data.primary);
>
> @@ -1506,6 +1534,8 @@ igt_main
> igt_plane_t *cursor =
> igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_CURSOR);
>
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> if (!cursor)
> continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> @@ -1520,6 +1550,8 @@ igt_main
> igt_describe("Test error handling when invalid plane parameters are passed");
> igt_subtest_with_dynamic("plane-invalid-params") {
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> atomic_setup(&data, pipe, output);
> plane_invalid_params(&data, output);
> @@ -1532,6 +1564,8 @@ igt_main
> igt_describe("Test error handling when invalid plane fence parameters are passed");
> igt_subtest_with_dynamic("plane-invalid-params-fence") {
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> atomic_setup(&data, pipe, output);
> plane_invalid_params_fence(&data, output);
> @@ -1544,6 +1578,8 @@ igt_main
> igt_describe("Test error handling when invalid crtc parameters are passed");
> igt_subtest_with_dynamic("crtc-invalid-params") {
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> atomic_setup(&data, pipe, output);
> crtc_invalid_params(&data, output);
> @@ -1556,6 +1592,8 @@ igt_main
> igt_describe("Test error handling when invalid crtc fence parameters are passed");
> igt_subtest_with_dynamic("crtc-invalid-params-fence") {
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> atomic_setup(&data, pipe, output);
> crtc_invalid_params_fence(&data, output);
> @@ -1570,6 +1608,8 @@ igt_main
> "allow us to create.");
> igt_subtest_with_dynamic("atomic-invalid-params") {
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> atomic_setup(&data, pipe, output);
> atomic_invalid_params(&data, output);
> @@ -1582,6 +1622,9 @@ igt_main
> igt_describe("Simple test cases to use FB_DAMAGE_CLIPS plane property");
> igt_subtest_with_dynamic("atomic-plane-damage") {
> for_each_pipe_with_single_output(&data.display, pipe, output) {
> + if (!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> +
> atomic_setup(&data, pipe, output);
>
> if (!igt_plane_has_prop(data.primary, IGT_PLANE_FB_DAMAGE_CLIPS))
next prev parent reply other threads:[~2023-10-13 3:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 5:59 [igt-dev] [v2 0/6] tests/kms_atomic: Test cleanup and dynamic conversion Swati Sharma
2023-10-10 5:59 ` [igt-dev] [v2 1/6] tests/kms_atomic: cosmetic changes Swati Sharma
2023-10-10 5:59 ` [igt-dev] [v2 2/6] tests/kms_atomic: rename subtest Swati Sharma
2023-10-10 5:59 ` [igt-dev] [v2 3/6] tests/kms_atomic: test cleanup Swati Sharma
2023-10-13 3:32 ` Karthik B S
2023-10-10 5:59 ` [igt-dev] [v2 4/6] tests/kms_atomic: convert subtests to dynamic subtests Swati Sharma
2023-10-13 4:57 ` Karthik B S
2023-10-10 5:59 ` [igt-dev] [v2 5/6] tests/kms_atomic: check validity of pipe-output combo Swati Sharma
2023-10-13 3:47 ` Karthik B S [this message]
2023-10-13 11:24 ` Sharma, Swati2
2023-10-13 14:28 ` Karthik B S
2023-10-10 5:59 ` [igt-dev] [v2 6/6] tests/kms_atomic: add flexibility to run tests on all pipes Swati Sharma
2023-10-10 7:31 ` [igt-dev] ✓ CI.xeBAT: success for tests/kms_atomic: Test cleanup and dynamic conversion (rev2) Patchwork
2023-10-10 7:36 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2023-10-10 13:46 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-11 12:46 ` Patchwork
2023-10-11 13:01 ` [igt-dev] ✓ Fi.CI.IGT: success " 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=bcb7be7b-b75e-9d99-fe6c-ba6422aaab95@intel.com \
--to=karthik.b.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@intel.com \
/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