Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "Joshi, Kunal1" <kunal1.joshi@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: "Murthy, Arun R" <arun.r.murthy@intel.com>,
	"Manna, Animesh" <animesh.manna@intel.com>
Subject: Re: [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: extend tests for panel replay sf
Date: Mon, 5 Feb 2024 12:28:09 +0000	[thread overview]
Message-ID: <77658e89ad9e71e6fa39a0771604b9d277d5f7cc.camel@intel.com> (raw)
In-Reply-To: <20240122074914.1161997-3-kunal1.joshi@intel.com>

On Mon, 2024-01-22 at 13:19 +0530, Kunal Joshi wrote:
> v2: fixed dynamic test name

I think you should modify check_psr2_support to take into account
outputs supporting PR.

BR,

Jouni Högander

> 
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Cc: Animesh Manna <animesh.manna@intel.com>
> Cc: Arun R Murthy <arun.r.murthy@intel.com>
> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
> ---
>  tests/intel/kms_psr2_sf.c | 119 ++++++++++++++++++++++--------------
> --
>  1 file changed, 69 insertions(+), 50 deletions(-)
> 
> diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
> index c826cd7c3..29a187fc4 100644
> --- a/tests/intel/kms_psr2_sf.c
> +++ b/tests/intel/kms_psr2_sf.c
> @@ -979,6 +979,21 @@ pipe_output_combo_valid(igt_display_t *display,
>         return ret;
>  }
>  
> +static const char *get_psr_mode_for_output(data_t *data,
> igt_output_t *output)
> +{
> +       const char *psr_mode = NULL;
> +
> +       if (psr_sink_support(data->drm_fd, data->debugfs_fd,
> PR_MODE_SEL_FETCH,
> +                            output))
> +               psr_mode = "pr-";
> +       else if (psr_sink_support(data->drm_fd, data->debugfs_fd,
> PSR_MODE_2,
> +                                 output))
> +               psr_mode = "psr2-";
> +       else
> +               igt_assert_f(false, "PR/PSR2 selective fetch not
> supported\n");
> +       return psr_mode;
> +}
> +
>  igt_main
>  {
>         data_t data = {};
> @@ -1001,11 +1016,6 @@ igt_main
>                 data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
>                 kmstest_set_vt_graphics_mode();
>  
> -               igt_require_f(psr_sink_support(data.drm_fd,
> -                                              data.debugfs_fd,
> PSR_MODE_2,
> -                                              NULL),
> -                             "Sink does not support PSR2\n");
> -
>                 display_init(&data);
>  
>                 if
> ((intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 20) &&
> @@ -1013,10 +1023,6 @@ igt_main
>                         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),
> -                             "Error enabling PSR2\n");
>  
>                 data.damage_area_count = MAX_DAMAGE_AREAS;
>                 data.primary_format = DRM_FORMAT_XRGB8888;
> @@ -1055,7 +1061,7 @@ igt_main
>                 /* 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)) {
> +                                                                 
> op_str(data.op)) {
>                         for (i = 0; i < n_pipes; i++) {
>                                 if
> (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
>                                         continue;
> @@ -1063,9 +1069,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1096,10 +1103,11 @@ igt_main
>                                         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)) {
> +                                               igt_dynamic_f("%spipe
> -%s-%s%s",
> +                                                                    
>      get_psr_mode_for_output(&data, outputs[i]),
> +                                                                    
>      kmstest_pipe_name(pipes[i]),
> +                                                                    
>      igt_output_name(outputs[i]),
> +                                                                    
>      coexist_feature_str(j)) {
>                                                         data.pipe =
> pipes[i];
>                                                         data.output =
> outputs[i];
>                                                         data.test_pla
> ne_id = DRM_PLANE_TYPE_PRIMARY;
> @@ -1128,9 +1136,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1158,9 +1167,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1184,9 +1194,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1211,9 +1222,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1238,9 +1250,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1266,9 +1279,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1295,9 +1309,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1322,9 +1337,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1349,9 +1365,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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;
> @@ -1377,9 +1394,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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++) {
> @@ -1410,9 +1428,10 @@ igt_main
>                                 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)) {
> +                                       igt_dynamic_f("%spipe-%s-
> %s%s", get_psr_mode_for_output(&data, outputs[i]),
> +                                                                
> 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_coun
> t = 1;


  reply	other threads:[~2024-02-05 12:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22  7:49 [PATCH i-g-t 0/2] extend psr2_sf test for pr_sf Kunal Joshi
2024-01-22  7:49 ` [PATCH i-g-t 1/2] lib/igt_psr.c: add support for panel replay sf Kunal Joshi
2024-02-05 12:00   ` Hogander, Jouni
2024-02-07 13:49     ` Joshi, Kunal1
2024-01-22  7:49 ` [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: extend tests " Kunal Joshi
2024-02-05 12:28   ` Hogander, Jouni [this message]
2024-01-22  8:39 ` ✓ CI.xeBAT: success for extend psr2_sf test for pr_sf (rev2) Patchwork
2024-01-22  8:50 ` ✓ Fi.CI.BAT: " Patchwork
2024-01-22 10:36 ` ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-02-08 14:54 [PATCH i-g-t 0/2] extend psr2_sf test for pr_sf Kunal Joshi
2024-02-08 14:54 ` [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: extend tests for panel replay sf Kunal Joshi
2024-02-16  8:25   ` Hogander, Jouni
2024-02-19  5:25     ` Joshi, Kunal1
2024-01-21 12:57 [PATCH i-g-t 0/2] extend psr2_sf test for pr_sf Kunal Joshi
2024-01-21 12:57 ` [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: extend tests for panel replay sf Kunal Joshi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77658e89ad9e71e6fa39a0771604b9d277d5f7cc.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=animesh.manna@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kunal1.joshi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox