All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] Skip VBlank tests in modules without VBlank
@ 2018-08-20 23:54 ` Rodrigo Siqueira
  0 siblings, 0 replies; 12+ messages in thread
From: Rodrigo Siqueira @ 2018-08-20 23:54 UTC (permalink / raw)
  To: Petri Latvala, Arkadiusz Hiler; +Cc: igt-dev, intel-gfx, Haneen Mohammed

The kms_flip test does not support drivers without VBlank which exclude
some virtual drivers. This patch adds a function that checks if a module
has a VBlank or not; if a module has VBlank than kms_flip will execute
all the VBlank tests, otherwise, VBlank tests will be skipped.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
---
 lib/igt_aux.c    | 14 ++++++++++++++
 lib/igt_aux.h    |  2 ++
 tests/kms_flip.c | 26 ++++++++++++++++++++++++--
 3 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 1250d5c5..da5be4bb 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
 	return dump_aub;
 }
 
+bool igt_there_is_vblank(int drm_fd)
+{
+	drmVBlank dummy_vbl;
+	int ret;
+
+	dummy_vbl.request.type = DRM_VBLANK_ABSOLUTE;
+	ret = drmWaitVBlank(drm_fd, &dummy_vbl);
+
+	if (ret < 0)
+		return false;
+
+	return true;
+}
+
 /* other helpers */
 /**
  * igt_exchange_int:
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index ef89faa9..933055e8 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -119,6 +119,8 @@ bool igt_check_boolean_env_var(const char *env_var, bool default_value);
 
 bool igt_aub_dump_enabled(void);
 
+bool igt_there_is_vblank(int fd);
+
 /* suspend/hibernate and auto-resume system */
 
 /**
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 393d690a..770fa5f7 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -73,6 +73,7 @@
 #define TEST_TS_CONT		(1 << 27)
 #define TEST_BO_TOOBIG		(1 << 28)
 
+#define TEST_NO_VBLANK		(1 << 29)
 #define TEST_BASIC		(1 << 30)
 
 #define EVENT_FLIP		(1 << 0)
@@ -125,6 +126,18 @@ struct event_state {
 	int seq_step;
 };
 
+static bool vblank_dependence(int flags)
+{
+	int vblank_flags = TEST_VBLANK | TEST_VBLANK_BLOCK |
+			   TEST_VBLANK_ABSOLUTE | TEST_VBLANK_EXPIRED_SEQ |
+			   TEST_TS_CONT | TEST_CHECK_TS | TEST_VBLANK_RACE;
+
+	if (flags & vblank_flags)
+		return true;
+
+	return false;
+}
+
 static float timeval_float(const struct timeval *tv)
 {
 	return tv->tv_sec + tv->tv_usec / 1000000.0f;
@@ -493,11 +506,11 @@ static void check_state(const struct test_output *o, const struct event_state *e
 	/* check only valid if no modeset happens in between, that increments by
 	 * (1 << 23) on each step. This bounding matches the one in
 	 * DRM_IOCTL_WAIT_VBLANK. */
-	if (!(o->flags & (TEST_DPMS | TEST_MODESET)))
+	if (!(o->flags & (TEST_DPMS | TEST_MODESET | TEST_NO_VBLANK))) {
 		igt_assert_f(es->current_seq - (es->last_seq + o->seq_step) <= 1UL << 23,
 			     "unexpected %s seq %u, should be >= %u\n",
 			     es->name, es->current_seq, es->last_seq + o->seq_step);
-
+	}
 	/* Check that the vblank frame didn't wrap unexpectedly. */
 	if (o->flags & TEST_TS_CONT) {
 		/* Ignore seq_step here since vblank waits time out immediately
@@ -1204,6 +1217,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 	unsigned bo_size = 0;
 	uint64_t tiling;
 	int i;
+	bool vblank = true;
 
 	switch (crtc_count) {
 	case 1:
@@ -1297,6 +1311,14 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 	}
 	igt_assert(fb_is_bound(o, o->fb_ids[0]));
 
+	vblank = igt_there_is_vblank(drm_fd);
+	if (!vblank) {
+		if (vblank_dependence(o->flags))
+			igt_require_f(vblank, "There is no Vblank\n");
+		else
+			o->flags |= TEST_NO_VBLANK;
+	}
+
 	/* quiescent the hw a bit so ensure we don't miss a single frame */
 	if (o->flags & TEST_CHECK_TS)
 		calibrate_ts(o, crtc_idxs[0]);
-- 
2.18.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [igt-dev] [PATCH i-g-t] Skip VBlank tests in modules without VBlank
@ 2018-08-20 23:54 ` Rodrigo Siqueira
  0 siblings, 0 replies; 12+ messages in thread
From: Rodrigo Siqueira @ 2018-08-20 23:54 UTC (permalink / raw)
  To: Petri Latvala, Arkadiusz Hiler
  Cc: igt-dev, Gustavo Padovan, intel-gfx, Daniel Vetter, Haneen Mohammed

The kms_flip test does not support drivers without VBlank which exclude
some virtual drivers. This patch adds a function that checks if a module
has a VBlank or not; if a module has VBlank than kms_flip will execute
all the VBlank tests, otherwise, VBlank tests will be skipped.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
---
 lib/igt_aux.c    | 14 ++++++++++++++
 lib/igt_aux.h    |  2 ++
 tests/kms_flip.c | 26 ++++++++++++++++++++++++--
 3 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 1250d5c5..da5be4bb 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
 	return dump_aub;
 }
 
+bool igt_there_is_vblank(int drm_fd)
+{
+	drmVBlank dummy_vbl;
+	int ret;
+
+	dummy_vbl.request.type = DRM_VBLANK_ABSOLUTE;
+	ret = drmWaitVBlank(drm_fd, &dummy_vbl);
+
+	if (ret < 0)
+		return false;
+
+	return true;
+}
+
 /* other helpers */
 /**
  * igt_exchange_int:
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index ef89faa9..933055e8 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -119,6 +119,8 @@ bool igt_check_boolean_env_var(const char *env_var, bool default_value);
 
 bool igt_aub_dump_enabled(void);
 
+bool igt_there_is_vblank(int fd);
+
 /* suspend/hibernate and auto-resume system */
 
 /**
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 393d690a..770fa5f7 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -73,6 +73,7 @@
 #define TEST_TS_CONT		(1 << 27)
 #define TEST_BO_TOOBIG		(1 << 28)
 
+#define TEST_NO_VBLANK		(1 << 29)
 #define TEST_BASIC		(1 << 30)
 
 #define EVENT_FLIP		(1 << 0)
@@ -125,6 +126,18 @@ struct event_state {
 	int seq_step;
 };
 
+static bool vblank_dependence(int flags)
+{
+	int vblank_flags = TEST_VBLANK | TEST_VBLANK_BLOCK |
+			   TEST_VBLANK_ABSOLUTE | TEST_VBLANK_EXPIRED_SEQ |
+			   TEST_TS_CONT | TEST_CHECK_TS | TEST_VBLANK_RACE;
+
+	if (flags & vblank_flags)
+		return true;
+
+	return false;
+}
+
 static float timeval_float(const struct timeval *tv)
 {
 	return tv->tv_sec + tv->tv_usec / 1000000.0f;
@@ -493,11 +506,11 @@ static void check_state(const struct test_output *o, const struct event_state *e
 	/* check only valid if no modeset happens in between, that increments by
 	 * (1 << 23) on each step. This bounding matches the one in
 	 * DRM_IOCTL_WAIT_VBLANK. */
-	if (!(o->flags & (TEST_DPMS | TEST_MODESET)))
+	if (!(o->flags & (TEST_DPMS | TEST_MODESET | TEST_NO_VBLANK))) {
 		igt_assert_f(es->current_seq - (es->last_seq + o->seq_step) <= 1UL << 23,
 			     "unexpected %s seq %u, should be >= %u\n",
 			     es->name, es->current_seq, es->last_seq + o->seq_step);
-
+	}
 	/* Check that the vblank frame didn't wrap unexpectedly. */
 	if (o->flags & TEST_TS_CONT) {
 		/* Ignore seq_step here since vblank waits time out immediately
@@ -1204,6 +1217,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 	unsigned bo_size = 0;
 	uint64_t tiling;
 	int i;
+	bool vblank = true;
 
 	switch (crtc_count) {
 	case 1:
@@ -1297,6 +1311,14 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 	}
 	igt_assert(fb_is_bound(o, o->fb_ids[0]));
 
+	vblank = igt_there_is_vblank(drm_fd);
+	if (!vblank) {
+		if (vblank_dependence(o->flags))
+			igt_require_f(vblank, "There is no Vblank\n");
+		else
+			o->flags |= TEST_NO_VBLANK;
+	}
+
 	/* quiescent the hw a bit so ensure we don't miss a single frame */
 	if (o->flags & TEST_CHECK_TS)
 		calibrate_ts(o, crtc_idxs[0]);
-- 
2.18.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for Skip VBlank tests in modules without VBlank
  2018-08-20 23:54 ` [igt-dev] " Rodrigo Siqueira
  (?)
@ 2018-08-21  0:34 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-08-21  0:34 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev

== Series Details ==

Series: Skip VBlank tests in modules without VBlank
URL   : https://patchwork.freedesktop.org/series/48468/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4690 -> IGTPW_1731 =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_1731 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1731, 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/48468/revisions/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-hsw-peppy:       PASS -> SKIP
      fi-snb-2600:        PASS -> SKIP
      fi-skl-6260u:       PASS -> SKIP
      fi-hsw-4770r:       PASS -> SKIP
      {fi-bdw-samus}:     PASS -> SKIP
      {fi-cfl-8109u}:     PASS -> SKIP
      fi-blb-e6850:       PASS -> SKIP
      fi-kbl-r:           PASS -> SKIP
      fi-bwr-2160:        PASS -> SKIP
      fi-bdw-5557u:       PASS -> SKIP
      fi-skl-6600u:       PASS -> SKIP
      fi-kbl-7560u:       PASS -> SKIP
      fi-hsw-4770:        PASS -> SKIP
      fi-skl-6700k2:      PASS -> SKIP
      fi-ivb-3770:        PASS -> SKIP
      fi-bxt-dsi:         PASS -> SKIP
      fi-cnl-psr:         PASS -> SKIP
      {fi-bsw-kefka}:     PASS -> SKIP
      fi-skl-6700hq:      PASS -> SKIP
      fi-bxt-j4205:       PASS -> SKIP
      fi-bsw-n3050:       PASS -> SKIP
      fi-skl-gvtdvm:      PASS -> SKIP
      {fi-byt-clapper}:   PASS -> SKIP
      fi-gdg-551:         PASS -> SKIP
      fi-glk-dsi:         PASS -> SKIP
      fi-glk-j4005:       PASS -> SKIP
      fi-skl-guc:         PASS -> SKIP
      fi-kbl-7567u:       PASS -> SKIP
      fi-bdw-gvtdvm:      PASS -> SKIP
      fi-ivb-3520m:       PASS -> SKIP
      fi-kbl-7500u:       PASS -> SKIP
      fi-cfl-8700k:       PASS -> SKIP
      fi-whl-u:           PASS -> SKIP
      fi-pnv-d510:        PASS -> SKIP
      fi-snb-2520m:       PASS -> SKIP
      fi-cfl-s3:          PASS -> SKIP
      {fi-skl-iommu}:     PASS -> SKIP
      fi-cfl-guc:         PASS -> SKIP
      fi-byt-n2820:       PASS -> SKIP
      fi-skl-6770hq:      PASS -> SKIP
      fi-elk-e7500:       PASS -> SKIP
      fi-ilk-650:         PASS -> SKIP

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      fi-kbl-guc:         PASS -> DMESG-FAIL (fdo#106947)

    igt@kms_chamelium@dp-edid-read:
      fi-kbl-7500u:       PASS -> FAIL (fdo#103841)

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#107362)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#103191, fdo#107362)

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_hangcheck:
      fi-skl-guc:         DMESG-FAIL (fdo#107174) -> PASS

    igt@kms_flip@basic-flip-vs-modeset:
      fi-skl-6700hq:      DMESG-WARN (fdo#105998) -> PASS +1

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
      {fi-byt-clapper}:   FAIL (fdo#107362) -> PASS

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

  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
  fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362


== Participating hosts (52 -> 47) ==

  Missing    (5): fi-byt-j1900 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4606 -> IGTPW_1731

  CI_DRM_4690: 5b8042159e2b05425c098868ed6fac9518ee638d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1731: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1731/
  IGT_4606: 38a44003774e35c587c67c8766b35e75dbb993b8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1731/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for Skip VBlank tests in modules without VBlank
  2018-08-20 23:54 ` [igt-dev] " Rodrigo Siqueira
  (?)
  (?)
@ 2018-08-21  2:07 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-08-21  2:07 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev

== Series Details ==

Series: Skip VBlank tests in modules without VBlank
URL   : https://patchwork.freedesktop.org/series/48468/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4606_full -> IGTPW_1731_full =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_1731_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1731_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/48468/revisions/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-hsw:          PASS -> SKIP +43

    igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible:
      shard-snb:          PASS -> SKIP +22

    igt@kms_flip@plain-flip-fb-recreate-interruptible:
      shard-glk:          PASS -> SKIP +39

    igt@kms_flip@plain-flip-ts-check:
      shard-kbl:          PASS -> SKIP +20

    igt@kms_flip@wf_vblank-ts-check:
      shard-apl:          PASS -> SKIP +21

    igt@pm_rc6_residency@rc6-accuracy:
      shard-kbl:          SKIP -> PASS

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_busy@extended-blt:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@gem_exec_await@wide-contexts:
      shard-apl:          PASS -> FAIL (fdo#105900, fdo#106680)

    igt@gem_exec_schedule@pi-ringfull-bsd:
      shard-glk:          NOTRUN -> FAIL (fdo#103158)

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          PASS -> INCOMPLETE (fdo#106023, fdo#103665)

    igt@kms_available_modes_crc@available_mode_test_crc:
      shard-glk:          NOTRUN -> FAIL (fdo#106641)

    igt@kms_rotation_crc@sprite-rotation-180:
      shard-snb:          PASS -> FAIL (fdo#103925)

    igt@testdisplay:
      shard-glk:          PASS -> INCOMPLETE (fdo#107093, fdo#103359, k.org#198133)

    
    ==== Possible fixes ====

    igt@gem_ctx_isolation@rcs0-s3:
      shard-glk:          FAIL (fdo#103375) -> PASS +1

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          INCOMPLETE (fdo#106023, fdo#103665) -> PASS

    igt@gem_reg_read@timestamp-monotonic:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    
  fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
  fdo#106680 https://bugs.freedesktop.org/show_bug.cgi?id=106680
  fdo#107093 https://bugs.freedesktop.org/show_bug.cgi?id=107093
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4606 -> IGTPW_1731
    * Linux: CI_DRM_4684 -> CI_DRM_4690

  CI_DRM_4684: bb1a6d0044581c5d8867afde39111ea4605c644d @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4690: 5b8042159e2b05425c098868ed6fac9518ee638d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1731: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1731/
  IGT_4606: 38a44003774e35c587c67c8766b35e75dbb993b8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1731/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [PATCH i-g-t] Skip VBlank tests in modules without VBlank
  2018-08-20 23:54 ` [igt-dev] " Rodrigo Siqueira
@ 2018-08-21 10:16   ` Chris Wilson
  -1 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-08-21 10:16 UTC (permalink / raw)
  To: Arkadiusz Hiler, Petri Latvala, Rodrigo Siqueira
  Cc: igt-dev, Haneen Mohammed, intel-gfx

Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> The kms_flip test does not support drivers without VBlank which exclude
> some virtual drivers. This patch adds a function that checks if a module
> has a VBlank or not; if a module has VBlank than kms_flip will execute
> all the VBlank tests, otherwise, VBlank tests will be skipped.
> 
> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> ---
>  lib/igt_aux.c    | 14 ++++++++++++++
>  lib/igt_aux.h    |  2 ++
>  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
>  3 files changed, 40 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 1250d5c5..da5be4bb 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
>         return dump_aub;
>  }
>  
> +bool igt_there_is_vblank(int drm_fd)

I would suggest breaking out in the kms namespace,

bool kms_has_vblank(int fd);

> +{
> +       drmVBlank dummy_vbl;
> +       int ret;
> +

Either memset() the rest or use a named initializer.

> +       dummy_vbl.request.type = DRM_VBLANK_ABSOLUTE;
> +       ret = drmWaitVBlank(drm_fd, &dummy_vbl);

return drmWaitVblank() == 0;
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] Skip VBlank tests in modules without VBlank
@ 2018-08-21 10:16   ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-08-21 10:16 UTC (permalink / raw)
  To: Arkadiusz Hiler, Petri Latvala, Rodrigo Siqueira
  Cc: igt-dev, Haneen Mohammed, intel-gfx

Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> The kms_flip test does not support drivers without VBlank which exclude
> some virtual drivers. This patch adds a function that checks if a module
> has a VBlank or not; if a module has VBlank than kms_flip will execute
> all the VBlank tests, otherwise, VBlank tests will be skipped.
> 
> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> ---
>  lib/igt_aux.c    | 14 ++++++++++++++
>  lib/igt_aux.h    |  2 ++
>  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
>  3 files changed, 40 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 1250d5c5..da5be4bb 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
>         return dump_aub;
>  }
>  
> +bool igt_there_is_vblank(int drm_fd)

I would suggest breaking out in the kms namespace,

bool kms_has_vblank(int fd);

> +{
> +       drmVBlank dummy_vbl;
> +       int ret;
> +

Either memset() the rest or use a named initializer.

> +       dummy_vbl.request.type = DRM_VBLANK_ABSOLUTE;
> +       ret = drmWaitVBlank(drm_fd, &dummy_vbl);

return drmWaitVblank() == 0;
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [PATCH i-g-t] Skip VBlank tests in modules without VBlank
  2018-08-21 10:16   ` [igt-dev] [Intel-gfx] " Chris Wilson
@ 2018-08-21 14:29     ` Rodrigo Siqueira
  -1 siblings, 0 replies; 12+ messages in thread
From: Rodrigo Siqueira @ 2018-08-21 14:29 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, Haneen Mohammed, intel-gfx

On 08/21, Chris Wilson wrote:
> Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> > The kms_flip test does not support drivers without VBlank which exclude
> > some virtual drivers. This patch adds a function that checks if a module
> > has a VBlank or not; if a module has VBlank than kms_flip will execute
> > all the VBlank tests, otherwise, VBlank tests will be skipped.
> > 
> > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > ---
> >  lib/igt_aux.c    | 14 ++++++++++++++
> >  lib/igt_aux.h    |  2 ++
> >  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
> >  3 files changed, 40 insertions(+), 2 deletions(-)
> > 
> > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > index 1250d5c5..da5be4bb 100644
> > --- a/lib/igt_aux.c
> > +++ b/lib/igt_aux.c
> > @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
> >         return dump_aub;
> >  }
> >  
> > +bool igt_there_is_vblank(int drm_fd)
> 
> I would suggest breaking out in the kms namespace,
> 
> bool kms_has_vblank(int fd);
Hi,

Do you mean to move this function to igt_kms, right? If so, how about
kmstest_has_vblank.

> > +{
> > +       drmVBlank dummy_vbl;
> > +       int ret;
> > +
> 
> Either memset() the rest or use a named initializer.
> 
> > +       dummy_vbl.request.type = DRM_VBLANK_ABSOLUTE;
> > +       ret = drmWaitVBlank(drm_fd, &dummy_vbl);
> 
> return drmWaitVblank() == 0;
> -Chris

Thanks for the feedback! I will apply the suggestions.

-- 
Rodrigo Siqueira
http://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] Skip VBlank tests in modules without VBlank
@ 2018-08-21 14:29     ` Rodrigo Siqueira
  0 siblings, 0 replies; 12+ messages in thread
From: Rodrigo Siqueira @ 2018-08-21 14:29 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, Haneen Mohammed, intel-gfx

On 08/21, Chris Wilson wrote:
> Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> > The kms_flip test does not support drivers without VBlank which exclude
> > some virtual drivers. This patch adds a function that checks if a module
> > has a VBlank or not; if a module has VBlank than kms_flip will execute
> > all the VBlank tests, otherwise, VBlank tests will be skipped.
> > 
> > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > ---
> >  lib/igt_aux.c    | 14 ++++++++++++++
> >  lib/igt_aux.h    |  2 ++
> >  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
> >  3 files changed, 40 insertions(+), 2 deletions(-)
> > 
> > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > index 1250d5c5..da5be4bb 100644
> > --- a/lib/igt_aux.c
> > +++ b/lib/igt_aux.c
> > @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
> >         return dump_aub;
> >  }
> >  
> > +bool igt_there_is_vblank(int drm_fd)
> 
> I would suggest breaking out in the kms namespace,
> 
> bool kms_has_vblank(int fd);
Hi,

Do you mean to move this function to igt_kms, right? If so, how about
kmstest_has_vblank.

> > +{
> > +       drmVBlank dummy_vbl;
> > +       int ret;
> > +
> 
> Either memset() the rest or use a named initializer.
> 
> > +       dummy_vbl.request.type = DRM_VBLANK_ABSOLUTE;
> > +       ret = drmWaitVBlank(drm_fd, &dummy_vbl);
> 
> return drmWaitVblank() == 0;
> -Chris

Thanks for the feedback! I will apply the suggestions.

-- 
Rodrigo Siqueira
http://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [PATCH i-g-t] Skip VBlank tests in modules without VBlank
  2018-08-21 14:29     ` [igt-dev] [Intel-gfx] " Rodrigo Siqueira
@ 2018-08-21 15:19       ` Chris Wilson
  -1 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-08-21 15:19 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev, Haneen Mohammed, intel-gfx

Quoting Rodrigo Siqueira (2018-08-21 15:29:03)
> On 08/21, Chris Wilson wrote:
> > Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> > > The kms_flip test does not support drivers without VBlank which exclude
> > > some virtual drivers. This patch adds a function that checks if a module
> > > has a VBlank or not; if a module has VBlank than kms_flip will execute
> > > all the VBlank tests, otherwise, VBlank tests will be skipped.
> > > 
> > > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > > ---
> > >  lib/igt_aux.c    | 14 ++++++++++++++
> > >  lib/igt_aux.h    |  2 ++
> > >  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
> > >  3 files changed, 40 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > > index 1250d5c5..da5be4bb 100644
> > > --- a/lib/igt_aux.c
> > > +++ b/lib/igt_aux.c
> > > @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
> > >         return dump_aub;
> > >  }
> > >  
> > > +bool igt_there_is_vblank(int drm_fd)
> > 
> > I would suggest breaking out in the kms namespace,
> > 
> > bool kms_has_vblank(int fd);
> Hi,
> 
> Do you mean to move this function to igt_kms, right? If so, how about
> kmstest_has_vblank.

Yes, start igt_kms.c to avoid letting igt_aux.c keep growing. (Its
mostly for unstructured miscellany). Personally, I think since this is
talking to the kernel and not our own intermediary, kms_has_vblank()
is more appropriate than kmstest_foo.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] Skip VBlank tests in modules without VBlank
@ 2018-08-21 15:19       ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-08-21 15:19 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev, Haneen Mohammed, intel-gfx

Quoting Rodrigo Siqueira (2018-08-21 15:29:03)
> On 08/21, Chris Wilson wrote:
> > Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> > > The kms_flip test does not support drivers without VBlank which exclude
> > > some virtual drivers. This patch adds a function that checks if a module
> > > has a VBlank or not; if a module has VBlank than kms_flip will execute
> > > all the VBlank tests, otherwise, VBlank tests will be skipped.
> > > 
> > > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > > ---
> > >  lib/igt_aux.c    | 14 ++++++++++++++
> > >  lib/igt_aux.h    |  2 ++
> > >  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
> > >  3 files changed, 40 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > > index 1250d5c5..da5be4bb 100644
> > > --- a/lib/igt_aux.c
> > > +++ b/lib/igt_aux.c
> > > @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
> > >         return dump_aub;
> > >  }
> > >  
> > > +bool igt_there_is_vblank(int drm_fd)
> > 
> > I would suggest breaking out in the kms namespace,
> > 
> > bool kms_has_vblank(int fd);
> Hi,
> 
> Do you mean to move this function to igt_kms, right? If so, how about
> kmstest_has_vblank.

Yes, start igt_kms.c to avoid letting igt_aux.c keep growing. (Its
mostly for unstructured miscellany). Personally, I think since this is
talking to the kernel and not our own intermediary, kms_has_vblank()
is more appropriate than kmstest_foo.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [PATCH i-g-t] Skip VBlank tests in modules without VBlank
  2018-08-21 15:19       ` [igt-dev] [Intel-gfx] " Chris Wilson
@ 2018-08-21 17:04         ` Rodrigo Siqueira
  -1 siblings, 0 replies; 12+ messages in thread
From: Rodrigo Siqueira @ 2018-08-21 17:04 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, Haneen Mohammed, intel-gfx

On 08/21, Chris Wilson wrote:
> Quoting Rodrigo Siqueira (2018-08-21 15:29:03)
> > On 08/21, Chris Wilson wrote:
> > > Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> > > > The kms_flip test does not support drivers without VBlank which exclude
> > > > some virtual drivers. This patch adds a function that checks if a module
> > > > has a VBlank or not; if a module has VBlank than kms_flip will execute
> > > > all the VBlank tests, otherwise, VBlank tests will be skipped.
> > > > 
> > > > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > > > ---
> > > >  lib/igt_aux.c    | 14 ++++++++++++++
> > > >  lib/igt_aux.h    |  2 ++
> > > >  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
> > > >  3 files changed, 40 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > > > index 1250d5c5..da5be4bb 100644
> > > > --- a/lib/igt_aux.c
> > > > +++ b/lib/igt_aux.c
> > > > @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
> > > >         return dump_aub;
> > > >  }
> > > >  
> > > > +bool igt_there_is_vblank(int drm_fd)
> > > 
> > > I would suggest breaking out in the kms namespace,
> > > 
> > > bool kms_has_vblank(int fd);
> > Hi,
> > 
> > Do you mean to move this function to igt_kms, right? If so, how about
> > kmstest_has_vblank.
> 
> Yes, start igt_kms.c to avoid letting igt_aux.c keep growing. (Its
> mostly for unstructured miscellany). Personally, I think since this is
> talking to the kernel and not our own intermediary, kms_has_vblank()
> is more appropriate than kmstest_foo.

I got it now! Thanks! :)
I will work on the second version

> -Chris

-- 
Rodrigo Siqueira
http://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] Skip VBlank tests in modules without VBlank
@ 2018-08-21 17:04         ` Rodrigo Siqueira
  0 siblings, 0 replies; 12+ messages in thread
From: Rodrigo Siqueira @ 2018-08-21 17:04 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, Haneen Mohammed, intel-gfx

On 08/21, Chris Wilson wrote:
> Quoting Rodrigo Siqueira (2018-08-21 15:29:03)
> > On 08/21, Chris Wilson wrote:
> > > Quoting Rodrigo Siqueira (2018-08-21 00:54:45)
> > > > The kms_flip test does not support drivers without VBlank which exclude
> > > > some virtual drivers. This patch adds a function that checks if a module
> > > > has a VBlank or not; if a module has VBlank than kms_flip will execute
> > > > all the VBlank tests, otherwise, VBlank tests will be skipped.
> > > > 
> > > > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > > > ---
> > > >  lib/igt_aux.c    | 14 ++++++++++++++
> > > >  lib/igt_aux.h    |  2 ++
> > > >  tests/kms_flip.c | 26 ++++++++++++++++++++++++--
> > > >  3 files changed, 40 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > > > index 1250d5c5..da5be4bb 100644
> > > > --- a/lib/igt_aux.c
> > > > +++ b/lib/igt_aux.c
> > > > @@ -564,6 +564,20 @@ bool igt_aub_dump_enabled(void)
> > > >         return dump_aub;
> > > >  }
> > > >  
> > > > +bool igt_there_is_vblank(int drm_fd)
> > > 
> > > I would suggest breaking out in the kms namespace,
> > > 
> > > bool kms_has_vblank(int fd);
> > Hi,
> > 
> > Do you mean to move this function to igt_kms, right? If so, how about
> > kmstest_has_vblank.
> 
> Yes, start igt_kms.c to avoid letting igt_aux.c keep growing. (Its
> mostly for unstructured miscellany). Personally, I think since this is
> talking to the kernel and not our own intermediary, kms_has_vblank()
> is more appropriate than kmstest_foo.

I got it now! Thanks! :)
I will work on the second version

> -Chris

-- 
Rodrigo Siqueira
http://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-08-21 17:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20 23:54 [PATCH i-g-t] Skip VBlank tests in modules without VBlank Rodrigo Siqueira
2018-08-20 23:54 ` [igt-dev] " Rodrigo Siqueira
2018-08-21  0:34 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-08-21  2:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-08-21 10:16 ` [PATCH i-g-t] " Chris Wilson
2018-08-21 10:16   ` [igt-dev] [Intel-gfx] " Chris Wilson
2018-08-21 14:29   ` Rodrigo Siqueira
2018-08-21 14:29     ` [igt-dev] [Intel-gfx] " Rodrigo Siqueira
2018-08-21 15:19     ` Chris Wilson
2018-08-21 15:19       ` [igt-dev] [Intel-gfx] " Chris Wilson
2018-08-21 17:04       ` Rodrigo Siqueira
2018-08-21 17:04         ` [igt-dev] [Intel-gfx] " Rodrigo Siqueira

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.