* [igt-dev] [PATCH i-g-t] tests/i915/kms_psr2_su: Cleanup
@ 2022-11-11 16:24 Jeevan B
2022-11-11 19:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2022-11-14 9:00 ` [igt-dev] [PATCH i-g-t] " Hogander, Jouni
0 siblings, 2 replies; 3+ messages in thread
From: Jeevan B @ 2022-11-11 16:24 UTC (permalink / raw)
To: igt-dev
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Sanitize the system state before starting the subtest.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/i915/kms_psr2_su.c | 112 +++++++++++++++------------------------
1 file changed, 44 insertions(+), 68 deletions(-)
diff --git a/tests/i915/kms_psr2_su.c b/tests/i915/kms_psr2_su.c
index 84dc30c3..785dff30 100644
--- a/tests/i915/kms_psr2_su.c
+++ b/tests/i915/kms_psr2_su.c
@@ -92,41 +92,20 @@ typedef struct {
uint32_t screen_changes;
} data_t;
-static void setup_output(data_t *data)
-{
- igt_display_t *display = &data->display;
- igt_output_t *output;
- enum pipe pipe;
-
- for_each_pipe_with_valid_output(display, pipe, output) {
- drmModeConnectorPtr c = output->config.connector;
-
- if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
- continue;
-
- igt_output_set_pipe(output, pipe);
- data->output = output;
- data->mode = igt_output_get_mode(output);
-
- return;
- }
-}
-
-static void display_init(data_t *data)
-{
- igt_display_require(&data->display, data->drm_fd);
- setup_output(data);
-}
-
static void display_fini(data_t *data)
{
igt_display_fini(&data->display);
}
-static void prepare(data_t *data, igt_output_t *output)
+static void prepare(data_t *data, enum pipe pipe, igt_output_t *output)
{
igt_plane_t *primary;
+ igt_display_t *display = &data->display;
+
+ igt_display_reset(display);
+ igt_output_set_pipe(output, pipe);
+ data->mode = igt_output_get_mode(output);
/* all green frame */
igt_create_color_fb(data->drm_fd,
data->mode->hdisplay, data->mode->vdisplay,
@@ -243,13 +222,14 @@ static void run(data_t *data, igt_output_t *output)
"No matching selective update blocks read from debugfs\n");
}
-static void cleanup(data_t *data, igt_output_t *output)
+static void cleanup(data_t *data, enum pipe pipe, igt_output_t *output)
{
igt_plane_t *primary;
primary = igt_output_get_plane_type(output,
DRM_PLANE_TYPE_PRIMARY);
igt_plane_set_fb(primary, NULL);
+ igt_output_set_pipe(output, pipe);
igt_display_commit2(&data->display, COMMIT_ATOMIC);
if (data->op == PAGE_FLIP)
@@ -262,18 +242,17 @@ static void cleanup(data_t *data, igt_output_t *output)
static int check_psr2_support(data_t *data, enum pipe pipe)
{
- int status;
+ bool status = false;
- igt_output_t *output;
- igt_display_t *display = &data->display;
+ igt_output_t *output = data->output;
+ drmModeConnectorPtr c = data->output->config.connector;
- igt_display_reset(display);
- output = data->output;
- igt_output_set_pipe(output, pipe);
+ if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
+ return status;
- prepare(data, output);
+ prepare(data, pipe, output);
status = psr_wait_entry(data->debugfs_fd, PSR_MODE_2);
- cleanup(data, output);
+ cleanup(data, pipe, output);
return status;
}
@@ -282,10 +261,7 @@ igt_main
{
data_t data = {};
enum pipe pipe;
- int r, i;
- igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int n_pipes = 0;
+ int r;
igt_fixture {
struct itimerspec interval;
@@ -301,7 +277,8 @@ igt_main
igt_require_f(intel_display_ver(intel_get_drm_devid(data.drm_fd)) < 13,
"Registers used by this test do not work on display 13\n");
- display_init(&data);
+ igt_display_require(&data.display, data.drm_fd);
+ igt_display_require_output(&data.display);
/* Test if PSR2 can be enabled */
igt_require_f(psr_enable(data.drm_fd,
@@ -320,43 +297,42 @@ igt_main
interval.it_interval.tv_sec = interval.it_value.tv_sec;
r = timerfd_settime(data.change_screen_timerfd, 0, &interval, NULL);
igt_require_f(r != -1, "Error setting timerfd\n");
-
- for_each_pipe_with_valid_output(&data.display, pipe, data.output) {
- if (check_psr2_support(&data, pipe)) {
- pipes[n_pipes] = pipe;
- outputs[n_pipes] = data.output;
- n_pipes++;
- }
- }
}
for (data.op = PAGE_FLIP; data.op < LAST; data.op++) {
const uint32_t *format = formats[data.op];
+ igt_fixture {
+ if (data.op == FRONTBUFFER &&
+ intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 12) {
+ /*
+ * FIXME: Display 12+ platforms now have PSR2
+ * selective fetch enabled by default but we
+ * still can't properly handle frontbuffer
+ * rendering, so right it does full frame
+ * fetches at every frontbuffer rendering.
+ * So it is expected that this test will fail
+ * in display 12+ platform for now.
+ */
+ igt_info("PSR2 selective fetch is doing full frame fetches for frontbuffer rendering\n");
+ continue;
+ }
+ }
while (*format != DRM_FORMAT_INVALID) {
data.format = *format++;
igt_describe("Test that selective update works when screen changes");
igt_subtest_with_dynamic_f("%s-%s", op_str(data.op), igt_format_str(data.format)) {
- for (i = 0; i < n_pipes; i++) {
- igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
- igt_output_name(outputs[i])) {
- igt_output_set_pipe(outputs[i], pipes[i]);
- if (data.op == FRONTBUFFER &&
- intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 12) {
- /*
- * FIXME: Display 12+ platforms now have PSR2
- * selective fetch enabled by default but we
- * still can't properly handle frontbuffer
- * rendering, so right it does full frame
- * fetches at every frontbuffer rendering.
- * So it is expected that this test will fail
- * in display 12+ platform for now.
- */
- igt_skip("PSR2 selective fetch is doing full frame fetches for frontbuffer rendering\n");
+ for_each_pipe(&data.display, pipe) {
+ for_each_valid_output_on_pipe(&data.display, pipe, data.output) {
+ if (!check_psr2_support(&data, pipe))
+ continue;
+
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe),
+ igt_output_name(data.output)) {
+ prepare(&data, pipe, data.output);
+ run(&data, data.output);
+ cleanup(&data, pipe, data.output);
}
- prepare(&data, outputs[i]);
- run(&data, outputs[i]);
- cleanup(&data, outputs[i]);
}
}
}
--
2.36.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/kms_psr2_su: Cleanup
2022-11-11 16:24 [igt-dev] [PATCH i-g-t] tests/i915/kms_psr2_su: Cleanup Jeevan B
@ 2022-11-11 19:09 ` Patchwork
2022-11-14 9:00 ` [igt-dev] [PATCH i-g-t] " Hogander, Jouni
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2022-11-11 19:09 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 10966 bytes --]
== Series Details ==
Series: tests/i915/kms_psr2_su: Cleanup
URL : https://patchwork.freedesktop.org/series/110821/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12371 -> IGTPW_8088
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_8088 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_8088, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/index.html
Participating hosts (41 -> 42)
------------------------------
Additional (2): fi-kbl-soraka bat-atsm-1
Missing (1): fi-ctg-p8600
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8088:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@perf:
- fi-kbl-soraka: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-kbl-soraka/igt@i915_selftest@live@perf.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@i915_selftest@live@migrate:
- {bat-atsm-1}: NOTRUN -> [INCOMPLETE][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-atsm-1/igt@i915_selftest@live@migrate.html
* igt@i915_selftest@live@reset:
- {bat-rpls-1}: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/bat-rpls-1/igt@i915_selftest@live@reset.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-rpls-1/igt@i915_selftest@live@reset.html
Known issues
------------
Here are the changes found in IGTPW_8088 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_gttfill@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][5] ([fdo#109271]) +8 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-kbl-soraka/igt@gem_exec_gttfill@basic.html
* igt@gem_exec_suspend@basic-s3@smem:
- fi-rkl-11600: NOTRUN -> [INCOMPLETE][6] ([i915#6179])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-rkl-11600/igt@gem_exec_suspend@basic-s3@smem.html
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#2190])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#4613]) +3 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html
* igt@gem_tiled_blits@basic:
- fi-pnv-d510: [PASS][9] -> [SKIP][10] ([fdo#109271]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/fi-pnv-d510/igt@gem_tiled_blits@basic.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-pnv-d510/igt@gem_tiled_blits@basic.html
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][11] ([i915#1886])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [PASS][12] -> [INCOMPLETE][13] ([i915#4785])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][14] ([fdo#109271] / [fdo#111827]) +7 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-kbl-soraka/igt@kms_chamelium@hdmi-hpd-fast.html
* igt@runner@aborted:
- fi-hsw-4770: NOTRUN -> [FAIL][15] ([fdo#109271] / [i915#4312] / [i915#5594])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-hsw-4770/igt@runner@aborted.html
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s0@smem:
- {bat-rplp-1}: [DMESG-WARN][16] ([i915#2867]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/bat-rplp-1/igt@gem_exec_suspend@basic-s0@smem.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-rplp-1/igt@gem_exec_suspend@basic-s0@smem.html
* igt@i915_module_load@load:
- {bat-dg2-8}: [FAIL][18] ([i915#7328]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/bat-dg2-8/igt@i915_module_load@load.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-dg2-8/igt@i915_module_load@load.html
* igt@i915_pm_rpm@module-reload:
- {bat-rpls-2}: [WARN][20] ([i915#7346]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/bat-rpls-2/igt@i915_pm_rpm@module-reload.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-rpls-2/igt@i915_pm_rpm@module-reload.html
* igt@i915_selftest@live@slpc:
- {bat-rpls-1}: [DMESG-FAIL][22] ([i915#6367]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/bat-rpls-1/igt@i915_selftest@live@slpc.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-rpls-1/igt@i915_selftest@live@slpc.html
* igt@i915_suspend@basic-s3-without-i915:
- {bat-kbl-2}: [INCOMPLETE][24] ([i915#4817]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/bat-kbl-2/igt@i915_suspend@basic-s3-without-i915.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-kbl-2/igt@i915_suspend@basic-s3-without-i915.html
* igt@kms_frontbuffer_tracking@basic:
- {bat-rpls-2}: [SKIP][26] ([i915#1849]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/bat-rpls-2/igt@kms_frontbuffer_tracking@basic.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-rpls-2/igt@kms_frontbuffer_tracking@basic.html
* igt@prime_vgem@basic-fence-flip:
- {bat-rpls-2}: [SKIP][28] ([fdo#109295] / [i915#1845] / [i915#3708]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/bat-rpls-2/igt@prime_vgem@basic-fence-flip.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/bat-rpls-2/igt@prime_vgem@basic-fence-flip.html
#### Warnings ####
* igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600: [INCOMPLETE][30] ([i915#4817]) -> [FAIL][31] ([fdo#103375])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12371/fi-rkl-11600/igt@i915_suspend@basic-s3-without-i915.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/fi-rkl-11600/igt@i915_suspend@basic-s3-without-i915.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4817]: https://gitlab.freedesktop.org/drm/intel/issues/4817
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
[i915#6077]: https://gitlab.freedesktop.org/drm/intel/issues/6077
[i915#6078]: https://gitlab.freedesktop.org/drm/intel/issues/6078
[i915#6093]: https://gitlab.freedesktop.org/drm/intel/issues/6093
[i915#6094]: https://gitlab.freedesktop.org/drm/intel/issues/6094
[i915#6166]: https://gitlab.freedesktop.org/drm/intel/issues/6166
[i915#6179]: https://gitlab.freedesktop.org/drm/intel/issues/6179
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6434]: https://gitlab.freedesktop.org/drm/intel/issues/6434
[i915#6559]: https://gitlab.freedesktop.org/drm/intel/issues/6559
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#7029]: https://gitlab.freedesktop.org/drm/intel/issues/7029
[i915#7328]: https://gitlab.freedesktop.org/drm/intel/issues/7328
[i915#7346]: https://gitlab.freedesktop.org/drm/intel/issues/7346
[i915#7357]: https://gitlab.freedesktop.org/drm/intel/issues/7357
[i915#7358]: https://gitlab.freedesktop.org/drm/intel/issues/7358
[i915#7498]: https://gitlab.freedesktop.org/drm/intel/issues/7498
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7051 -> IGTPW_8088
CI-20190529: 20190529
CI_DRM_12371: 3abfcf048c08ca9c7bbaba0c57c699453fd37a2e @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8088: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/index.html
IGT_7051: 7da9f813cdacb80d4471fc6ddb493bae9c46913d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8088/index.html
[-- Attachment #2: Type: text/html, Size: 10379 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/i915/kms_psr2_su: Cleanup
2022-11-11 16:24 [igt-dev] [PATCH i-g-t] tests/i915/kms_psr2_su: Cleanup Jeevan B
2022-11-11 19:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2022-11-14 9:00 ` Hogander, Jouni
1 sibling, 0 replies; 3+ messages in thread
From: Hogander, Jouni @ 2022-11-14 9:00 UTC (permalink / raw)
To: igt-dev@lists.freedesktop.org, B, Jeevan
On Fri, 2022-11-11 at 21:54 +0530, Jeevan B wrote:
> From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
>
> Sanitize the system state before starting the subtest.
I think this patch is doing much more than what is in your commit
message. Please explain what this patch is actually doing in commit
message. Also if you have some specific reason for that you could
mention that too.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/i915/kms_psr2_su.c | 112 +++++++++++++++----------------------
> --
> 1 file changed, 44 insertions(+), 68 deletions(-)
>
> diff --git a/tests/i915/kms_psr2_su.c b/tests/i915/kms_psr2_su.c
> index 84dc30c3..785dff30 100644
> --- a/tests/i915/kms_psr2_su.c
> +++ b/tests/i915/kms_psr2_su.c
> @@ -92,41 +92,20 @@ typedef struct {
> uint32_t screen_changes;
> } data_t;
>
> -static void setup_output(data_t *data)
> -{
> - igt_display_t *display = &data->display;
> - igt_output_t *output;
> - enum pipe pipe;
> -
> - for_each_pipe_with_valid_output(display, pipe, output) {
> - drmModeConnectorPtr c = output->config.connector;
> -
> - if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
> - continue;
> -
> - igt_output_set_pipe(output, pipe);
> - data->output = output;
> - data->mode = igt_output_get_mode(output);
> -
> - return;
> - }
> -}
> -
> -static void display_init(data_t *data)
> -{
> - igt_display_require(&data->display, data->drm_fd);
> - setup_output(data);
> -}
> -
> static void display_fini(data_t *data)
> {
> igt_display_fini(&data->display);
> }
>
> -static void prepare(data_t *data, igt_output_t *output)
> +static void prepare(data_t *data, enum pipe pipe, igt_output_t
> *output)
> {
> igt_plane_t *primary;
> + igt_display_t *display = &data->display;
> +
> + igt_display_reset(display);
> + igt_output_set_pipe(output, pipe);
>
> + data->mode = igt_output_get_mode(output);
> /* all green frame */
> igt_create_color_fb(data->drm_fd,
> data->mode->hdisplay, data->mode-
> >vdisplay,
> @@ -243,13 +222,14 @@ static void run(data_t *data, igt_output_t
> *output)
> "No matching selective update blocks read from
> debugfs\n");
> }
>
> -static void cleanup(data_t *data, igt_output_t *output)
> +static void cleanup(data_t *data, enum pipe pipe, igt_output_t
> *output)
> {
> igt_plane_t *primary;
>
> primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> igt_plane_set_fb(primary, NULL);
> + igt_output_set_pipe(output, pipe);
> igt_display_commit2(&data->display, COMMIT_ATOMIC);
>
> if (data->op == PAGE_FLIP)
> @@ -262,18 +242,17 @@ static void cleanup(data_t *data, igt_output_t
> *output)
>
> static int check_psr2_support(data_t *data, enum pipe pipe)
> {
> - int status;
> + bool status = false;
>
> - igt_output_t *output;
> - igt_display_t *display = &data->display;
> + igt_output_t *output = data->output;
> + drmModeConnectorPtr c = data->output->config.connector;
>
> - igt_display_reset(display);
> - output = data->output;
> - igt_output_set_pipe(output, pipe);
> + if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
> + return status;
>
> - prepare(data, output);
> + prepare(data, pipe, output);
> status = psr_wait_entry(data->debugfs_fd, PSR_MODE_2);
> - cleanup(data, output);
> + cleanup(data, pipe, output);
>
> return status;
> }
> @@ -282,10 +261,7 @@ igt_main
> {
> data_t data = {};
> enum pipe pipe;
> - int r, i;
> - igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
> - int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
> - int n_pipes = 0;
> + int r;
>
> igt_fixture {
> struct itimerspec interval;
> @@ -301,7 +277,8 @@ igt_main
> igt_require_f(intel_display_ver(intel_get_drm_devid(d
> ata.drm_fd)) < 13,
> "Registers used by this test do not
> work on display 13\n");
>
> - display_init(&data);
> + igt_display_require(&data.display, data.drm_fd);
> + igt_display_require_output(&data.display);
>
> /* Test if PSR2 can be enabled */
> igt_require_f(psr_enable(data.drm_fd,
> @@ -320,43 +297,42 @@ igt_main
> interval.it_interval.tv_sec =
> interval.it_value.tv_sec;
> r = timerfd_settime(data.change_screen_timerfd, 0,
> &interval, NULL);
> igt_require_f(r != -1, "Error setting timerfd\n");
> -
> - for_each_pipe_with_valid_output(&data.display, pipe,
> data.output) {
> - if (check_psr2_support(&data, pipe)) {
> - pipes[n_pipes] = pipe;
> - outputs[n_pipes] = data.output;
> - n_pipes++;
> - }
> - }
> }
>
> for (data.op = PAGE_FLIP; data.op < LAST; data.op++) {
> const uint32_t *format = formats[data.op];
> + igt_fixture {
> + if (data.op == FRONTBUFFER &&
> +
> intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 12) {
> + /*
> + * FIXME: Display 12+ platforms now
> have PSR2
> + * selective fetch enabled by default
> but we
> + * still can't properly handle
> frontbuffer
> + * rendering, so right it does full
> frame
> + * fetches at every frontbuffer
> rendering.
> + * So it is expected that this test
> will fail
> + * in display 12+ platform for now.
> + */
> + igt_info("PSR2 selective fetch is
> doing full frame fetches for frontbuffer rendering\n");
> + continue;
> + }
> + }
>
> while (*format != DRM_FORMAT_INVALID) {
> data.format = *format++;
> igt_describe("Test that selective update
> works when screen changes");
> igt_subtest_with_dynamic_f("%s-%s",
> op_str(data.op), igt_format_str(data.format)) {
> - for (i = 0; i < n_pipes; i++) {
> - igt_dynamic_f("pipe-%s-%s",
> kmstest_pipe_name(pipes[i]),
> -
> igt_output_name
> (outputs[i])) {
> -
> igt_output_set_pipe(out
> puts[i], pipes[i]);
> - if (data.op ==
> FRONTBUFFER &&
> -
> intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 12) {
> - /*
> - * FIXME:
> Display 12+ platforms now have PSR2
> - * selective
> fetch enabled by default but we
> - * still
> can't properly handle frontbuffer
> - * rendering,
> so right it does full frame
> - * fetches at
> every frontbuffer rendering.
> - * So it is
> expected that this test will fail
> - * in display
> 12+ platform for now.
> - */
> -
> igt_skip("PSR2
> selective fetch is doing full frame fetches for frontbuffer
> rendering\n");
> + for_each_pipe(&data.display, pipe) {
> + for_each_valid_output_on_pipe
> (&data.display, pipe, data.output) {
> + if
> (!check_psr2_support(&data, pipe))
> + continue;
> +
> + igt_dynamic_f("pipe-
> %s-%s", kmstest_pipe_name(pipe),
> + igt_o
> utput_name(data.output)) {
> + prepare(&data
> , pipe, data.output);
> + run(&data,
> data.output);
> + cleanup(&data
> , pipe, data.output);
> }
> - prepare(&data,
> outputs[i]);
> - run(&data,
> outputs[i]);
> - cleanup(&data,
> outputs[i]);
> }
> }
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-14 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11 16:24 [igt-dev] [PATCH i-g-t] tests/i915/kms_psr2_su: Cleanup Jeevan B
2022-11-11 19:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2022-11-14 9:00 ` [igt-dev] [PATCH i-g-t] " Hogander, Jouni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox