Skip to contentSkip to conversation

tests/kms_dp_dsc: Force a full modeset when we force dsc enable

PATCH In review Manasi Navare 3 participants 8 messages Apr 9, 2019 – Apr 10, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 tests/kms_dp_dsc: Force a full modeset when we force dsc enable

DSC enable gets configured during compute_config and needs a full modeset to force DSC.
Sometimes in between the tests, if the initial output is same as the mode being set for DSC then it will not do a full modeset. So we disable the output before forcing a mode with DSC enable.

Fixes db19bccc1c22 ("test/kms_dp_dsc: Basic KMS test to validate VESA DSC on DP/eDP")
Cc Petri Latvala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Imre Deak <[email protected]>
---
 tests/kms_dp_dsc.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tests/kms_dp_dsc.c +8 -2
index da93cd74..7ba7c4ef 100644
@@ -161,12 +161,17 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		return;
 	}
 
+	/* Disable the output first */
+	igt_output_set_pipe(data->output, PIPE_NONE);
+	igt_display_commit(&data->display);
+
 	if (test_type == test_basic_dsc_enable) {
 		bool enabled;
 
 		igt_debug("DSC is supported on %s\n", data->conn_name);
 		force_dp_dsc_enable(data);
 
+		igt_output_set_pipe(data->output, data->pipe);
 		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
 				      data->mode->vdisplay,
 				      DRM_FORMAT_XRGB8888,
@@ -174,6 +179,8 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 				      &data->fb_test_pattern);
 		primary = igt_output_get_plane_type(data->output,
 						    DRM_PLANE_TYPE_PRIMARY);
+
+		/* Now set the output to the desired mode */
 		igt_plane_set_fb(primary, &data->fb_test_pattern);
 		igt_display_commit(&data->display);
 
@@ -187,7 +194,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		clear_dp_dsc_enable(data);
 
 		igt_assert_f(enabled,
-			     "Default DSC enable failed on Connector: %s Pipe: %s",
+			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
 			     data->conn_name,
 			     kmstest_pipe_name(data->pipe));
 	} else {
@@ -203,7 +210,6 @@ static void run_test(data_t *data, igt_output_t *output,
 	for_each_pipe(&data->display, pipe) {
 
 		if (igt_pipe_connector_valid(pipe, output)) {
-			igt_output_set_pipe(output, pipe);
 			data->pipe = pipe;
 			data->output = output;
 			update_display(data, test_type);
Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

PATCH v3 2/2 tests/kms_dp_dsc: Restore the value of force dsc enable

This patch saves off the original value of force_dsc_en and restores it back after each test and in the igt exit handler so that it gets restored on any failure/assertion.

Cc Petri Latvala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Imre Deak <[email protected]>
---
 tests/kms_dp_dsc.c | 49 +++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 42 insertions(+), 7 deletions(-)
tests/kms_dp_dsc.c +42 -7
index 7ba7c4ef..1bfefbf2 100644
@@ -65,6 +65,9 @@ typedef struct {
 	char conn_name[128];
 } data_t;
 
+bool force_dsc_en_orig;
+int force_dsc_restore_fd = -1;
+
 static inline void manual(const char *expected)
 {
 	igt_debug_manual_check("all", expected);
@@ -120,19 +123,44 @@ static void force_dp_dsc_enable(data_t *data)
 	igt_assert_f(ret > 0, "debugfs_write failed");
 }
 
-static void clear_dp_dsc_enable(data_t *data)
+static bool is_force_dsc_enabled(data_t *data)
 {
 	char file_name[128] = {0};
-	int ret;
+	char buf[512];
 
 	strcpy(file_name, data->conn_name);
 	strcat(file_name, "/i915_dsc_fec_support");
-	igt_debug ("Clearing DSC enable on %s\n", data->conn_name);
-	ret = igt_sysfs_write(data->debugfs_fd, file_name, "0", 1);
-	igt_assert_f(ret > 0, "debugfs_write failed");
+	igt_debugfs_read(data->drm_fd, file_name, buf);
+
+	return strstr(buf, "Force_DSC_Enable: yes");
 }
 
-static void test_cleanup(data_t *data) {
+static void save_force_dsc_en(data_t *data)
+{
+	char file_name[128] = {0};
+
+	force_dsc_en_orig = is_force_dsc_enabled(data);
+	strcpy(file_name, data->conn_name);
+	strcat(file_name, "/i915_dsc_fec_support");
+	force_dsc_restore_fd = openat(igt_debugfs_dir(data->drm_fd),
+				      file_name, O_WRONLY);
+	igt_assert(force_dsc_restore_fd >= 0);
+}
+
+static void restore_force_dsc_en(void)
+{
+	if (force_dsc_restore_fd < 0)
+		return;
+
+	igt_debug("Restoring DSC enable\n");
+	igt_assert(write(force_dsc_restore_fd, force_dsc_en_orig ? "1" : "0", 1) == 1);
+
+	close(force_dsc_restore_fd);
+	force_dsc_restore_fd = -1;
+}
+
+static void test_cleanup(data_t *data)
+{
 	igt_plane_t *primary;
 
 	if (data->output) {
@@ -144,6 +172,11 @@ static void test_cleanup(data_t *data) {
 	}
 }
 
+static void kms_dp_dsc_exit_handler(int sig)
+{
+	restore_force_dsc_en();
+}
+
 
 /*
  * Re-probe connectors and do a modeset with DSC
@@ -169,6 +202,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		bool enabled;
 
 		igt_debug("DSC is supported on %s\n", data->conn_name);
+		save_force_dsc_en(data);
 		force_dp_dsc_enable(data);
 
 		igt_output_set_pipe(data->output, data->pipe);
@@ -191,7 +225,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		manual("RGB test pattern without corruption");
 
 		enabled = is_dp_dsc_enabled(data);
-		clear_dp_dsc_enable(data);
+		restore_force_dsc_en();
 
 		igt_assert_f(enabled,
 			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
@@ -231,6 +265,7 @@ igt_main
 		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
 		kmstest_set_vt_graphics_mode();
+		igt_install_exit_handler(kms_dp_dsc_exit_handler);
 		igt_display_require(&data.display, data.drm_fd);
 		igt_require(res = drmModeGetResources(data.drm_fd));
 	}
Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#4 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] tests/kms_dp_dsc: Force a full modeset when we force dsc enable

In reply to Manasi Navare
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,v3,1/2] tests/kms_dp_dsc: Force a full modeset when we force dsc enable
URL : https://patchwork.freedesktop.org/series/59203/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5891 -> IGTPW_2822
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/59203/revisions/1/mbox/

Known issues
------------

Here are the changes found in IGTPW_2822 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_create@basic-files:
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] +106

* igt@i915_selftest@live_hangcheck:
- fi-bxt-dsi: PASS -> INCOMPLETE [fdo#103927]

* igt@kms_busy@basic-flip-c:
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_cursor_legacy@basic-flip-before-cursor-atomic:
- fi-glk-dsi: NOTRUN -> INCOMPLETE [fdo#103359] / [k.org#198133]

#### Possible fixes ####

* igt@gem_cpu_reloc@basic:
- {fi-icl-u2}: INCOMPLETE [fdo#110246] -> PASS

* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- fi-glk-dsi: INCOMPLETE [fdo#103359] / [k.org#198133] -> PASS

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: FAIL [fdo#103167] -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316
[fdo#110246]: https://bugs.freedesktop.org/show_bug.cgi?id=110246
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133

Participating hosts (48 -> 41)
------------------------------

Additional (1): fi-gdg-551
Missing (8): fi-kbl-7567u fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-apl-guc fi-ctg-p8600 fi-icl-y fi-byt-clapper

Build changes
-------------

* IGT: IGT_4932 -> IGTPW_2822

CI_DRM_5891: a46e12e83547c781a779776f33fbeeefe2978905 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2822: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2822/
IGT_4932: 08cf63a8fac11e3594b57580331fb319241a0d69 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2822/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,v3,1/2] tests/kms_dp_dsc: Force a full modeset when we force dsc enable

In reply to Manasi Navare
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,v3,1/2] tests/kms_dp_dsc: Force a full modeset when we force dsc enable
URL : https://patchwork.freedesktop.org/series/59203/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5891_full -> IGTPW_2822_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_2822_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_2822_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/59203/revisions/1/mbox/

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_2822_full:

### IGT changes ###

#### Possible regressions ####

* igt@prime_busy@wait-before-render:
- shard-iclb: PASS -> INCOMPLETE

Known issues
------------

Here are the changes found in IGTPW_2822_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@independent-bsd1:
- shard-iclb: NOTRUN -> SKIP [fdo#109276] +7

* igt@gem_pread@pagefault-pread:
- shard-iclb: NOTRUN -> SKIP [fdo#109277] +1

* igt@gem_pwrite@huge-gtt-forwards:
- shard-iclb: NOTRUN -> SKIP [fdo#109290]

* igt@gem_tiled_fence_blits@normal:
- shard-iclb: PASS -> TIMEOUT [fdo#109673]

* igt@gem_tiled_swapping@non-threaded:
- shard-hsw: PASS -> INCOMPLETE [fdo#103540]

* igt@gen3_render_tiledy_blits:
- shard-iclb: NOTRUN -> SKIP [fdo#109289]

* igt@i915_pm_rpm@pc8-residency:
- shard-iclb: NOTRUN -> SKIP [fdo#109293]

* igt@kms_atomic_transition@2x-modeset-transitions-nonblocking:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +7

* igt@kms_atomic_transition@3x-modeset-transitions:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

* igt@kms_busy@basic-flip-f:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +13

* igt@kms_chamelium@hdmi-edid-read:
- shard-iclb: NOTRUN -> SKIP [fdo#109284] +4

* igt@kms_color@pipe-a-degamma:

    - shard-glk:          PASS -> FAIL [fdo#104782] / [fdo#108145]
    - shard-apl:          NOTRUN -> FAIL [fdo#104782] / [fdo#108145]
    - shard-kbl:          PASS -> FAIL [fdo#104782] / [fdo#108145]

* igt@kms_content_protection@legacy:
- shard-iclb: NOTRUN -> SKIP [fdo#109300]

* igt@kms_cursor_crc@cursor-512x512-rapid-movement:
- shard-iclb: NOTRUN -> SKIP [fdo#109279]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-iclb: NOTRUN -> SKIP [fdo#109274] +3

* igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
- shard-iclb: PASS -> FAIL [fdo#103355] +2

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: PASS -> FAIL [fdo#105363]

* igt@kms_flip@flip-vs-panning-vs-hang-interruptible:
- shard-iclb: PASS -> INCOMPLETE [fdo#107713]

* igt@kms_flip@flip-vs-suspend:
- shard-snb: PASS -> DMESG-WARN [fdo#102365]

* igt@kms_force_connector_basic@prune-stale-modes:
- shard-iclb: NOTRUN -> SKIP [fdo#109285]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- shard-iclb: NOTRUN -> FAIL [fdo#103167]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-mmap-wc:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +11

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#103167]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#109247] +16

* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247]

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-blt:
- shard-iclb: NOTRUN -> FAIL [fdo#109247]

* igt@kms_pipe_crc_basic@hang-read-crc-pipe-f:
- shard-iclb: NOTRUN -> SKIP [fdo#109278] +5

* igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
- shard-iclb: NOTRUN -> INCOMPLETE [fdo#110036 ]

* igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
- shard-apl: NOTRUN -> FAIL [fdo#108145] +5
- shard-kbl: NOTRUN -> FAIL [fdo#108145] / [fdo#108590]

* igt@kms_psr@primary_mmap_cpu:
- shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +2

* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: NOTRUN -> SKIP [fdo#109441]

* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: PASS -> SKIP [fdo#109441] +1

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: PASS -> FAIL [fdo#109016]

* igt@kms_setmode@basic:
- shard-kbl: PASS -> FAIL [fdo#99912]

* igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm:
- shard-apl: PASS -> FAIL [fdo#104894]

* igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm:
- shard-kbl: PASS -> FAIL [fdo#104894] +2

* igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +209

* igt@prime_nv_api@i915_self_import:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +6

* igt@prime_nv_test@i915_import_gtt_mmap:
- shard-iclb: NOTRUN -> SKIP [fdo#109291]

* igt@tools_test@sysfs_l3_parity:
- shard-iclb: NOTRUN -> SKIP [fdo#109307]

* igt@v3d_get_param@get-bad-flags:
- shard-iclb: NOTRUN -> SKIP [fdo#109315]

#### Possible fixes ####

* igt@gem_exec_reloc@basic-cpu-wc-active:
- shard-iclb: INCOMPLETE [fdo#107713] -> PASS

* igt@gem_mmap_gtt@forked-big-copy-odd:
- shard-iclb: TIMEOUT [fdo#109673] -> PASS

* igt@gem_ppgtt@blt-vs-render-ctxn:
- shard-iclb: INCOMPLETE [fdo#109801] -> PASS

* igt@i915_selftest@live_workarounds:
- shard-iclb: DMESG-FAIL [fdo#108954] -> PASS

* igt@kms_color@pipe-a-ctm-max:
- shard-kbl: FAIL [fdo#108147] -> PASS

* igt@kms_cursor_crc@cursor-64x64-sliding:
- shard-apl: FAIL [fdo#103232] -> PASS
- shard-kbl: FAIL [fdo#103232] -> PASS

* igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size:
- shard-iclb: FAIL [fdo#103355] -> PASS

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: SKIP [fdo#109349] -> PASS

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-plflip-blt:
- shard-glk: FAIL [fdo#103167] -> PASS

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: FAIL [fdo#103167] -> PASS +4

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite:
- shard-iclb: FAIL [fdo#109247] -> PASS +8

* igt@kms_plane_scaling@pipe-a-scaler-with-rotation:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS +1

* igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping:
- shard-iclb: INCOMPLETE [fdo#110041] -> PASS

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: SKIP [fdo#109441] -> PASS

* igt@kms_psr@suspend:
- shard-iclb: FAIL [fdo#107383] / [fdo#110215] -> PASS

* igt@kms_rotation_crc@multiplane-rotation:
- shard-iclb: DMESG-WARN [fdo#106885] -> PASS
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS

* igt@kms_vblank@pipe-b-ts-continuation-modeset-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS
- shard-kbl: FAIL [fdo#104894] -> PASS +1

#### Warnings ####

* igt@i915_selftest@live_contexts:
- shard-iclb: DMESG-FAIL [fdo#108569] -> INCOMPLETE [fdo#108569]

* igt@kms_psr@cursor_render:
- shard-iclb: DMESG-WARN [fdo#110025] -> FAIL [fdo#107383] / [fdo#110215]

[fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#106885]: https://bugs.freedesktop.org/show_bug.cgi?id=106885
[fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
[fdo#108954]: https://bugs.freedesktop.org/show_bug.cgi?id=108954
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109290]: https://bugs.freedesktop.org/show_bug.cgi?id=109290
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109293]: https://bugs.freedesktop.org/show_bug.cgi?id=109293
[fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
[fdo#109801]: https://bugs.freedesktop.org/show_bug.cgi?id=109801
[fdo#110025]: https://bugs.freedesktop.org/show_bug.cgi?id=110025
[fdo#110036 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110036
[fdo#110041]: https://bugs.freedesktop.org/show_bug.cgi?id=110041
[fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (10 -> 6)
------------------------------

Missing (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005

Build changes
-------------

* IGT: IGT_4932 -> IGTPW_2822
* Piglit: piglit_4509 -> None

CI_DRM_5891: a46e12e83547c781a779776f33fbeeefe2978905 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2822: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2822/
IGT_4932: 08cf63a8fac11e3594b57580331fb319241a0d69 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2822/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v3 1/2
#6 lore raw
In reply to Manasi Navare
Quoted 6 lines · Manasi Navare

DSC enable gets configured during compute_config and needs a full modeset to force DSC.
Sometimes in between the tests, if the initial output is same as the mode being set for DSC then it will not do a full modeset. So we disable the output before forcing a mode with DSC enable.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110270

Quoted 5 lines
Fixes db19bccc1c22 ("test/kms_dp_dsc: Basic KMS test to validate VESA DSC on DP/eDP")
Cc Petri Latvala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Imre Deak <[email protected]>
Quoted 55 lines
---
 tests/kms_dp_dsc.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tests/kms_dp_dsc.c +8 -2
index da93cd74..7ba7c4ef 100644
@@ -161,12 +161,17 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		return;
 	}
 
+	/* Disable the output first */
+	igt_output_set_pipe(data->output, PIPE_NONE);
+	igt_display_commit(&data->display);
+
 	if (test_type == test_basic_dsc_enable) {
 		bool enabled;
 
 		igt_debug("DSC is supported on %s\n", data->conn_name);
 		force_dp_dsc_enable(data);
 
+		igt_output_set_pipe(data->output, data->pipe);
 		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
 				      data->mode->vdisplay,
 				      DRM_FORMAT_XRGB8888,
@@ -174,6 +179,8 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 				      &data->fb_test_pattern);
 		primary = igt_output_get_plane_type(data->output,
 						    DRM_PLANE_TYPE_PRIMARY);
+
+		/* Now set the output to the desired mode */
 		igt_plane_set_fb(primary, &data->fb_test_pattern);
 		igt_display_commit(&data->display);
 
@@ -187,7 +194,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		clear_dp_dsc_enable(data);
 
 		igt_assert_f(enabled,
-			     "Default DSC enable failed on Connector: %s Pipe: %s",
+			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
 			     data->conn_name,
 			     kmstest_pipe_name(data->pipe));
 	} else {
@@ -203,7 +210,6 @@ static void run_test(data_t *data, igt_output_t *output,
 	for_each_pipe(&data->display, pipe) {
 
 		if (igt_pipe_connector_valid(pipe, output)) {
-			igt_output_set_pipe(output, pipe);
 			data->pipe = pipe;
 			data->output = output;
 			update_display(data, test_type);
Signature · 1 line
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v3 2/2
#2 lore raw

Re: [igt-dev] [PATCH i-g-t v3 2/2] tests/kms_dp_dsc: Restore the value of force dsc enable

In reply to Manasi Navare
Quoted 9 lines · Manasi Navare

This patch saves off the original value of force_dsc_en and restores it back after each test and in the igt exit handler so that it gets restored on any failure/assertion.

Cc Petri Latvala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Imre Deak <[email protected]>

Looks good, thanks:

Quoted 109 lines
---
 tests/kms_dp_dsc.c | 49 +++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 42 insertions(+), 7 deletions(-)
tests/kms_dp_dsc.c +42 -7
index 7ba7c4ef..1bfefbf2 100644
@@ -65,6 +65,9 @@ typedef struct {
 	char conn_name[128];
 } data_t;
 
+bool force_dsc_en_orig;
+int force_dsc_restore_fd = -1;
+
 static inline void manual(const char *expected)
 {
 	igt_debug_manual_check("all", expected);
@@ -120,19 +123,44 @@ static void force_dp_dsc_enable(data_t *data)
 	igt_assert_f(ret > 0, "debugfs_write failed");
 }
 
-static void clear_dp_dsc_enable(data_t *data)
+static bool is_force_dsc_enabled(data_t *data)
 {
 	char file_name[128] = {0};
-	int ret;
+	char buf[512];
 
 	strcpy(file_name, data->conn_name);
 	strcat(file_name, "/i915_dsc_fec_support");
-	igt_debug ("Clearing DSC enable on %s\n", data->conn_name);
-	ret = igt_sysfs_write(data->debugfs_fd, file_name, "0", 1);
-	igt_assert_f(ret > 0, "debugfs_write failed");
+	igt_debugfs_read(data->drm_fd, file_name, buf);
+
+	return strstr(buf, "Force_DSC_Enable: yes");
 }
 
-static void test_cleanup(data_t *data) {
+static void save_force_dsc_en(data_t *data)
+{
+	char file_name[128] = {0};
+
+	force_dsc_en_orig = is_force_dsc_enabled(data);
+	strcpy(file_name, data->conn_name);
+	strcat(file_name, "/i915_dsc_fec_support");
+	force_dsc_restore_fd = openat(igt_debugfs_dir(data->drm_fd),
+				      file_name, O_WRONLY);
+	igt_assert(force_dsc_restore_fd >= 0);
+}
+
+static void restore_force_dsc_en(void)
+{
+	if (force_dsc_restore_fd < 0)
+		return;
+
+	igt_debug("Restoring DSC enable\n");
+	igt_assert(write(force_dsc_restore_fd, force_dsc_en_orig ? "1" : "0", 1) == 1);
+
+	close(force_dsc_restore_fd);
+	force_dsc_restore_fd = -1;
+}
+
+static void test_cleanup(data_t *data)
+{
 	igt_plane_t *primary;
 
 	if (data->output) {
@@ -144,6 +172,11 @@ static void test_cleanup(data_t *data) {
 	}
 }
 
+static void kms_dp_dsc_exit_handler(int sig)
+{
+	restore_force_dsc_en();
+}
+
 
 /*
  * Re-probe connectors and do a modeset with DSC
@@ -169,6 +202,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		bool enabled;
 
 		igt_debug("DSC is supported on %s\n", data->conn_name);
+		save_force_dsc_en(data);
 		force_dp_dsc_enable(data);
 
 		igt_output_set_pipe(data->output, data->pipe);
@@ -191,7 +225,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		manual("RGB test pattern without corruption");
 
 		enabled = is_dp_dsc_enabled(data);
-		clear_dp_dsc_enable(data);
+		restore_force_dsc_en();
 
 		igt_assert_f(enabled,
 			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
@@ -231,6 +265,7 @@ igt_main
 		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
 		kmstest_set_vt_graphics_mode();
+		igt_install_exit_handler(kms_dp_dsc_exit_handler);
 		igt_display_require(&data.display, data.drm_fd);
 		igt_require(res = drmModeGetResources(data.drm_fd));
 	}
Signature · 1 line
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#7 lore raw
In reply to Imre Deak

Pushed, thanks for the review

Regards
Manasi

Quoted 65 lines · Imre Deak
Quoted 6 lines · Manasi Navare

DSC enable gets configured during compute_config and needs a full modeset to force DSC.
Sometimes in between the tests, if the initial output is same as the mode being set for DSC then it will not do a full modeset. So we disable the output before forcing a mode with DSC enable.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110270

Quoted 5 lines
Fixes db19bccc1c22 ("test/kms_dp_dsc: Basic KMS test to validate VESA DSC on DP/eDP")
Cc Petri Latvala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Imre Deak <[email protected]>
Quoted 47 lines
---
 tests/kms_dp_dsc.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tests/kms_dp_dsc.c +8 -1
index da93cd74..7ba7c4ef 100644
@@ -161,12 +161,17 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		return;
 	}
 
+	/* Disable the output first */
+	igt_output_set_pipe(data->output, PIPE_NONE);
+	igt_display_commit(&data->display);
+
 	if (test_type == test_basic_dsc_enable) {
 		bool enabled;
 
 		igt_debug("DSC is supported on %s\n", data->conn_name);
 		force_dp_dsc_enable(data);
 
+		igt_output_set_pipe(data->output, data->pipe);
 		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
 				      data->mode->vdisplay,
 				      DRM_FORMAT_XRGB8888,
@@ -174,6 +179,8 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 				      &data->fb_test_pattern);
 		primary = igt_output_get_plane_type(data->output,
 						    DRM_PLANE_TYPE_PRIMARY);
+
+		/* Now set the output to the desired mode */
 		igt_plane_set_fb(primary, &data->fb_test_pattern);
 		igt_display_commit(&data->display);
 
@@ -187,7 +194,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		clear_dp_dsc_enable(data);
 
 		igt_assert_f(enabled,
-			     "Default DSC enable failed on Connector: %s Pipe: %s",
+			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
 			     data->conn_name,
 			     kmstest_pipe_name(data->pipe));
 	} else {
@@ -203,7 +210,6 @@ static void run_test(data_t *data, igt_output_t *output,
 	for_each_pipe(&data->display, pipe) {
 
Quoted 8 lines
Quoted 8 lines
tests/kms_dp_dsc.c +0 -1
 		if (igt_pipe_connector_valid(pipe, output)) {
-			igt_output_set_pipe(output, pipe);
 			data->pipe = pipe;
 			data->output = output;
 			update_display(data, test_type);
Signature · 1 line
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

Re: [igt-dev] [PATCH i-g-t v3 2/2] tests/kms_dp_dsc: Restore the value of force dsc enable

In reply to Imre Deak

Pushed, thanks for the review

Manasi

Quoted 110 lines · Imre Deak
Quoted 9 lines · Manasi Navare

This patch saves off the original value of force_dsc_en and restores it back after each test and in the igt exit handler so that it gets restored on any failure/assertion.

Cc Petri Latvala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Imre Deak <[email protected]>

Looks good, thanks:

Quoted 96 lines
---
 tests/kms_dp_dsc.c | 49 +++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 42 insertions(+), 7 deletions(-)
tests/kms_dp_dsc.c +41 -7
index 7ba7c4ef..1bfefbf2 100644
@@ -65,6 +65,9 @@ typedef struct {
 	char conn_name[128];
 } data_t;
 
+bool force_dsc_en_orig;
+int force_dsc_restore_fd = -1;
+
 static inline void manual(const char *expected)
 {
 	igt_debug_manual_check("all", expected);
@@ -120,19 +123,44 @@ static void force_dp_dsc_enable(data_t *data)
 	igt_assert_f(ret > 0, "debugfs_write failed");
 }
 
-static void clear_dp_dsc_enable(data_t *data)
+static bool is_force_dsc_enabled(data_t *data)
 {
 	char file_name[128] = {0};
-	int ret;
+	char buf[512];
 
 	strcpy(file_name, data->conn_name);
 	strcat(file_name, "/i915_dsc_fec_support");
-	igt_debug ("Clearing DSC enable on %s\n", data->conn_name);
-	ret = igt_sysfs_write(data->debugfs_fd, file_name, "0", 1);
-	igt_assert_f(ret > 0, "debugfs_write failed");
+	igt_debugfs_read(data->drm_fd, file_name, buf);
+
+	return strstr(buf, "Force_DSC_Enable: yes");
 }
 
-static void test_cleanup(data_t *data) {
+static void save_force_dsc_en(data_t *data)
+{
+	char file_name[128] = {0};
+
+	force_dsc_en_orig = is_force_dsc_enabled(data);
+	strcpy(file_name, data->conn_name);
+	strcat(file_name, "/i915_dsc_fec_support");
+	force_dsc_restore_fd = openat(igt_debugfs_dir(data->drm_fd),
+				      file_name, O_WRONLY);
+	igt_assert(force_dsc_restore_fd >= 0);
+}
+
+static void restore_force_dsc_en(void)
+{
+	if (force_dsc_restore_fd < 0)
+		return;
+
+	igt_debug("Restoring DSC enable\n");
+	igt_assert(write(force_dsc_restore_fd, force_dsc_en_orig ? "1" : "0", 1) == 1);
+
+	close(force_dsc_restore_fd);
+	force_dsc_restore_fd = -1;
+}
+
+static void test_cleanup(data_t *data)
+{
 	igt_plane_t *primary;
 
 	if (data->output) {
@@ -144,6 +172,11 @@ static void test_cleanup(data_t *data) {
 	}
 }
 
+static void kms_dp_dsc_exit_handler(int sig)
+{
+	restore_force_dsc_en();
+}
+
 
 /*
  * Re-probe connectors and do a modeset with DSC
@@ -169,6 +202,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		bool enabled;
 
 		igt_debug("DSC is supported on %s\n", data->conn_name);
+		save_force_dsc_en(data);
 		force_dp_dsc_enable(data);
 
 		igt_output_set_pipe(data->output, data->pipe);
@@ -191,7 +225,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		manual("RGB test pattern without corruption");
 
 		enabled = is_dp_dsc_enabled(data);
-		clear_dp_dsc_enable(data);
+		restore_force_dsc_en();
 
Quoted 13 lines
Quoted 13 lines
tests/kms_dp_dsc.c +1 -0
 		igt_assert_f(enabled,
 			     "Default DSC enable failed on Connector: %s Pipe: %s\n",
@@ -231,6 +265,7 @@ igt_main
 		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
 		kmstest_set_vt_graphics_mode();
+		igt_install_exit_handler(kms_dp_dsc_exit_handler);
 		igt_display_require(&data.display, data.drm_fd);
 		igt_require(res = drmModeGetResources(data.drm_fd));
 	}
Signature · 1 line
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev