* [igt-dev] [PATCH i-g-t] lib/debugfs: Use a blocking read in igt_pipe_crc_get_single()
@ 2018-09-25 14:53 Ville Syrjala
2018-09-25 15:32 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ville Syrjala @ 2018-09-25 14:53 UTC (permalink / raw)
To: igt-dev
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
All users of igt_pipe_crc_get_single() want a blocking read even if
the fd was opened in nonblocking mode. Make it so.
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_debugfs.c | 35 ++++++++++++-----------------------
lib/igt_debugfs.h | 2 +-
tests/kms_chv_cursor_fail.c | 2 +-
3 files changed, 14 insertions(+), 25 deletions(-)
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index baedc2255ac9..d151d9b23ed4 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -757,8 +757,13 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
{
int ret;
- while ((ret = read_crc(pipe_crc, out)) <= 0 && ret != -EINVAL)
- usleep(1000);
+ fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags & ~O_NONBLOCK);
+
+ do {
+ ret = read_crc(pipe_crc, out);
+ } while (ret == -EINTR);
+
+ fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
}
/**
@@ -926,12 +931,8 @@ void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
* @pipe_crc: pipe CRC object
* @crc: buffer pointer for the captured CRC value
*
- * Read a single @crc from @pipe_crc. This function does not block
- * when nonblocking CRC is requested, and will return false if no CRC
- * can be captured.
- *
- * If opened in blocking mode it will always block until a new CRC is read, like
- * igt_pipe_crc_collect_crc().
+ * Read a single @crc from @pipe_crc. This function blocks even
+ * when nonblocking CRC is requested.
*
* Callers must start and stop the capturing themselves by calling
* igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
@@ -943,22 +944,11 @@ void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
* Returns:
* Whether a crc is captured, only false in non-blocking mode.
*/
-bool
-igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
+void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
{
- bool found = true;
+ read_one_crc(pipe_crc, crc);
- if (pipe_crc->flags & O_NONBLOCK) {
- int ret = read_crc(pipe_crc, crc);
-
- found = ret > 0;
- } else
- read_one_crc(pipe_crc, crc);
-
- if (found)
- crc_sanity_checks(crc);
-
- return found;
+ crc_sanity_checks(crc);
}
/**
@@ -976,7 +966,6 @@ igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
{
unsigned vblank = kmstest_get_vblank(drm_fd, pipe_crc->pipe, 0);
- igt_assert(!(pipe_crc->flags & O_NONBLOCK));
do {
read_one_crc(pipe_crc, crc);
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index 9f81be0a24de..58ca07f5c15d 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -132,7 +132,7 @@ __attribute__((warn_unused_result))
int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
igt_crc_t **out_crcs);
void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc);
-bool igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
+void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
void igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc);
void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
index 7138e549aeb7..8e50978d0be1 100644
--- a/tests/kms_chv_cursor_fail.c
+++ b/tests/kms_chv_cursor_fail.c
@@ -258,7 +258,7 @@ static void prepare_crtc(data_t *data)
/* get reference crc w/o cursor */
igt_pipe_crc_start(data->pipe_crc);
- igt_assert(igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc));
+ igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc);
}
static void test_crtc(data_t *data, unsigned int edges)
--
2.16.4
_______________________________________________
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.BAT: success for lib/debugfs: Use a blocking read in igt_pipe_crc_get_single()
2018-09-25 14:53 [igt-dev] [PATCH i-g-t] lib/debugfs: Use a blocking read in igt_pipe_crc_get_single() Ville Syrjala
@ 2018-09-25 15:32 ` Patchwork
2018-09-25 16:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-09-26 18:56 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkilä
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-09-25 15:32 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: igt-dev
== Series Details ==
Series: lib/debugfs: Use a blocking read in igt_pipe_crc_get_single()
URL : https://patchwork.freedesktop.org/series/50152/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4874 -> IGTPW_1871 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50152/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1871 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@debugfs_test@read_all_entries:
fi-icl-u: PASS -> DMESG-WARN (fdo#107724)
igt@gem_exec_suspend@basic-s4-devices:
fi-bdw-samus: PASS -> INCOMPLETE (fdo#107773)
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
fi-byt-clapper: PASS -> FAIL (fdo#103191, fdo#107362)
igt@kms_psr@primary_page_flip:
fi-kbl-r: PASS -> FAIL (fdo#107336)
igt@prime_vgem@basic-fence-flip:
fi-skl-iommu: PASS -> FAIL (fdo#104008)
==== Possible fixes ====
igt@drv_module_reload@basic-reload:
fi-blb-e6850: INCOMPLETE (fdo#107718) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-cfl-8109u: INCOMPLETE (fdo#106070) -> PASS
igt@kms_psr@primary_page_flip:
fi-cnl-u: FAIL (fdo#107336) -> PASS
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
== Participating hosts (48 -> 43) ==
Additional (1): fi-skl-6700hq
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u2 fi-ctg-p8600
== Build changes ==
* IGT: IGT_4649 -> IGTPW_1871
CI_DRM_4874: 7bb42432ef1cc63b4a6a223e19455f6c4f9a1538 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1871: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1871/
IGT_4649: 19b0c74d20d9b53d4c82be14af0909a3b6846010 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1871/issues.html
_______________________________________________
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] ✓ Fi.CI.IGT: success for lib/debugfs: Use a blocking read in igt_pipe_crc_get_single()
2018-09-25 14:53 [igt-dev] [PATCH i-g-t] lib/debugfs: Use a blocking read in igt_pipe_crc_get_single() Ville Syrjala
2018-09-25 15:32 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-09-25 16:33 ` Patchwork
2018-09-26 18:56 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkilä
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-09-25 16:33 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: igt-dev
== Series Details ==
Series: lib/debugfs: Use a blocking read in igt_pipe_crc_get_single()
URL : https://patchwork.freedesktop.org/series/50152/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4649_full -> IGTPW_1871_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1871_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1871_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/50152/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1871_full:
=== IGT changes ===
==== Warnings ====
igt@pm_rc6_residency@rc6-accuracy:
shard-kbl: PASS -> SKIP
shard-snb: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_1871_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
shard-glk: PASS -> DMESG-WARN (fdo#105763, fdo#106538)
igt@kms_frontbuffer_tracking@fbcpsr-1p-rte:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
igt@kms_setmode@basic:
shard-kbl: PASS -> FAIL (fdo#99912)
igt@perf@blocking:
shard-hsw: PASS -> FAIL (fdo#102252)
==== Possible fixes ====
igt@kms_cursor_crc@cursor-256x256-suspend:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@kms_cursor_legacy@pipe-c-forked-move:
shard-apl: INCOMPLETE (fdo#103927) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
igt@kms_universal_plane@universal-plane-gen9-features-pipe-a:
shard-kbl: DMESG-WARN (fdo#103558, fdo#105602) -> PASS +14
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4649 -> IGTPW_1871
* Linux: CI_DRM_4859 -> CI_DRM_4874
CI_DRM_4859: 841654aee134e50b21bf8f2aab17da8d0afd14c4 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4874: 7bb42432ef1cc63b4a6a223e19455f6c4f9a1538 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1871: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1871/
IGT_4649: 19b0c74d20d9b53d4c82be14af0909a3b6846010 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1871/shards.html
_______________________________________________
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
* Re: [igt-dev] [PATCH i-g-t] lib/debugfs: Use a blocking read in igt_pipe_crc_get_single()
2018-09-25 14:53 [igt-dev] [PATCH i-g-t] lib/debugfs: Use a blocking read in igt_pipe_crc_get_single() Ville Syrjala
2018-09-25 15:32 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-25 16:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-09-26 18:56 ` Juha-Pekka Heikkilä
2018-09-27 12:21 ` Ville Syrjälä
2 siblings, 1 reply; 5+ messages in thread
From: Juha-Pekka Heikkilä @ 2018-09-26 18:56 UTC (permalink / raw)
To: Ville Syrjala, igt-dev
Looks good. I suspect this will reduce those random crc errors seen in CI.
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Ville Syrjala kirjoitti 25.9.2018 klo 17.53:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> All users of igt_pipe_crc_get_single() want a blocking read even if
> the fd was opened in nonblocking mode. Make it so.
>
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> lib/igt_debugfs.c | 35 ++++++++++++-----------------------
> lib/igt_debugfs.h | 2 +-
> tests/kms_chv_cursor_fail.c | 2 +-
> 3 files changed, 14 insertions(+), 25 deletions(-)
>
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index baedc2255ac9..d151d9b23ed4 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -757,8 +757,13 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
> {
> int ret;
>
> - while ((ret = read_crc(pipe_crc, out)) <= 0 && ret != -EINVAL)
> - usleep(1000);
> + fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags & ~O_NONBLOCK);
> +
> + do {
> + ret = read_crc(pipe_crc, out);
> + } while (ret == -EINTR);
> +
> + fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
> }
>
> /**
> @@ -926,12 +931,8 @@ void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
> * @pipe_crc: pipe CRC object
> * @crc: buffer pointer for the captured CRC value
> *
> - * Read a single @crc from @pipe_crc. This function does not block
> - * when nonblocking CRC is requested, and will return false if no CRC
> - * can be captured.
> - *
> - * If opened in blocking mode it will always block until a new CRC is read, like
> - * igt_pipe_crc_collect_crc().
> + * Read a single @crc from @pipe_crc. This function blocks even
> + * when nonblocking CRC is requested.
> *
> * Callers must start and stop the capturing themselves by calling
> * igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
> @@ -943,22 +944,11 @@ void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
> * Returns:
> * Whether a crc is captured, only false in non-blocking mode.
> */
> -bool
> -igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> +void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> {
> - bool found = true;
> + read_one_crc(pipe_crc, crc);
>
> - if (pipe_crc->flags & O_NONBLOCK) {
> - int ret = read_crc(pipe_crc, crc);
> -
> - found = ret > 0;
> - } else
> - read_one_crc(pipe_crc, crc);
> -
> - if (found)
> - crc_sanity_checks(crc);
> -
> - return found;
> + crc_sanity_checks(crc);
> }
>
> /**
> @@ -976,7 +966,6 @@ igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> {
> unsigned vblank = kmstest_get_vblank(drm_fd, pipe_crc->pipe, 0);
>
> - igt_assert(!(pipe_crc->flags & O_NONBLOCK));
> do {
> read_one_crc(pipe_crc, crc);
>
> diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
> index 9f81be0a24de..58ca07f5c15d 100644
> --- a/lib/igt_debugfs.h
> +++ b/lib/igt_debugfs.h
> @@ -132,7 +132,7 @@ __attribute__((warn_unused_result))
> int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
> igt_crc_t **out_crcs);
> void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc);
> -bool igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> +void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> void igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc);
>
> void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
> index 7138e549aeb7..8e50978d0be1 100644
> --- a/tests/kms_chv_cursor_fail.c
> +++ b/tests/kms_chv_cursor_fail.c
> @@ -258,7 +258,7 @@ static void prepare_crtc(data_t *data)
>
> /* get reference crc w/o cursor */
> igt_pipe_crc_start(data->pipe_crc);
> - igt_assert(igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc));
> + igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc);
> }
>
> static void test_crtc(data_t *data, unsigned int edges)
>
_______________________________________________
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
* Re: [igt-dev] [PATCH i-g-t] lib/debugfs: Use a blocking read in igt_pipe_crc_get_single()
2018-09-26 18:56 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkilä
@ 2018-09-27 12:21 ` Ville Syrjälä
0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-09-27 12:21 UTC (permalink / raw)
To: Juha-Pekka Heikkilä; +Cc: igt-dev
On Wed, Sep 26, 2018 at 09:56:47PM +0300, Juha-Pekka Heikkilä wrote:
> Looks good. I suspect this will reduce those random crc errors seen in CI.
>
> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>
> Ville Syrjala kirjoitti 25.9.2018 klo 17.53:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > All users of igt_pipe_crc_get_single() want a blocking read even if
> > the fd was opened in nonblocking mode. Make it so.
> >
> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > lib/igt_debugfs.c | 35 ++++++++++++-----------------------
> > lib/igt_debugfs.h | 2 +-
> > tests/kms_chv_cursor_fail.c | 2 +-
> > 3 files changed, 14 insertions(+), 25 deletions(-)
> >
> > diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> > index baedc2255ac9..d151d9b23ed4 100644
> > --- a/lib/igt_debugfs.c
> > +++ b/lib/igt_debugfs.c
> > @@ -757,8 +757,13 @@ static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
> > {
> > int ret;
> >
> > - while ((ret = read_crc(pipe_crc, out)) <= 0 && ret != -EINVAL)
> > - usleep(1000);
> > + fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags & ~O_NONBLOCK);
> > +
> > + do {
> > + ret = read_crc(pipe_crc, out);
> > + } while (ret == -EINTR);
> > +
> > + fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
> > }
> >
> > /**
> > @@ -926,12 +931,8 @@ void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
> > * @pipe_crc: pipe CRC object
> > * @crc: buffer pointer for the captured CRC value
> > *
> > - * Read a single @crc from @pipe_crc. This function does not block
> > - * when nonblocking CRC is requested, and will return false if no CRC
> > - * can be captured.
> > - *
> > - * If opened in blocking mode it will always block until a new CRC is read, like
> > - * igt_pipe_crc_collect_crc().
> > + * Read a single @crc from @pipe_crc. This function blocks even
> > + * when nonblocking CRC is requested.
> > *
> > * Callers must start and stop the capturing themselves by calling
> > * igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
> > @@ -943,22 +944,11 @@ void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
> > * Returns:
> > * Whether a crc is captured, only false in non-blocking mode.
I just noticed that I failed to remove this "Returns: ..." stuff here.
Fixed while pushing. Thanks for the review.
> > */
> > -bool
> > -igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> > +void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> > {
> > - bool found = true;
> > + read_one_crc(pipe_crc, crc);
> >
> > - if (pipe_crc->flags & O_NONBLOCK) {
> > - int ret = read_crc(pipe_crc, crc);
> > -
> > - found = ret > 0;
> > - } else
> > - read_one_crc(pipe_crc, crc);
> > -
> > - if (found)
> > - crc_sanity_checks(crc);
> > -
> > - return found;
> > + crc_sanity_checks(crc);
> > }
> >
> > /**
> > @@ -976,7 +966,6 @@ igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> > {
> > unsigned vblank = kmstest_get_vblank(drm_fd, pipe_crc->pipe, 0);
> >
> > - igt_assert(!(pipe_crc->flags & O_NONBLOCK));
> > do {
> > read_one_crc(pipe_crc, crc);
> >
> > diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
> > index 9f81be0a24de..58ca07f5c15d 100644
> > --- a/lib/igt_debugfs.h
> > +++ b/lib/igt_debugfs.h
> > @@ -132,7 +132,7 @@ __attribute__((warn_unused_result))
> > int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
> > igt_crc_t **out_crcs);
> > void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc);
> > -bool igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> > +void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> > void igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc);
> >
> > void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> > diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
> > index 7138e549aeb7..8e50978d0be1 100644
> > --- a/tests/kms_chv_cursor_fail.c
> > +++ b/tests/kms_chv_cursor_fail.c
> > @@ -258,7 +258,7 @@ static void prepare_crtc(data_t *data)
> >
> > /* get reference crc w/o cursor */
> > igt_pipe_crc_start(data->pipe_crc);
> > - igt_assert(igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc));
> > + igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc);
> > }
> >
> > static void test_crtc(data_t *data, unsigned int edges)
> >
--
Ville Syrjälä
Intel
_______________________________________________
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
end of thread, other threads:[~2018-09-27 12:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-25 14:53 [igt-dev] [PATCH i-g-t] lib/debugfs: Use a blocking read in igt_pipe_crc_get_single() Ville Syrjala
2018-09-25 15:32 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-25 16:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-09-26 18:56 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkilä
2018-09-27 12:21 ` Ville Syrjälä
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.