From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62FD510E02D for ; Tue, 27 Dec 2022 05:27:36 +0000 (UTC) From: "Gupta, Nidhi1" To: "igt-dev@lists.freedesktop.org" Date: Tue, 27 Dec 2022 05:27:31 +0000 Message-ID: Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PH7PR11MB600698F43943115166E19407C5ED9PH7PR11MB6006namp_" MIME-Version: 1.0 Subject: Re: [igt-dev] [i-g-t v5 05/52] tests/kms_atomic_interruptible: Add support for Bigjoiner List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: --_000_PH7PR11MB600698F43943115166E19407C5ED9PH7PR11MB6006namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tue, 2022-11-15 at 08:43 +0530, Bhanuprakash Modem wrote: >This patch will add a check to Skip the subtest if a selected >pipe/output combo won't support Bigjoiner or 8K mode. > >Example: >* Pipe-D wont support a mode > 5K >* To use 8K mode on a pipe then consecutive pipe must be available & free. > >V2: - Use updated helper name > >Signed-off-by: Bhanuprakash Modem > Reviewed-by: Nidhi Gupta > --- tests/kms_atomic_interruptible.c | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) >diff --git a/tests/kms_atomic_interruptible.c >b/tests/kms_atomic_interruptible.c >index f461a15c..74b2e246 100644 >--- a/tests/kms_atomic_interruptible.c >+++ b/tests/kms_atomic_interruptible.c >@@ -82,11 +82,15 @@ static void run_plane_test(igt_display_t *display, en= um pipe pipe, igt_output_t > igt_plane_t *primary, *plane; > int block; > >+ igt_info("Using (pipe %s + %s) to run the subtest.\n", >+ kmstest_pipe_name(pipe), igt_output_name(output= )); >+ > /* > * Make sure we start with everything disabled to force a real= modeset. > * igt_display_require only sets sw state, and assumes the fi= rst test > * doesn't care about hw state. > */ >+ igt_display_reset(display); > igt_display_commit2(display, COMMIT_ATOMIC); > > igt_output_set_pipe(output, pipe); >@@ -265,6 +269,21 @@ static void run_plane_test(igt_display_t *display, e= num pipe pipe, igt_output_t > igt_remove_fb(display->drm_fd, &fb); > } > >+static bool pipe_output_combo_valid(igt_display_t *display, >+ enum pipe pip= e, igt_output_t *output) { >+ bool ret =3D true; >+ >+ igt_display_reset(display); >+ >+ igt_output_set_pipe(output, pipe); >+ if (!i915_pipe_output_combo_valid(display)) >+ ret =3D false; >+ igt_output_set_pipe(output, PIPE_NONE); >+ >+ return ret; >+} >+ >igt_main >{ > igt_display_t display; >@@ -286,6 +305,9 @@ igt_main > igt_describe("Tests the interrupt properties of legacy modese= t"); > igt_subtest_with_dynamic("legacy-setmode") { > for_each_pipe_with_valid_output(&display, pipe= , output) { >+ if (!pipe_output_combo_valid(&di= splay, pipe, output)) >+ continue; >+ > igt_dynamic_f("%s-pipe-%s", igt= _output_name(output), kmstest_pipe_name(pipe)) > run_plane_test(&= display, pipe, output, test_legacy_modeset, DRM_PLANE_TYPE_PRIMARY); > break; >@@ -295,6 +317,9 @@ igt_main > igt_describe("Tests the interrupt properties of atomic modese= t"); > igt_subtest_with_dynamic("atomic-setmode") { > for_each_pipe_with_valid_output(&display, pipe= , output) { >+ if (!pipe_output_combo_valid(&di= splay, pipe, output)) >+ continue; >+ > igt_dynamic_f("%s-pipe-%s", igt= _output_name(output), kmstest_pipe_name(pipe)) > run_plane_test(&= display, pipe, output, test_atomic_modeset, DRM_PLANE_TYPE_PRIMARY); > break; >@@ -304,6 +329,9 @@ igt_main > igt_describe("Tests the interrupt properties for DPMS"); > igt_subtest_with_dynamic("legacy-dpms") { > for_each_pipe_with_valid_output(&display, pipe= , output) { >+ if (!pipe_output_combo_valid(&di= splay, pipe, output)) >+ continue; >+ > igt_dynamic_f("%s-pipe-%s", igt= _output_name(output), kmstest_pipe_name(pipe)) > run_plane_test(&= display, pipe, output, test_legacy_dpms, DRM_PLANE_TYPE_PRIMARY); > break; >@@ -313,6 +341,9 @@ igt_main > igt_describe("Tests the interrupt properties for pageflip"); > igt_subtest_with_dynamic("legacy-pageflip") { > for_each_pipe_with_valid_output(&display, pipe= , output) { >+ if (!pipe_output_combo_valid(&di= splay, pipe, output)) >+ continue; >+ > igt_dynamic_f("%s-pipe-%s", igt= _output_name(output), kmstest_pipe_name(pipe)) > run_plane_test(&= display, pipe, output, test_pageflip, DRM_PLANE_TYPE_PRIMARY); > break; >@@ -322,6 +353,9 @@ igt_main > igt_describe("Tests the interrupt properties for cursor"); > igt_subtest_with_dynamic("legacy-cursor") { > for_each_pipe_with_valid_output(&display, pipe= , output) { >+ if (!pipe_output_combo_valid(&di= splay, pipe, output)) >+ continue; >+ > igt_dynamic_f("%s-pipe-%s", igt= _output_name(output), kmstest_pipe_name(pipe)) > run_plane_test(&= display, pipe, output, test_setcursor, DRM_PLANE_TYPE_CURSOR); > break; >@@ -331,6 +365,9 @@ igt_main > igt_describe("Tests the interrupt properties for primary plan= e"); > igt_subtest_with_dynamic("universal-setplane-primary") { > for_each_pipe_with_valid_output(&display, pipe= , output) { >+ if (!pipe_output_combo_valid(&di= splay, pipe, output)) >+ continue; >+ > igt_dynamic_f("%s-pipe-%s", igt= _output_name(output), kmstest_pipe_name(pipe)) > run_plane_test(&= display, pipe, output, test_setplane, DRM_PLANE_TYPE_PRIMARY); > break; >@@ -340,6 +377,9 @@ igt_main > igt_describe("Tests the interrupt properties for cursor plane= "); > igt_subtest_with_dynamic("universal-setplane-cursor") { > for_each_pipe_with_valid_output(&display, pipe= , output) { >+ if (!pipe_output_combo_valid(&di= splay, pipe, output)) >+ continue; >+ > igt_dynamic_f("%s-pipe-%s", igt= _output_name(output), kmstest_pipe_name(pipe)) > run_plane_test(&= display, pipe, output, test_setplane, DRM_PLANE_TYPE_CURSOR); > break; --_000_PH7PR11MB600698F43943115166E19407C5ED9PH7PR11MB6006namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

On Tue, 2022-11-15 at 08:43 +0530, Bhanuprakash M= odem wrote:

>This patch will add a check to Skip the subte= st if a selected

>pipe/output combo won't support Bigjoiner or = 8K mode.

> 

>Example:

>* Pipe-D wont support a mode > 5K

>* To use 8K mode on a pipe then consecutive p= ipe must be available & free.

> 

>V2: - Use updated helper name

> 

>Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com&g= t;

Reviewed-by: Nidhi Gupta <nidhi1.gupta@intel.com>

---

tests/kms_atomic_interruptible.c | 40 +++++++++++= +++++++++++++++++++++

1 file changed, 40 insertions(+)

>diff --git a/tests/kms_atomic_interruptible.c=

>b/tests/kms_atomic_interruptible.c=

>index f461a15c..74b2e246 100644

>--- a/tests/kms_atomic_interruptible.c

>+++ b/tests/kms_atomic_interruptible.c

>@@ -82,11 +82,15 @@  static void run_pla= ne_test(igt_display_t *display, enum pipe pipe, igt_output_t

>       &nb= sp;     igt_plane_t *primary, *plane;

>       &nb= sp;     int block;

> 

>+       &n= bsp;   igt_info("Using (pipe %s + %s) to run the subtest.\n&= quot;,

>+       &n= bsp;            = ;      kmstest_pipe_name(pipe), igt_output_name(ou= tput));

>+

>        &n= bsp;    /*

>       &nb= sp;     * Make sure we start with everything disabled t= o force a real modeset.

>        &n= bsp;     * igt_display_require only sets sw state, and = assumes the first test

>        &n= bsp;     * doesn't care about hw state.

>        &n= bsp;     */

>+       &n= bsp;   igt_display_reset(display);

>        &n= bsp;    igt_display_commit2(display, COMMIT_ATOMIC);

>

>        &n= bsp;    igt_output_set_pipe(output, pipe);

>@@ -265,6 +269,21 @@  static void run_pl= ane_test(igt_display_t *display, enum pipe pipe, igt_output_t

>        &n= bsp;    igt_remove_fb(display->drm_fd, &fb);

> }

>

>+static bool pipe_output_combo_valid(igt_disp= lay_t *display,

>+       &n= bsp;            = ;            &n= bsp;            = ;             &= nbsp; enum pipe pipe, igt_output_t *output) {

>+       &n= bsp;   bool ret =3D true;

>+

>+       &n= bsp;   igt_display_reset(display);

>+

>+       &n= bsp;   igt_output_set_pipe(output, pipe);

>+       &n= bsp;   if (!i915_pipe_output_combo_valid(display))

>+       &n= bsp;            = ;      ret =3D false;

>+       &n= bsp;   igt_output_set_pipe(output, PIPE_NONE);

>+

>+       &n= bsp;   return ret;

>+}

>+

>igt_main

>{

>        &n= bsp;    igt_display_t display;

>@@ -286,6 +305,9 @@  igt_main=

>        &n= bsp;    igt_describe("Tests the interrupt properties of= legacy modeset");

>        &n= bsp;    igt_subtest_with_dynamic("legacy-setmode")= {

>        &n= bsp;            = ;       for_each_pipe_with_valid_output(&= display, pipe, output) {

>+       &n= bsp;            = ;            &n= bsp;        if (!pipe_output_combo_valid= (&display, pipe, output))

>+       &n= bsp;            = ;            &n= bsp;            = ;           continue;

>+

>        &n= bsp;            = ;            &n= bsp;         igt_dynamic_f("%s= -pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))

>        &n= bsp;            = ;            &n= bsp;            = ;            run_pla= ne_test(&display, pipe, output, test_legacy_modeset, DRM_PLANE_TYPE_PRI= MARY);

>        &n= bsp;            = ;            &n= bsp;         break;

>@@ -295,6 +317,9 @@  igt_main=

>        &n= bsp;    igt_describe("Tests the interrupt properties of= atomic modeset");

>        &n= bsp;    igt_subtest_with_dynamic("atomic-setmode")= {

>        &n= bsp;            = ;       for_each_pipe_with_valid_output(&= display, pipe, output) {

>+       &n= bsp;            = ;            &n= bsp;        if (!pipe_output_combo_valid= (&display, pipe, output))

>+       &n= bsp;            = ;            &n= bsp;            = ;           continue;

>+

>        &n= bsp;            = ;            &n= bsp;         igt_dynamic_f("%s= -pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))

>        &n= bsp;            = ;            &n= bsp;            = ;            run_pla= ne_test(&display, pipe, output, test_atomic_modeset, DRM_PLANE_TYPE_PRI= MARY);

>        &n= bsp;            = ;            &n= bsp;         break;

>@@ -304,6 +329,9 @@  igt_main=

>        &n= bsp;    igt_describe("Tests the interrupt properties fo= r DPMS");

>        &n= bsp;    igt_subtest_with_dynamic("legacy-dpms") {<= o:p>

>        &n= bsp;            = ;       for_each_pipe_with_valid_output(&= display, pipe, output) {

>+       &n= bsp;            = ;            &n= bsp;        if (!pipe_output_combo_valid= (&display, pipe, output))

>+       &n= bsp;            = ;            &n= bsp;            = ;           continue;

>+

>        &n= bsp;            = ;            &n= bsp;         igt_dynamic_f("%s= -pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))

>        &n= bsp;            = ;            &n= bsp;            &nbs= p;           run_plane_te= st(&display, pipe, output, test_legacy_dpms, DRM_PLANE_TYPE_PRIMARY);

>        &n= bsp;            = ;            &n= bsp;         break;

>@@ -313,6 +341,9 @@  igt_main=

>        &n= bsp;    igt_describe("Tests the interrupt properties fo= r pageflip");

>        &n= bsp;    igt_subtest_with_dynamic("legacy-pageflip"= ) {

>        &n= bsp;            = ;       for_each_pipe_with_valid_output(&= display, pipe, output) {

>+       &n= bsp;            = ;            &n= bsp;        if (!pipe_output_combo_valid= (&display, pipe, output))

>+       &n= bsp;            = ;            &n= bsp;            = ;           continue;

>+

>        &n= bsp;            = ;            &n= bsp;         igt_dynamic_f("%s= -pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))

>        &n= bsp;            = ;            &n= bsp;            = ;            run_pla= ne_test(&display, pipe, output, test_pageflip, DRM_PLANE_TYPE_PRIMARY);=

>        &n= bsp;            = ;            &n= bsp;         break;

>@@ -322,6 +353,9 @@  igt_main=

>        &n= bsp;    igt_describe("Tests the interrupt properties fo= r cursor");

>        &n= bsp;    igt_subtest_with_dynamic("legacy-cursor") = {

>        &n= bsp;            &nbs= p;      for_each_pipe_with_valid_output(&displ= ay, pipe, output) {

>+       &n= bsp;            = ;            &n= bsp;        if (!pipe_output_combo_valid= (&display, pipe, output))

>+       &n= bsp;            = ;            &n= bsp;            = ;           continue;

>+

>        &n= bsp;            = ;            &n= bsp;         igt_dynamic_f("%s= -pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))

>        &n= bsp;            = ;            &n= bsp;            = ;            run_pla= ne_test(&display, pipe, output, test_setcursor, DRM_PLANE_TYPE_CURSOR);=

>        &n= bsp;            = ;            &n= bsp;         break;

>@@ -331,6 +365,9 @@  igt_main=

>        &n= bsp;    igt_describe("Tests the interrupt properties fo= r primary plane");

>        &n= bsp;    igt_subtest_with_dynamic("universal-setplane-pr= imary") {

>        &n= bsp;            = ;       for_each_pipe_with_valid_output(&= display, pipe, output) {

>+       &n= bsp;            = ;            &n= bsp;        if (!pipe_output_combo_valid= (&display, pipe, output))

>+       &n= bsp;            = ;            &n= bsp;            = ;           continue;

>+

>        &n= bsp;            = ;            &n= bsp;         igt_dynamic_f("%s= -pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))

>        &n= bsp;            = ;            &n= bsp;            = ;            run_pla= ne_test(&display, pipe, output, test_setplane, DRM_PLANE_TYPE_PRIMARY);=

>        &n= bsp;            = ;            &n= bsp;         break;

>@@ -340,6 +377,9 @@  igt_main=

>        &n= bsp;    igt_describe("Tests the interrupt properties fo= r cursor plane");

>        &n= bsp;    igt_subtest_with_dynamic("universal-setplane-cu= rsor") {

>        &n= bsp;            = ;       for_each_pipe_with_valid_output(&= display, pipe, output) {

>+       &n= bsp;            = ;            &n= bsp;        if (!pipe_output_combo_valid= (&display, pipe, output))

>+       &n= bsp;            = ;            &n= bsp;            = ;           continue;

>+

>        &n= bsp;            = ;            &n= bsp;         igt_dynamic_f("%s= -pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))

>        &n= bsp;            = ;            &n= bsp;            = ;            run_pla= ne_test(&display, pipe, output, test_setplane, DRM_PLANE_TYPE_CURSOR);<= o:p>

>        &n= bsp;            = ;            &n= bsp;         break;

--_000_PH7PR11MB600698F43943115166E19407C5ED9PH7PR11MB6006namp_--