* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests
@ 2023-11-27 5:55 Jeevan B
2023-11-27 5:55 ` [igt-dev] [PATCH i-g-t 1/2] tests/intel/kms_psr: " Jeevan B
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Jeevan B @ 2023-11-27 5:55 UTC (permalink / raw)
To: igt-dev
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Jeevan B (2):
tests/intel/kms_psr: Add FBC support to PSR/PSR2 tests
tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests
lib/igt_psr.h | 5 +
tests/intel/kms_psr.c | 238 +++++++++-------
tests/intel/kms_psr2_sf.c | 567 ++++++++++++++++++++------------------
3 files changed, 435 insertions(+), 375 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 14+ messages in thread* [igt-dev] [PATCH i-g-t 1/2] tests/intel/kms_psr: Add FBC support to PSR/PSR2 tests 2023-11-27 5:55 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-27 5:55 ` Jeevan B 2023-11-27 13:47 ` Kamil Konieczny 2023-11-27 5:55 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B ` (2 subsequent siblings) 3 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-27 5:55 UTC (permalink / raw) To: igt-dev For intel_display_ver 20, FBC can be enabled along with PSR/PSR2, thereby adding FBC checks to validate this scenario. Signed-off-by: Jeevan B <jeevan.b@intel.com> --- lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 238 ++++++++++++++++++++++++------------------ 2 files changed, 139 insertions(+), 104 deletions(-) diff --git a/lib/igt_psr.h b/lib/igt_psr.h index a30330e6c..fee9df6b3 100644 --- a/lib/igt_psr.h +++ b/lib/igt_psr.h @@ -40,6 +40,11 @@ enum psr_mode { PSR_DISABLED, }; +enum fbc_mode { + FBC_ENABLED, + FBC_DISABLED, +}; + 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 afd74eaff..2e748f7fe 100644 --- a/tests/intel/kms_psr.c +++ b/tests/intel/kms_psr.c @@ -31,6 +31,7 @@ #include "igt.h" #include "igt_sysfs.h" #include "igt_psr.h" +#include "i915/intel_fbc.h" #include <errno.h> #include <stdbool.h> #include <stdio.h> @@ -366,6 +367,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; @@ -376,6 +378,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) @@ -782,6 +785,11 @@ static void test_setup(data_t *data) igt_require_f(data->output, "No available output found\n"); + if (data->fbc_flag) + igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd, + pipe), + "FBC still disabled"); + pipe = get_pipe_for_output(&data->display, data->output); igt_output_set_pipe(data->output, pipe); igt_require_f(intel_pipe_output_combo_valid(&data->display), @@ -819,14 +827,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 { @@ -837,52 +851,41 @@ 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"); - } - - 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); - } - } + 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; } - 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); + } + + for (y = 0; y < ARRAY_SIZE(fbc_status); y++) { + data.op_fbc_mode = fbc_status[y]; + if (data.op_fbc_mode == FBC_DISABLED) + data.fbc_flag = false; + 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("%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)) @@ -890,24 +893,90 @@ 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 = 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)); + 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); + } + } + } + } + + 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)) @@ -915,22 +984,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)) @@ -938,56 +1006,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] 14+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] tests/intel/kms_psr: Add FBC support to PSR/PSR2 tests 2023-11-27 5:55 ` [igt-dev] [PATCH i-g-t 1/2] tests/intel/kms_psr: " Jeevan B @ 2023-11-27 13:47 ` Kamil Konieczny 0 siblings, 0 replies; 14+ messages in thread From: Kamil Konieczny @ 2023-11-27 13:47 UTC (permalink / raw) To: igt-dev Hi Jeevan, On 2023-11-27 at 11:25:25 +0530, Jeevan B wrote: > For intel_display_ver 20, FBC can be enabled along with PSR/PSR2, ----------------------- ^ Could you write here (maybe in braces) platfrom name? Or maybe other way around, something like: For LunarLake (intel_display_ver 20) FBC can be enabled ... rest of description > thereby adding FBC checks to validate this scenario. > > Signed-off-by: Jeevan B <jeevan.b@intel.com> > --- > lib/igt_psr.h | 5 + > tests/intel/kms_psr.c | 238 ++++++++++++++++++++++++------------------ > 2 files changed, 139 insertions(+), 104 deletions(-) > > diff --git a/lib/igt_psr.h b/lib/igt_psr.h > index a30330e6c..fee9df6b3 100644 > --- a/lib/igt_psr.h > +++ b/lib/igt_psr.h > @@ -40,6 +40,11 @@ enum psr_mode { > PSR_DISABLED, > }; > > +enum fbc_mode { > + FBC_ENABLED, > + FBC_DISABLED, > +}; > + > 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 afd74eaff..2e748f7fe 100644 > --- a/tests/intel/kms_psr.c > +++ b/tests/intel/kms_psr.c > @@ -31,6 +31,7 @@ > #include "igt.h" > #include "igt_sysfs.h" > #include "igt_psr.h" > +#include "i915/intel_fbc.h" > #include <errno.h> > #include <stdbool.h> > #include <stdio.h> > @@ -366,6 +367,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; > @@ -376,6 +378,7 @@ typedef struct { > int mod_stride; > drmModeModeInfo *mode; > igt_output_t *output; > + bool fbc_flag; > } data_t; You are missing documentation for new tests, see GitLab warning: build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52046443): Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr_suspend After recent changes such documentation should be at beginning of test. > > static void create_cursor_fb(data_t *data) > @@ -782,6 +785,11 @@ static void test_setup(data_t *data) > igt_require_f(data->output, > "No available output found\n"); > > + if (data->fbc_flag) > + igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd, > + pipe), > + "FBC still disabled"); > + > pipe = get_pipe_for_output(&data->display, data->output); > igt_output_set_pipe(data->output, pipe); > igt_require_f(intel_pipe_output_combo_valid(&data->display), > @@ -819,14 +827,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_" ----------- ^ Looks like this is breaking convetion for (sub)tests name: very-long-subtest-name, now it is very_long_subtest_name. Was it intended? +cc Swati, Bhanu and Juha-Pekka. Regards, Kamil > + }; > int modes[] = {PSR_MODE_1, PSR_MODE_2, PR_MODE}; > + int fbc_status[] = {FBC_DISABLED, FBC_ENABLED}; > igt_output_t *output; > > igt_fixture { > @@ -837,52 +851,41 @@ 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"); > - } > - > - 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); > - } > - } > + 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; > } > > - 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); > + } > + > + for (y = 0; y < ARRAY_SIZE(fbc_status); y++) { > + data.op_fbc_mode = fbc_status[y]; > + if (data.op_fbc_mode == FBC_DISABLED) > + data.fbc_flag = false; > + 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("%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)) > @@ -890,24 +893,90 @@ 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 = 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)); > + 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); > + } > + } > + } > + } > + > + 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)) > @@ -915,22 +984,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)) > @@ -938,56 +1006,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 [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-27 5:55 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-27 5:55 ` [igt-dev] [PATCH i-g-t 1/2] tests/intel/kms_psr: " Jeevan B @ 2023-11-27 5:55 ` Jeevan B 2023-11-27 7:31 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Add FBC support to PSR/PSR2 tests (rev5) Patchwork 2023-11-27 7:35 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork 3 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-27 5:55 UTC (permalink / raw) To: igt-dev For 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> --- tests/intel/kms_psr2_sf.c | 567 ++++++++++++++++++++------------------ 1 file changed, 296 insertions(+), 271 deletions(-) diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c index a597c8701..d935b0097 100644 --- a/tests/intel/kms_psr2_sf.c +++ b/tests/intel/kms_psr2_sf.c @@ -26,6 +26,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> @@ -157,9 +158,11 @@ typedef struct { struct drm_mode_rect cursor_clip; enum operations op; enum plane_move_postion pos; + enum fbc_mode op_fbc_mode; 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; @@ -865,6 +868,11 @@ static void run(data_t *data) igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL)); + if (data->fbc_flag) + igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd, + data->pipe), + "FBC still disabled"); + data->screen_changes = 0; switch (data->op) { @@ -967,10 +975,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; @@ -986,6 +999,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), @@ -1020,54 +1038,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++) { - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + data.op_fbc_mode = fbc_status[y]; + if (data.op_fbc_mode == FBC_DISABLED) + data.fbc_flag = false; + + /* 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; - 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; + /* Verify primary plane selective fetch with big fb */ + data.big_fb_test = 1; + igt_describe("Test that selective fetch works on primary plane with big fb"); + igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb", append_fbc_subtest[y], op_str(data.op)) { + for (i = 0; i < n_pipes; i++) { + if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i])) + continue; - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + 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); + } + } + } + } + } + + 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; - 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_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; + + 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); @@ -1075,28 +1155,24 @@ 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); @@ -1104,130 +1180,129 @@ 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); @@ -1235,103 +1310,84 @@ 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); @@ -1342,37 +1398,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] 14+ messages in thread
* [igt-dev] ✗ Fi.CI.BUILD: failure for Add FBC support to PSR/PSR2 tests (rev5) 2023-11-27 5:55 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-27 5:55 ` [igt-dev] [PATCH i-g-t 1/2] tests/intel/kms_psr: " Jeevan B 2023-11-27 5:55 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B @ 2023-11-27 7:31 ` Patchwork 2023-11-27 7:35 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork 3 siblings, 0 replies; 14+ messages in thread From: Patchwork @ 2023-11-27 7:31 UTC (permalink / raw) To: Jeevan B; +Cc: igt-dev == Series Details == Series: Add FBC support to PSR/PSR2 tests (rev5) URL : https://patchwork.freedesktop.org/series/126689/ State : failure == Summary == IGT patchset build failed on latest successful build d2af13d9f5be5ce23d996e4afd3e45990f5ab977 tests/intel/kms_pm_lpsp: Use lib helper to iterate connector modes Tail of build.log: Warning: Missing documentation for igt@kms_psr@fbc_pr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_pr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_pr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_pr_suspend Warning: Missing documentation for igt@kms_psr@fbc_psr2_basic Warning: Missing documentation for igt@kms_psr@fbc_psr2_cursor_blt Warning: Missing documentation for igt@kms_psr@fbc_psr2_cursor_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr2_cursor_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr2_cursor_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr2_cursor_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr2_cursor_render Warning: Missing documentation for igt@kms_psr@fbc_psr2_dpms Warning: Missing documentation for igt@kms_psr@fbc_psr2_no_drrs Warning: Missing documentation for igt@kms_psr@fbc_psr2_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr2_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr2_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr2_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr2_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr2_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr2_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr2_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr2_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr2_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr2_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr2_suspend Warning: Missing documentation for igt@kms_psr@fbc_psr_basic Warning: Missing documentation for igt@kms_psr@fbc_psr_cursor_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_cursor_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_cursor_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_cursor_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_cursor_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_cursor_render Warning: Missing documentation for igt@kms_psr@fbc_psr_dpms Warning: Missing documentation for igt@kms_psr@fbc_psr_no_drrs Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr_suspend Please refer: docs/test_documentation.md for more details [1654/1657] Generating xe_tests.html with a custom command. [1655/1657] Generating i915_tests.html with a custom command. ninja: build stopped: subcommand failed. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] ✗ GitLab.Pipeline: warning for Add FBC support to PSR/PSR2 tests (rev5) 2023-11-27 5:55 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B ` (2 preceding siblings ...) 2023-11-27 7:31 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Add FBC support to PSR/PSR2 tests (rev5) Patchwork @ 2023-11-27 7:35 ` Patchwork 3 siblings, 0 replies; 14+ messages in thread From: Patchwork @ 2023-11-27 7:35 UTC (permalink / raw) To: Jeevan B; +Cc: igt-dev == Series Details == Series: Add FBC support to PSR/PSR2 tests (rev5) URL : https://patchwork.freedesktop.org/series/126689/ State : warning == Summary == Pipeline status: FAILED. see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1043227 for the overview. build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52046443): Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr_suspend Please refer: docs/test_documentation.md for more details ninja: build stopped: subcommand failed. section_end:1701070361:step_script section_start:1701070361:cleanup_file_variables Cleaning up project directory and file based variables section_end:1701070362:cleanup_file_variables ERROR: Job failed: exit code 1 build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52046447): Checking if the user of the pipeline is allowed... Checking if the job's project is part of a well-known group... Thank you for contributing to freedesktop.org Fetching changes... Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/ Checking out 4d9b1b43 as detached HEAD (ref is intel/IGTPW_10271)... Removing build/ Removing lib/i915/perf-configs/__pycache__/ Removing scripts/__pycache__/ Skipping Git submodules setup section_end:1701070325:get_sources section_start:1701070325:step_script Executing "step_script" stage of the job script Using docker image sha256:cc55efdc667be826910d414a562c76ce1130a9c15255a0dd115431bc42f83448 for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-mips:commit-4d9b1b43929e1cd15e8be9cb6f27bada2d9a52ea with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-mips@sha256:c829c44880da4782b7a72626c259ac6904b4bd5f08601e66b3be889ca1c0cf79 ... section_end:1701070327:step_script section_start:1701070327:cleanup_file_variables Cleaning up project directory and file based variables section_end:1701070328:cleanup_file_variables ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:cc55efdc667be826910d414a562c76ce1130a9c15255a0dd115431bc42f83448: image not known (docker.go:570:0s) build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52046438): Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr_suspend Please refer: docs/test_documentation.md for more details ninja: build stopped: subcommand failed. section_end:1701070360:step_script section_start:1701070360:cleanup_file_variables Cleaning up project directory and file based variables section_end:1701070360:cleanup_file_variables ERROR: Job failed: exit code 1 build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52046442): Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr_suspend Please refer: docs/test_documentation.md for more details ninja: build stopped: subcommand failed. section_end:1701070409:step_script section_start:1701070409:cleanup_file_variables Cleaning up project directory and file based variables section_end:1701070410:cleanup_file_variables ERROR: Job failed: exit code 1 build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52046441): Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr_suspend Please refer: docs/test_documentation.md for more details ninja: build stopped: subcommand failed. section_end:1701070359:step_script section_start:1701070359:cleanup_file_variables Cleaning up project directory and file based variables section_end:1701070360:cleanup_file_variables ERROR: Job failed: exit code 1 build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52046439): Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr_suspend Please refer: docs/test_documentation.md for more details ninja: build stopped: subcommand failed. section_end:1701070391:step_script section_start:1701070391:cleanup_file_variables Cleaning up project directory and file based variables section_end:1701070391:cleanup_file_variables ERROR: Job failed: exit code 1 build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52046440): Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_page_flip Warning: Missing documentation for igt@kms_psr@fbc_psr_primary_render Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_blt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_cpu Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_mmap_gtt Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_move Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_plane_onoff Warning: Missing documentation for igt@kms_psr@fbc_psr_sprite_render Warning: Missing documentation for igt@kms_psr@fbc_psr_suspend Please refer: docs/test_documentation.md for more details ninja: build stopped: subcommand failed. section_end:1701070359:step_script section_start:1701070359:cleanup_file_variables Cleaning up project directory and file based variables section_end:1701070359:cleanup_file_variables ERROR: Job failed: exit code 1 == Logs == For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1043227 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests @ 2023-11-30 9:45 Jeevan B 2023-11-30 9:45 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 0 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-30 9:45 UTC (permalink / raw) To: igt-dev Signed-off-by: Jeevan B <jeevan.b@intel.com> Jeevan B (2): tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 459 +++++++++++++++++++---------- tests/intel/kms_psr2_sf.c | 606 +++++++++++++++++++++----------------- 3 files changed, 650 insertions(+), 420 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-30 9:45 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-30 9:45 ` Jeevan B 0 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-30 9:45 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> --- 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] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests @ 2023-11-30 7:23 Jeevan B 2023-11-30 7:23 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 0 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-30 7:23 UTC (permalink / raw) To: igt-dev Signed-off-by: Jeevan B <jeevan.b@intel.com> Jeevan B (2): tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 459 +++++++++++++++++++---------- tests/intel/kms_psr2_sf.c | 606 +++++++++++++++++++++----------------- 3 files changed, 650 insertions(+), 420 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-30 7:23 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-30 7:23 ` Jeevan B 0 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-30 7:23 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> --- 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] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests @ 2023-11-29 14:46 Jeevan B 2023-11-29 14:46 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 0 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-29 14:46 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi From: Kunal Joshi <kunal1.joshi@intel.com> Signed-off-by: Jeevan B <jeevan.b@intel.com> Jeevan B (2): tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 464 +++++++++++++++++++---------- tests/intel/kms_psr2_sf.c | 607 +++++++++++++++++++++----------------- 3 files changed, 652 insertions(+), 424 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-29 14:46 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-29 14:46 ` Jeevan B 0 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-29 14:46 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> --- tests/intel/kms_psr2_sf.c | 607 +++++++++++++++++++++----------------- 1 file changed, 336 insertions(+), 271 deletions(-) diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c index 27faa93d9..f7c7536b8 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 + * 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-dmg-area + * 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" @@ -132,9 +159,11 @@ typedef struct { struct drm_mode_rect cursor_clip; enum operations op; enum plane_move_postion pos; + enum fbc_mode op_fbc_mode; 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,117 @@ 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]; - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + /* 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; - 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; + /* Verify primary plane selective fetch with big fb */ + data.big_fb_test = 1; + igt_describe("Test that selective fetch works on primary plane with big fb"); + igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb", append_fbc_subtest[y], + op_str(data.op)) { + for (i = 0; i < n_pipes; i++) { + if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i])) + continue; - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + 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); + } + } + } + } + } + + 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; - 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_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; + + 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 +1157,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 +1183,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 +1321,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 +1413,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] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests @ 2023-11-29 5:35 Jeevan B 2023-11-29 5:36 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 0 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-29 5:35 UTC (permalink / raw) To: igt-dev Signed-off-by: Jeevan B <jeevan.b@intel.com> Jeevan B (2): tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 468 +++++++++++++++++++---------- tests/intel/kms_psr2_sf.c | 609 +++++++++++++++++++++----------------- 3 files changed, 657 insertions(+), 425 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-29 5:35 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-29 5:36 ` Jeevan B 0 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-29 5:36 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> --- 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..c4393a6ba 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 + * 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-dmg-area + * 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" @@ -132,9 +159,11 @@ typedef struct { struct drm_mode_rect cursor_clip; enum operations op; enum plane_move_postion pos; + enum fbc_mode op_fbc_mode; 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) + 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,119 @@ 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]; + if (data.op_fbc_mode == FBC_DISABLED) + data.fbc_flag = false; + + /* 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] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests @ 2023-11-28 17:40 Jeevan B 2023-11-28 17:40 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 0 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-28 17:40 UTC (permalink / raw) To: igt-dev Signed-off-by: Jeevan B <jeevan.b@intel.com> Jeevan B (2): tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 446 +++++++++++++++++++--------- tests/intel/kms_psr2_sf.c | 609 +++++++++++++++++++++----------------- 3 files changed, 646 insertions(+), 414 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-28 17:40 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-28 17:40 ` Jeevan B 0 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-28 17:40 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> --- 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..936edbf5c 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-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 + * 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-sf-dmg-area + * 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-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-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" @@ -132,9 +159,11 @@ typedef struct { struct drm_mode_rect cursor_clip; enum operations op; enum plane_move_postion pos; + enum fbc_mode op_fbc_mode; 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) + 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,119 @@ 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]; + if (data.op_fbc_mode == FBC_DISABLED) + data.fbc_flag = false; + + /* 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] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests @ 2023-11-28 11:37 Jeevan B 2023-11-28 11:37 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 0 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-28 11:37 UTC (permalink / raw) To: igt-dev Signed-off-by: Jeevan B <jeevan.b@intel.com> Jeevan B (2): tests/intel/kms_psr: Add FBC support to PSR/PSR2/PR tests tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 488 ++++++++++++++++++++--------- tests/intel/kms_psr2_sf.c | 625 +++++++++++++++++++++----------------- 3 files changed, 711 insertions(+), 407 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-28 11:37 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-28 11:37 ` Jeevan B 0 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-28 11:37 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> --- tests/intel/kms_psr2_sf.c | 625 +++++++++++++++++++++----------------- 1 file changed, 354 insertions(+), 271 deletions(-) diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c index a597c8701..64e8b289b 100644 --- a/tests/intel/kms_psr2_sf.c +++ b/tests/intel/kms_psr2_sf.c @@ -26,6 +26,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> @@ -44,6 +45,14 @@ * Mega feature: PSR * Test category: functionality test * + * 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) + * Driver requirement: i915, xe + * Functionality: plane, psr2, selective_fetch, fbc + * Mega feature: PSR, FBC + * Test category: functionality test + * * arg[1]: * * @cursor: Cursor @@ -64,6 +73,13 @@ * Mega feature: PSR * Test category: functionality test * + * SUBTEST: fbc-cursor-plane-update-sf + * Description: Test that fbc with selective fetch works on cursor plane + * Driver requirement: i915, xe + * Functionality: cursor, psr2, selective_fetch, fbc + * Mega feature: PSR, FBC + * Test category: functionality test + * * SUBTEST: overlay-plane-update-continuous-sf * Description: Test that selective fetch works on overlay plane * Driver requirement: i915, xe @@ -71,6 +87,13 @@ * Mega feature: PSR * Test category: functionality test * + * SUBTEST: fbc-overlay-plane-update-continuous-sf + * Description: Test that fbc with selective fetch works on overlay plane + * Driver requirement: i915, xe + * Functionality: plane, psr2, selective_fetch, fbc + * Mega feature: PSR, FBC + * Test category: functionality test + * * SUBTEST: overlay-plane-update-sf-dmg-area * Description: Test that selective fetch works on overlay plane * Driver requirement: i915, xe @@ -78,6 +101,13 @@ * Mega feature: PSR * Test category: functionality test * + * SUBTEST: fbc-overlay-plane-update-sf-dmg-area + * Description: Test that fbc with selective fetch works on overlay plane + * Driver requirement: i915, xe + * Functionality: plane, psr2, selective_fetch, fbc + * Mega feature: PSR, FBC + * Test category: functionality test + * * SUBTEST: overlay-primary-update-sf-dmg-area * Description: Test that selective fetch works on primary plane with blended * overlay plane @@ -86,6 +116,14 @@ * Mega feature: PSR * Test category: functionality test * + * SUBTEST: fbc-overlay-primary-update-sf-dmg-area + * Description: Test that fbc with selective fetch works on primary plane with blended + * overlay plane + * Driver requirement: i915, xe + * Functionality: plane, psr2, selective_fetch, fbc + * Mega feature: PSR, FBC + * Test category: functionality test + * * SUBTEST: plane-move-sf-dmg-area * Description: Test that selective fetch works on moving overlay plane * Driver requirement: i915, xe @@ -93,6 +131,13 @@ * Mega feature: PSR * Test category: functionality test * + * SUBTEST: fbc-plane-move-sf-dmg-area + * Description: Test that fbc with selective fetch works on moving overlay plane + * Driver requirement: i915, xe + * Functionality: plane, psr2, selective_fetch, fbc + * Mega feature: PSR, FBC + * Test category: functionality test + * * SUBTEST: primary-plane-update-sf-dmg-area * Description: Test that selective fetch works on primary plane * Driver requirement: i915, xe @@ -100,12 +145,26 @@ * Mega feature: PSR * Test category: functionality test * + * SUBTEST: fbc-primary-plane-update-sf-dmg-area + * Description: Test that fbc with selective fetch works on primary plane + * Driver requirement: i915, xe + * Functionality: plane, psr2, selective_fetch, fbc + * Mega feature: PSR, FBC + * Test category: functionality test + * * SUBTEST: primary-plane-update-sf-dmg-area-big-fb * Description: Test that selective fetch works on primary plane with big fb * Driver requirement: i915, xe * Functionality: plane, psr2, selective_fetch * Mega feature: PSR * Test category: functionality test + * + * SUBTEST: fbc-primary-plane-update-sf-dmg-area-big-fb + * Description: Test that fbc with selective fetch works on primary plane with big fb + * Driver requirement: i915, xe + * Functionality: plane, psr2, selective_fetch, fbc + * Mega feature: PSR, FBC + * Test category: functionality test */ IGT_TEST_DESCRIPTION("Tests to varify PSR2 selective fetch by sending multiple" @@ -157,9 +216,11 @@ typedef struct { struct drm_mode_rect cursor_clip; enum operations op; enum plane_move_postion pos; + enum fbc_mode op_fbc_mode; 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; @@ -865,6 +926,11 @@ static void run(data_t *data) igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL)); + if (data->fbc_flag) + igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd, + data->pipe), + "FBC still disabled"); + data->screen_changes = 0; switch (data->op) { @@ -967,10 +1033,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; @@ -986,6 +1057,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), @@ -1020,54 +1096,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]; + if (data.op_fbc_mode == FBC_DISABLED) + data.fbc_flag = false; - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + /* 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; - 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("%sprimary-%s-sf-dmg-area-big-fb", append_fbc_subtest[y], op_str(data.op)) { + for (i = 0; i < n_pipes; i++) { + if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i])) + continue; + + for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { + if (j != FEATURE_NONE && !(coexist_features[i] & j)) + 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); @@ -1075,28 +1213,24 @@ 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); @@ -1104,130 +1238,129 @@ 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); @@ -1235,103 +1368,84 @@ 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); @@ -1342,37 +1456,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] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests @ 2023-11-24 16:04 Jeevan B 2023-11-24 16:04 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 0 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-24 16:04 UTC (permalink / raw) To: igt-dev Signed-off-by: Jeevan B <jeevan.b@intel.com> Jeevan B (2): tests/intel/kms_psr: Add FBC support to PSR/PSR2 tests tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 240 +++++++++------- tests/intel/kms_psr2_sf.c | 567 ++++++++++++++++++++------------------ 3 files changed, 438 insertions(+), 374 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-24 16:04 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-24 16:04 ` Jeevan B 0 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-24 16:04 UTC (permalink / raw) To: igt-dev For 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> --- tests/intel/kms_psr.c | 4 +- tests/intel/kms_psr2_sf.c | 567 ++++++++++++++++++++------------------ 2 files changed, 298 insertions(+), 273 deletions(-) diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c index c1d987415..95cb9164f 100644 --- a/tests/intel/kms_psr.c +++ b/tests/intel/kms_psr.c @@ -840,7 +840,7 @@ igt_main "fbc_" }; int modes[] = {PSR_MODE_1, PSR_MODE_2, PR_MODE}; - int fbc_status[] = {FBC_ENABLED, FBC_DISABLED}; + int fbc_status[] = {FBC_DISABLED, FBC_ENABLED}; igt_output_t *output; igt_fixture { @@ -860,7 +860,7 @@ igt_main for (y = 0; y < ARRAY_SIZE(fbc_status); y++) { data.op_fbc_mode = fbc_status[y]; - if (data.op_fbc_mode == FBC_ENABLED) + if (data.op_fbc_mode == FBC_DISABLED) data.fbc_flag = false; for (z = 0; z < ARRAY_SIZE(modes); z++) { diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c index a597c8701..d935b0097 100644 --- a/tests/intel/kms_psr2_sf.c +++ b/tests/intel/kms_psr2_sf.c @@ -26,6 +26,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> @@ -157,9 +158,11 @@ typedef struct { struct drm_mode_rect cursor_clip; enum operations op; enum plane_move_postion pos; + enum fbc_mode op_fbc_mode; 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; @@ -865,6 +868,11 @@ static void run(data_t *data) igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL)); + if (data->fbc_flag) + igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd, + data->pipe), + "FBC still disabled"); + data->screen_changes = 0; switch (data->op) { @@ -967,10 +975,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; @@ -986,6 +999,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), @@ -1020,54 +1038,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++) { - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + data.op_fbc_mode = fbc_status[y]; + if (data.op_fbc_mode == FBC_DISABLED) + data.fbc_flag = false; + + /* 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; - 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; + /* Verify primary plane selective fetch with big fb */ + data.big_fb_test = 1; + igt_describe("Test that selective fetch works on primary plane with big fb"); + igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb", append_fbc_subtest[y], op_str(data.op)) { + for (i = 0; i < n_pipes; i++) { + if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i])) + continue; - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + 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); + } + } + } + } + } + + 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; - 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_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; + + 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); @@ -1075,28 +1155,24 @@ 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); @@ -1104,130 +1180,129 @@ 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); @@ -1235,103 +1310,84 @@ 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); @@ -1342,37 +1398,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] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests @ 2023-11-24 16:00 Jeevan B 2023-11-24 16:00 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 0 siblings, 1 reply; 14+ messages in thread From: Jeevan B @ 2023-11-24 16:00 UTC (permalink / raw) To: igt-dev Add FBC support to PSR/PSR2 tests Jeevan B (2): tests/intel/kms_psr: Add FBC support to PSR/PSR2 tests tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests lib/igt_psr.h | 5 + tests/intel/kms_psr.c | 240 +++++++++------- tests/intel/kms_psr2_sf.c | 567 ++++++++++++++++++++------------------ 3 files changed, 438 insertions(+), 374 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests 2023-11-24 16:00 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B @ 2023-11-24 16:00 ` Jeevan B 0 siblings, 0 replies; 14+ messages in thread From: Jeevan B @ 2023-11-24 16:00 UTC (permalink / raw) To: igt-dev For 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> --- tests/intel/kms_psr2_sf.c | 567 ++++++++++++++++++++------------------ 1 file changed, 296 insertions(+), 271 deletions(-) diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c index a597c8701..d935b0097 100644 --- a/tests/intel/kms_psr2_sf.c +++ b/tests/intel/kms_psr2_sf.c @@ -26,6 +26,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> @@ -157,9 +158,11 @@ typedef struct { struct drm_mode_rect cursor_clip; enum operations op; enum plane_move_postion pos; + enum fbc_mode op_fbc_mode; 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; @@ -865,6 +868,11 @@ static void run(data_t *data) igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2, NULL)); + if (data->fbc_flag) + igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd, + data->pipe), + "FBC still disabled"); + data->screen_changes = 0; switch (data->op) { @@ -967,10 +975,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; @@ -986,6 +999,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), @@ -1020,54 +1038,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++) { - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + data.op_fbc_mode = fbc_status[y]; + if (data.op_fbc_mode == FBC_DISABLED) + data.fbc_flag = false; + + /* 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; - 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; + /* Verify primary plane selective fetch with big fb */ + data.big_fb_test = 1; + igt_describe("Test that selective fetch works on primary plane with big fb"); + igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb", append_fbc_subtest[y], op_str(data.op)) { + for (i = 0; i < n_pipes; i++) { + if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i])) + continue; - for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) { - if (j != FEATURE_NONE && !(coexist_features[i] & j)) + 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); + } + } + } + } + } + + 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; - 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_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; + + 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); @@ -1075,28 +1155,24 @@ 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); @@ -1104,130 +1180,129 @@ 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); @@ -1235,103 +1310,84 @@ 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); @@ -1342,37 +1398,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] 14+ messages in thread
end of thread, other threads:[~2023-11-30 9:38 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-11-27 5:55 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-27 5:55 ` [igt-dev] [PATCH i-g-t 1/2] tests/intel/kms_psr: " Jeevan B 2023-11-27 13:47 ` Kamil Konieczny 2023-11-27 5:55 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 2023-11-27 7:31 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Add FBC support to PSR/PSR2 tests (rev5) Patchwork 2023-11-27 7:35 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2023-11-30 9:45 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-30 9:45 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 2023-11-30 7:23 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-30 7:23 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 2023-11-29 14:46 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-29 14:46 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 2023-11-29 5:35 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-29 5:36 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 2023-11-28 17:40 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-28 17:40 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 2023-11-28 11:37 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-28 11:37 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 2023-11-24 16:04 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-24 16:04 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B 2023-11-24 16:00 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B 2023-11-24 16:00 ` [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox