All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 0/2] tests/kms_chamelium Handle DP FSM more reliably
@ 2020-05-08  2:26 Kunal Joshi
  2020-05-08  2:26 ` [igt-dev] [PATCH i-g-t 1/2] tests/kms_chamelium Fix DP FSM in dp-mode-timings Kunal Joshi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kunal Joshi @ 2020-05-08  2:26 UTC (permalink / raw)
  To: arkadiusz.hiler, igt-dev, imre.deak; +Cc: Kunal Joshi

Receiver reset is always required after we set a new mode, so let's disable
the mode (reset_state() does that) before we switch to a new mode.
With this we will get the HPD pulses reliably for each iteration over
all the supoprted modes.

For more details
Refer commit: c8dc1fd926a550308b971ca7d83fe0a927a38152

Cc: Hiler Arkadiusz <arkadiusz.hiler@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Issue: https://gitlab.freedesktop.org/drm/intel/issues/262
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>

Kunal Joshi (2):
  tests/kms_chamelium Fix DP FSM in dp-mode-timings
  HAX: Run in BAT

 tests/intel-ci/fast-feedback.testlist |  1 +
 tests/kms_chamelium.c                 | 43 +++++++++++++++++----------
 2 files changed, 29 insertions(+), 15 deletions(-)

-- 
2.25.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [igt-dev] [PATCH i-g-t 1/2] tests/kms_chamelium Fix DP FSM in dp-mode-timings
  2020-05-08  2:26 [igt-dev] [PATCH i-g-t 0/2] tests/kms_chamelium Handle DP FSM more reliably Kunal Joshi
@ 2020-05-08  2:26 ` Kunal Joshi
  2020-05-08  2:26 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Run in BAT Kunal Joshi
  2020-05-08 10:04 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/kms_chamelium Handle DP FSM more reliably Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Kunal Joshi @ 2020-05-08  2:26 UTC (permalink / raw)
  To: arkadiusz.hiler, igt-dev, imre.deak; +Cc: Kunal Joshi

Receiver reset is always required after we set a new mode, so let's disable
the mode (reset_state() does that) before we switch to a new mode.
With this we will get the HPD pulses reliably for each iteration over
all the supoprted modes.

For more details
Refer commit: c8dc1fd926a550308b971ca7d83fe0a927a38152

Cc: Hiler Arkadiusz <arkadiusz.hiler@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Issue: https://gitlab.freedesktop.org/drm/intel/issues/262
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/kms_chamelium.c | 43 ++++++++++++++++++++++++++++---------------
 1 file changed, 28 insertions(+), 15 deletions(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 421a9006..4fe26d61 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -1017,23 +1017,37 @@ static const char test_mode_timings_desc[] =
 	"mode detected by the Chamelium receiver matches the mode we set";
 static void test_mode_timings(data_t *data, struct chamelium_port *port)
 {
-	igt_output_t *output;
-	igt_plane_t *primary;
-	drmModeConnector *connector;
-	int fb_id, i;
-	struct igt_fb fb;
+	int i, count_modes;
 
+	i = 0;
 	igt_require(chamelium_supports_get_video_params(data->chamelium));
+	do {
+		igt_output_t *output;
+		igt_plane_t *primary;
+		drmModeConnector *connector;
+		int fb_id, i;
+		struct igt_fb fb;
 
-	reset_state(data, port);
+		/*
+		 * let's reset state each mode so we will get the
+		 * HPD pulses realibably
+		 */
+		reset_state(data, port);
 
-	output = prepare_output(data, port, TEST_EDID_BASE);
-	connector = chamelium_port_get_connector(data->chamelium, port, false);
-	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
-	igt_assert(primary);
+		/*
+		 * modes may change due to mode pruining and link issues, so we
+		 * need to refresh the connector
+		 */
+		output = prepare_output(data, port, TEST_EDID_BASE);
+		connector = chamelium_port_get_connector(data->chamelium, port, false);
+		primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+		igt_assert(primary);
 
-	igt_assert(connector->count_modes > 0);
-	for (i = 0; i < connector->count_modes; i++) {
+		/* we may skip some modes due to above but that's ok */
+		count_modes = connector->count_modes;
+		if (i >= count_modes)
+			break;
+		
 		drmModeModeInfo *mode = &connector->modes[i];
 
 		fb_id = igt_create_color_pattern_fb(data->drm_fd,
@@ -1051,9 +1065,8 @@ static void test_mode_timings(data_t *data, struct chamelium_port *port)
 		check_mode(data->chamelium, port, mode);
 
 		igt_remove_fb(data->drm_fd, &fb);
-	}
-
-	drmModeFreeConnector(connector);
+		drmModeFreeConnector(connector);
+	} (++i < count_modes);
 }
 
 /* Set of Video Identification Codes advertised in the EDID */
-- 
2.25.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] HAX: Run in BAT
  2020-05-08  2:26 [igt-dev] [PATCH i-g-t 0/2] tests/kms_chamelium Handle DP FSM more reliably Kunal Joshi
  2020-05-08  2:26 ` [igt-dev] [PATCH i-g-t 1/2] tests/kms_chamelium Fix DP FSM in dp-mode-timings Kunal Joshi
@ 2020-05-08  2:26 ` Kunal Joshi
  2020-05-08 10:04 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/kms_chamelium Handle DP FSM more reliably Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Kunal Joshi @ 2020-05-08  2:26 UTC (permalink / raw)
  To: arkadiusz.hiler, igt-dev, imre.deak; +Cc: Kunal Joshi

Run in BAT.

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/intel-ci/fast-feedback.testlist | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index 2ccad438..8a2c0813 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -84,6 +84,7 @@ igt@kms_addfb_basic@unused-modifier
 igt@kms_addfb_basic@unused-offsets
 igt@kms_addfb_basic@unused-pitches
 igt@kms_busy@basic
+igt@kms_chamelium@dp-mode-timings
 igt@kms_chamelium@dp-hpd-fast
 igt@kms_chamelium@dp-edid-read
 igt@kms_chamelium@dp-crc-fast
-- 
2.25.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for tests/kms_chamelium Handle DP FSM more reliably
  2020-05-08  2:26 [igt-dev] [PATCH i-g-t 0/2] tests/kms_chamelium Handle DP FSM more reliably Kunal Joshi
  2020-05-08  2:26 ` [igt-dev] [PATCH i-g-t 1/2] tests/kms_chamelium Fix DP FSM in dp-mode-timings Kunal Joshi
  2020-05-08  2:26 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Run in BAT Kunal Joshi
@ 2020-05-08 10:04 ` Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2020-05-08 10:04 UTC (permalink / raw)
  To: Kunal Joshi; +Cc: igt-dev

== Series Details ==

Series: tests/kms_chamelium Handle DP FSM more reliably
URL   : https://patchwork.freedesktop.org/series/77071/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
4f6c17f0dbbdf2c7b4e647bb909e6d31dfce9827 i915/gem_ctx_persistence: Fix ring, don't block

[289/561] Linking target tests/kms_setmode.
[290/561] Linking target tests/kms_universal_plane.
[291/561] Linking target tests/meta_test.
[292/561] Linking target tests/kms_vrr.
[293/561] Linking target tests/kms_vblank.
[294/561] Linking target tests/panfrost_submit.
[295/561] Linking target tests/panfrost_get_param.
[296/561] Linking target tests/panfrost_prime.
[297/561] Linking target tests/panfrost_gem_new.
[298/561] Linking target tests/prime_busy.
[299/561] Linking target tests/prime_mmap_kms.
[300/561] Linking target tests/prime_mmap.
[301/561] Linking target tests/prime_self_import.
[302/561] Linking target tests/prime_vgem.
[303/561] Linking target tests/syncobj_basic.
[304/561] Linking target tests/syncobj_wait.
[305/561] Linking target tests/template.
[306/561] Linking target tests/v3d_get_bo_offset.
[307/561] Linking target tests/tools_test.
[308/561] Linking target tests/v3d_get_param.
[309/561] Linking target tests/vc4_create_bo.
[310/561] Linking target tests/v3d_mmap.
[311/561] Linking target tests/vc4_tiling.
[312/561] Linking target tests/vc4_label_bo.
[313/561] Linking target tests/vc4_dmabuf_poll.
[314/561] Linking target tests/vc4_lookup_fail.
[315/561] Linking target tests/vc4_purgeable_bo.
[316/561] Linking target tests/vc4_wait_bo.
[317/561] Linking target tests/vgem_basic.
[318/561] Linking target tests/vc4_wait_seqno.
[319/561] Linking target tests/vgem_slow.
[320/561] Linking target tests/prime_nv_api.
[321/561] Linking target tests/prime_nv_pcopy.
[322/561] Compiling C object 'tests/tests@@kms_chamelium@exe/kms_chamelium.c.o'.
FAILED: tests/tests@@kms_chamelium@exe/kms_chamelium.c.o 
ccache cc -Itests/tests@@kms_chamelium@exe -Itests -I../tests -I../include/drm-uapi -Ilib -I../lib -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libdrm -I/usr/include/x86_64-linux-gnu -I/usr/include/alsa -I/usr/include -I/usr/include/libdrm/nouveau -I/home/cidrm/kernel_headers/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fcommon -pthread  -MD -MQ 'tests/tests@@kms_chamelium@exe/kms_chamelium.c.o' -MF 'tests/tests@@kms_chamelium@exe/kms_chamelium.c.o.d' -o 'tests/tests@@kms_chamelium@exe/kms_chamelium.c.o' -c ../tests/kms_chamelium.c
../tests/kms_chamelium.c: In function ‘test_mode_timings’:
../tests/kms_chamelium.c:1028:14: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
   int fb_id, i;
              ^
../tests/kms_chamelium.c:1020:6: note: shadowed declaration is here
  int i, count_modes;
      ^
../tests/kms_chamelium.c:1051:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   drmModeModeInfo *mode = &connector->modes[i];
   ^~~~~~~~~~~~~~~
../tests/kms_chamelium.c:1069:4: error: expected ‘while’ before ‘(’ token
  } (++i < count_modes);
    ^
ninja: build stopped: subcommand failed.

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] HAX: Run in BAT
  2020-05-10 19:35 [igt-dev] [PATCH i-g-t 0/2] " Kunal Joshi
@ 2020-05-10 19:35 ` Kunal Joshi
  0 siblings, 0 replies; 5+ messages in thread
From: Kunal Joshi @ 2020-05-10 19:35 UTC (permalink / raw)
  To: arkadiusz.hiler, igt-dev, imre.deak; +Cc: Kunal Joshi

Run in bat

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/intel-ci/fast-feedback.testlist | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index 2ccad438..11833c6d 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -85,6 +85,7 @@ igt@kms_addfb_basic@unused-offsets
 igt@kms_addfb_basic@unused-pitches
 igt@kms_busy@basic
 igt@kms_chamelium@dp-hpd-fast
+igt@kms_chamelium@dp-mode-timings
 igt@kms_chamelium@dp-edid-read
 igt@kms_chamelium@dp-crc-fast
 igt@kms_chamelium@hdmi-hpd-fast
-- 
2.25.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-11  2:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  2:26 [igt-dev] [PATCH i-g-t 0/2] tests/kms_chamelium Handle DP FSM more reliably Kunal Joshi
2020-05-08  2:26 ` [igt-dev] [PATCH i-g-t 1/2] tests/kms_chamelium Fix DP FSM in dp-mode-timings Kunal Joshi
2020-05-08  2:26 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Run in BAT Kunal Joshi
2020-05-08 10:04 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/kms_chamelium Handle DP FSM more reliably Patchwork
2020-05-10 19:35 [igt-dev] [PATCH i-g-t 0/2] " Kunal Joshi
2020-05-10 19:35 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Run in BAT Kunal Joshi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.