* [igt-dev] [PATCH i-g-t 1/4] tests/intel/kms_psr: fix documentation
2023-11-30 13:20 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
@ 2023-11-30 13:20 ` Jeevan B
2023-12-01 5:06 ` B, Jeevan
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 2/4] tests/intel/kms_psr: fix subtest naming Jeevan B
` (5 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Jeevan B @ 2023-11-30 13:20 UTC (permalink / raw)
To: igt-dev
From: Swati Sharma <swati2.sharma@intel.com>
Optimize documentation and update mega features accordingly.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/intel/kms_psr.c | 215 +++++++++++++++---------------------------
1 file changed, 74 insertions(+), 141 deletions(-)
diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c
index 05bdd7b98..31d6f779c 100644
--- a/tests/intel/kms_psr.c
+++ b/tests/intel/kms_psr.c
@@ -43,143 +43,93 @@
#include "xe/xe_query.h"
/**
- * SUBTEST: psr_basic
- * Description: Basic check for psr if it is detecting changes made in planes
- * Functionality: psr1
+ * SUBTEST: %s_basic
+ * Description: Basic check for %arg[1] if it is detecting changes made in planes
+ * Functionality: %arg[1]
*
- * SUBTEST: psr_%s_%s
- * Description: Check if psr is detecting memory mapping, rendering and plane
- * operations performed on %arg[1]
- * Driver requirement: i915
- * Functionality: kms_core, plane, psr1
- *
- * arg[1]:
- *
- * @cursor: Cursor plane
- * @primary: Primary plane
- * @sprite: Sprite plane
- *
- * arg[2]:
+ * SUBTEST: %s_dpms
+ * Description: Check if %arg[1] is detecting changes when rendering operation
+ * is performed with dpms enabled or disabled
+ * Functionality: %arg[1], dpms
*
- * @mmap_cpu: MMAP CPU
- * @mmap_gtt: MMAP GTT
- */
-
-/**
- * SUBTEST: psr_sprite_plane_move
- * Description: Check if psr is detecting memory mapping, rendering and plane
- * operations performed on sprite planes
- * Functionality: plane, psr1
+ * SUBTEST: %s_no_drrs
+ * Description: Check if %arg[1] is detecting changes when drrs is disabled
+ * Functionality: %arg[1], drrs
*
- * SUBTEST: psr_%s_%s
- * Description: Check if psr is detecting memory mapping, rendering and plane
- * operations performed on %arg[1] planes
- * Functionality: kms_core, plane, psr1
+ * SUBTEST: %s_suspend
+ * Description: Check if %arg[1] is detecting changes when plane operation is
+ * performed with suspend resume cycles
+ * Functionality: %arg[1], suspend
*
* arg[1]:
*
- * @cursor: Cursor plane
- * @sprite: Sprite plane
- *
- * arg[2]:
- *
- * @blt: Blitter
- * @render: Render
- * @plane_onoff: Plane On off
+ * @psr: psr1
+ * @psr2: psr2
*/
/**
- * SUBTEST: psr_primary_%s
- * Description: Check if psr is detecting memory mapping, rendering and plane
- * operations performed on %arg[1] planes
- * Functionality: kms_core, psr1
+ * SUBTEST: %s_%s_%s
+ * Description: Check if %arg[1] is detecting memory mapping %arg[3] operations
+ * performed on %arg[2] planes
+ * Driver requirement: i915
+ * Functionality: %arg[1], plane
*
* arg[1]:
*
- * @blt: Blitter
- * @render: Render
- */
-
-/**
- * SUBTEST: psr_dpms
- * Description: Check if psr is detecting changes when rendering operation is
- * performed with dpms enabled or disabled
- * Functionality: dpms, psr1
- *
- * SUBTEST: psr_no_drrs
- * Description: Check if psr is detecting changes when drrs is disabled
- * Functionality: drrs, psr1
- *
- * SUBTEST: psr_suspend
- * Description: Check if psr is detecting changes when plane operation
- * is performed with suspend resume cycles
- * Functionality: psr1, suspend
- *
- * SUBTEST: psr2_dpms
- * Description: Check if psr is detecting changes when rendering operation
- * is performed with dpms enabled or disabled
- * Functionality: dpms, psr2
- *
- * SUBTEST: psr2_no_drrs
- * Description: Check if psr is detecting changes when drrs is disabled
- * Functionality: drrs, psr2
- *
- * SUBTEST: psr2_suspend
- * Description: Check if psr is detecting changes when plane operation is
- * performed with suspend resume cycles
- * Functionality: psr2, suspend
- *
- * SUBTEST: psr2_basic
- * Description: Basic check for psr if it is detecting changes made in planes
- * Functionality: psr2
+ * @psr: psr1
+ * @psr2: psr2
*
- * SUBTEST: psr2_%s_%s
- * Description: Check if psr2 is detecting memory mapping, rendering and plane
- * operations performed on %arg[1] planes
- * Driver requirement: i915
- * Functionality: kms_core, plane, psr2
- *
- * arg[1]:
+ * arg[2]:
*
* @cursor: Cursor plane
* @primary: Primary plane
* @sprite: Sprite plane
*
- * arg[2]:
+ * arg[3]:
*
* @mmap_cpu: MMAP CPU
* @mmap_gtt: MMAP GTT
*/
/**
- * SUBTEST: psr2_primary_page_flip
- * Description: Check if psr is detecting memory mapping, rendering and plane
- * operations performed on primary planes
- * Functionality: plane, psr2
+ * SUBTEST: %s_primary_page_flip
+ * Description: Check if %arg[1] is detecting page-flipping operation
+ * performed on primary plane
+ * Functionality: %arg[1], plane
*
- * SUBTEST: psr2_primary_%s
- * Description: Check if psr is detecting memory mapping, rendering and plane
- * operations performed on primary planes
- * Functionality: kms_core, plane, psr2
+ * SUBTEST: %s_primary_%s
+ * Description: Check if %arg[1] is detecting rendering operations %arg[2]
+ * when performed on primary plane
+ * Functionality: %arg[1], plane
*
* arg[1]:
*
+ * @psr: psr1
+ * @psr2: psr2
+ *
+ * arg[2]:
+ *
* @blt: Blitter
* @render: Render
*/
/**
- * SUBTEST: psr2_%s_%s
- * Description: Check if psr is detecting memory mapping, rendering and plane
- * operations performed on %arg[1] planes
- * Functionality: kms_core, plane, psr2
+ * SUBTEST: %s_%s_%s
+ * Description: Check if %arg[1] is detecting rendering and plane
+ * operations %arg[3] performed on %arg[2] planes
+ * Functionality: %arg[1], plane
*
* arg[1]:
*
+ * @psr: psr1
+ * @psr2: psr2
+ *
+ * arg[2]:
+ *
* @cursor: Cursor plane
* @sprite: Sprite plane
*
- * arg[2]:
+ * arg[3]:
*
* @blt: Blitter
* @render: Render
@@ -188,36 +138,36 @@
*/
/**
+ * SUBTEST: pr_basic
+ * Description: Basic check for pr if it is detecting changes made in planes
+ * Functionality: pr
+ * Mega feature: DP2.0
+ *
* SUBTEST: pr_dpms
* Description: Check if pr is detecting changes when rendering operation
* is performed with dpms enabled or disabled
- * Functionality: dpms, pr
- * Mega feature: Panel Replay
+ * Functionality: pr, dpms
+ * Mega feature: DP2.0
*
* SUBTEST: pr_no_drrs
* Description: Check if pr is detecting changes when drrs is disabled
- * Functionality: drrs, pr
- * Mega feature: Panel Replay
+ * Functionality: pr, drrs
+ * Mega feature: DP2.0
*
* SUBTEST: pr_suspend
* Description: Check if pr is detecting changes when plane operation is
* performed with suspend resume cycles
* Functionality: pr, suspend
- * Mega feature: Panel Replay
- *
- * SUBTEST: pr_basic
- * Description: Basic check for pr if it is detecting changes made in planes
- * Functionality: pr
- * Mega feature: Panel Replay
+ * Mega feature: DP2.0
*/
/**
* SUBTEST: pr_%s_%s
- * Description: Check if pr is detecting memory mapping, rendering and plane
- * operations performed on %arg[1] planes
+ * Description: Check if pr is detecting memory mapping %arg[2] operations
+ * performed on %arg[1] planes
* Driver requirement: i915
- * Functionality: kms_core, plane, pr
- * Mega feature: Panel Replay
+ * Functionality: pr, plane
+ * Mega feature: DP2.0
*
* arg[1]:
*
@@ -233,16 +183,16 @@
/**
* SUBTEST: pr_primary_page_flip
- * Description: Check if pr is detecting memory mapping, rendering and plane
- * operations performed on primary planes
- * Functionality: plane, pr
- * Mega feature: Panel Replay
+ * Description: Check if pr is detecting page-flipping operation
+ * performed on primary plane
+ * Functionality: pr, plane
+ * Mega feature: DP2.0
*
* SUBTEST: pr_primary_%s
- * Description: Check if pr is detecting memory mapping, rendering and plane
- * operations performed on primary planes
- * Functionality: kms_core, plane, pr
- * Mega feature: Panel Replay
+ * Description: Check if pr is detecting rendering operations %arg[1]
+ * when performed on primary plane
+ * Functionality: pr, plane
+ * Mega feature: DP2.0
*
* arg[1]:
*
@@ -252,10 +202,10 @@
/**
* SUBTEST: pr_%s_%s
- * Description: Check if pr is detecting memory mapping, rendering and plane
- * operations performed on %arg[1] planes
- * Functionality: kms_core, plane, pr
- * Mega feature: Panel Replay
+ * Description: Check if pr is detecting rendering and plane
+ * operations %arg[2] performed on %arg[1] planes
+ * Functionality: pr, plane
+ * Mega feature: DP2.0
*
* arg[1]:
*
@@ -270,23 +220,6 @@
* @plane_move: Move plane position
*/
-/**
- * SUBTEST: psr_cursor_plane_move
- * Description: Check if psr is detecting the plane operations performed on
- * cursor planes
- * Functionality: psr1
- *
- * SUBTEST: psr_primary_page_flip
- * Description: Check if psr is detecting page-flipping operations performed
- * on primary planes
- * Functionality: psr1
- *
- * SUBTEST: psr_sprite_plane_onoff
- * Description: Check if psr is detecting the plane operations performed on
- * sprite planes
- * Functionality: psr1
- */
-
enum operations {
PAGE_FLIP,
MMAP_GTT,
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [igt-dev] [PATCH i-g-t 1/4] tests/intel/kms_psr: fix documentation
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 1/4] tests/intel/kms_psr: fix documentation Jeevan B
@ 2023-12-01 5:06 ` B, Jeevan
0 siblings, 0 replies; 16+ messages in thread
From: B, Jeevan @ 2023-12-01 5:06 UTC (permalink / raw)
To: B, Jeevan, igt-dev@lists.freedesktop.org
LGTM
Reviewed-by: Jeevan B <jeevan.b@intel.com>
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Jeevan B
> Sent: Thursday, November 30, 2023 6:51 PM
> To: igt-dev@lists.freedesktop.org
> Subject: [igt-dev] [PATCH i-g-t 1/4] tests/intel/kms_psr: fix documentation
>
> From: Swati Sharma <swati2.sharma@intel.com>
>
> Optimize documentation and update mega features accordingly.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/intel/kms_psr.c | 215 +++++++++++++++---------------------------
> 1 file changed, 74 insertions(+), 141 deletions(-)
>
> diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c index
> 05bdd7b98..31d6f779c 100644
> --- a/tests/intel/kms_psr.c
> +++ b/tests/intel/kms_psr.c
> @@ -43,143 +43,93 @@
> #include "xe/xe_query.h"
>
> /**
> - * SUBTEST: psr_basic
> - * Description: Basic check for psr if it is detecting changes made in planes
> - * Functionality: psr1
> + * SUBTEST: %s_basic
> + * Description: Basic check for %arg[1] if it is detecting changes made
> + in planes
> + * Functionality: %arg[1]
> *
> - * SUBTEST: psr_%s_%s
> - * Description: Check if psr is detecting memory mapping, rendering and plane
> - * operations performed on %arg[1]
> - * Driver requirement: i915
> - * Functionality: kms_core, plane, psr1
> - *
> - * arg[1]:
> - *
> - * @cursor: Cursor plane
> - * @primary: Primary plane
> - * @sprite: Sprite plane
> - *
> - * arg[2]:
> + * SUBTEST: %s_dpms
> + * Description: Check if %arg[1] is detecting changes when rendering operation
> + * is performed with dpms enabled or disabled
> + * Functionality: %arg[1], dpms
> *
> - * @mmap_cpu: MMAP CPU
> - * @mmap_gtt: MMAP GTT
> - */
> -
> -/**
> - * SUBTEST: psr_sprite_plane_move
> - * Description: Check if psr is detecting memory mapping, rendering and plane
> - * operations performed on sprite planes
> - * Functionality: plane, psr1
> + * SUBTEST: %s_no_drrs
> + * Description: Check if %arg[1] is detecting changes when drrs is
> + disabled
> + * Functionality: %arg[1], drrs
> *
> - * SUBTEST: psr_%s_%s
> - * Description: Check if psr is detecting memory mapping, rendering and plane
> - * operations performed on %arg[1] planes
> - * Functionality: kms_core, plane, psr1
> + * SUBTEST: %s_suspend
> + * Description: Check if %arg[1] is detecting changes when plane operation is
> + * performed with suspend resume cycles
> + * Functionality: %arg[1], suspend
> *
> * arg[1]:
> *
> - * @cursor: Cursor plane
> - * @sprite: Sprite plane
> - *
> - * arg[2]:
> - *
> - * @blt: Blitter
> - * @render: Render
> - * @plane_onoff: Plane On off
> + * @psr: psr1
> + * @psr2: psr2
> */
>
> /**
> - * SUBTEST: psr_primary_%s
> - * Description: Check if psr is detecting memory mapping, rendering and plane
> - * operations performed on %arg[1] planes
> - * Functionality: kms_core, psr1
> + * SUBTEST: %s_%s_%s
> + * Description: Check if %arg[1] is detecting memory mapping %arg[3]
> operations
> + * performed on %arg[2] planes
> + * Driver requirement: i915
> + * Functionality: %arg[1], plane
> *
> * arg[1]:
> *
> - * @blt: Blitter
> - * @render: Render
> - */
> -
> -/**
> - * SUBTEST: psr_dpms
> - * Description: Check if psr is detecting changes when rendering operation is
> - * performed with dpms enabled or disabled
> - * Functionality: dpms, psr1
> - *
> - * SUBTEST: psr_no_drrs
> - * Description: Check if psr is detecting changes when drrs is disabled
> - * Functionality: drrs, psr1
> - *
> - * SUBTEST: psr_suspend
> - * Description: Check if psr is detecting changes when plane operation
> - * is performed with suspend resume cycles
> - * Functionality: psr1, suspend
> - *
> - * SUBTEST: psr2_dpms
> - * Description: Check if psr is detecting changes when rendering operation
> - * is performed with dpms enabled or disabled
> - * Functionality: dpms, psr2
> - *
> - * SUBTEST: psr2_no_drrs
> - * Description: Check if psr is detecting changes when drrs is disabled
> - * Functionality: drrs, psr2
> - *
> - * SUBTEST: psr2_suspend
> - * Description: Check if psr is detecting changes when plane operation is
> - * performed with suspend resume cycles
> - * Functionality: psr2, suspend
> - *
> - * SUBTEST: psr2_basic
> - * Description: Basic check for psr if it is detecting changes made in planes
> - * Functionality: psr2
> + * @psr: psr1
> + * @psr2: psr2
> *
> - * SUBTEST: psr2_%s_%s
> - * Description: Check if psr2 is detecting memory mapping, rendering and plane
> - * operations performed on %arg[1] planes
> - * Driver requirement: i915
> - * Functionality: kms_core, plane, psr2
> - *
> - * arg[1]:
> + * arg[2]:
> *
> * @cursor: Cursor plane
> * @primary: Primary plane
> * @sprite: Sprite plane
> *
> - * arg[2]:
> + * arg[3]:
> *
> * @mmap_cpu: MMAP CPU
> * @mmap_gtt: MMAP GTT
> */
>
> /**
> - * SUBTEST: psr2_primary_page_flip
> - * Description: Check if psr is detecting memory mapping, rendering and plane
> - * operations performed on primary planes
> - * Functionality: plane, psr2
> + * SUBTEST: %s_primary_page_flip
> + * Description: Check if %arg[1] is detecting page-flipping operation
> + * performed on primary plane
> + * Functionality: %arg[1], plane
> *
> - * SUBTEST: psr2_primary_%s
> - * Description: Check if psr is detecting memory mapping, rendering and plane
> - * operations performed on primary planes
> - * Functionality: kms_core, plane, psr2
> + * SUBTEST: %s_primary_%s
> + * Description: Check if %arg[1] is detecting rendering operations %arg[2]
> + * when performed on primary plane
> + * Functionality: %arg[1], plane
> *
> * arg[1]:
> *
> + * @psr: psr1
> + * @psr2: psr2
> + *
> + * arg[2]:
> + *
> * @blt: Blitter
> * @render: Render
> */
>
> /**
> - * SUBTEST: psr2_%s_%s
> - * Description: Check if psr is detecting memory mapping, rendering and plane
> - * operations performed on %arg[1] planes
> - * Functionality: kms_core, plane, psr2
> + * SUBTEST: %s_%s_%s
> + * Description: Check if %arg[1] is detecting rendering and plane
> + * operations %arg[3] performed on %arg[2] planes
> + * Functionality: %arg[1], plane
> *
> * arg[1]:
> *
> + * @psr: psr1
> + * @psr2: psr2
> + *
> + * arg[2]:
> + *
> * @cursor: Cursor plane
> * @sprite: Sprite plane
> *
> - * arg[2]:
> + * arg[3]:
> *
> * @blt: Blitter
> * @render: Render
> @@ -188,36 +138,36 @@
> */
>
> /**
> + * SUBTEST: pr_basic
> + * Description: Basic check for pr if it is detecting changes made in
> + planes
> + * Functionality: pr
> + * Mega feature: DP2.0
> + *
> * SUBTEST: pr_dpms
> * Description: Check if pr is detecting changes when rendering operation
> * is performed with dpms enabled or disabled
> - * Functionality: dpms, pr
> - * Mega feature: Panel Replay
> + * Functionality: pr, dpms
> + * Mega feature: DP2.0
> *
> * SUBTEST: pr_no_drrs
> * Description: Check if pr is detecting changes when drrs is disabled
> - * Functionality: drrs, pr
> - * Mega feature: Panel Replay
> + * Functionality: pr, drrs
> + * Mega feature: DP2.0
> *
> * SUBTEST: pr_suspend
> * Description: Check if pr is detecting changes when plane operation is
> * performed with suspend resume cycles
> * Functionality: pr, suspend
> - * Mega feature: Panel Replay
> - *
> - * SUBTEST: pr_basic
> - * Description: Basic check for pr if it is detecting changes made in planes
> - * Functionality: pr
> - * Mega feature: Panel Replay
> + * Mega feature: DP2.0
> */
>
> /**
> * SUBTEST: pr_%s_%s
> - * Description: Check if pr is detecting memory mapping, rendering and plane
> - * operations performed on %arg[1] planes
> + * Description: Check if pr is detecting memory mapping %arg[2] operations
> + * performed on %arg[1] planes
> * Driver requirement: i915
> - * Functionality: kms_core, plane, pr
> - * Mega feature: Panel Replay
> + * Functionality: pr, plane
> + * Mega feature: DP2.0
> *
> * arg[1]:
> *
> @@ -233,16 +183,16 @@
>
> /**
> * SUBTEST: pr_primary_page_flip
> - * Description: Check if pr is detecting memory mapping, rendering and plane
> - * operations performed on primary planes
> - * Functionality: plane, pr
> - * Mega feature: Panel Replay
> + * Description: Check if pr is detecting page-flipping operation
> + * performed on primary plane
> + * Functionality: pr, plane
> + * Mega feature: DP2.0
> *
> * SUBTEST: pr_primary_%s
> - * Description: Check if pr is detecting memory mapping, rendering and plane
> - * operations performed on primary planes
> - * Functionality: kms_core, plane, pr
> - * Mega feature: Panel Replay
> + * Description: Check if pr is detecting rendering operations %arg[1]
> + * when performed on primary plane
> + * Functionality: pr, plane
> + * Mega feature: DP2.0
> *
> * arg[1]:
> *
> @@ -252,10 +202,10 @@
>
> /**
> * SUBTEST: pr_%s_%s
> - * Description: Check if pr is detecting memory mapping, rendering and plane
> - * operations performed on %arg[1] planes
> - * Functionality: kms_core, plane, pr
> - * Mega feature: Panel Replay
> + * Description: Check if pr is detecting rendering and plane
> + * operations %arg[2] performed on %arg[1] planes
> + * Functionality: pr, plane
> + * Mega feature: DP2.0
> *
> * arg[1]:
> *
> @@ -270,23 +220,6 @@
> * @plane_move: Move plane position
> */
>
> -/**
> - * SUBTEST: psr_cursor_plane_move
> - * Description: Check if psr is detecting the plane operations performed on
> - * cursor planes
> - * Functionality: psr1
> - *
> - * SUBTEST: psr_primary_page_flip
> - * Description: Check if psr is detecting page-flipping operations performed
> - * on primary planes
> - * Functionality: psr1
> - *
> - * SUBTEST: psr_sprite_plane_onoff
> - * Description: Check if psr is detecting the plane operations performed on
> - * sprite planes
> - * Functionality: psr1
> - */
> -
> enum operations {
> PAGE_FLIP,
> MMAP_GTT,
> --
> 2.25.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t 2/4] tests/intel/kms_psr: fix subtest naming
2023-11-30 13:20 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 1/4] tests/intel/kms_psr: fix documentation Jeevan B
@ 2023-11-30 13:20 ` Jeevan B
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 3/4] tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests Jeevan B
` (4 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Jeevan B @ 2023-11-30 13:20 UTC (permalink / raw)
To: igt-dev
update subtest naming from sub_test to sub-test.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/intel/kms_psr.c | 70 +++++++++++++++++++++----------------------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c
index 31d6f779c..5bb4acb61 100644
--- a/tests/intel/kms_psr.c
+++ b/tests/intel/kms_psr.c
@@ -43,20 +43,20 @@
#include "xe/xe_query.h"
/**
- * SUBTEST: %s_basic
+ * SUBTEST: %s-basic
* Description: Basic check for %arg[1] if it is detecting changes made in planes
* Functionality: %arg[1]
*
- * SUBTEST: %s_dpms
+ * SUBTEST: %s-dpms
* Description: Check if %arg[1] is detecting changes when rendering operation
* is performed with dpms enabled or disabled
* Functionality: %arg[1], dpms
*
- * SUBTEST: %s_no_drrs
+ * SUBTEST: %s-no-drrs
* Description: Check if %arg[1] is detecting changes when drrs is disabled
* Functionality: %arg[1], drrs
*
- * SUBTEST: %s_suspend
+ * SUBTEST: %s-suspend
* Description: Check if %arg[1] is detecting changes when plane operation is
* performed with suspend resume cycles
* Functionality: %arg[1], suspend
@@ -68,7 +68,7 @@
*/
/**
- * SUBTEST: %s_%s_%s
+ * SUBTEST: %s-%s-%s
* Description: Check if %arg[1] is detecting memory mapping %arg[3] operations
* performed on %arg[2] planes
* Driver requirement: i915
@@ -87,17 +87,17 @@
*
* arg[3]:
*
- * @mmap_cpu: MMAP CPU
- * @mmap_gtt: MMAP GTT
+ * @mmap-cpu: MMAP CPU
+ * @mmap-gtt: MMAP GTT
*/
/**
- * SUBTEST: %s_primary_page_flip
+ * SUBTEST: %s-primary-page-flip
* Description: Check if %arg[1] is detecting page-flipping operation
* performed on primary plane
* Functionality: %arg[1], plane
*
- * SUBTEST: %s_primary_%s
+ * SUBTEST: %s-primary-%s
* Description: Check if %arg[1] is detecting rendering operations %arg[2]
* when performed on primary plane
* Functionality: %arg[1], plane
@@ -114,7 +114,7 @@
*/
/**
- * SUBTEST: %s_%s_%s
+ * SUBTEST: %s-%s-%s
* Description: Check if %arg[1] is detecting rendering and plane
* operations %arg[3] performed on %arg[2] planes
* Functionality: %arg[1], plane
@@ -133,28 +133,28 @@
*
* @blt: Blitter
* @render: Render
- * @plane_onoff: Plane On off
- * @plane_move: Move plane position
+ * @plane-onoff: Plane On off
+ * @plane-move: Move plane position
*/
/**
- * SUBTEST: pr_basic
+ * SUBTEST: pr-basic
* Description: Basic check for pr if it is detecting changes made in planes
* Functionality: pr
* Mega feature: DP2.0
*
- * SUBTEST: pr_dpms
+ * SUBTEST: pr-dpms
* Description: Check if pr is detecting changes when rendering operation
* is performed with dpms enabled or disabled
* Functionality: pr, dpms
* Mega feature: DP2.0
*
- * SUBTEST: pr_no_drrs
+ * SUBTEST: pr-no_drrs
* Description: Check if pr is detecting changes when drrs is disabled
* Functionality: pr, drrs
* Mega feature: DP2.0
*
- * SUBTEST: pr_suspend
+ * SUBTEST: pr-suspend
* Description: Check if pr is detecting changes when plane operation is
* performed with suspend resume cycles
* Functionality: pr, suspend
@@ -162,7 +162,7 @@
*/
/**
- * SUBTEST: pr_%s_%s
+ * SUBTEST: pr-%s-%s
* Description: Check if pr is detecting memory mapping %arg[2] operations
* performed on %arg[1] planes
* Driver requirement: i915
@@ -177,18 +177,18 @@
*
* arg[2]:
*
- * @mmap_cpu: MMAP CPU
- * @mmap_gtt: MMAP GTT
+ * @mmap-cpu: MMAP CPU
+ * @mmap-gtt: MMAP GTT
*/
/**
- * SUBTEST: pr_primary_page_flip
+ * SUBTEST: pr-primary-page-flip
* Description: Check if pr is detecting page-flipping operation
* performed on primary plane
* Functionality: pr, plane
* Mega feature: DP2.0
*
- * SUBTEST: pr_primary_%s
+ * SUBTEST: pr-primary-%s
* Description: Check if pr is detecting rendering operations %arg[1]
* when performed on primary plane
* Functionality: pr, plane
@@ -201,7 +201,7 @@
*/
/**
- * SUBTEST: pr_%s_%s
+ * SUBTEST: pr-%s-%s
* Description: Check if pr is detecting rendering and plane
* operations %arg[2] performed on %arg[1] planes
* Functionality: pr, plane
@@ -216,7 +216,7 @@
*
* @blt: Blitter
* @render: Render
- * @plane_onoff: Plane On off
+ * @plane-onoff: Plane On off
* @plane_move: Move plane position
*/
@@ -233,13 +233,13 @@ enum operations {
static const char *op_str(enum operations op)
{
static const char * const name[] = {
- [PAGE_FLIP] = "page_flip",
- [MMAP_GTT] = "mmap_gtt",
- [MMAP_CPU] = "mmap_cpu",
+ [PAGE_FLIP] = "page-flip",
+ [MMAP_GTT] = "mmap-gtt",
+ [MMAP_CPU] = "mmap-cpu",
[BLT] = "blt",
[RENDER] = "render",
- [PLANE_MOVE] = "plane_move",
- [PLANE_ONOFF] = "plane_onoff",
+ [PLANE_MOVE] = "plane-move",
+ [PLANE_ONOFF] = "plane-onoff",
};
return name[op];
@@ -682,9 +682,9 @@ igt_main
int z;
enum operations op;
const char *append_subtest_name[3] = {
- "psr_",
- "psr2_",
- "pr_"
+ "psr-",
+ "psr2-",
+ "pr-"
};
int modes[] = {PSR_MODE_1, PSR_MODE_2, PR_MODE};
igt_output_t *output;
@@ -719,7 +719,7 @@ igt_main
}
igt_describe("Check if psr is detecting changes when drrs is disabled");
- igt_subtest_with_dynamic_f("%sno_drrs", append_subtest_name[z]) {
+ igt_subtest_with_dynamic_f("%sno-drrs", append_subtest_name[z]) {
for_each_connected_output(&data.display, output) {
if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
data.op_psr_mode, output))
@@ -738,7 +738,7 @@ igt_main
for (op = PAGE_FLIP; op <= RENDER; op++) {
igt_describe("Check if psr is detecting page-flipping,memory mapping and "
"rendering operations performed on primary planes");
- igt_subtest_with_dynamic_f("%sprimary_%s",
+ igt_subtest_with_dynamic_f("%sprimary-%s",
append_subtest_name[z],
op_str(op)) {
igt_skip_on(is_xe_device(data.drm_fd) &&
@@ -763,7 +763,7 @@ igt_main
for (op = MMAP_GTT; op <= PLANE_ONOFF; op++) {
igt_describe("Check if psr is detecting memory mapping,rendering "
"and plane operations performed on sprite planes");
- igt_subtest_with_dynamic_f("%ssprite_%s",
+ igt_subtest_with_dynamic_f("%ssprite-%s",
append_subtest_name[z],
op_str(op)) {
igt_skip_on(is_xe_device(data.drm_fd) &&
@@ -786,7 +786,7 @@ igt_main
igt_describe("Check if psr is detecting memory mapping, rendering "
"and plane operations performed on cursor planes");
- igt_subtest_with_dynamic_f("%scursor_%s",
+ igt_subtest_with_dynamic_f("%scursor-%s",
append_subtest_name[z],
op_str(op)) {
igt_skip_on(is_xe_device(data.drm_fd) &&
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [igt-dev] [PATCH i-g-t 3/4] tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests
2023-11-30 13:20 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 1/4] tests/intel/kms_psr: fix documentation Jeevan B
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 2/4] tests/intel/kms_psr: fix subtest naming Jeevan B
@ 2023-11-30 13:20 ` Jeevan B
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B
` (3 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Jeevan B @ 2023-11-30 13:20 UTC (permalink / raw)
To: igt-dev
For LunarLake (intel_display_ver 20), FBC can be enabled along with
PSR/PSR2/PR, thereby adding FBC checks to validate this scenario.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
lib/igt_psr.h | 5 +
tests/intel/kms_psr.c | 322 ++++++++++++++++++++++++++++--------------
2 files changed, 221 insertions(+), 106 deletions(-)
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index a30330e6c..36711c0d4 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -40,6 +40,11 @@ enum psr_mode {
PSR_DISABLED,
};
+enum fbc_mode {
+ FBC_DISABLED,
+ FBC_ENABLED,
+};
+
bool psr_disabled_check(int debugfs_fd);
bool psr2_selective_fetch_check(int debugfs_fd);
bool psr_wait_entry(int debugfs_fd, enum psr_mode mode, igt_output_t *output);
diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c
index 5bb4acb61..fa5333f9a 100644
--- a/tests/intel/kms_psr.c
+++ b/tests/intel/kms_psr.c
@@ -31,6 +31,7 @@
* Test category: functionality test
*/
+#include "i915/intel_fbc.h"
#include "igt.h"
#include "igt_sysfs.h"
#include "igt_psr.h"
@@ -47,24 +48,42 @@
* Description: Basic check for %arg[1] if it is detecting changes made in planes
* Functionality: %arg[1]
*
+ * SUBTEST: fbc-%s-basic
+ * Description: Basic check for fbc with %arg[1] if it is detecting changes made in planes
+ * Functionality: %arg[1], fbc
+ *
* SUBTEST: %s-dpms
* Description: Check if %arg[1] is detecting changes when rendering operation
* is performed with dpms enabled or disabled
* Functionality: %arg[1], dpms
*
+ * SUBTEST: fbc-%s-dpms
+ * Description: Check if fbc with %arg[1] is detecting changes when rendering operation
+ * is performed with dpms enabled or disabled
+ * Functionality: %arg[1], dpms, fbc
+ *
* SUBTEST: %s-no-drrs
* Description: Check if %arg[1] is detecting changes when drrs is disabled
* Functionality: %arg[1], drrs
*
+ * SUBTEST: fbc-%s-no-drrs
+ * Description: Check if fbc with %arg[1] is detecting changes when drrs is disabled
+ * Functionality: %arg[1], drrs, fbc
+ *
* SUBTEST: %s-suspend
* Description: Check if %arg[1] is detecting changes when plane operation is
* performed with suspend resume cycles
* Functionality: %arg[1], suspend
*
+ * SUBTEST: fbc-%s-suspend
+ * Description: Check if fbc with %arg[1] is detecting changes when plane operation is
+ * performed with suspend resume cycles
+ * Functionality: %arg[1], suspend, fbc
+ *
* arg[1]:
*
- * @psr: psr1
- * @psr2: psr2
+ * @psr: psr1
+ * @psr2: psr2
*/
/**
@@ -74,6 +93,12 @@
* Driver requirement: i915
* Functionality: %arg[1], plane
*
+ * SUBTEST: fbc-%s-%s-%s
+ * Description: Check if fbc with %arg[1] is detecting memory mapping %arg[3] operations
+ * performed on %arg[2] planes
+ * Driver requirement: i915
+ * Functionality: %arg[1], plane, fbc
+ *
* arg[1]:
*
* @psr: psr1
@@ -97,11 +122,21 @@
* performed on primary plane
* Functionality: %arg[1], plane
*
+ * SUBTEST: fbc-%s-primary-page-flip
+ * Description: Check if fbc with %arg[1] is detecting page-flipping operation
+ * performed on primary plane
+ * Functionality: %arg[1], plane, fbc
+ *
* SUBTEST: %s-primary-%s
* Description: Check if %arg[1] is detecting rendering operations %arg[2]
* when performed on primary plane
* Functionality: %arg[1], plane
*
+ * SUBTEST: fbc-%s-primary-%s
+ * Description: Check if %arg[1] is detecting rendering operations %arg[2]
+ * when performed on primary plane
+ * Functionality: %arg[1], plane, fbc
+ *
* arg[1]:
*
* @psr: psr1
@@ -119,6 +154,11 @@
* operations %arg[3] performed on %arg[2] planes
* Functionality: %arg[1], plane
*
+ * SUBTEST: fbc-%s-%s-%s
+ * Description: Check if fbc with %arg[1] is detecting rendering and plane
+ * operations %arg[3] performed on %arg[2] planes
+ * Functionality: %arg[1], plane, fbc
+ *
* arg[1]:
*
* @psr: psr1
@@ -143,22 +183,44 @@
* Functionality: pr
* Mega feature: DP2.0
*
+ * SUBTEST: fbc-pr-basic
+ * Description: Basic check for fbc with pr if it is detecting changes made in planes
+ * Functionality: pr, fbc
+ * Mega feature: DP2.0
+ *
* SUBTEST: pr-dpms
* Description: Check if pr is detecting changes when rendering operation
* is performed with dpms enabled or disabled
* Functionality: pr, dpms
* Mega feature: DP2.0
*
- * SUBTEST: pr-no_drrs
+ * SUBTEST: fbc-pr-dpms
+ * Description: Check if fbc with pr is detecting changes when rendering operation
+ * is performed with dpms enabled or disabled
+ * Functionality: pr, dpms, fbc
+ * Mega feature: DP2.0
+ *
+ * SUBTEST: pr-no-drrs
* Description: Check if pr is detecting changes when drrs is disabled
* Functionality: pr, drrs
* Mega feature: DP2.0
*
+ * SUBTEST: fbc-pr-no-drrs
+ * Description: Check if fbc with pr is detecting changes when drrs is disabled
+ * Functionality: pr, drrs, fbc
+ * Mega feature: DP2.0
+ *
* SUBTEST: pr-suspend
* Description: Check if pr is detecting changes when plane operation is
* performed with suspend resume cycles
* Functionality: pr, suspend
* Mega feature: DP2.0
+ *
+ * SUBTEST: fbc-pr-suspend
+ * Description: Check if fbc with pr is detecting changes when plane operation is
+ * performed with suspend resume cycles
+ * Functionality: pr, suspend, fbc
+ * Mega feature: DP2.0
*/
/**
@@ -169,6 +231,13 @@
* Functionality: pr, plane
* Mega feature: DP2.0
*
+ * SUBTEST: fbc-pr-%s-%s
+ * Description: Check if fbc with pr is detecting memory mapping %arg[2] operations
+ * performed on %arg[1] planes
+ * Driver requirement: i915
+ * Functionality: pr, plane, fbc
+ * Mega feature: DP2.0
+ *
* arg[1]:
*
* @cursor: Cursor plane
@@ -188,12 +257,24 @@
* Functionality: pr, plane
* Mega feature: DP2.0
*
+ * SUBTEST: fbc-pr-primary-page-flip
+ * Description: Check if fbc with pr is detecting page-flipping operation
+ * performed on primary plane
+ * Functionality: pr, plane, fbc
+ * Mega feature: DP2.0
+ *
* SUBTEST: pr-primary-%s
* Description: Check if pr is detecting rendering operations %arg[1]
* when performed on primary plane
* Functionality: pr, plane
* Mega feature: DP2.0
*
+ * SUBTEST: fbc-pr-primary-%s
+ * Description: Check if fbc with pr is detecting rendering operations %arg[1]
+ * when performed on primary plane
+ * Functionality: pr, plane, fbc
+ * Mega feature: DP2.0
+ *
* arg[1]:
*
* @blt: Blitter
@@ -207,6 +288,12 @@
* Functionality: pr, plane
* Mega feature: DP2.0
*
+ * SUBTEST: fbc-pr-%s-%s
+ * Description: Check if fbc with pr is detecting rendering and plane
+ * operations %arg[2] performed on %arg[1] planes
+ * Functionality: pr, plane, fbc
+ * Mega feature: DP2.0
+ *
* arg[1]:
*
* @cursor: Cursor plane
@@ -217,7 +304,7 @@
* @blt: Blitter
* @render: Render
* @plane-onoff: Plane On off
- * @plane_move: Move plane position
+ * @plane-move: Move plane position
*/
enum operations {
@@ -251,6 +338,7 @@ typedef struct {
enum operations op;
int test_plane_id;
enum psr_mode op_psr_mode;
+ enum fbc_mode op_fbc_mode;
uint32_t devid;
uint32_t crtc_id;
igt_display_t display;
@@ -261,6 +349,7 @@ typedef struct {
int mod_stride;
drmModeModeInfo *mode;
igt_output_t *output;
+ bool fbc_flag;
} data_t;
static void create_cursor_fb(data_t *data)
@@ -659,6 +748,10 @@ static void test_setup(data_t *data)
psr_enable_if_enabled(data);
setup_test_plane(data, data->test_plane_id);
if (psr_wait_entry_if_enabled(data)) {
+ if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
+ igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+ pipe),
+ "FBC still disabled");
psr_entered = true;
break;
}
@@ -679,14 +772,20 @@ data_t data = {};
igt_main
{
- int z;
+ int z, y;
enum operations op;
+ enum pipe pipe;
const char *append_subtest_name[3] = {
"psr-",
"psr2-",
"pr-"
};
+ const char *append_fbc_subtest[2] = {
+ "",
+ "fbc-"
+ };
int modes[] = {PSR_MODE_1, PSR_MODE_2, PR_MODE};
+ int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
igt_output_t *output;
igt_fixture {
@@ -697,52 +796,38 @@ igt_main
data.bops = buf_ops_create(data.drm_fd);
igt_display_require(&data.display, data.drm_fd);
igt_require_f(output_supports_psr(&data), "Sink does not support PSR/PSR2/PR\n");
+ if ((intel_display_ver(intel_get_drm_devid(data.drm_fd) == 20)) &&
+ (intel_fbc_supported_on_chipset(data.drm_fd, pipe))) {
+ data.fbc_flag = true;
+ }
}
- for (z = 0; z < ARRAY_SIZE(modes); z++) {
- data.op_psr_mode = modes[z];
-
- igt_describe("Basic check for psr if it is detecting changes made in planes");
- igt_subtest_with_dynamic_f("%sbasic", append_subtest_name[z]) {
- for_each_connected_output(&data.display, output) {
- if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
- data.op_psr_mode, output))
- continue;
- igt_display_reset(&data.display);
- data.output = output;
- igt_dynamic_f("%s", data.output->name) {
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
- test_setup(&data);
- test_cleanup(&data);
- }
- }
- }
+ for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+ data.op_fbc_mode = fbc_status[y];
+ for (z = 0; z < ARRAY_SIZE(modes); z++) {
+ data.op_psr_mode = modes[z];
- igt_describe("Check if psr is detecting changes when drrs is disabled");
- igt_subtest_with_dynamic_f("%sno-drrs", append_subtest_name[z]) {
- for_each_connected_output(&data.display, output) {
- if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
- data.op_psr_mode, output))
- continue;
- igt_display_reset(&data.display);
- data.output = output;
- igt_dynamic_f("%s", data.output->name) {
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
- test_setup(&data);
- igt_assert(drrs_disabled(&data));
- test_cleanup(&data);
+ igt_describe("Basic check for psr if it is detecting changes made "
+ "in planes");
+ igt_subtest_with_dynamic_f("%s%sbasic", append_fbc_subtest[y],
+ append_subtest_name[z]) {
+ for_each_connected_output(&data.display, output) {
+ if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
+ data.op_psr_mode, output))
+ continue;
+ igt_display_reset(&data.display);
+ data.output = output;
+ igt_dynamic_f("%s", data.output->name) {
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+ test_setup(&data);
+ test_cleanup(&data);
+ }
}
}
- }
- for (op = PAGE_FLIP; op <= RENDER; op++) {
- igt_describe("Check if psr is detecting page-flipping,memory mapping and "
- "rendering operations performed on primary planes");
- igt_subtest_with_dynamic_f("%sprimary-%s",
- append_subtest_name[z],
- op_str(op)) {
- igt_skip_on(is_xe_device(data.drm_fd) &&
- (op == MMAP_CPU || op == MMAP_GTT));
+ igt_describe("Check if psr is detecting changes when drrs is disabled");
+ igt_subtest_with_dynamic_f("%s%sno-drrs", append_fbc_subtest[y],
+ append_subtest_name[z]) {
for_each_connected_output(&data.display, output) {
if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
data.op_psr_mode, output))
@@ -750,24 +835,88 @@ igt_main
igt_display_reset(&data.display);
data.output = output;
igt_dynamic_f("%s", data.output->name) {
- data.op = op;
data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
test_setup(&data);
- run_test(&data);
+ igt_assert(drrs_disabled(&data));
test_cleanup(&data);
}
}
}
+
+ for (op = PAGE_FLIP; op <= RENDER; op++) {
+ igt_describe("Check if psr is detecting page-flipping,memory "
+ "mapping and rendering operations performed on "
+ "primary planes");
+ igt_subtest_with_dynamic_f("%s%sprimary-%s", append_fbc_subtest[y],
+ append_subtest_name[z], op_str(op)) {
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ (op == MMAP_CPU || op == MMAP_GTT));
+ for_each_connected_output(&data.display, output) {
+ if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
+ data.op_psr_mode, output))
+ continue;
+ igt_display_reset(&data.display);
+ data.output = output;
+ igt_dynamic_f("%s", data.output->name) {
+ data.op = op;
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+ test_setup(&data);
+ run_test(&data);
+ test_cleanup(&data);
+ }
+ }
+ }
+ }
+
+ for (op = MMAP_GTT; op <= PLANE_ONOFF; op++) {
+ igt_describe("Check if psr is detecting memory mapping,rendering "
+ "and plane operations performed on sprite planes");
+ igt_subtest_with_dynamic_f("%s%ssprite-%s", append_fbc_subtest[y],
+ append_subtest_name[z], op_str(op)) {
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ (op == MMAP_CPU || op == MMAP_GTT));
+ for_each_connected_output(&data.display, output) {
+ if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
+ data.op_psr_mode, output))
+ continue;
+ igt_display_reset(&data.display);
+ data.output = output;
+ igt_dynamic_f("%s", data.output->name) {
+ data.op = op;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
+ test_setup(&data);
+ run_test(&data);
+ test_cleanup(&data);
+ }
+ }
+ }
+
+ igt_describe("Check if psr is detecting memory mapping, rendering "
+ "and plane operations performed on cursor planes");
+ igt_subtest_with_dynamic_f("%s%scursor-%s", append_fbc_subtest[y],
+ append_subtest_name[z], op_str(op)) {
+ igt_skip_on(is_xe_device(data.drm_fd) &&
+ (op == MMAP_CPU || op == MMAP_GTT));
+ for_each_connected_output(&data.display, output) {
+ if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
+ data.op_psr_mode, output))
+ continue;
+ igt_display_reset(&data.display);
+ data.output = output;
+ igt_dynamic_f("%s", data.output->name) {
+ data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
+ test_setup(&data);
+ run_test(&data);
+ test_cleanup(&data);
+ }
+ }
+ }
}
- for (op = MMAP_GTT; op <= PLANE_ONOFF; op++) {
- igt_describe("Check if psr is detecting memory mapping,rendering "
- "and plane operations performed on sprite planes");
- igt_subtest_with_dynamic_f("%ssprite-%s",
- append_subtest_name[z],
- op_str(op)) {
- igt_skip_on(is_xe_device(data.drm_fd) &&
- (op == MMAP_CPU || op == MMAP_GTT));
+ igt_describe("Check if psr is detecting changes when rendering operation "
+ "is performed with dpms enabled or disabled");
+ igt_subtest_with_dynamic_f("%s%sdpms", append_fbc_subtest[y],
+ append_subtest_name[z]) {
for_each_connected_output(&data.display, output) {
if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
data.op_psr_mode, output))
@@ -775,22 +924,21 @@ igt_main
igt_display_reset(&data.display);
data.output = output;
igt_dynamic_f("%s", data.output->name) {
- data.op = op;
- data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
+ data.op = igt_get_render_copyfunc(data.devid) ?
+ RENDER : BLT;
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
test_setup(&data);
+ dpms_off_on(&data);
run_test(&data);
test_cleanup(&data);
}
}
}
- igt_describe("Check if psr is detecting memory mapping, rendering "
- "and plane operations performed on cursor planes");
- igt_subtest_with_dynamic_f("%scursor-%s",
- append_subtest_name[z],
- op_str(op)) {
- igt_skip_on(is_xe_device(data.drm_fd) &&
- (op == MMAP_CPU || op == MMAP_GTT));
+ igt_describe("Check if psr is detecting changes when plane operation is "
+ "performed with suspend resume cycles");
+ igt_subtest_with_dynamic_f("%s%ssuspend", append_fbc_subtest[y],
+ append_subtest_name[z]) {
for_each_connected_output(&data.display, output) {
if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
data.op_psr_mode, output))
@@ -798,56 +946,18 @@ igt_main
igt_display_reset(&data.display);
data.output = output;
igt_dynamic_f("%s", data.output->name) {
+ data.op = PLANE_ONOFF;
data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
test_setup(&data);
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+ igt_assert(psr_wait_entry_if_enabled(&data));
run_test(&data);
test_cleanup(&data);
}
}
}
}
-
- igt_describe("Check if psr is detecting changes when rendering operation is performed"
- " with dpms enabled or disabled");
- igt_subtest_with_dynamic_f("%sdpms", append_subtest_name[z]) {
- for_each_connected_output(&data.display, output) {
- if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
- data.op_psr_mode, output))
- continue;
- igt_display_reset(&data.display);
- data.output = output;
- igt_dynamic_f("%s", data.output->name) {
- data.op = igt_get_render_copyfunc(data.devid) ? RENDER : BLT;
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
- test_setup(&data);
- dpms_off_on(&data);
- run_test(&data);
- test_cleanup(&data);
- }
- }
- }
-
- igt_describe("Check if psr is detecting changes when plane operation is performed "
- "with suspend resume cycles");
- igt_subtest_with_dynamic_f("%ssuspend", append_subtest_name[z]) {
- for_each_connected_output(&data.display, output) {
- if (!psr_sink_support(data.drm_fd, data.debugfs_fd,
- data.op_psr_mode, output))
- continue;
- igt_display_reset(&data.display);
- data.output = output;
- igt_dynamic_f("%s", data.output->name) {
- data.op = PLANE_ONOFF;
- data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
- test_setup(&data);
- igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
- SUSPEND_TEST_NONE);
- igt_assert(psr_wait_entry_if_enabled(&data));
- run_test(&data);
- test_cleanup(&data);
- }
- }
- }
}
igt_fixture {
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
2023-11-30 13:20 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
` (2 preceding siblings ...)
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 3/4] tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests Jeevan B
@ 2023-11-30 13:20 ` Jeevan B
2023-11-30 15:26 ` [igt-dev] ✗ GitLab.Pipeline: warning for Update PSR/PSR2_SF documenation and Add FBC support Patchwork
` (2 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Jeevan B @ 2023-11-30 13:20 UTC (permalink / raw)
To: igt-dev
For LunarLake (intel_display_ver 20), FBC can be enabled along with PSR2,
thereby adding FBC checks to validate this scenario.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
tests/intel/kms_psr2_sf.c | 606 +++++++++++++++++++++-----------------
1 file changed, 335 insertions(+), 271 deletions(-)
diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 27faa93d9..77bc23213 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -37,6 +37,7 @@
#include "igt_sysfs.h"
#include "igt_psr.h"
#include "kms_dsc_helper.h"
+#include "i915/intel_fbc.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
@@ -47,6 +48,10 @@
* Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
* visible area (no update)
*
+ * SUBTEST: fbc-%s-plane-move-continuous-%s
+ * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
+ * visible area (no update)
+ *
* arg[1]:
*
* @cursor: Cursor
@@ -63,24 +68,46 @@
* SUBTEST: cursor-plane-update-sf
* Description: Test that selective fetch works on cursor plane
*
+ * SUBTEST: fbc-cursor-plane-update-continuous-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
+ * Description: Test that fbc with selective fetch works on overlay plane
+ *
* SUBTEST: overlay-plane-update-sf-dmg-area
* Description: Test that selective fetch works on overlay plane
*
+ * SUBTEST: fbc-overlay-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on overlay plane
+ *
* SUBTEST: overlay-primary-update-sf-dmg-area
* Description: Test that selective fetch works on primary plane with blended
* overlay plane
*
+ * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane with blended
+ * overlay plane
+ *
* SUBTEST: plane-move-sf-dmg-area
* Description: Test that selective fetch works on moving overlay plane
*
+ * SUBTEST: fbc-plane-move-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on moving overlay plane
+ *
* 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
+ * 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"
@@ -131,10 +158,12 @@ typedef struct {
struct drm_mode_rect plane_move_clip;
struct drm_mode_rect cursor_clip;
enum operations op;
+ enum fbc_mode op_fbc_mode;
enum plane_move_postion pos;
int test_plane_id;
igt_plane_t *test_plane;
bool big_fb_test;
+ bool fbc_flag;
cairo_t *cr;
uint32_t screen_changes;
int cur_x, cur_y;
@@ -840,6 +869,11 @@ static void run(data_t *data)
igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL));
+ if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
+ igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+ data->pipe),
+ "FBC still disabled");
+
data->screen_changes = 0;
switch (data->op) {
@@ -942,10 +976,15 @@ igt_main
{
data_t data = {};
igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int i, j, k;
+ int i, j, k, y;
int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
int n_pipes = 0;
int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
+ const char *append_fbc_subtest[2] = {
+ "",
+ "fbc-"
+ };
+ int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
igt_fixture {
drmModeResPtr res;
@@ -961,6 +1000,11 @@ igt_main
display_init(&data);
+ if ((intel_display_ver(intel_get_drm_devid(data.drm_fd) == 20)) &&
+ (intel_fbc_supported_on_chipset(data.drm_fd, data.pipe))) {
+ data.fbc_flag = true;
+ }
+
/* Test if PSR2 can be enabled */
igt_require_f(psr_enable(data.drm_fd,
data.debugfs_fd, PSR_MODE_2_SEL_FETCH),
@@ -995,54 +1039,116 @@ igt_main
}
}
- /* Verify primary plane selective fetch */
- igt_describe("Test that selective fetch works on primary plane");
- igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+ data.op_fbc_mode = fbc_status[y];
+ /* Verify primary plane selective fetch */
+ igt_describe("Test that selective fetch works on primary plane");
+ igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", 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))
+ 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);
+ }
+ }
+ }
+ }
+ }
+
+ /* 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;
- 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);
+ }
}
}
}
}
- }
- /* 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("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ data.big_fb_test = 0;
+ /* Verify overlay plane selective fetch */
+ igt_describe("Test that selective fetch works on overlay plane");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", 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))
+ 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_OVERLAY;
+ 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))
+ data.damage_area_count = 1;
+ /* Verify cursor plane selective fetch */
+ igt_describe("Test that selective fetch works on cursor plane");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1050,28 +1156,25 @@ igt_main
}
}
}
- }
-
- data.big_fb_test = 0;
- /* Verify overlay plane selective fetch */
- igt_describe("Test that selective fetch works on overlay plane");
- igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving cursor plane (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1079,130 +1182,137 @@ igt_main
}
}
}
- }
- data.damage_area_count = 1;
- /* Verify cursor plane selective fetch */
- igt_describe("Test that selective fetch works on cursor plane");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "partially visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving cursor plane (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "fully visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ /* Only for overlay plane */
+ data.op = PLANE_MOVE;
+ /* Verify overlay plane move selective fetch */
+ igt_describe("Test that selective fetch works on moving overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_CURSOR;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
+ data.pos = k;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving overlay plane (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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)) {
+
+ 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_CURSOR;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
+ }
}
}
}
- }
- /* Only for overlay plane */
- data.op = PLANE_MOVE;
- /* Verify overlay plane move selective fetch */
- igt_describe("Test that selective fetch works on moving overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving overlay plane partially "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
- data.pos = k;
+
+ 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_OVERLAY;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1210,103 +1320,88 @@ igt_main
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving overlay plane (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving overlay plane fully "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
- 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_OVERLAY;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ /* Verify primary plane selective fetch with overplay plane blended */
+ data.op = OVERLAY_PRIM_UPDATE;
+ igt_describe("Test that selective fetch works on primary plane "
+ "with blended overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_OVERLAY;
- data.coexist_feature = j;
- 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];
+ for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+ data.damage_area_count = k;
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- /* Verify primary plane selective fetch with overplay plane blended */
- data.op = OVERLAY_PRIM_UPDATE;
- igt_describe("Test that selective fetch works on primary plane "
- "with blended overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ /*
+ * Verify overlay plane selective fetch using NV12 primary
+ * 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)) {
+ 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];
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+
+ 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.damage_area_count = 1;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
@@ -1317,37 +1412,6 @@ igt_main
}
}
- /*
- * Verify overlay plane selective fetch using NV12 primary
- * 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("overlay-%s-sf", 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))
- 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.damage_area_count = 1;
- data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
igt_fixture {
close(data.debugfs_fd);
display_fini(&data);
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [igt-dev] ✗ GitLab.Pipeline: warning for Update PSR/PSR2_SF documenation and Add FBC support
2023-11-30 13:20 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
` (3 preceding siblings ...)
2023-11-30 13:20 ` [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B
@ 2023-11-30 15:26 ` Patchwork
2023-11-30 15:39 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2023-11-30 16:25 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
6 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2023-11-30 15:26 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
== Series Details ==
Series: Update PSR/PSR2_SF documenation and Add FBC support
URL : https://patchwork.freedesktop.org/series/127121/
State : warning
== Summary ==
Pipeline status: FAILED.
see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1046086 for the overview.
containers:igt has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52198810):
Fetching changes...
Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/
Checking out 2bb5b87f as detached HEAD (ref is intel/IGTPW_10304)...
Removing build/
Skipping Git submodules setup
section_end:1701357858:get_sources
section_start:1701357858:download_artifacts
Downloading artifacts
Downloading artifacts for build:tests-fedora (52198795)...
Downloading artifacts from coordinator... ok host=gitlab.freedesktop.org id=52198795 responseStatus=200 OK token=64_eZh8c
section_end:1701357863:download_artifacts
section_start:1701357863:step_script
Executing "step_script" stage of the job script
Using docker image sha256:594aa868d31ee3304dee8cae8a3433c89a6fcfcf6c7d420c04cce22f60147176 for registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 with digest registry.freedesktop.org/wayland/ci-templates/buildah@sha256:7dbcf22cd2c1c7d49db0dc7b4ab207c3d6a4a09bd81cc3b71a688d3727d8749f ...
section_end:1701357865:step_script
section_start:1701357865:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1701357865:cleanup_file_variables
ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:594aa868d31ee3304dee8cae8a3433c89a6fcfcf6c7d420c04cce22f60147176: image not known (docker.go:570:0s)
== Logs ==
For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1046086
^ permalink raw reply [flat|nested] 16+ messages in thread* [igt-dev] ✗ Fi.CI.BAT: failure for Update PSR/PSR2_SF documenation and Add FBC support
2023-11-30 13:20 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
` (4 preceding siblings ...)
2023-11-30 15:26 ` [igt-dev] ✗ GitLab.Pipeline: warning for Update PSR/PSR2_SF documenation and Add FBC support Patchwork
@ 2023-11-30 15:39 ` Patchwork
2023-11-30 16:25 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
6 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2023-11-30 15:39 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 15595 bytes --]
== Series Details ==
Series: Update PSR/PSR2_SF documenation and Add FBC support
URL : https://patchwork.freedesktop.org/series/127121/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13955 -> IGTPW_10304
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_10304 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10304, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/index.html
Participating hosts (36 -> 38)
------------------------------
Additional (4): bat-rpls-1 fi-pnv-d510 bat-mtlp-8 bat-dg1-5
Missing (2): bat-dg2-9 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_10304:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@dmabuf:
- bat-atsm-1: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13955/bat-atsm-1/igt@i915_selftest@live@dmabuf.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-atsm-1/igt@i915_selftest@live@dmabuf.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* {igt@kms_psr@psr_cursor_plane_move}:
- bat-mtlp-8: NOTRUN -> [SKIP][3] +3 other tests skip
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@kms_psr@psr_cursor_plane_move.html
* {igt@kms_psr@psr_primary_mmap_gtt}:
- bat-adls-5: NOTRUN -> [SKIP][4] +3 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-adls-5/igt@kms_psr@psr_primary_mmap_gtt.html
Known issues
------------
Here are the changes found in IGTPW_10304 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@basic-hwmon:
- bat-mtlp-8: NOTRUN -> [SKIP][5] ([i915#9318])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@debugfs_test@basic-hwmon.html
- bat-rpls-1: NOTRUN -> [SKIP][6] ([i915#9318])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@debugfs_test@basic-hwmon.html
* igt@fbdev@info:
- bat-rpls-1: NOTRUN -> [SKIP][7] ([i915#1849] / [i915#2582])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@fbdev@info.html
* igt@fbdev@write:
- bat-rpls-1: NOTRUN -> [SKIP][8] ([i915#2582]) +3 other tests skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@fbdev@write.html
* igt@gem_lmem_swapping@basic:
- fi-pnv-d510: NOTRUN -> [SKIP][9] ([fdo#109271]) +25 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/fi-pnv-d510/igt@gem_lmem_swapping@basic.html
* igt@gem_lmem_swapping@random-engines:
- bat-rpls-1: NOTRUN -> [SKIP][10] ([i915#4613]) +3 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@gem_lmem_swapping@random-engines.html
* igt@gem_lmem_swapping@verify-random:
- bat-mtlp-8: NOTRUN -> [SKIP][11] ([i915#4613]) +3 other tests skip
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@gem_lmem_swapping@verify-random.html
* igt@gem_mmap@basic:
- bat-dg1-5: NOTRUN -> [SKIP][12] ([i915#4083])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@gem_mmap@basic.html
- bat-mtlp-8: NOTRUN -> [SKIP][13] ([i915#4083])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@gem_mmap@basic.html
* igt@gem_mmap_gtt@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][14] ([i915#4077]) +2 other tests skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@gem_mmap_gtt@basic.html
* igt@gem_render_tiled_blits@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][15] ([i915#4079]) +1 other test skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@gem_render_tiled_blits@basic.html
* igt@gem_tiled_fence_blits@basic:
- bat-dg1-5: NOTRUN -> [SKIP][16] ([i915#4077]) +2 other tests skip
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@gem_tiled_fence_blits@basic.html
* igt@gem_tiled_pread_basic:
- bat-dg1-5: NOTRUN -> [SKIP][17] ([i915#4079]) +1 other test skip
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@gem_tiled_pread_basic.html
- bat-rpls-1: NOTRUN -> [SKIP][18] ([i915#3282])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@gem_tiled_pread_basic.html
* igt@i915_pm_rps@basic-api:
- bat-dg1-5: NOTRUN -> [SKIP][19] ([i915#6621])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@i915_pm_rps@basic-api.html
- bat-mtlp-8: NOTRUN -> [SKIP][20] ([i915#6621])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@i915_pm_rps@basic-api.html
- bat-rpls-1: NOTRUN -> [SKIP][21] ([i915#6621])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@i915_pm_rps@basic-api.html
* igt@i915_suspend@basic-s3-without-i915:
- bat-mtlp-8: NOTRUN -> [SKIP][22] ([i915#6645])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@i915_suspend@basic-s3-without-i915.html
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][23] ([i915#5190])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html
* igt@kms_addfb_basic@basic-x-tiled-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][24] ([i915#4212]) +7 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@kms_addfb_basic@basic-x-tiled-legacy.html
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][25] ([i915#4212]) +8 other tests skip
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@kms_addfb_basic@basic-y-tiled-legacy.html
- bat-dg1-5: NOTRUN -> [SKIP][26] ([i915#4215])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@kms_addfb_basic@basic-y-tiled-legacy.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][27] ([i915#4213]) +1 other test skip
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
- bat-dg1-5: NOTRUN -> [SKIP][28] ([i915#4103] / [i915#4213]) +1 other test skip
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- bat-rpls-1: NOTRUN -> [SKIP][29] ([i915#1845]) +17 other tests skip
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html
* igt@kms_dsc@dsc-basic:
- bat-mtlp-8: NOTRUN -> [SKIP][30] ([i915#3555] / [i915#3840] / [i915#4098] / [i915#9159])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@kms_dsc@dsc-basic.html
- bat-dg1-5: NOTRUN -> [SKIP][31] ([i915#3555] / [i915#3840])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@kms_dsc@dsc-basic.html
* igt@kms_flip@basic-flip-vs-modeset:
- bat-rpls-1: NOTRUN -> [SKIP][32] ([i915#3637]) +3 other tests skip
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@kms_flip@basic-flip-vs-modeset.html
* igt@kms_force_connector_basic@force-load-detect:
- bat-mtlp-8: NOTRUN -> [SKIP][33] ([fdo#109285])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@kms_force_connector_basic@force-load-detect.html
- bat-rpls-1: NOTRUN -> [SKIP][34] ([fdo#109285])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@kms_force_connector_basic@force-load-detect.html
- bat-dg1-5: NOTRUN -> [SKIP][35] ([fdo#109285])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@kms_force_connector_basic@force-load-detect.html
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-mtlp-8: NOTRUN -> [SKIP][36] ([i915#5274])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@kms_force_connector_basic@prune-stale-modes.html
* igt@kms_frontbuffer_tracking@basic:
- bat-rpls-1: NOTRUN -> [SKIP][37] ([i915#1849] / [i915#5354])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@kms_frontbuffer_tracking@basic.html
* igt@kms_hdmi_inject@inject-audio:
- bat-dg1-5: NOTRUN -> [SKIP][38] ([i915#433])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@kms_hdmi_inject@inject-audio.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg1-5: NOTRUN -> [SKIP][39] ([i915#3555])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@kms_setmode@basic-clone-single-crtc.html
- bat-mtlp-8: NOTRUN -> [SKIP][40] ([i915#3555] / [i915#8809])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@kms_setmode@basic-clone-single-crtc.html
- bat-rpls-1: NOTRUN -> [SKIP][41] ([i915#3555])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@kms_setmode@basic-clone-single-crtc.html
* igt@prime_vgem@basic-fence-flip:
- bat-rpls-1: NOTRUN -> [SKIP][42] ([fdo#109295] / [i915#1845] / [i915#3708])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@prime_vgem@basic-fence-flip.html
* igt@prime_vgem@basic-fence-mmap:
- bat-mtlp-8: NOTRUN -> [SKIP][43] ([i915#3708] / [i915#4077]) +1 other test skip
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@prime_vgem@basic-fence-mmap.html
* igt@prime_vgem@basic-fence-read:
- bat-mtlp-8: NOTRUN -> [SKIP][44] ([i915#3708]) +2 other tests skip
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-mtlp-8/igt@prime_vgem@basic-fence-read.html
- bat-dg1-5: NOTRUN -> [SKIP][45] ([i915#3708]) +3 other tests skip
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@prime_vgem@basic-fence-read.html
* igt@prime_vgem@basic-gtt:
- bat-dg1-5: NOTRUN -> [SKIP][46] ([i915#3708] / [i915#4077]) +1 other test skip
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-dg1-5/igt@prime_vgem@basic-gtt.html
* igt@prime_vgem@basic-write:
- bat-rpls-1: NOTRUN -> [SKIP][47] ([fdo#109295] / [i915#3708]) +2 other tests skip
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-rpls-1/igt@prime_vgem@basic-write.html
#### Possible fixes ####
* igt@kms_flip@basic-flip-vs-modeset@b-dp6:
- bat-adlp-11: [FAIL][48] ([i915#6121]) -> [PASS][49] +3 other tests pass
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13955/bat-adlp-11/igt@kms_flip@basic-flip-vs-modeset@b-dp6.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/bat-adlp-11/igt@kms_flip@basic-flip-vs-modeset@b-dp6.html
* igt@kms_hdmi_inject@inject-audio:
- fi-kbl-guc: [FAIL][50] ([IGT#3]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13955/fi-kbl-guc/igt@kms_hdmi_inject@inject-audio.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/fi-kbl-guc/igt@kms_hdmi_inject@inject-audio.html
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-hdmi-a-2:
- fi-bsw-n3050: [DMESG-WARN][52] ([i915#1982]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13955/fi-bsw-n3050/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-hdmi-a-2.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/fi-bsw-n3050/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-hdmi-a-2.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#3]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/3
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6121]: https://gitlab.freedesktop.org/drm/intel/issues/6121
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809
[i915#9159]: https://gitlab.freedesktop.org/drm/intel/issues/9159
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
[i915#9673]: https://gitlab.freedesktop.org/drm/intel/issues/9673
[i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732
[i915#9736]: https://gitlab.freedesktop.org/drm/intel/issues/9736
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7612 -> IGTPW_10304
CI-20190529: 20190529
CI_DRM_13955: d835c627d25ba8775624ff3e854d034708044ac3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10304: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/index.html
IGT_7612: b5c47966901ee1060bcb9d4bccdd3ccec9651ef4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+++ 139 lines
--- 68 lines
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/index.html
[-- Attachment #2: Type: text/html, Size: 18927 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* [igt-dev] ✓ CI.xeBAT: success for Update PSR/PSR2_SF documenation and Add FBC support
2023-11-30 13:20 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
` (5 preceding siblings ...)
2023-11-30 15:39 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
@ 2023-11-30 16:25 ` Patchwork
6 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2023-11-30 16:25 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 3926 bytes --]
== Series Details ==
Series: Update PSR/PSR2_SF documenation and Add FBC support
URL : https://patchwork.freedesktop.org/series/127121/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_7612_BAT -> XEIGTPW_10304_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (4 -> 4)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in XEIGTPW_10304_BAT:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* {igt@kms_psr@psr_cursor_plane_move}:
- bat-adlp-7: [PASS][1] -> [SKIP][2] +2 other tests skip
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7612/bat-adlp-7/igt@kms_psr@psr_cursor_plane_move.html
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10304/bat-adlp-7/igt@kms_psr@psr_cursor_plane_move.html
Known issues
------------
Here are the changes found in XEIGTPW_10304_BAT that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
- bat-adlp-7: [PASS][3] -> [FAIL][4] ([Intel XE#480])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7612/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10304/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html
#### Possible fixes ####
* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- bat-adlp-7: [FAIL][5] ([i915#2346]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7612/bat-adlp-7/igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size.html
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10304/bat-adlp-7/igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size.html
* igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
- bat-adlp-7: [FAIL][7] ([Intel XE#480]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7612/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10304/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html
#### Warnings ####
* igt@kms_frontbuffer_tracking@basic:
- bat-adlp-7: [DMESG-FAIL][9] ([Intel XE#282] / [i915#2017]) -> [DMESG-WARN][10] ([Intel XE#282] / [i915#2017])
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7612/bat-adlp-7/igt@kms_frontbuffer_tracking@basic.html
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10304/bat-adlp-7/igt@kms_frontbuffer_tracking@basic.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282
[Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
[Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524
[i915#2017]: https://gitlab.freedesktop.org/drm/intel/issues/2017
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
Build changes
-------------
* IGT: IGT_7612 -> IGTPW_10304
* Linux: xe-538-afdc645350a4b30d1ba6c52deed4ecc11bf7c083 -> xe-539-00436a1a34afc0f8116f720f0666e9c62c82505c
IGTPW_10304: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10304/index.html
IGT_7612: b5c47966901ee1060bcb9d4bccdd3ccec9651ef4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-538-afdc645350a4b30d1ba6c52deed4ecc11bf7c083: afdc645350a4b30d1ba6c52deed4ecc11bf7c083
xe-539-00436a1a34afc0f8116f720f0666e9c62c82505c: 00436a1a34afc0f8116f720f0666e9c62c82505c
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10304/index.html
[-- Attachment #2: Type: text/html, Size: 4756 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
2023-12-01 11:22 [igt-dev] [PATCH i-g-t 0/4] " Jeevan B
@ 2023-12-01 11:22 ` Jeevan B
2023-12-01 11:44 ` Sharma, Swati2
0 siblings, 1 reply; 16+ messages in thread
From: Jeevan B @ 2023-12-01 11:22 UTC (permalink / raw)
To: igt-dev
For LunarLake (intel_display_ver 20), FBC can be enabled along with PSR2,
thereby adding FBC checks to validate this scenario.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
tests/intel/kms_psr2_sf.c | 606 +++++++++++++++++++++-----------------
1 file changed, 335 insertions(+), 271 deletions(-)
diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 27faa93d9..77bc23213 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -37,6 +37,7 @@
#include "igt_sysfs.h"
#include "igt_psr.h"
#include "kms_dsc_helper.h"
+#include "i915/intel_fbc.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
@@ -47,6 +48,10 @@
* Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
* visible area (no update)
*
+ * SUBTEST: fbc-%s-plane-move-continuous-%s
+ * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
+ * visible area (no update)
+ *
* arg[1]:
*
* @cursor: Cursor
@@ -63,24 +68,46 @@
* SUBTEST: cursor-plane-update-sf
* Description: Test that selective fetch works on cursor plane
*
+ * SUBTEST: fbc-cursor-plane-update-continuous-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
+ * Description: Test that fbc with selective fetch works on overlay plane
+ *
* SUBTEST: overlay-plane-update-sf-dmg-area
* Description: Test that selective fetch works on overlay plane
*
+ * SUBTEST: fbc-overlay-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on overlay plane
+ *
* SUBTEST: overlay-primary-update-sf-dmg-area
* Description: Test that selective fetch works on primary plane with blended
* overlay plane
*
+ * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane with blended
+ * overlay plane
+ *
* SUBTEST: plane-move-sf-dmg-area
* Description: Test that selective fetch works on moving overlay plane
*
+ * SUBTEST: fbc-plane-move-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on moving overlay plane
+ *
* 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
+ * 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"
@@ -131,10 +158,12 @@ typedef struct {
struct drm_mode_rect plane_move_clip;
struct drm_mode_rect cursor_clip;
enum operations op;
+ enum fbc_mode op_fbc_mode;
enum plane_move_postion pos;
int test_plane_id;
igt_plane_t *test_plane;
bool big_fb_test;
+ bool fbc_flag;
cairo_t *cr;
uint32_t screen_changes;
int cur_x, cur_y;
@@ -840,6 +869,11 @@ static void run(data_t *data)
igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL));
+ if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
+ igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+ data->pipe),
+ "FBC still disabled");
+
data->screen_changes = 0;
switch (data->op) {
@@ -942,10 +976,15 @@ igt_main
{
data_t data = {};
igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int i, j, k;
+ int i, j, k, y;
int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
int n_pipes = 0;
int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
+ const char *append_fbc_subtest[2] = {
+ "",
+ "fbc-"
+ };
+ int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
igt_fixture {
drmModeResPtr res;
@@ -961,6 +1000,11 @@ igt_main
display_init(&data);
+ if ((intel_display_ver(intel_get_drm_devid(data.drm_fd) == 20)) &&
+ (intel_fbc_supported_on_chipset(data.drm_fd, data.pipe))) {
+ data.fbc_flag = true;
+ }
+
/* Test if PSR2 can be enabled */
igt_require_f(psr_enable(data.drm_fd,
data.debugfs_fd, PSR_MODE_2_SEL_FETCH),
@@ -995,54 +1039,116 @@ igt_main
}
}
- /* Verify primary plane selective fetch */
- igt_describe("Test that selective fetch works on primary plane");
- igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+ data.op_fbc_mode = fbc_status[y];
+ /* Verify primary plane selective fetch */
+ igt_describe("Test that selective fetch works on primary plane");
+ igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", 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))
+ 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);
+ }
+ }
+ }
+ }
+ }
+
+ /* 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;
- 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);
+ }
}
}
}
}
- }
- /* 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("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ data.big_fb_test = 0;
+ /* Verify overlay plane selective fetch */
+ igt_describe("Test that selective fetch works on overlay plane");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", 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))
+ 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_OVERLAY;
+ 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))
+ data.damage_area_count = 1;
+ /* Verify cursor plane selective fetch */
+ igt_describe("Test that selective fetch works on cursor plane");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1050,28 +1156,25 @@ igt_main
}
}
}
- }
-
- data.big_fb_test = 0;
- /* Verify overlay plane selective fetch */
- igt_describe("Test that selective fetch works on overlay plane");
- igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving cursor plane (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1079,130 +1182,137 @@ igt_main
}
}
}
- }
- data.damage_area_count = 1;
- /* Verify cursor plane selective fetch */
- igt_describe("Test that selective fetch works on cursor plane");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "partially visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving cursor plane (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "fully visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ /* Only for overlay plane */
+ data.op = PLANE_MOVE;
+ /* Verify overlay plane move selective fetch */
+ igt_describe("Test that selective fetch works on moving overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_CURSOR;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
+ data.pos = k;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving overlay plane (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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)) {
+
+ 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_CURSOR;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
+ }
}
}
}
- }
- /* Only for overlay plane */
- data.op = PLANE_MOVE;
- /* Verify overlay plane move selective fetch */
- igt_describe("Test that selective fetch works on moving overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving overlay plane partially "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
- data.pos = k;
+
+ 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_OVERLAY;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1210,103 +1320,88 @@ igt_main
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving overlay plane (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving overlay plane fully "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
- 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_OVERLAY;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ /* Verify primary plane selective fetch with overplay plane blended */
+ data.op = OVERLAY_PRIM_UPDATE;
+ igt_describe("Test that selective fetch works on primary plane "
+ "with blended overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_OVERLAY;
- data.coexist_feature = j;
- 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];
+ for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+ data.damage_area_count = k;
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- /* Verify primary plane selective fetch with overplay plane blended */
- data.op = OVERLAY_PRIM_UPDATE;
- igt_describe("Test that selective fetch works on primary plane "
- "with blended overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ /*
+ * Verify overlay plane selective fetch using NV12 primary
+ * 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)) {
+ 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];
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+
+ 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.damage_area_count = 1;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
@@ -1317,37 +1412,6 @@ igt_main
}
}
- /*
- * Verify overlay plane selective fetch using NV12 primary
- * 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("overlay-%s-sf", 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))
- 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.damage_area_count = 1;
- data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
igt_fixture {
close(data.debugfs_fd);
display_fini(&data);
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
2023-12-01 11:22 ` [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B
@ 2023-12-01 11:44 ` Sharma, Swati2
0 siblings, 0 replies; 16+ messages in thread
From: Sharma, Swati2 @ 2023-12-01 11:44 UTC (permalink / raw)
To: Jeevan B, igt-dev
Hi Jeevan,
On 01-Dec-23 4:52 PM, Jeevan B wrote:
> For LunarLake (intel_display_ver 20), FBC can be enabled along with PSR2,
> thereby adding FBC checks to validate this scenario.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
> tests/intel/kms_psr2_sf.c | 606 +++++++++++++++++++++-----------------
> 1 file changed, 335 insertions(+), 271 deletions(-)
>
> diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
> index 27faa93d9..77bc23213 100644
> --- a/tests/intel/kms_psr2_sf.c
> +++ b/tests/intel/kms_psr2_sf.c
> @@ -37,6 +37,7 @@
> #include "igt_sysfs.h"
> #include "igt_psr.h"
> #include "kms_dsc_helper.h"
> +#include "i915/intel_fbc.h"
Add header in alphabetical order.
> #include <errno.h>
> #include <stdbool.h>
> #include <stdio.h>
> @@ -47,6 +48,10 @@
> * Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
> * visible area (no update)
> *
> + * SUBTEST: fbc-%s-plane-move-continuous-%s
> + * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
> + * visible area (no update)
> + *
Functionality: plane, psr2, selective_fetch is defined in top and will
be used by all subtests, so now we have fbc related tests too, we need
to add fbc in functionality.
Remove this functionality from top and add at individual subtest level
like how you have done for kms_psr.
> * arg[1]:
> *
> * @cursor: Cursor
> @@ -63,24 +68,46 @@
> * SUBTEST: cursor-plane-update-sf
> * Description: Test that selective fetch works on cursor plane
> *
> + * SUBTEST: fbc-cursor-plane-update-continuous-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
> + * Description: Test that fbc with selective fetch works on overlay plane
> + *
> * SUBTEST: overlay-plane-update-sf-dmg-area
> * Description: Test that selective fetch works on overlay plane
> *
> + * SUBTEST: fbc-overlay-plane-update-continuous-sf
> + * Description: Test that fbc with selective fetch works on overlay plane
> + *
> * SUBTEST: overlay-primary-update-sf-dmg-area
> * Description: Test that selective fetch works on primary plane with blended
> * overlay plane
> *
> + * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
> + * Description: Test that fbc with selective fetch works on primary plane with blended
> + * overlay plane
> + *
> * SUBTEST: plane-move-sf-dmg-area
> * Description: Test that selective fetch works on moving overlay plane
> *
> + * SUBTEST: fbc-plane-move-sf-dmg-area
> + * Description: Test that fbc with selective fetch works on moving overlay plane
> + *
> * 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
> + * 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"
> @@ -131,10 +158,12 @@ typedef struct {
> struct drm_mode_rect plane_move_clip;
> struct drm_mode_rect cursor_clip;
> enum operations op;
> + enum fbc_mode op_fbc_mode;
> enum plane_move_postion pos;
> int test_plane_id;
> igt_plane_t *test_plane;
> bool big_fb_test;
> + bool fbc_flag;
> cairo_t *cr;
> uint32_t screen_changes;
> int cur_x, cur_y;
> @@ -840,6 +869,11 @@ static void run(data_t *data)
>
> igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL));
>
> + if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
> + igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
> + data->pipe),
> + "FBC still disabled");
> +
> data->screen_changes = 0;
>
> switch (data->op) {
> @@ -942,10 +976,15 @@ igt_main
> {
> data_t data = {};
> igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
> - int i, j, k;
> + int i, j, k, y;
> int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
> int n_pipes = 0;
> int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
> + const char *append_fbc_subtest[2] = {
> + "",
> + "fbc-"
> + };
> + int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
>
> igt_fixture {
> drmModeResPtr res;
> @@ -961,6 +1000,11 @@ igt_main
>
> display_init(&data);
>
> + if ((intel_display_ver(intel_get_drm_devid(data.drm_fd) == 20)) &&
> + (intel_fbc_supported_on_chipset(data.drm_fd, data.pipe))) {
> + data.fbc_flag = true;
> + }
> +
> /* Test if PSR2 can be enabled */
> igt_require_f(psr_enable(data.drm_fd,
> data.debugfs_fd, PSR_MODE_2_SEL_FETCH),
> @@ -995,54 +1039,116 @@ igt_main
> }
> }
>
> - /* Verify primary plane selective fetch */
> - igt_describe("Test that selective fetch works on primary plane");
> - igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
> - for (i = 0; i < n_pipes; i++) {
> - if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
> - continue;
> + for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
> + data.op_fbc_mode = fbc_status[y];
> + /* Verify primary plane selective fetch */
> + igt_describe("Test that selective fetch works on primary plane");
> + igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", 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))
> + 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);
> + }
> + }
> + }
> + }
> + }
> +
> + /* 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;
> - 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);
> + }
> }
> }
> }
> }
> - }
>
> - /* 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("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
> - for (i = 0; i < n_pipes; i++) {
> - if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
> - continue;
> + data.big_fb_test = 0;
> + /* Verify overlay plane selective fetch */
> + igt_describe("Test that selective fetch works on overlay plane");
> + igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", 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))
> + 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_OVERLAY;
> + 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))
> + data.damage_area_count = 1;
> + /* Verify cursor plane selective fetch */
> + igt_describe("Test that selective fetch works on cursor plane");
> + igt_subtest_with_dynamic_f("%scursor-%s-sf", 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;
> +
> + 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_CURSOR;
> + data.coexist_feature = j;
> prepare(&data);
> run(&data);
> cleanup(&data);
> @@ -1050,28 +1156,25 @@ igt_main
> }
> }
> }
> - }
> -
> - data.big_fb_test = 0;
> - /* Verify overlay plane selective fetch */
> - igt_describe("Test that selective fetch works on overlay plane");
> - igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", 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))
> + data.op = PLANE_MOVE_CONTINUOUS;
> + igt_describe("Test that selective fetch works on moving cursor plane (no update)");
> + igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_OVERLAY;
> - data.coexist_feature = j;
> - for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> - data.damage_area_count = k;
> +
> + 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_CURSOR;
> + data.coexist_feature = j;
> prepare(&data);
> run(&data);
> cleanup(&data);
> @@ -1079,130 +1182,137 @@ igt_main
> }
> }
> }
> - }
>
> - data.damage_area_count = 1;
> - /* Verify cursor plane selective fetch */
> - igt_describe("Test that selective fetch works on cursor plane");
> - igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
> + data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
> + igt_describe("Test that selective fetch works on moving cursor plane exceeding "
> + "partially visible area (no update)");
> + igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
> - data.coexist_feature = j;
> - 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_CURSOR;
> + data.coexist_feature = j;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> }
> }
> }
> - }
> -
> - data.op = PLANE_MOVE_CONTINUOUS;
> - igt_describe("Test that selective fetch works on moving cursor plane (no update)");
> - igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
> + data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
> + igt_describe("Test that selective fetch works on moving cursor plane exceeding "
> + "fully visible area (no update)");
> + igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
> - data.coexist_feature = j;
> - 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_CURSOR;
> + data.coexist_feature = j;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> }
> }
> }
> - }
> -
> - data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
> - igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
> - igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
> + /* Only for overlay plane */
> + data.op = PLANE_MOVE;
> + /* Verify overlay plane move selective fetch */
> + igt_describe("Test that selective fetch works on moving overlay plane");
> + igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_CURSOR;
> - data.coexist_feature = j;
> - 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_OVERLAY;
> + data.coexist_feature = j;
> + for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
> + data.pos = k;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> + }
> }
> }
> }
> - }
>
> - data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
> - igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
> - igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
> + data.op = PLANE_MOVE_CONTINUOUS;
> + igt_describe("Test that selective fetch works on moving overlay plane (no update)");
> + igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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)) {
> +
> + 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_CURSOR;
> + data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> data.coexist_feature = j;
> prepare(&data);
> run(&data);
> cleanup(&data);
> + }
> }
> }
> }
> - }
>
> - /* Only for overlay plane */
> - data.op = PLANE_MOVE;
> - /* Verify overlay plane move selective fetch */
> - igt_describe("Test that selective fetch works on moving overlay plane");
> - igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
> + data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
> + igt_describe("Test that selective fetch works on moving overlay plane partially "
> + "exceeding visible area (no update)");
> + igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
> - data.coexist_feature = j;
> - for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
> - data.pos = k;
> +
> + 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_OVERLAY;
> + data.coexist_feature = j;
> prepare(&data);
> run(&data);
> cleanup(&data);
> @@ -1210,103 +1320,88 @@ igt_main
> }
> }
> }
> - }
> -
> - data.op = PLANE_MOVE_CONTINUOUS;
> - igt_describe("Test that selective fetch works on moving overlay plane (no update)");
> - igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
> + data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
> + igt_describe("Test that selective fetch works on moving overlay plane fully "
> + "exceeding visible area (no update)");
> + igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
> - data.coexist_feature = j;
> - prepare(&data);
> - run(&data);
> - cleanup(&data);
> - }
> - }
> - }
> - }
> -
> - data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
> - igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
> - igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
> - 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_OVERLAY;
> - data.coexist_feature = j;
> - 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_OVERLAY;
> + data.coexist_feature = j;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> }
> }
> }
> - }
>
> - data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
> - igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
> - igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
> + /* Verify primary plane selective fetch with overplay plane blended */
> + data.op = OVERLAY_PRIM_UPDATE;
> + igt_describe("Test that selective fetch works on primary plane "
> + "with blended overlay plane");
> + igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_OVERLAY;
> - data.coexist_feature = j;
> - 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];
> + for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> + data.damage_area_count = k;
> + data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> + data.coexist_feature = j;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> + }
> }
> }
> }
> - }
>
> - /* Verify primary plane selective fetch with overplay plane blended */
> - data.op = OVERLAY_PRIM_UPDATE;
> - igt_describe("Test that selective fetch works on primary plane "
> - "with blended overlay plane");
> - igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
> + /*
> + * Verify overlay plane selective fetch using NV12 primary
> + * 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)) {
> + 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];
> - for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> - data.damage_area_count = k;
> - data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> +
> + 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.damage_area_count = 1;
> + data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> data.coexist_feature = j;
> prepare(&data);
> run(&data);
> @@ -1317,37 +1412,6 @@ igt_main
> }
> }
>
> - /*
> - * Verify overlay plane selective fetch using NV12 primary
> - * 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("overlay-%s-sf", 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))
> - 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.damage_area_count = 1;
> - data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> - data.coexist_feature = j;
> - prepare(&data);
> - run(&data);
> - cleanup(&data);
> - }
> - }
> - }
> - }
> -
> igt_fixture {
> close(data.debugfs_fd);
> display_fini(&data);
^ permalink raw reply [flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
2023-12-01 12:47 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
@ 2023-12-01 12:47 ` Jeevan B
0 siblings, 0 replies; 16+ messages in thread
From: Jeevan B @ 2023-12-01 12:47 UTC (permalink / raw)
To: igt-dev
For LunarLake (intel_display_ver 20), FBC can be enabled along with PSR2,
thereby adding FBC checks to validate this scenario.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
tests/intel/kms_psr2_sf.c | 623 +++++++++++++++++++++-----------------
1 file changed, 351 insertions(+), 272 deletions(-)
diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 27faa93d9..779dd8c58 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -28,11 +28,11 @@
* Description: Tests to varify PSR2 selective fetch by sending multiple damaged
* areas
* Driver requirement: i915, xe
- * Functionality: plane, psr2, selective_fetch
* Mega feature: PSR
* Test category: functionality test
*/
+#include "i915/intel_fbc.h"
#include "igt.h"
#include "igt_sysfs.h"
#include "igt_psr.h"
@@ -46,6 +46,12 @@
* SUBTEST: %s-plane-move-continuous-%s
* Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
* visible area (no update)
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-%s-plane-move-continuous-%s
+ * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
+ * visible area (no update)
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* arg[1]:
*
@@ -62,25 +68,61 @@
/**
* SUBTEST: cursor-plane-update-sf
* Description: Test that selective fetch works on cursor plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-cursor-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on cursor plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: overlay-plane-update-continuous-sf
* Description: Test that selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-overlay-plane-update-continuous-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: overlay-plane-update-sf-dmg-area
* Description: Test that selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-overlay-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: overlay-primary-update-sf-dmg-area
* Description: Test that selective fetch works on primary plane with blended
* overlay plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane with blended
+ * overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: plane-move-sf-dmg-area
* Description: Test that selective fetch works on moving overlay plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-plane-move-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on moving overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: primary-plane-update-sf-dmg-area
* Description: Test that selective fetch works on primary plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: primary-plane-update-sf-dmg-area-big-fb
* Description: Test that selective fetch works on primary plane with big fb
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * 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
+ * Functionality: plane, psr2, selective_fetch, fbc
*/
IGT_TEST_DESCRIPTION("Tests to varify PSR2 selective fetch by sending multiple"
@@ -131,10 +173,12 @@ typedef struct {
struct drm_mode_rect plane_move_clip;
struct drm_mode_rect cursor_clip;
enum operations op;
+ enum fbc_mode op_fbc_mode;
enum plane_move_postion pos;
int test_plane_id;
igt_plane_t *test_plane;
bool big_fb_test;
+ bool fbc_flag;
cairo_t *cr;
uint32_t screen_changes;
int cur_x, cur_y;
@@ -840,6 +884,11 @@ static void run(data_t *data)
igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL));
+ if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
+ igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+ data->pipe),
+ "FBC still disabled");
+
data->screen_changes = 0;
switch (data->op) {
@@ -942,10 +991,15 @@ igt_main
{
data_t data = {};
igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int i, j, k;
+ int i, j, k, y;
int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
int n_pipes = 0;
int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
+ const char *append_fbc_subtest[2] = {
+ "",
+ "fbc-"
+ };
+ int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
igt_fixture {
drmModeResPtr res;
@@ -961,6 +1015,11 @@ igt_main
display_init(&data);
+ if ((intel_display_ver(intel_get_drm_devid(data.drm_fd) == 20)) &&
+ (intel_fbc_supported_on_chipset(data.drm_fd, data.pipe))) {
+ data.fbc_flag = true;
+ }
+
/* Test if PSR2 can be enabled */
igt_require_f(psr_enable(data.drm_fd,
data.debugfs_fd, PSR_MODE_2_SEL_FETCH),
@@ -995,54 +1054,116 @@ igt_main
}
}
- /* Verify primary plane selective fetch */
- igt_describe("Test that selective fetch works on primary plane");
- igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+ data.op_fbc_mode = fbc_status[y];
+ /* Verify primary plane selective fetch */
+ igt_describe("Test that selective fetch works on primary plane");
+ igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", 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))
+ 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))
+ /* 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;
- 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);
+ }
}
}
}
}
- }
- /* 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("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ data.big_fb_test = 0;
+ /* Verify overlay plane selective fetch */
+ igt_describe("Test that selective fetch works on overlay plane");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", 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))
+ 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_OVERLAY;
+ data.coexist_feature = j;
+ for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+ data.damage_area_count = k;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
+ }
+ }
+ }
+
+ data.damage_area_count = 1;
+ /* Verify cursor plane selective fetch */
+ igt_describe("Test that selective fetch works on cursor plane");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1050,28 +1171,25 @@ igt_main
}
}
}
- }
- data.big_fb_test = 0;
- /* Verify overlay plane selective fetch */
- igt_describe("Test that selective fetch works on overlay plane");
- igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving cursor plane (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1079,130 +1197,137 @@ igt_main
}
}
}
- }
-
- data.damage_area_count = 1;
- /* Verify cursor plane selective fetch */
- igt_describe("Test that selective fetch works on cursor plane");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "partially visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving cursor plane (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "fully visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ /* Only for overlay plane */
+ data.op = PLANE_MOVE;
+ /* Verify overlay plane move selective fetch */
+ igt_describe("Test that selective fetch works on moving overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_CURSOR;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
+ data.pos = k;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving overlay plane (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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)) {
+
+ 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_CURSOR;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
+ }
}
}
}
- }
- /* Only for overlay plane */
- data.op = PLANE_MOVE;
- /* Verify overlay plane move selective fetch */
- igt_describe("Test that selective fetch works on moving overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving overlay plane partially "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
- data.pos = k;
+
+ 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_OVERLAY;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1210,103 +1335,88 @@ igt_main
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving overlay plane (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving overlay plane fully "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
- 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_OVERLAY;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ /* Verify primary plane selective fetch with overplay plane blended */
+ data.op = OVERLAY_PRIM_UPDATE;
+ igt_describe("Test that selective fetch works on primary plane "
+ "with blended overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_OVERLAY;
- data.coexist_feature = j;
- 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];
+ for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+ data.damage_area_count = k;
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- /* Verify primary plane selective fetch with overplay plane blended */
- data.op = OVERLAY_PRIM_UPDATE;
- igt_describe("Test that selective fetch works on primary plane "
- "with blended overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ /*
+ * Verify overlay plane selective fetch using NV12 primary
+ * 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)) {
+ 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];
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+
+ 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.damage_area_count = 1;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
@@ -1317,37 +1427,6 @@ igt_main
}
}
- /*
- * Verify overlay plane selective fetch using NV12 primary
- * 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("overlay-%s-sf", 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))
- 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.damage_area_count = 1;
- data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
igt_fixture {
close(data.debugfs_fd);
display_fini(&data);
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
2023-12-01 12:49 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
@ 2023-12-01 12:49 ` Jeevan B
2023-12-01 12:57 ` Sharma, Swati2
0 siblings, 1 reply; 16+ messages in thread
From: Jeevan B @ 2023-12-01 12:49 UTC (permalink / raw)
To: igt-dev
For LunarLake (intel_display_ver 20), FBC can be enabled along with PSR2,
thereby adding FBC checks to validate this scenario.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
tests/intel/kms_psr2_sf.c | 623 +++++++++++++++++++++-----------------
1 file changed, 351 insertions(+), 272 deletions(-)
diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 27faa93d9..779dd8c58 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -28,11 +28,11 @@
* Description: Tests to varify PSR2 selective fetch by sending multiple damaged
* areas
* Driver requirement: i915, xe
- * Functionality: plane, psr2, selective_fetch
* Mega feature: PSR
* Test category: functionality test
*/
+#include "i915/intel_fbc.h"
#include "igt.h"
#include "igt_sysfs.h"
#include "igt_psr.h"
@@ -46,6 +46,12 @@
* SUBTEST: %s-plane-move-continuous-%s
* Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
* visible area (no update)
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-%s-plane-move-continuous-%s
+ * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
+ * visible area (no update)
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* arg[1]:
*
@@ -62,25 +68,61 @@
/**
* SUBTEST: cursor-plane-update-sf
* Description: Test that selective fetch works on cursor plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-cursor-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on cursor plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: overlay-plane-update-continuous-sf
* Description: Test that selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-overlay-plane-update-continuous-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: overlay-plane-update-sf-dmg-area
* Description: Test that selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-overlay-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: overlay-primary-update-sf-dmg-area
* Description: Test that selective fetch works on primary plane with blended
* overlay plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane with blended
+ * overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: plane-move-sf-dmg-area
* Description: Test that selective fetch works on moving overlay plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-plane-move-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on moving overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: primary-plane-update-sf-dmg-area
* Description: Test that selective fetch works on primary plane
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane
+ * Functionality: plane, psr2, selective_fetch, fbc
*
* SUBTEST: primary-plane-update-sf-dmg-area-big-fb
* Description: Test that selective fetch works on primary plane with big fb
+ * Functionality: plane, psr2, selective_fetch
+ *
+ * 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
+ * Functionality: plane, psr2, selective_fetch, fbc
*/
IGT_TEST_DESCRIPTION("Tests to varify PSR2 selective fetch by sending multiple"
@@ -131,10 +173,12 @@ typedef struct {
struct drm_mode_rect plane_move_clip;
struct drm_mode_rect cursor_clip;
enum operations op;
+ enum fbc_mode op_fbc_mode;
enum plane_move_postion pos;
int test_plane_id;
igt_plane_t *test_plane;
bool big_fb_test;
+ bool fbc_flag;
cairo_t *cr;
uint32_t screen_changes;
int cur_x, cur_y;
@@ -840,6 +884,11 @@ static void run(data_t *data)
igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL));
+ if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
+ igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+ data->pipe),
+ "FBC still disabled");
+
data->screen_changes = 0;
switch (data->op) {
@@ -942,10 +991,15 @@ igt_main
{
data_t data = {};
igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int i, j, k;
+ int i, j, k, y;
int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
int n_pipes = 0;
int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
+ const char *append_fbc_subtest[2] = {
+ "",
+ "fbc-"
+ };
+ int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
igt_fixture {
drmModeResPtr res;
@@ -961,6 +1015,11 @@ igt_main
display_init(&data);
+ if ((intel_display_ver(intel_get_drm_devid(data.drm_fd) == 20)) &&
+ (intel_fbc_supported_on_chipset(data.drm_fd, data.pipe))) {
+ data.fbc_flag = true;
+ }
+
/* Test if PSR2 can be enabled */
igt_require_f(psr_enable(data.drm_fd,
data.debugfs_fd, PSR_MODE_2_SEL_FETCH),
@@ -995,54 +1054,116 @@ igt_main
}
}
- /* Verify primary plane selective fetch */
- igt_describe("Test that selective fetch works on primary plane");
- igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+ data.op_fbc_mode = fbc_status[y];
+ /* Verify primary plane selective fetch */
+ igt_describe("Test that selective fetch works on primary plane");
+ igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", 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))
+ 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))
+ /* 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;
- 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);
+ }
}
}
}
}
- }
- /* 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("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ data.big_fb_test = 0;
+ /* Verify overlay plane selective fetch */
+ igt_describe("Test that selective fetch works on overlay plane");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", 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))
+ 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_OVERLAY;
+ data.coexist_feature = j;
+ for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+ data.damage_area_count = k;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
+ }
+ }
+ }
+
+ data.damage_area_count = 1;
+ /* Verify cursor plane selective fetch */
+ igt_describe("Test that selective fetch works on cursor plane");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1050,28 +1171,25 @@ igt_main
}
}
}
- }
- data.big_fb_test = 0;
- /* Verify overlay plane selective fetch */
- igt_describe("Test that selective fetch works on overlay plane");
- igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving cursor plane (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1079,130 +1197,137 @@ igt_main
}
}
}
- }
-
- data.damage_area_count = 1;
- /* Verify cursor plane selective fetch */
- igt_describe("Test that selective fetch works on cursor plane");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "partially visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving cursor plane (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "fully visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ /* Only for overlay plane */
+ data.op = PLANE_MOVE;
+ /* Verify overlay plane move selective fetch */
+ igt_describe("Test that selective fetch works on moving overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_CURSOR;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
+ data.pos = k;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving overlay plane (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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)) {
+
+ 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_CURSOR;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
+ }
}
}
}
- }
- /* Only for overlay plane */
- data.op = PLANE_MOVE;
- /* Verify overlay plane move selective fetch */
- igt_describe("Test that selective fetch works on moving overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving overlay plane partially "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
- data.pos = k;
+
+ 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_OVERLAY;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1210,103 +1335,88 @@ igt_main
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving overlay plane (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving overlay plane fully "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
- 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_OVERLAY;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ /* Verify primary plane selective fetch with overplay plane blended */
+ data.op = OVERLAY_PRIM_UPDATE;
+ igt_describe("Test that selective fetch works on primary plane "
+ "with blended overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_OVERLAY;
- data.coexist_feature = j;
- 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];
+ for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+ data.damage_area_count = k;
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- /* Verify primary plane selective fetch with overplay plane blended */
- data.op = OVERLAY_PRIM_UPDATE;
- igt_describe("Test that selective fetch works on primary plane "
- "with blended overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ /*
+ * Verify overlay plane selective fetch using NV12 primary
+ * 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)) {
+ 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];
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+
+ 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.damage_area_count = 1;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
@@ -1317,37 +1427,6 @@ igt_main
}
}
- /*
- * Verify overlay plane selective fetch using NV12 primary
- * 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("overlay-%s-sf", 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))
- 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.damage_area_count = 1;
- data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
igt_fixture {
close(data.debugfs_fd);
display_fini(&data);
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
2023-12-01 12:49 ` [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B
@ 2023-12-01 12:57 ` Sharma, Swati2
0 siblings, 0 replies; 16+ messages in thread
From: Sharma, Swati2 @ 2023-12-01 12:57 UTC (permalink / raw)
To: Jeevan B, igt-dev
LGTM
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
On 01-Dec-23 6:19 PM, Jeevan B wrote:
> For LunarLake (intel_display_ver 20), FBC can be enabled along with PSR2,
> thereby adding FBC checks to validate this scenario.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
> tests/intel/kms_psr2_sf.c | 623 +++++++++++++++++++++-----------------
> 1 file changed, 351 insertions(+), 272 deletions(-)
>
> diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
> index 27faa93d9..779dd8c58 100644
> --- a/tests/intel/kms_psr2_sf.c
> +++ b/tests/intel/kms_psr2_sf.c
> @@ -28,11 +28,11 @@
> * Description: Tests to varify PSR2 selective fetch by sending multiple damaged
> * areas
> * Driver requirement: i915, xe
> - * Functionality: plane, psr2, selective_fetch
> * Mega feature: PSR
> * Test category: functionality test
> */
>
> +#include "i915/intel_fbc.h"
> #include "igt.h"
> #include "igt_sysfs.h"
> #include "igt_psr.h"
> @@ -46,6 +46,12 @@
> * SUBTEST: %s-plane-move-continuous-%s
> * Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
> * visible area (no update)
> + * Functionality: plane, psr2, selective_fetch
> + *
> + * SUBTEST: fbc-%s-plane-move-continuous-%s
> + * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
> + * visible area (no update)
> + * Functionality: plane, psr2, selective_fetch, fbc
> *
> * arg[1]:
> *
> @@ -62,25 +68,61 @@
> /**
> * SUBTEST: cursor-plane-update-sf
> * Description: Test that selective fetch works on cursor plane
> + * Functionality: plane, psr2, selective_fetch
> + *
> + * SUBTEST: fbc-cursor-plane-update-continuous-sf
> + * Description: Test that fbc with selective fetch works on cursor plane
> + * Functionality: plane, psr2, selective_fetch, fbc
> *
> * SUBTEST: overlay-plane-update-continuous-sf
> * Description: Test that selective fetch works on overlay plane
> + * Functionality: plane, psr2, selective_fetch
> + *
> + * SUBTEST: fbc-overlay-plane-update-continuous-sf-dmg-area
> + * Description: Test that fbc with selective fetch works on overlay plane
> + * Functionality: plane, psr2, selective_fetch, fbc
> *
> * SUBTEST: overlay-plane-update-sf-dmg-area
> * Description: Test that selective fetch works on overlay plane
> + * Functionality: plane, psr2, selective_fetch
> + *
> + * SUBTEST: fbc-overlay-plane-update-continuous-sf
> + * Description: Test that fbc with selective fetch works on overlay plane
> + * Functionality: plane, psr2, selective_fetch, fbc
> *
> * SUBTEST: overlay-primary-update-sf-dmg-area
> * Description: Test that selective fetch works on primary plane with blended
> * overlay plane
> + * Functionality: plane, psr2, selective_fetch
> + *
> + * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
> + * Description: Test that fbc with selective fetch works on primary plane with blended
> + * overlay plane
> + * Functionality: plane, psr2, selective_fetch, fbc
> *
> * SUBTEST: plane-move-sf-dmg-area
> * Description: Test that selective fetch works on moving overlay plane
> + * Functionality: plane, psr2, selective_fetch
> + *
> + * SUBTEST: fbc-plane-move-sf-dmg-area
> + * Description: Test that fbc with selective fetch works on moving overlay plane
> + * Functionality: plane, psr2, selective_fetch, fbc
> *
> * SUBTEST: primary-plane-update-sf-dmg-area
> * Description: Test that selective fetch works on primary plane
> + * Functionality: plane, psr2, selective_fetch
> + *
> + * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area
> + * Description: Test that fbc with selective fetch works on primary plane
> + * Functionality: plane, psr2, selective_fetch, fbc
> *
> * SUBTEST: primary-plane-update-sf-dmg-area-big-fb
> * Description: Test that selective fetch works on primary plane with big fb
> + * Functionality: plane, psr2, selective_fetch
> + *
> + * 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
> + * Functionality: plane, psr2, selective_fetch, fbc
> */
>
> IGT_TEST_DESCRIPTION("Tests to varify PSR2 selective fetch by sending multiple"
> @@ -131,10 +173,12 @@ typedef struct {
> struct drm_mode_rect plane_move_clip;
> struct drm_mode_rect cursor_clip;
> enum operations op;
> + enum fbc_mode op_fbc_mode;
> enum plane_move_postion pos;
> int test_plane_id;
> igt_plane_t *test_plane;
> bool big_fb_test;
> + bool fbc_flag;
> cairo_t *cr;
> uint32_t screen_changes;
> int cur_x, cur_y;
> @@ -840,6 +884,11 @@ static void run(data_t *data)
>
> igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL));
>
> + if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
> + igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
> + data->pipe),
> + "FBC still disabled");
> +
> data->screen_changes = 0;
>
> switch (data->op) {
> @@ -942,10 +991,15 @@ igt_main
> {
> data_t data = {};
> igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
> - int i, j, k;
> + int i, j, k, y;
> int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
> int n_pipes = 0;
> int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
> + const char *append_fbc_subtest[2] = {
> + "",
> + "fbc-"
> + };
> + int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
>
> igt_fixture {
> drmModeResPtr res;
> @@ -961,6 +1015,11 @@ igt_main
>
> display_init(&data);
>
> + if ((intel_display_ver(intel_get_drm_devid(data.drm_fd) == 20)) &&
> + (intel_fbc_supported_on_chipset(data.drm_fd, data.pipe))) {
> + data.fbc_flag = true;
> + }
> +
> /* Test if PSR2 can be enabled */
> igt_require_f(psr_enable(data.drm_fd,
> data.debugfs_fd, PSR_MODE_2_SEL_FETCH),
> @@ -995,54 +1054,116 @@ igt_main
> }
> }
>
> - /* Verify primary plane selective fetch */
> - igt_describe("Test that selective fetch works on primary plane");
> - igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
> - for (i = 0; i < n_pipes; i++) {
> - if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
> - continue;
> + for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
> + data.op_fbc_mode = fbc_status[y];
> + /* Verify primary plane selective fetch */
> + igt_describe("Test that selective fetch works on primary plane");
> + igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", 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))
> + 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))
> + /* 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;
> - 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);
> + }
> }
> }
> }
> }
> - }
>
> - /* 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("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
> - for (i = 0; i < n_pipes; i++) {
> - if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
> - continue;
> + data.big_fb_test = 0;
> + /* Verify overlay plane selective fetch */
> + igt_describe("Test that selective fetch works on overlay plane");
> + igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", 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))
> + 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_OVERLAY;
> + data.coexist_feature = j;
> + for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> + data.damage_area_count = k;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> + }
> + }
> + }
> + }
> +
> + data.damage_area_count = 1;
> + /* Verify cursor plane selective fetch */
> + igt_describe("Test that selective fetch works on cursor plane");
> + igt_subtest_with_dynamic_f("%scursor-%s-sf", 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;
> +
> + 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_CURSOR;
> + data.coexist_feature = j;
> prepare(&data);
> run(&data);
> cleanup(&data);
> @@ -1050,28 +1171,25 @@ igt_main
> }
> }
> }
> - }
>
> - data.big_fb_test = 0;
> - /* Verify overlay plane selective fetch */
> - igt_describe("Test that selective fetch works on overlay plane");
> - igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", 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))
> + data.op = PLANE_MOVE_CONTINUOUS;
> + igt_describe("Test that selective fetch works on moving cursor plane (no update)");
> + igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_OVERLAY;
> - data.coexist_feature = j;
> - for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> - data.damage_area_count = k;
> +
> + 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_CURSOR;
> + data.coexist_feature = j;
> prepare(&data);
> run(&data);
> cleanup(&data);
> @@ -1079,130 +1197,137 @@ igt_main
> }
> }
> }
> - }
> -
> - data.damage_area_count = 1;
> - /* Verify cursor plane selective fetch */
> - igt_describe("Test that selective fetch works on cursor plane");
> - igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
> + data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
> + igt_describe("Test that selective fetch works on moving cursor plane exceeding "
> + "partially visible area (no update)");
> + igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
> - data.coexist_feature = j;
> - 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_CURSOR;
> + data.coexist_feature = j;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> }
> }
> }
> - }
>
> - data.op = PLANE_MOVE_CONTINUOUS;
> - igt_describe("Test that selective fetch works on moving cursor plane (no update)");
> - igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
> + data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
> + igt_describe("Test that selective fetch works on moving cursor plane exceeding "
> + "fully visible area (no update)");
> + igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
> - data.coexist_feature = j;
> - 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_CURSOR;
> + data.coexist_feature = j;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> }
> }
> }
> - }
>
> - data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
> - igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
> - igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
> + /* Only for overlay plane */
> + data.op = PLANE_MOVE;
> + /* Verify overlay plane move selective fetch */
> + igt_describe("Test that selective fetch works on moving overlay plane");
> + igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_CURSOR;
> - data.coexist_feature = j;
> - 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_OVERLAY;
> + data.coexist_feature = j;
> + for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
> + data.pos = k;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> + }
> }
> }
> }
> - }
> -
> - data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
> - igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
> - igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
> + data.op = PLANE_MOVE_CONTINUOUS;
> + igt_describe("Test that selective fetch works on moving overlay plane (no update)");
> + igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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)) {
> +
> + 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_CURSOR;
> + data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> data.coexist_feature = j;
> prepare(&data);
> run(&data);
> cleanup(&data);
> + }
> }
> }
> }
> - }
>
> - /* Only for overlay plane */
> - data.op = PLANE_MOVE;
> - /* Verify overlay plane move selective fetch */
> - igt_describe("Test that selective fetch works on moving overlay plane");
> - igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
> + data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
> + igt_describe("Test that selective fetch works on moving overlay plane partially "
> + "exceeding visible area (no update)");
> + igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
> - data.coexist_feature = j;
> - for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
> - data.pos = k;
> +
> + 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_OVERLAY;
> + data.coexist_feature = j;
> prepare(&data);
> run(&data);
> cleanup(&data);
> @@ -1210,103 +1335,88 @@ igt_main
> }
> }
> }
> - }
> -
> - data.op = PLANE_MOVE_CONTINUOUS;
> - igt_describe("Test that selective fetch works on moving overlay plane (no update)");
> - igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
> + data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
> + igt_describe("Test that selective fetch works on moving overlay plane fully "
> + "exceeding visible area (no update)");
> + igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
> - data.coexist_feature = j;
> - prepare(&data);
> - run(&data);
> - cleanup(&data);
> - }
> - }
> - }
> - }
> -
> - data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
> - igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
> - igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
> - 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_OVERLAY;
> - data.coexist_feature = j;
> - 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_OVERLAY;
> + data.coexist_feature = j;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> }
> }
> }
> - }
>
> - data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
> - igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
> - igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
> + /* Verify primary plane selective fetch with overplay plane blended */
> + data.op = OVERLAY_PRIM_UPDATE;
> + igt_describe("Test that selective fetch works on primary plane "
> + "with blended overlay plane");
> + igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_OVERLAY;
> - data.coexist_feature = j;
> - 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];
> + for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> + data.damage_area_count = k;
> + data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> + data.coexist_feature = j;
> + prepare(&data);
> + run(&data);
> + cleanup(&data);
> + }
> + }
> }
> }
> }
> - }
>
> - /* Verify primary plane selective fetch with overplay plane blended */
> - data.op = OVERLAY_PRIM_UPDATE;
> - igt_describe("Test that selective fetch works on primary plane "
> - "with blended overlay plane");
> - igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
> + /*
> + * Verify overlay plane selective fetch using NV12 primary
> + * 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)) {
> + 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];
> - for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
> - data.damage_area_count = k;
> - data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> +
> + 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.damage_area_count = 1;
> + data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> data.coexist_feature = j;
> prepare(&data);
> run(&data);
> @@ -1317,37 +1427,6 @@ igt_main
> }
> }
>
> - /*
> - * Verify overlay plane selective fetch using NV12 primary
> - * 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("overlay-%s-sf", 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))
> - 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.damage_area_count = 1;
> - data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> - data.coexist_feature = j;
> - prepare(&data);
> - run(&data);
> - cleanup(&data);
> - }
> - }
> - }
> - }
> -
> igt_fixture {
> close(data.debugfs_fd);
> display_fini(&data);
^ permalink raw reply [flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
2023-12-04 9:52 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
@ 2023-12-04 9:53 ` Jeevan B
0 siblings, 0 replies; 16+ messages in thread
From: Jeevan B @ 2023-12-04 9:53 UTC (permalink / raw)
To: igt-dev
For LunarLake (intel_display_ver 20), FBC can be enabled along with PSR2,
thereby adding FBC checks to validate this scenario.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
tests/intel/kms_psr2_sf.c | 609 +++++++++++++++++++++-----------------
1 file changed, 338 insertions(+), 271 deletions(-)
diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 27faa93d9..76435f501 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -37,6 +37,7 @@
#include "igt_sysfs.h"
#include "igt_psr.h"
#include "kms_dsc_helper.h"
+#include "i915/intel_fbc.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
@@ -47,6 +48,10 @@
* Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
* visible area (no update)
*
+ * SUBTEST: fbc-%s-plane-move-continuous-%s
+ * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
+ * visible area (no update)
+ *
* arg[1]:
*
* @cursor: Cursor
@@ -63,24 +68,46 @@
* SUBTEST: cursor-plane-update-sf
* Description: Test that selective fetch works on cursor plane
*
+ * SUBTEST: fbc-cursor-plane-update-continuous-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
+ * Description: Test that fbc with selective fetch works on overlay plane
+ *
* SUBTEST: overlay-plane-update-sf-dmg-area
* Description: Test that selective fetch works on overlay plane
*
+ * SUBTEST: fbc-overlay-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on overlay plane
+ *
* SUBTEST: overlay-primary-update-sf-dmg-area
* Description: Test that selective fetch works on primary plane with blended
* overlay plane
*
+ * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane with blended
+ * overlay plane
+ *
* SUBTEST: plane-move-sf-dmg-area
* Description: Test that selective fetch works on moving overlay plane
*
+ * SUBTEST: fbc-plane-move-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on moving overlay plane
+ *
* 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
+ * 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"
@@ -131,10 +158,12 @@ typedef struct {
struct drm_mode_rect plane_move_clip;
struct drm_mode_rect cursor_clip;
enum operations op;
+ enum fbc_mode op_fbc_mode;
enum plane_move_postion pos;
int test_plane_id;
igt_plane_t *test_plane;
bool big_fb_test;
+ bool fbc_flag;
cairo_t *cr;
uint32_t screen_changes;
int cur_x, cur_y;
@@ -439,6 +468,9 @@ static void prepare(data_t *data)
if (data->coexist_feature & FEATURE_DSC)
igt_require_f(igt_is_dsc_enabled(data->drm_fd, output->name),
"DSC is not enabled\n");
+ if (data->op_fbc_mode == FBC_ENABLED)
+ igt_require_f(data->fbc_flag,
+ "Can't test FBC with PSR\n");
}
static inline void manual(const char *expected)
@@ -840,6 +872,11 @@ static void run(data_t *data)
igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL));
+ if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
+ igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+ data->pipe),
+ "FBC still disabled");
+
data->screen_changes = 0;
switch (data->op) {
@@ -942,10 +979,15 @@ igt_main
{
data_t data = {};
igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int i, j, k;
+ int i, j, k, y;
int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
int n_pipes = 0;
int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
+ const char *append_fbc_subtest[2] = {
+ "",
+ "fbc-"
+ };
+ int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
igt_fixture {
drmModeResPtr res;
@@ -961,6 +1003,11 @@ igt_main
display_init(&data);
+ if ((intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 20) &&
+ (intel_fbc_supported_on_chipset(data.drm_fd, data.pipe))) {
+ data.fbc_flag = true;
+ }
+
/* Test if PSR2 can be enabled */
igt_require_f(psr_enable(data.drm_fd,
data.debugfs_fd, PSR_MODE_2_SEL_FETCH),
@@ -995,54 +1042,116 @@ igt_main
}
}
- /* Verify primary plane selective fetch */
- igt_describe("Test that selective fetch works on primary plane");
- igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+ data.op_fbc_mode = fbc_status[y];
+ /* Verify primary plane selective fetch */
+ igt_describe("Test that selective fetch works on primary plane");
+ igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", 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))
+ 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);
+ }
+ }
+ }
+ }
+ }
+
+ /* 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;
- 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);
+ }
}
}
}
}
- }
- /* 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("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ data.big_fb_test = 0;
+ /* Verify overlay plane selective fetch */
+ igt_describe("Test that selective fetch works on overlay plane");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", 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))
+ 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_OVERLAY;
+ 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))
+ data.damage_area_count = 1;
+ /* Verify cursor plane selective fetch */
+ igt_describe("Test that selective fetch works on cursor plane");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1050,28 +1159,25 @@ igt_main
}
}
}
- }
-
- data.big_fb_test = 0;
- /* Verify overlay plane selective fetch */
- igt_describe("Test that selective fetch works on overlay plane");
- igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving cursor plane (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1079,130 +1185,137 @@ igt_main
}
}
}
- }
- data.damage_area_count = 1;
- /* Verify cursor plane selective fetch */
- igt_describe("Test that selective fetch works on cursor plane");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "partially visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving cursor plane (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "fully visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ /* Only for overlay plane */
+ data.op = PLANE_MOVE;
+ /* Verify overlay plane move selective fetch */
+ igt_describe("Test that selective fetch works on moving overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_CURSOR;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
+ data.pos = k;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving overlay plane (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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)) {
+
+ 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_CURSOR;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
+ }
}
}
}
- }
- /* Only for overlay plane */
- data.op = PLANE_MOVE;
- /* Verify overlay plane move selective fetch */
- igt_describe("Test that selective fetch works on moving overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving overlay plane partially "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
- data.pos = k;
+
+ 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_OVERLAY;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1210,103 +1323,88 @@ igt_main
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving overlay plane (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving overlay plane fully "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
- 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_OVERLAY;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ /* Verify primary plane selective fetch with overplay plane blended */
+ data.op = OVERLAY_PRIM_UPDATE;
+ igt_describe("Test that selective fetch works on primary plane "
+ "with blended overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_OVERLAY;
- data.coexist_feature = j;
- 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];
+ for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+ data.damage_area_count = k;
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- /* Verify primary plane selective fetch with overplay plane blended */
- data.op = OVERLAY_PRIM_UPDATE;
- igt_describe("Test that selective fetch works on primary plane "
- "with blended overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ /*
+ * Verify overlay plane selective fetch using NV12 primary
+ * 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)) {
+ 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];
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+
+ 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.damage_area_count = 1;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
@@ -1317,37 +1415,6 @@ igt_main
}
}
- /*
- * Verify overlay plane selective fetch using NV12 primary
- * 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("overlay-%s-sf", 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))
- 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.damage_area_count = 1;
- data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
igt_fixture {
close(data.debugfs_fd);
display_fini(&data);
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t 4/4] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
2023-12-04 9:59 [igt-dev] [PATCH i-g-t 0/4] Update PSR/PSR2_SF documenation and Add FBC support Jeevan B
@ 2023-12-04 9:59 ` Jeevan B
0 siblings, 0 replies; 16+ messages in thread
From: Jeevan B @ 2023-12-04 9:59 UTC (permalink / raw)
To: igt-dev
For LunarLake (intel_display_ver 20), FBC can be enabled along with PSR2,
thereby adding FBC checks to validate this scenario.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/intel/kms_psr2_sf.c | 609 +++++++++++++++++++++-----------------
1 file changed, 338 insertions(+), 271 deletions(-)
diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 27faa93d9..76435f501 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -37,6 +37,7 @@
#include "igt_sysfs.h"
#include "igt_psr.h"
#include "kms_dsc_helper.h"
+#include "i915/intel_fbc.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
@@ -47,6 +48,10 @@
* Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
* visible area (no update)
*
+ * SUBTEST: fbc-%s-plane-move-continuous-%s
+ * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
+ * visible area (no update)
+ *
* arg[1]:
*
* @cursor: Cursor
@@ -63,24 +68,46 @@
* SUBTEST: cursor-plane-update-sf
* Description: Test that selective fetch works on cursor plane
*
+ * SUBTEST: fbc-cursor-plane-update-continuous-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
+ * Description: Test that fbc with selective fetch works on overlay plane
+ *
* SUBTEST: overlay-plane-update-sf-dmg-area
* Description: Test that selective fetch works on overlay plane
*
+ * SUBTEST: fbc-overlay-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on overlay plane
+ *
* SUBTEST: overlay-primary-update-sf-dmg-area
* Description: Test that selective fetch works on primary plane with blended
* overlay plane
*
+ * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane with blended
+ * overlay plane
+ *
* SUBTEST: plane-move-sf-dmg-area
* Description: Test that selective fetch works on moving overlay plane
*
+ * SUBTEST: fbc-plane-move-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on moving overlay plane
+ *
* 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
+ * 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"
@@ -131,10 +158,12 @@ typedef struct {
struct drm_mode_rect plane_move_clip;
struct drm_mode_rect cursor_clip;
enum operations op;
+ enum fbc_mode op_fbc_mode;
enum plane_move_postion pos;
int test_plane_id;
igt_plane_t *test_plane;
bool big_fb_test;
+ bool fbc_flag;
cairo_t *cr;
uint32_t screen_changes;
int cur_x, cur_y;
@@ -439,6 +468,9 @@ static void prepare(data_t *data)
if (data->coexist_feature & FEATURE_DSC)
igt_require_f(igt_is_dsc_enabled(data->drm_fd, output->name),
"DSC is not enabled\n");
+ if (data->op_fbc_mode == FBC_ENABLED)
+ igt_require_f(data->fbc_flag,
+ "Can't test FBC with PSR\n");
}
static inline void manual(const char *expected)
@@ -840,6 +872,11 @@ static void run(data_t *data)
igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL));
+ if (data->fbc_flag == true && data->op_fbc_mode == FBC_ENABLED)
+ igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+ data->pipe),
+ "FBC still disabled");
+
data->screen_changes = 0;
switch (data->op) {
@@ -942,10 +979,15 @@ igt_main
{
data_t data = {};
igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int i, j, k;
+ int i, j, k, y;
int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
int n_pipes = 0;
int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
+ const char *append_fbc_subtest[2] = {
+ "",
+ "fbc-"
+ };
+ int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
igt_fixture {
drmModeResPtr res;
@@ -961,6 +1003,11 @@ igt_main
display_init(&data);
+ if ((intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 20) &&
+ (intel_fbc_supported_on_chipset(data.drm_fd, data.pipe))) {
+ data.fbc_flag = true;
+ }
+
/* Test if PSR2 can be enabled */
igt_require_f(psr_enable(data.drm_fd,
data.debugfs_fd, PSR_MODE_2_SEL_FETCH),
@@ -995,54 +1042,116 @@ igt_main
}
}
- /* Verify primary plane selective fetch */
- igt_describe("Test that selective fetch works on primary plane");
- igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+ data.op_fbc_mode = fbc_status[y];
+ /* Verify primary plane selective fetch */
+ igt_describe("Test that selective fetch works on primary plane");
+ igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", 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))
+ 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);
+ }
+ }
+ }
+ }
+ }
+
+ /* 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;
- 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);
+ }
}
}
}
}
- }
- /* 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("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
- continue;
+ data.big_fb_test = 0;
+ /* Verify overlay plane selective fetch */
+ igt_describe("Test that selective fetch works on overlay plane");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", 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))
+ 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_OVERLAY;
+ 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))
+ data.damage_area_count = 1;
+ /* Verify cursor plane selective fetch */
+ igt_describe("Test that selective fetch works on cursor plane");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1050,28 +1159,25 @@ igt_main
}
}
}
- }
-
- data.big_fb_test = 0;
- /* Verify overlay plane selective fetch */
- igt_describe("Test that selective fetch works on overlay plane");
- igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving cursor plane (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
+
+ 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_CURSOR;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1079,130 +1185,137 @@ igt_main
}
}
}
- }
- data.damage_area_count = 1;
- /* Verify cursor plane selective fetch */
- igt_describe("Test that selective fetch works on cursor plane");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "partially visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving cursor plane (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving cursor plane exceeding "
+ "fully visible area (no update)");
+ igt_subtest_with_dynamic_f("%scursor-%s-sf", 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_CURSOR;
- data.coexist_feature = j;
- 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_CURSOR;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ /* Only for overlay plane */
+ data.op = PLANE_MOVE;
+ /* Verify overlay plane move selective fetch */
+ igt_describe("Test that selective fetch works on moving overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_CURSOR;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
+ data.pos = k;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
- igt_subtest_with_dynamic_f("cursor-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS;
+ igt_describe("Test that selective fetch works on moving overlay plane (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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)) {
+
+ 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_CURSOR;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
+ }
}
}
}
- }
- /* Only for overlay plane */
- data.op = PLANE_MOVE;
- /* Verify overlay plane move selective fetch */
- igt_describe("Test that selective fetch works on moving overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
+ igt_describe("Test that selective fetch works on moving overlay plane partially "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
- data.pos = k;
+
+ 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_OVERLAY;
+ data.coexist_feature = j;
prepare(&data);
run(&data);
cleanup(&data);
@@ -1210,103 +1323,88 @@ igt_main
}
}
}
- }
-
- data.op = PLANE_MOVE_CONTINUOUS;
- igt_describe("Test that selective fetch works on moving overlay plane (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
+ igt_describe("Test that selective fetch works on moving overlay plane fully "
+ "exceeding visible area (no update)");
+ igt_subtest_with_dynamic_f("%soverlay-%s-sf", 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_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
- igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
- 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_OVERLAY;
- data.coexist_feature = j;
- 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_OVERLAY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
}
}
}
- }
- data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
- igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
- igt_subtest_with_dynamic_f("overlay-%s-sf", 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))
+ /* Verify primary plane selective fetch with overplay plane blended */
+ data.op = OVERLAY_PRIM_UPDATE;
+ igt_describe("Test that selective fetch works on primary plane "
+ "with blended overlay plane");
+ igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", 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_OVERLAY;
- data.coexist_feature = j;
- 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];
+ for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+ data.damage_area_count = k;
+ data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+ data.coexist_feature = j;
+ prepare(&data);
+ run(&data);
+ cleanup(&data);
+ }
+ }
}
}
}
- }
- /* Verify primary plane selective fetch with overplay plane blended */
- data.op = OVERLAY_PRIM_UPDATE;
- igt_describe("Test that selective fetch works on primary plane "
- "with blended overlay plane");
- igt_subtest_with_dynamic_f("%s-sf-dmg-area", 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))
+ /*
+ * Verify overlay plane selective fetch using NV12 primary
+ * 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)) {
+ 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];
- for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
- data.damage_area_count = k;
- data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+
+ 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.damage_area_count = 1;
+ data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
data.coexist_feature = j;
prepare(&data);
run(&data);
@@ -1317,37 +1415,6 @@ igt_main
}
}
- /*
- * Verify overlay plane selective fetch using NV12 primary
- * 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("overlay-%s-sf", 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))
- 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.damage_area_count = 1;
- data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
- data.coexist_feature = j;
- prepare(&data);
- run(&data);
- cleanup(&data);
- }
- }
- }
- }
-
igt_fixture {
close(data.debugfs_fd);
display_fini(&data);
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread