All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
@ 2018-08-08 13:17 Mahesh Kumar
  2018-08-08 13:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Mahesh Kumar @ 2018-08-08 13:17 UTC (permalink / raw)
  To: igt-dev

Now crc framework does not wait for first CRC during open, User need
to wait for crc if he wants so.
This patch make changes in igt_pipe_crc_start to make sure we wait
for first crc after open to keep the tests behaviour same.
Without this if driver is skipping few initial crcs there will be
mismatch in expected and actual number of crcs returned by crc
framework.

Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
---
 lib/igt_debugfs.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index f3196f43..f4c388bf 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -748,6 +748,7 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
 void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 {
 	const char *src = pipe_crc_source_name(pipe_crc->source);
+	igt_crc_t first_crc;
 	char buf[32];
 
 	/* Stop first just to make sure we don't have lingering state left. */
@@ -757,11 +758,13 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 
 	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
 
-	igt_set_timeout(10, "Opening crc fd, which waits for first CRC.");
+	igt_set_timeout(10, "Opening crc fd, and wait for first CRC.");
 	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
+	igt_assert(pipe_crc->crc_fd != -1);
+	read_one_crc(pipe_crc, &first_crc);
+
 	igt_reset_timeout();
 
-	igt_assert(pipe_crc->crc_fd != -1);
 	errno = 0;
 }
 
-- 
2.16.2

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
  2018-08-08 13:17 [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start Mahesh Kumar
@ 2018-08-08 13:45 ` Patchwork
  2018-08-08 14:04 ` [igt-dev] [PATCH i-g-t] " Maarten Lankhorst
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-08-08 13:45 UTC (permalink / raw)
  To: Mahesh Kumar; +Cc: igt-dev

== Series Details ==

Series: lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
URL   : https://patchwork.freedesktop.org/series/47887/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4633 -> IGTPW_1693 =

== Summary - SUCCESS ==

  No regressions found.

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

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
      {fi-byt-clapper}:   PASS -> FAIL +1

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_workarounds:
      fi-cnl-psr:         PASS -> DMESG-FAIL (fdo#107292)

    igt@gem_exec_suspend@basic-s4-devices:
      fi-kbl-7500u:       PASS -> DMESG-WARN (fdo#107139, fdo#105128)

    
    ==== Possible fixes ====

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

    igt@drv_selftest@live_workarounds:
      fi-whl-u:           DMESG-FAIL (fdo#107292) -> PASS
      fi-kbl-x1275:       DMESG-FAIL (fdo#107292) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      {fi-byt-clapper}:   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#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
  fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
  fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
  fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292


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

  Additional (1): fi-bxt-dsi 
  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4588 -> IGTPW_1693

  CI_DRM_4633: ea6e3f703e4d234c9c8eaec6c533355c7454ecb6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1693: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1693/
  IGT_4588: 7e5abbe4d9b2129bbbf02be77a70cad3da2ab941 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
  2018-08-08 13:17 [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start Mahesh Kumar
  2018-08-08 13:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-08-08 14:04 ` Maarten Lankhorst
  2018-08-08 15:20   ` Kumar, Mahesh
  2018-08-08 18:53 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Maarten Lankhorst @ 2018-08-08 14:04 UTC (permalink / raw)
  To: Mahesh Kumar, igt-dev

Op 08-08-18 om 15:17 schreef Mahesh Kumar:
> Now crc framework does not wait for first CRC during open, User need
> to wait for crc if he wants so.
> This patch make changes in igt_pipe_crc_start to make sure we wait
> for first crc after open to keep the tests behaviour same.
> Without this if driver is skipping few initial crcs there will be
> mismatch in expected and actual number of crcs returned by crc
> framework.
>
> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> ---
>  lib/igt_debugfs.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index f3196f43..f4c388bf 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -748,6 +748,7 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
>  void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>  {
>  	const char *src = pipe_crc_source_name(pipe_crc->source);
> +	igt_crc_t first_crc;
>  	char buf[32];
>  
>  	/* Stop first just to make sure we don't have lingering state left. */
> @@ -757,11 +758,13 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>  
>  	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
>  
> -	igt_set_timeout(10, "Opening crc fd, which waits for first CRC.");
> +	igt_set_timeout(10, "Opening crc fd, and wait for first CRC.");
>  	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
> +	igt_assert(pipe_crc->crc_fd != -1);
> +	read_one_crc(pipe_crc, &first_crc);
> +
>  	igt_reset_timeout();
>  
> -	igt_assert(pipe_crc->crc_fd != -1);
>  	errno = 0;
>  }
>  

Could you use poll() for the first CRC instead?

~Maarten

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

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

* Re: [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
  2018-08-08 14:04 ` [igt-dev] [PATCH i-g-t] " Maarten Lankhorst
@ 2018-08-08 15:20   ` Kumar, Mahesh
  0 siblings, 0 replies; 11+ messages in thread
From: Kumar, Mahesh @ 2018-08-08 15:20 UTC (permalink / raw)
  To: Maarten Lankhorst, igt-dev

Hi,


On 8/8/2018 7:34 PM, Maarten Lankhorst wrote:
> Op 08-08-18 om 15:17 schreef Mahesh Kumar:
>> Now crc framework does not wait for first CRC during open, User need
>> to wait for crc if he wants so.
>> This patch make changes in igt_pipe_crc_start to make sure we wait
>> for first crc after open to keep the tests behaviour same.
>> Without this if driver is skipping few initial crcs there will be
>> mismatch in expected and actual number of crcs returned by crc
>> framework.
>>
>> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
>> ---
>>   lib/igt_debugfs.c | 7 +++++--
>>   1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
>> index f3196f43..f4c388bf 100644
>> --- a/lib/igt_debugfs.c
>> +++ b/lib/igt_debugfs.c
>> @@ -748,6 +748,7 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
>>   void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>>   {
>>   	const char *src = pipe_crc_source_name(pipe_crc->source);
>> +	igt_crc_t first_crc;
>>   	char buf[32];
>>   
>>   	/* Stop first just to make sure we don't have lingering state left. */
>> @@ -757,11 +758,13 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>>   
>>   	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
>>   
>> -	igt_set_timeout(10, "Opening crc fd, which waits for first CRC.");
>> +	igt_set_timeout(10, "Opening crc fd, and wait for first CRC.");
>>   	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
>> +	igt_assert(pipe_crc->crc_fd != -1);
>> +	read_one_crc(pipe_crc, &first_crc);
>> +
>>   	igt_reset_timeout();
>>   
>> -	igt_assert(pipe_crc->crc_fd != -1);
>>   	errno = 0;
>>   }
>>   
> Could you use poll() for the first CRC instead?
Thank for review,
sure, sounds good to me, even it'll avoid loosing first CRC. Will make 
changes
-Mahesh
> ~Maarten
>

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
  2018-08-08 13:17 [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start Mahesh Kumar
  2018-08-08 13:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2018-08-08 14:04 ` [igt-dev] [PATCH i-g-t] " Maarten Lankhorst
@ 2018-08-08 18:53 ` Patchwork
  2018-08-13 12:58 ` [igt-dev] [PATCH i-g-t v2] " Mahesh Kumar
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-08-08 18:53 UTC (permalink / raw)
  To: Mahesh Kumar; +Cc: igt-dev

== Series Details ==

Series: lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
URL   : https://patchwork.freedesktop.org/series/47887/
State : failure

== Summary ==

= CI Bug Log - changes from IGT_4588_full -> IGTPW_1693_full =

== Summary - FAILURE ==

  Serious unknown changes coming with IGTPW_1693_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1693_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/47887/revisions/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@kms_chv_cursor_fail@pipe-a-128x128-bottom-edge:
      shard-glk:          PASS -> FAIL +32

    igt@kms_chv_cursor_fail@pipe-a-256x256-right-edge:
      shard-snb:          NOTRUN -> FAIL

    igt@kms_chv_cursor_fail@pipe-a-64x64-top-edge:
      shard-apl:          PASS -> FAIL +35

    igt@kms_chv_cursor_fail@pipe-b-256x256-top-edge:
      shard-hsw:          PASS -> FAIL +37

    igt@kms_chv_cursor_fail@pipe-b-64x64-left-edge:
      shard-snb:          PASS -> FAIL +21

    igt@kms_chv_cursor_fail@pipe-c-256x256-bottom-edge:
      shard-kbl:          PASS -> FAIL +35

    igt@kms_chv_cursor_fail@pipe-c-256x256-top-edge:
      shard-glk:          NOTRUN -> FAIL

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_draw_crc@draw-method-rgb565-mmap-wc-ytiled:
      shard-glk:          PASS -> FAIL (fdo#103184)

    igt@kms_frontbuffer_tracking@fbc-1p-shrfb-fliptrack:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

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

    igt@kms_setmode@basic:
      shard-kbl:          PASS -> FAIL (fdo#99912)

    igt@pm_rpm@debugfs-forcewake-user:
      shard-glk:          PASS -> FAIL (fdo#106539) +5

    igt@pm_rpm@modeset-lpsp:
      shard-apl:          SKIP -> FAIL (fdo#106539)
      shard-kbl:          SKIP -> FAIL (fdo#106539)
      shard-hsw:          SKIP -> FAIL (fdo#106539)

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

    
    ==== Possible fixes ====

    igt@drv_suspend@shrink:
      shard-snb:          INCOMPLETE (fdo#106886, fdo#105411) -> PASS

    igt@gem_softpin@evict-snoop-interruptible:
      shard-snb:          INCOMPLETE (fdo#105411) -> SKIP

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-snb:          FAIL (fdo#103166) -> PASS

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS

    igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm:
      shard-apl:          FAIL (fdo#106539) -> PASS +1

    igt@pm_rpm@gem-pread:
      shard-glk:          WARN -> PASS

    igt@pm_rpm@modeset-non-lpsp-stress:
      shard-kbl:          FAIL (fdo#106539) -> PASS +1
      shard-hsw:          FAIL (fdo#106539) -> PASS +1
      shard-glk:          FAIL (fdo#106539) -> PASS +1

    
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#106539 https://bugs.freedesktop.org/show_bug.cgi?id=106539
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107093 https://bugs.freedesktop.org/show_bug.cgi?id=107093
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
  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_4588 -> IGTPW_1693
    * Linux: CI_DRM_4632 -> CI_DRM_4633

  CI_DRM_4632: 648e2ff1094eabf43613f41d4d719c1a1f555dbb @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4633: ea6e3f703e4d234c9c8eaec6c533355c7454ecb6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1693: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1693/
  IGT_4588: 7e5abbe4d9b2129bbbf02be77a70cad3da2ab941 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] [PATCH i-g-t v2] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
  2018-08-08 13:17 [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start Mahesh Kumar
                   ` (2 preceding siblings ...)
  2018-08-08 18:53 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
@ 2018-08-13 12:58 ` Mahesh Kumar
  2018-08-13 13:38   ` Maarten Lankhorst
  2018-08-13 13:53   ` [igt-dev] [PATCH i-g-t v3] " Mahesh Kumar
  2018-08-13 14:52 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start (rev3) Patchwork
  2018-08-13 17:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 2 replies; 11+ messages in thread
From: Mahesh Kumar @ 2018-08-13 12:58 UTC (permalink / raw)
  To: igt-dev

Now crc framework does not wait for first CRC during open, User need
to wait for crc if he wants so.
This patch make changes in igt_pipe_crc_start to make sure we wait
until first crc available after open to keep the tests behaviour same.
Without this if driver is skipping few initial crcs there will be
mismatch in expected and actual number of crcs returned by crc
framework.

Changes Since V1:
 - poll instead of read_one_crc (Maarten)

Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
---
 lib/igt_debugfs.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index f3196f43..c2b438b6 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -35,6 +35,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <i915_drm.h>
+#include <poll.h>
 
 #include "drmtest.h"
 #include "igt_aux.h"
@@ -748,7 +749,9 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
 void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 {
 	const char *src = pipe_crc_source_name(pipe_crc->source);
+	struct pollfd pfd;
 	char buf[32];
+	int ret;
 
 	/* Stop first just to make sure we don't have lingering state left. */
 	igt_pipe_crc_stop(pipe_crc);
@@ -757,11 +760,17 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 
 	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
 
-	igt_set_timeout(10, "Opening crc fd, which waits for first CRC.");
+	igt_set_timeout(10, "Opening crc fd, and poll for first CRC.");
 	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
+	igt_assert(pipe_crc->crc_fd != -1);
+
+	pfd.fd = pipe_crc->crc_fd;
+	pfd.events = POLLIN;
+	ret = poll(&pfd, 1, 10000);
+	igt_assert(ret > 0);
+
 	igt_reset_timeout();
 
-	igt_assert(pipe_crc->crc_fd != -1);
 	errno = 0;
 }
 
-- 
2.16.2

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

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

* Re: [igt-dev] [PATCH i-g-t v2] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
  2018-08-13 12:58 ` [igt-dev] [PATCH i-g-t v2] " Mahesh Kumar
@ 2018-08-13 13:38   ` Maarten Lankhorst
  2018-08-13 13:53   ` [igt-dev] [PATCH i-g-t v3] " Mahesh Kumar
  1 sibling, 0 replies; 11+ messages in thread
From: Maarten Lankhorst @ 2018-08-13 13:38 UTC (permalink / raw)
  To: Mahesh Kumar, igt-dev

Op 13-08-18 om 14:58 schreef Mahesh Kumar:
> Now crc framework does not wait for first CRC during open, User need
> to wait for crc if he wants so.
> This patch make changes in igt_pipe_crc_start to make sure we wait
> until first crc available after open to keep the tests behaviour same.
> Without this if driver is skipping few initial crcs there will be
> mismatch in expected and actual number of crcs returned by crc
> framework.
>
> Changes Since V1:
>  - poll instead of read_one_crc (Maarten)
>
> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> ---
>  lib/igt_debugfs.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index f3196f43..c2b438b6 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -35,6 +35,7 @@
>  #include <fcntl.h>
>  #include <unistd.h>
>  #include <i915_drm.h>
> +#include <poll.h>
>  
>  #include "drmtest.h"
>  #include "igt_aux.h"
> @@ -748,7 +749,9 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
>  void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>  {
>  	const char *src = pipe_crc_source_name(pipe_crc->source);
> +	struct pollfd pfd;
>  	char buf[32];
> +	int ret;
>  
>  	/* Stop first just to make sure we don't have lingering state left. */
>  	igt_pipe_crc_stop(pipe_crc);
> @@ -757,11 +760,17 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>  
>  	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
>  
> -	igt_set_timeout(10, "Opening crc fd, which waits for first CRC.");
> +	igt_set_timeout(10, "Opening crc fd, and poll for first CRC.");
>  	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
> +	igt_assert(pipe_crc->crc_fd != -1);
> +
> +	pfd.fd = pipe_crc->crc_fd;
> +	pfd.events = POLLIN;
> +	ret = poll(&pfd, 1, 10000);
Set timeout to -1? We already use igt_set_timeout
> +	igt_assert(ret > 0);
> +
>  	igt_reset_timeout();
>  
> -	igt_assert(pipe_crc->crc_fd != -1);
>  	errno = 0;
>  }
>  


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

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

* [igt-dev] [PATCH i-g-t v3] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
  2018-08-13 12:58 ` [igt-dev] [PATCH i-g-t v2] " Mahesh Kumar
  2018-08-13 13:38   ` Maarten Lankhorst
@ 2018-08-13 13:53   ` Mahesh Kumar
  2018-08-13 14:14     ` Maarten Lankhorst
  1 sibling, 1 reply; 11+ messages in thread
From: Mahesh Kumar @ 2018-08-13 13:53 UTC (permalink / raw)
  To: igt-dev

Now crc framework does not wait for first CRC during open, User need
to wait for crc if he wants so.
This patch make changes in igt_pipe_crc_start to make sure we wait
until first crc available after open to keep the tests behaviour same.
Without this if driver is skipping few initial crcs there will be
mismatch in expected and actual number of crcs returned by crc
framework.

Changes Since V1:
 - poll instead of read_one_crc (Maarten)
Changes Since V2:
 - poll without timeout, we already have igt_timeout (Maarten)

Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
---
 lib/igt_debugfs.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index f3196f43..4de6b247 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -35,6 +35,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <i915_drm.h>
+#include <poll.h>
 
 #include "drmtest.h"
 #include "igt_aux.h"
@@ -748,6 +749,7 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
 void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 {
 	const char *src = pipe_crc_source_name(pipe_crc->source);
+	struct pollfd pfd;
 	char buf[32];
 
 	/* Stop first just to make sure we don't have lingering state left. */
@@ -757,11 +759,16 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 
 	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
 
-	igt_set_timeout(10, "Opening crc fd, which waits for first CRC.");
+	igt_set_timeout(10, "Opening crc fd, and poll for first CRC.");
 	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
+	igt_assert(pipe_crc->crc_fd != -1);
+
+	pfd.fd = pipe_crc->crc_fd;
+	pfd.events = POLLIN;
+	poll(&pfd, 1, -1);
+
 	igt_reset_timeout();
 
-	igt_assert(pipe_crc->crc_fd != -1);
 	errno = 0;
 }
 
-- 
2.16.2

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

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

* Re: [igt-dev] [PATCH i-g-t v3] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start
  2018-08-13 13:53   ` [igt-dev] [PATCH i-g-t v3] " Mahesh Kumar
@ 2018-08-13 14:14     ` Maarten Lankhorst
  0 siblings, 0 replies; 11+ messages in thread
From: Maarten Lankhorst @ 2018-08-13 14:14 UTC (permalink / raw)
  To: Mahesh Kumar, igt-dev

Op 13-08-18 om 15:53 schreef Mahesh Kumar:
> Now crc framework does not wait for first CRC during open, User need
> to wait for crc if he wants so.
> This patch make changes in igt_pipe_crc_start to make sure we wait
> until first crc available after open to keep the tests behaviour same.
> Without this if driver is skipping few initial crcs there will be
> mismatch in expected and actual number of crcs returned by crc
> framework.
>
> Changes Since V1:
>  - poll instead of read_one_crc (Maarten)
> Changes Since V2:
>  - poll without timeout, we already have igt_timeout (Maarten)
>
> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> ---
>  lib/igt_debugfs.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index f3196f43..4de6b247 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -35,6 +35,7 @@
>  #include <fcntl.h>
>  #include <unistd.h>
>  #include <i915_drm.h>
> +#include <poll.h>
>  
>  #include "drmtest.h"
>  #include "igt_aux.h"
> @@ -748,6 +749,7 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
>  void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>  {
>  	const char *src = pipe_crc_source_name(pipe_crc->source);
> +	struct pollfd pfd;
>  	char buf[32];
>  
>  	/* Stop first just to make sure we don't have lingering state left. */
> @@ -757,11 +759,16 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
>  
>  	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
>  
> -	igt_set_timeout(10, "Opening crc fd, which waits for first CRC.");
> +	igt_set_timeout(10, "Opening crc fd, and poll for first CRC.");
>  	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
> +	igt_assert(pipe_crc->crc_fd != -1);
> +
> +	pfd.fd = pipe_crc->crc_fd;
> +	pfd.events = POLLIN;
> +	poll(&pfd, 1, -1);
> +
>  	igt_reset_timeout();
>  
> -	igt_assert(pipe_crc->crc_fd != -1);
>  	errno = 0;
>  }
>  

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start (rev3)
  2018-08-08 13:17 [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start Mahesh Kumar
                   ` (3 preceding siblings ...)
  2018-08-13 12:58 ` [igt-dev] [PATCH i-g-t v2] " Mahesh Kumar
@ 2018-08-13 14:52 ` Patchwork
  2018-08-13 17:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-08-13 14:52 UTC (permalink / raw)
  To: Mahesh Kumar; +Cc: igt-dev

== Series Details ==

Series: lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start (rev3)
URL   : https://patchwork.freedesktop.org/series/47887/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4660 -> IGTPW_1706 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/47887/revisions/3/mbox/

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_coherency:
      fi-gdg-551:         PASS -> DMESG-FAIL (fdo#107164)

    igt@drv_selftest@live_workarounds:
      fi-skl-6700hq:      PASS -> DMESG-FAIL (fdo#107292)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-FAIL (fdo#102614)

    
    ==== Possible fixes ====

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

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

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-skl-guc:         FAIL (fdo#103191) -> PASS

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

  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
  fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
  fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362


== Participating hosts (54 -> 49) ==

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


== Build changes ==

    * IGT: IGT_4592 -> IGTPW_1706

  CI_DRM_4660: 9cd882754c1017e68ed9d2c8d57dc326530522fe @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1706: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1706/
  IGT_4592: fce9638b2e60afce872b3056c19a729b1b3708be @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start (rev3)
  2018-08-08 13:17 [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start Mahesh Kumar
                   ` (4 preceding siblings ...)
  2018-08-13 14:52 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start (rev3) Patchwork
@ 2018-08-13 17:44 ` Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-08-13 17:44 UTC (permalink / raw)
  To: Mahesh Kumar; +Cc: igt-dev

== Series Details ==

Series: lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start (rev3)
URL   : https://patchwork.freedesktop.org/series/47887/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4592_full -> IGTPW_1706_full =

== Summary - WARNING ==

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

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size:
      shard-snb:          PASS -> SKIP +1

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
      shard-hsw:          PASS -> DMESG-WARN (fdo#102614)

    igt@kms_cursor_legacy@pipe-c-torture-move:
      shard-kbl:          PASS -> DMESG-WARN (fdo#107122)
      shard-hsw:          PASS -> DMESG-WARN (fdo#107122)

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

    
    ==== Possible fixes ====

    igt@gem_eio@wait-wedge-10ms:
      shard-glk:          FAIL (fdo#105957) -> PASS

    igt@kms_cursor_legacy@all-pipes-torture-move:
      shard-snb:          DMESG-WARN (fdo#107122) -> PASS
      shard-glk:          DMESG-WARN (fdo#107122) -> PASS
      shard-apl:          DMESG-WARN (fdo#107122) -> PASS
      shard-hsw:          DMESG-WARN (fdo#107122) -> PASS

    igt@kms_rotation_crc@primary-rotation-270:
      shard-kbl:          FAIL (fdo#103925) -> PASS

    igt@kms_universal_plane@cursor-fb-leak-pipe-a:
      shard-apl:          FAIL (fdo#107241) -> PASS

    
  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#105957 https://bugs.freedesktop.org/show_bug.cgi?id=105957
  fdo#107122 https://bugs.freedesktop.org/show_bug.cgi?id=107122
  fdo#107241 https://bugs.freedesktop.org/show_bug.cgi?id=107241


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

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4592 -> IGTPW_1706
    * Linux: CI_DRM_4642 -> CI_DRM_4660

  CI_DRM_4642: 0de4e9a02a422ebe523f59c3b462c949673746b6 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4660: 9cd882754c1017e68ed9d2c8d57dc326530522fe @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1706: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1706/
  IGT_4592: fce9638b2e60afce872b3056c19a729b1b3708be @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 13:17 [igt-dev] [PATCH i-g-t] lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start Mahesh Kumar
2018-08-08 13:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-08-08 14:04 ` [igt-dev] [PATCH i-g-t] " Maarten Lankhorst
2018-08-08 15:20   ` Kumar, Mahesh
2018-08-08 18:53 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2018-08-13 12:58 ` [igt-dev] [PATCH i-g-t v2] " Mahesh Kumar
2018-08-13 13:38   ` Maarten Lankhorst
2018-08-13 13:53   ` [igt-dev] [PATCH i-g-t v3] " Mahesh Kumar
2018-08-13 14:14     ` Maarten Lankhorst
2018-08-13 14:52 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_debugfs: explicitly wait for first crc in igt_pipe_crc_start (rev3) Patchwork
2018-08-13 17:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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.