Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting
@ 2023-12-14 15:42 Jeevan B
  2023-12-18 12:12 ` Govindapillai, Vinod
  0 siblings, 1 reply; 6+ messages in thread
From: Jeevan B @ 2023-12-14 15:42 UTC (permalink / raw)
  To: igt-dev

The format is being changed globally to DRM_FORMAT_NV12. additionally,
FBC doesn't support the NV12 format, so this issue is being addressed.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/intel/kms_psr2_sf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 76435f501..272260cdf 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -1387,7 +1387,6 @@ igt_main
 		 * plane and continuous updates.
 		 */
 		data.op = PLANE_UPDATE_CONTINUOUS;
-		data.primary_format = DRM_FORMAT_NV12;
 		igt_describe("Test that selective fetch works on overlay plane");
 		igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
 					   op_str(data.op)) {
@@ -1404,6 +1403,11 @@ igt_main
 						data.pipe = pipes[i];
 						data.output = outputs[i];
 						data.damage_area_count = 1;
+						if (data.fbc_flag == true &&
+						    data.op_fbc_mode == FBC_ENABLED)
+							data.primary_format = DRM_FORMAT_XRGB8888;
+						else
+							data.primary_format = DRM_FORMAT_NV12;
 						data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
 						data.coexist_feature = j;
 						prepare(&data);
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting
  2023-12-14 15:42 Jeevan B
@ 2023-12-18 12:12 ` Govindapillai, Vinod
  2023-12-19  6:43   ` B, Jeevan
  0 siblings, 1 reply; 6+ messages in thread
From: Govindapillai, Vinod @ 2023-12-18 12:12 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, B, Jeevan

Hi jeevan,

This might not be enough. 

For example, if you are executing all the tests, after the first iteration y = 0, the
data.primary_format is set to DRM_FORMAT_NV12. Then in y = 1 (FBC cases) will be executed with
format as DRM_FORMAT_NV12 which will fail.

After introducing the FBC on/off loop, I think there could be other issues as well, because "data"
members are directly modified as required by the tests in that loop.

Also for pre-lnl platforms, do we need to even list and execute "fbc-" cases as it is not suported
and will be skipped?

BR
Vinod


On Thu, 2023-12-14 at 21:12 +0530, Jeevan B wrote:
> The format is being changed globally to DRM_FORMAT_NV12. additionally,
> FBC doesn't support the NV12 format, so this issue is being addressed.
> 
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
>  tests/intel/kms_psr2_sf.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
> index 76435f501..272260cdf 100644
> --- a/tests/intel/kms_psr2_sf.c
> +++ b/tests/intel/kms_psr2_sf.c
> @@ -1387,7 +1387,6 @@ igt_main
>                  * plane and continuous updates.
>                  */
>                 data.op = PLANE_UPDATE_CONTINUOUS;
> -               data.primary_format = DRM_FORMAT_NV12;
>                 igt_describe("Test that selective fetch works on overlay plane");
>                 igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
>                                            op_str(data.op)) {
> @@ -1404,6 +1403,11 @@ igt_main
>                                                 data.pipe = pipes[i];
>                                                 data.output = outputs[i];
>                                                 data.damage_area_count = 1;
> +                                               if (data.fbc_flag == true &&
> +                                                   data.op_fbc_mode == FBC_ENABLED)
> +                                                       data.primary_format = DRM_FORMAT_XRGB8888;
> +                                               else
> +                                                       data.primary_format = DRM_FORMAT_NV12;
>                                                 data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
>                                                 data.coexist_feature = j;
>                                                 prepare(&data);


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting
  2023-12-18 12:12 ` Govindapillai, Vinod
@ 2023-12-19  6:43   ` B, Jeevan
  2023-12-19  7:12     ` Govindapillai, Vinod
  0 siblings, 1 reply; 6+ messages in thread
From: B, Jeevan @ 2023-12-19  6:43 UTC (permalink / raw)
  To: Govindapillai, Vinod, igt-dev@lists.freedesktop.org

> -----Original Message-----
> From: Govindapillai, Vinod <vinod.govindapillai@intel.com>
> Sent: Monday, December 18, 2023 5:43 PM
> To: igt-dev@lists.freedesktop.org; B, Jeevan <jeevan.b@intel.com>
> Cc: Sharma, Swati2 <swati2.sharma@intel.com>
> Subject: Re: [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting
> 
> Hi jeevan,
> 
> This might not be enough.
> 
> For example, if you are executing all the tests, after the first iteration y = 0, the
> data.primary_format is set to DRM_FORMAT_NV12. Then in y = 1 (FBC cases) will
> be executed with format as DRM_FORMAT_NV12 which will fail.
> 
> After introducing the FBC on/off loop, I think there could be other issues as well,
> because "data"
> members are directly modified as required by the tests in that loop.
> 
> Also for pre-lnl platforms, do we need to even list and execute "fbc-" cases as it is
> not suported and will be skipped?
> 
Should we restructure the test by add new subtests instead of looping it ? 
NV12 should be fixed with this logic, but other parameters might be affected as you pointed out. 

> BR
> Vinod
> 
> 
> On Thu, 2023-12-14 at 21:12 +0530, Jeevan B wrote:
> > The format is being changed globally to DRM_FORMAT_NV12. additionally,
> > FBC doesn't support the NV12 format, so this issue is being addressed.
> >
> > Signed-off-by: Jeevan B <jeevan.b@intel.com>
> > ---
> >  tests/intel/kms_psr2_sf.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
> > index 76435f501..272260cdf 100644
> > --- a/tests/intel/kms_psr2_sf.c
> > +++ b/tests/intel/kms_psr2_sf.c
> > @@ -1387,7 +1387,6 @@ igt_main
> >                  * plane and continuous updates.
> >                  */
> >                 data.op = PLANE_UPDATE_CONTINUOUS;
> > -               data.primary_format = DRM_FORMAT_NV12;
> >                 igt_describe("Test that selective fetch works on
> > overlay plane");
> >                 igt_subtest_with_dynamic_f("%soverlay-%s-sf",
> > append_fbc_subtest[y],
> >                                            op_str(data.op)) { @@
> > -1404,6 +1403,11 @@ igt_main
> >                                                 data.pipe = pipes[i];
> >                                                 data.output =
> > outputs[i];
> >                                                 data.damage_area_count
> > = 1;
> > +                                               if (data.fbc_flag ==
> > +true &&
> > +                                                   data.op_fbc_mode
> > +== FBC_ENABLED)
> > +
> > +data.primary_format = DRM_FORMAT_XRGB8888;
> > +                                               else
> > +
> > +data.primary_format = DRM_FORMAT_NV12;
> >                                                 data.test_plane_id =
> > DRM_PLANE_TYPE_OVERLAY;
> >                                                 data.coexist_feature =
> > j;
> >                                                 prepare(&data);


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting
  2023-12-19  6:43   ` B, Jeevan
@ 2023-12-19  7:12     ` Govindapillai, Vinod
  0 siblings, 0 replies; 6+ messages in thread
From: Govindapillai, Vinod @ 2023-12-19  7:12 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, B, Jeevan

On Tue, 2023-12-19 at 06:43 +0000, B, Jeevan wrote:
> > -----Original Message-----
> > From: Govindapillai, Vinod <vinod.govindapillai@intel.com>
> > Sent: Monday, December 18, 2023 5:43 PM
> > To: igt-dev@lists.freedesktop.org; B, Jeevan <jeevan.b@intel.com>
> > Cc: Sharma, Swati2 <swati2.sharma@intel.com>
> > Subject: Re: [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting
> > 
> > Hi jeevan,
> > 
> > This might not be enough.
> > 
> > For example, if you are executing all the tests, after the first iteration y = 0, the
> > data.primary_format is set to DRM_FORMAT_NV12. Then in y = 1 (FBC cases) will
> > be executed with format as DRM_FORMAT_NV12 which will fail.
> > 
> > After introducing the FBC on/off loop, I think there could be other issues as well,
> > because "data"
> > members are directly modified as required by the tests in that loop.
> > 
> > Also for pre-lnl platforms, do we need to even list and execute "fbc-" cases as it is
> > not suported and will be skipped?
> > 
> Should we restructure the test by add new subtests instead of looping it ?
> 
A quick solution could be to move the initialization some of the common "data" members to the the
beginning of the "for" loop including the data.primary_format from "igt_fixture". Or create another
function to init the data members according to the test. I am not sure if that is according to the
practices in IGT.

> NV12 should be fixed with this logic, 
I dont think so! As mentioned if you execute the full "kms_psr2_sf", y = 1 (FBC) iteration tests
will be executed with format as NV12 and will fail.

BR
Vinod

> but other parameters might be affected as you pointed out. 

> 
> > BR
> > Vinod
> > 
> > 
> > On Thu, 2023-12-14 at 21:12 +0530, Jeevan B wrote:
> > > The format is being changed globally to DRM_FORMAT_NV12. additionally,
> > > FBC doesn't support the NV12 format, so this issue is being addressed.
> > > 
> > > Signed-off-by: Jeevan B <jeevan.b@intel.com>
> > > ---
> > >  tests/intel/kms_psr2_sf.c | 6 +++++-
> > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
> > > index 76435f501..272260cdf 100644
> > > --- a/tests/intel/kms_psr2_sf.c
> > > +++ b/tests/intel/kms_psr2_sf.c
> > > @@ -1387,7 +1387,6 @@ igt_main
> > >                  * plane and continuous updates.
> > >                  */
> > >                 data.op = PLANE_UPDATE_CONTINUOUS;
> > > -               data.primary_format = DRM_FORMAT_NV12;
> > >                 igt_describe("Test that selective fetch works on
> > > overlay plane");
> > >                 igt_subtest_with_dynamic_f("%soverlay-%s-sf",
> > > append_fbc_subtest[y],
> > >                                            op_str(data.op)) { @@
> > > -1404,6 +1403,11 @@ igt_main
> > >                                                 data.pipe = pipes[i];
> > >                                                 data.output =
> > > outputs[i];
> > >                                                 data.damage_area_count
> > > = 1;
> > > +                                               if (data.fbc_flag ==
> > > +true &&
> > > +                                                   data.op_fbc_mode
> > > +== FBC_ENABLED)
> > > +
> > > +data.primary_format = DRM_FORMAT_XRGB8888;
> > > +                                               else
> > > +
> > > +data.primary_format = DRM_FORMAT_NV12;
> > >                                                 data.test_plane_id =
> > > DRM_PLANE_TYPE_OVERLAY;
> > >                                                 data.coexist_feature =
> > > j;
> > >                                                 prepare(&data);
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting
@ 2023-12-20 18:31 Jeevan B
  2023-12-21  9:16 ` Govindapillai, Vinod
  0 siblings, 1 reply; 6+ messages in thread
From: Jeevan B @ 2023-12-20 18:31 UTC (permalink / raw)
  To: igt-dev

The format is being changed globally to DRM_FORMAT_NV12. Additionally,
FBC doesn't support the NV12 format, so this issue is being addressed.

v2: Initialize data members at the beginning of the loop.
    bigfb plane size is too big for FBC, so skipping that test.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/intel/kms_psr2_sf.c | 68 +++++++++++++++++++++++----------------
 1 file changed, 40 insertions(+), 28 deletions(-)

diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 76435f501..9cafe1f7a 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -68,13 +68,13 @@
  * SUBTEST: cursor-plane-update-sf
  * Description: Test that selective fetch works on cursor plane
  *
- * SUBTEST: fbc-cursor-plane-update-continuous-sf
+ * SUBTEST: fbc-cursor-plane-update-sf
  * Description: Test that fbc with selective fetch works on cursor plane
  *
  * SUBTEST: overlay-plane-update-continuous-sf
  * Description: Test that selective fetch works on overlay plane
  *
- * SUBTEST: fbc-overlay-plane-update-continuous-sf-dmg-area
+ * SUBTEST: fbc-overlay-plane-update-sf-dmg-area
  * Description: Test that fbc with selective fetch works on overlay plane
  *
  * SUBTEST: overlay-plane-update-sf-dmg-area
@@ -100,14 +100,12 @@
  * SUBTEST: primary-plane-update-sf-dmg-area
  * Description: Test that selective fetch works on primary plane
  *
- * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area
+ * SUBTEST:  fbc-primary-plane-update-sf-dmg-area
  * Description: Test that fbc with selective fetch works on primary plane
  *
  * SUBTEST: primary-plane-update-sf-dmg-area-big-fb
  * Description: Test that selective fetch works on primary plane with big fb
  *
- * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area-big-fb
- * Description: Test that fbc with selective fetch works on primary plane with big fb
  */
 
 IGT_TEST_DESCRIPTION("Tests to varify PSR2 selective fetch by sending multiple"
@@ -1043,6 +1041,11 @@ igt_main
 	}
 
 	for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+		data.op = PLANE_UPDATE;
+		data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+		data.primary_format = DRM_FORMAT_XRGB8888;
+		data.big_fb_test = 0;
+
 		data.op_fbc_mode = fbc_status[y];
 		/* Verify primary plane selective fetch */
 		igt_describe("Test that selective fetch works on primary plane");
@@ -1074,29 +1077,35 @@ igt_main
 		}
 
 		/* Verify primary plane selective fetch with big fb */
-		data.big_fb_test = 1;
-		igt_describe("Test that selective fetch works on primary plane with big fb");
-		igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb", append_fbc_subtest[y],
-					   op_str(data.op)) {
-			for (i = 0; i < n_pipes; i++) {
-				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
-					continue;
-
-				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
-					if (j != FEATURE_NONE && !(coexist_features[i] & j))
+		if (data.op_fbc_mode == FBC_DISABLED) {
+			data.big_fb_test = 1;
+			igt_describe("Test that selective fetch works on primary plane with "
+				     "big fb");
+			igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb",
+						   append_fbc_subtest[y],
+						   op_str(data.op)) {
+				for (i = 0; i < n_pipes; i++) {
+					if (!pipe_output_combo_valid(&data.display, pipes[i],
+								     outputs[i]))
 						continue;
-					igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
-						      igt_output_name(outputs[i]),
-						      coexist_feature_str(j)) {
-						data.pipe = pipes[i];
-						data.output = outputs[i];
-						data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
-						data.coexist_feature = j;
-						for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
-							data.damage_area_count = k;
-							prepare(&data);
-							run(&data);
-							cleanup(&data);
+
+					for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+						if (j != FEATURE_NONE && !(coexist_features[i] & j))
+							continue;
+						igt_dynamic_f("pipe-%s-%s%s",
+							      kmstest_pipe_name(pipes[i]),
+							      igt_output_name(outputs[i]),
+							      coexist_feature_str(j)) {
+							data.pipe = pipes[i];
+							data.output = outputs[i];
+							data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+							data.coexist_feature = j;
+							for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+								data.damage_area_count = k;
+								prepare(&data);
+								run(&data);
+								cleanup(&data);
+							}
 						}
 					}
 				}
@@ -1387,7 +1396,6 @@ igt_main
 		 * plane and continuous updates.
 		 */
 		data.op = PLANE_UPDATE_CONTINUOUS;
-		data.primary_format = DRM_FORMAT_NV12;
 		igt_describe("Test that selective fetch works on overlay plane");
 		igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
 					   op_str(data.op)) {
@@ -1404,6 +1412,10 @@ igt_main
 						data.pipe = pipes[i];
 						data.output = outputs[i];
 						data.damage_area_count = 1;
+						if (data.op_fbc_mode == FBC_ENABLED)
+							data.primary_format = DRM_FORMAT_XRGB8888;
+						else
+							data.primary_format = DRM_FORMAT_NV12;
 						data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
 						data.coexist_feature = j;
 						prepare(&data);
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting
  2023-12-20 18:31 [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting Jeevan B
@ 2023-12-21  9:16 ` Govindapillai, Vinod
  0 siblings, 0 replies; 6+ messages in thread
From: Govindapillai, Vinod @ 2023-12-21  9:16 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, Hogander, Jouni, B, Jeevan

Hi

Well.. I tried these changes and the fbc variant of kms_psr2_sf tests are all passing.
But I think, at some point some refactoring is warranted for this whole kms_psr_sf tests as the code
looks clumsy with unstructured "data" handling.

+Jouni, to see if all the selective fetch cases are handled as expected!

And please check two comments inline, with those addressed, 

Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>

BR
vinod


On Thu, 2023-12-21 at 00:01 +0530, Jeevan B wrote:
> The format is being changed globally to DRM_FORMAT_NV12. Additionally,
> FBC doesn't support the NV12 format, so this issue is being addressed.
> 
> v2: Initialize data members at the beginning of the loop.
>     bigfb plane size is too big for FBC, so skipping that test.
> 
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
>  tests/intel/kms_psr2_sf.c | 68 +++++++++++++++++++++++----------------
>  1 file changed, 40 insertions(+), 28 deletions(-)
> 
> diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
> index 76435f501..9cafe1f7a 100644
> --- a/tests/intel/kms_psr2_sf.c
> +++ b/tests/intel/kms_psr2_sf.c
> @@ -68,13 +68,13 @@
>   * SUBTEST: cursor-plane-update-sf
>   * Description: Test that selective fetch works on cursor plane
>   *
> - * SUBTEST: fbc-cursor-plane-update-continuous-sf
> + * SUBTEST: fbc-cursor-plane-update-sf
>   * Description: Test that fbc with selective fetch works on cursor plane
>   *
>   * SUBTEST: overlay-plane-update-continuous-sf
>   * Description: Test that selective fetch works on overlay plane
>   *
> - * SUBTEST: fbc-overlay-plane-update-continuous-sf-dmg-area
> + * SUBTEST: fbc-overlay-plane-update-sf-dmg-area
>   * Description: Test that fbc with selective fetch works on overlay plane
>   *
>   * SUBTEST: overlay-plane-update-sf-dmg-area
> @@ -100,14 +100,12 @@
>   * SUBTEST: primary-plane-update-sf-dmg-area
>   * Description: Test that selective fetch works on primary plane
>   *
> - * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area
> + * SUBTEST:  fbc-primary-plane-update-sf-dmg-area
>   * Description: Test that fbc with selective fetch works on primary plane
>   *
>   * SUBTEST: primary-plane-update-sf-dmg-area-big-fb
>   * Description: Test that selective fetch works on primary plane with big fb
>   *
> - * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area-big-fb
> - * Description: Test that fbc with selective fetch works on primary plane with big fb
>   */
>  
>  IGT_TEST_DESCRIPTION("Tests to varify PSR2 selective fetch by sending multiple"
> @@ -1043,6 +1041,11 @@ igt_main
>         }
>  
>         for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
> +               data.op = PLANE_UPDATE;
> +               data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> +               data.primary_format = DRM_FORMAT_XRGB8888;
> +               data.big_fb_test = 0;
> +
Now that these members are initialized here, do we need the same in igt_fixture block?

>                 data.op_fbc_mode = fbc_status[y];
>                 /* Verify primary plane selective fetch */
>                 igt_describe("Test that selective fetch works on primary plane");
> @@ -1074,29 +1077,35 @@ igt_main
>                 }
>  
>                 /* Verify primary plane selective fetch with big fb */
> -               data.big_fb_test = 1;
> -               igt_describe("Test that selective fetch works on primary plane with big fb");
> -               igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb",
> append_fbc_subtest[y],
> -                                          op_str(data.op)) {
> -                       for (i = 0; i < n_pipes; i++) {
> -                               if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
> -                                       continue;
> -
> -                               for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
> -                                       if (j != FEATURE_NONE && !(coexist_features[i] & j))
> +               if (data.op_fbc_mode == FBC_DISABLED) {

This change should be a separate patch.

> +                       data.big_fb_test = 1;
> +                       igt_describe("Test that selective fetch works on primary plane with "
> +                                    "big fb");
> +                       igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb",
> +                                                  append_fbc_subtest[y],
> +                                                  op_str(data.op)) {
> +                               for (i = 0; i < n_pipes; i++) {
> +                                       if (!pipe_output_combo_valid(&data.display, pipes[i],
> +                                                                    outputs[i]))
>                                                 continue;
> -                                       igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
> -                                                     igt_output_name(outputs[i]),
> -                                                     coexist_feature_str(j)) {
> -                                               data.pipe = pipes[i];
> -                                               data.output = outputs[i];
> -                                               data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> -                                               data.coexist_feature = j;
> -                                               for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> -                                                       data.damage_area_count = k;
> -                                                       prepare(&data);
> -                                                       run(&data);
> -                                                       cleanup(&data);
> +
> +                                       for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
> +                                               if (j != FEATURE_NONE && !(coexist_features[i] &
> j))
> +                                                       continue;
> +                                               igt_dynamic_f("pipe-%s-%s%s",
> +                                                             kmstest_pipe_name(pipes[i]),
> +                                                             igt_output_name(outputs[i]),
> +                                                             coexist_feature_str(j)) {
> +                                                       data.pipe = pipes[i];
> +                                                       data.output = outputs[i];
> +                                                       data.test_plane_id =
> DRM_PLANE_TYPE_PRIMARY;
> +                                                       data.coexist_feature = j;
> +                                                       for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> +                                                               data.damage_area_count = k;
> +                                                               prepare(&data);
> +                                                               run(&data);
> +                                                               cleanup(&data);
> +                                                       }
>                                                 }
>                                         }
>                                 }
> @@ -1387,7 +1396,6 @@ igt_main
>                  * plane and continuous updates.
>                  */
>                 data.op = PLANE_UPDATE_CONTINUOUS;
> -               data.primary_format = DRM_FORMAT_NV12;
>                 igt_describe("Test that selective fetch works on overlay plane");
>                 igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
>                                            op_str(data.op)) {
> @@ -1404,6 +1412,10 @@ igt_main
>                                                 data.pipe = pipes[i];
>                                                 data.output = outputs[i];
>                                                 data.damage_area_count = 1;
> +                                               if (data.op_fbc_mode == FBC_ENABLED)
> +                                                       data.primary_format = DRM_FORMAT_XRGB8888;
> +                                               else
> +                                                       data.primary_format = DRM_FORMAT_NV12;
>                                                 data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
>                                                 data.coexist_feature = j;
>                                                 prepare(&data);



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-21  9:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-20 18:31 [PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting Jeevan B
2023-12-21  9:16 ` Govindapillai, Vinod
  -- strict thread matches above, loose matches on Subject: below --
2023-12-14 15:42 Jeevan B
2023-12-18 12:12 ` Govindapillai, Vinod
2023-12-19  6:43   ` B, Jeevan
2023-12-19  7:12     ` Govindapillai, Vinod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox