drm/crc: Only report a single overflow when a CRC fd is opened
Subsystems (2)
Maarten Lankhorst
maintainerPATCH 1/1 drm/crc: Only report a single overflow when a CRC fd is opened
This reduces the amount of spam when you debug a CRC reading program.
--- drivers/gpu/drm/drm_debugfs_crc.c | 9 ++++++++- include/drm/drm_debugfs_crc.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_debugfs_crc.c +8 -1
@@ -139,6 +139,7 @@ static int crtc_crc_data_count(struct drm_crtc_crc *crc)static void crtc_crc_cleanup (struct drm_crtc_crc *crc) {kfree (crc->entries); + crc->overflow = false; crc->entries =NULL ; crc->head =0 ; crc->tail =0 ;
@@ -391,8 +392,14 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, tail = crc->tail;if (CIRC_SPACE (head, tail,DRM_CRC_ENTRIES_NR ) <1 ) { +bool overflow = crc->overflow; + + crc->overflow = true;spin_unlock (&crc->lock); -DRM_ERROR ("Overflow of CRC buffer, userspace reads too slow.\n" ); + +if (!overflow) +DRM_ERROR ("Overflow of CRC buffer, userspace reads too slow.\n" ); +return -ENOBUFS ; }
include/drm/drm_debugfs_crc.h +2 -1
@@ -43,6 +43,7 @@ struct drm_crtc_crc_entry {* @lock: protects the fields in this struct * @source: name of the currently configured source of CRCs * @opened: whether userspace has opened the data file for reading +* @overflow: whether an overflow occured. * @entries: array of entries, with size of %DRM_CRC_ENTRIES_NR * @head: head of circular queue * @tail: tail of circular queue
@@ -52,7 +53,7 @@ struct drm_crtc_crc_entry {struct drm_crtc_crc {spinlock_t lock;const char *source; -bool opened; +bool opened, overflow;struct drm_crtc_crc_entry *entries;int head, tail;size_t values_cnt;
Signature · 6 lines
2.17.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 lines · Maarten Lankhorst
This reduces the amount of spam when you debug a CRC reading program.
Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/drm_debugfs_crc.c | 9 ++++++++- include/drm/drm_debugfs_crc.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_debugfs_crc.c +1
-0@@ -139,6 +139,7 @@ static int crtc_crc_data_count(struct drm_crtc_crc *crc)static void crtc_crc_cleanup (struct drm_crtc_crc *crc) {kfree (crc->entries); + crc->overflow = false; crc->entries =NULL ; crc->head =0 ; crc->tail =0 ;
drivers/gpu/drm/drm_debugfs_crc.c int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, · line 395
Quoted 4 lines
drivers/gpu/drm/drm_debugfs_crc.c +1
-0@@ -391,8 +392,14 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, tail = crc->tail;if (CIRC_SPACE (head, tail,DRM_CRC_ENTRIES_NR ) <1 ) { +bool overflow = crc->overflow;
'was_overflow' or something to indicate this is the old value?
drivers/gpu/drm/drm_debugfs_crc.c int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, · line 401
Quoted 7 lines
drivers/gpu/drm/drm_debugfs_crc.c +5
-1+ + crc->overflow = true;spin_unlock (&crc->lock); -DRM_ERROR ("Overflow of CRC buffer, userspace reads too slow.\n" ); + +if (!overflow) +DRM_ERROR ("Overflow of CRC buffer, userspace reads too slow.\n" );
would make this a bit less confusing perhaps. Now it reads as "if (no overflow) DRM_ERROR("we have an overflow");" which makes no sense on the first glance.
Apart from that
Quoted 32 lines
drivers/gpu/drm/drm_debugfs_crc.c +1
-0+return -ENOBUFS ; }include/drm/drm_debugfs_crc.h +2
-1@@ -43,6 +43,7 @@ struct drm_crtc_crc_entry {* @lock: protects the fields in this struct * @source: name of the currently configured source of CRCs * @opened: whether userspace has opened the data file for reading +* @overflow: whether an overflow occured. * @entries: array of entries, with size of %DRM_CRC_ENTRIES_NR * @head: head of circular queue * @tail: tail of circular queue @@ -52,7 +53,7 @@ struct drm_crtc_crc_entry {struct drm_crtc_crc {spinlock_t lock;const char *source; -bool opened; +bool opened, overflow;struct drm_crtc_crc_entry *entries;int head, tail;size_t values_cnt;Signature · 6 lines
2.17.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Maarten Lankhorst
maintainerOp 18-04-18 om 17:37 schreef Ville Syrjälä:
Quoted 40 lines · Maarten Lankhorst
Quoted 22 lines
This reduces the amount of spam when you debug a CRC reading program.
Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/drm_debugfs_crc.c | 9 ++++++++- include/drm/drm_debugfs_crc.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_debugfs_crc.c +1
-0@@ -139,6 +139,7 @@ static int crtc_crc_data_count(struct drm_crtc_crc *crc)static void crtc_crc_cleanup (struct drm_crtc_crc *crc) {kfree (crc->entries); + crc->overflow = false; crc->entries =NULL ; crc->head =0 ; crc->tail =0 ;drivers/gpu/drm/drm_debugfs_crc.c int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, · line 395
Quoted 4 lines
drivers/gpu/drm/drm_debugfs_crc.c +1
-0@@ -391,8 +392,14 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, tail = crc->tail;if (CIRC_SPACE (head, tail,DRM_CRC_ENTRIES_NR ) <1 ) { +bool overflow = crc->overflow;'
was_overflow' or something to indicate this is the old value?drivers/gpu/drm/drm_debugfs_crc.c int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, · line 401
Quoted 7 lines
drivers/gpu/drm/drm_debugfs_crc.c +5
-1+ + crc->overflow = true;spin_unlock (&crc->lock); -DRM_ERROR ("Overflow of CRC buffer, userspace reads too slow.\n" ); + +if (!overflow) +DRM_ERROR ("Overflow of CRC buffer, userspace reads too slow.\n" );would make this a bit less confusing perhaps. Now it reads as "if (no overflow)
DRM_ERROR("we have an overflow");" which makes no sense on the first glance.
Quoted 2 lines
Apart from that
Reviewed-by Ville Syrjälä <[email protected]>
Thanks, fixed and pushed to drm-misc-next. :)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/crc: Only report a single overflow when a CRC fd is opened
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: drm/crc: Only report a single overflow when a CRC fd is opened
URL : https://patchwork.freedesktop.org/series/41897/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip e17f1c739f3f drm/crc: Only report a single overflow when a CRC fd is opened -:52: WARNING:TYPO_SPELLING: 'occured' may be misspelled - perhaps 'occurred'? #52: FILE: include/drm/drm_debugfs_crc.h:46: + * @overflow: whether an overflow occured.
total: 0 errors, 1 warnings, 0 checks, 37 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/crc: Only report a single overflow when a CRC fd is opened
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: drm/crc: Only report a single overflow when a CRC fd is opened
URL : https://patchwork.freedesktop.org/series/41897/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4066 -> Patchwork_8737 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/41897/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_8737 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s3:
fi-ivb-3520m: PASS -> DMESG-WARN (fdo#106084)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-bxt-dsi: NOTRUN -> INCOMPLETE (fdo#103927)
==== Possible fixes ====
igt@gem_mmap_gtt@basic-small-bo-tiledx:
fi-gdg-551: FAIL (fdo#102575) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-ivb-3520m: DMESG-WARN (fdo#106084) -> PASS fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
== Participating hosts (33 -> 32) ==
Additional (2): fi-glk-j4005 fi-bxt-dsi
Missing (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4066 -> Patchwork_8737
CI_DRM_4066: e1fbca4821d0700551df233285a5c28db09fd0f6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4441: 83ba5b7d3bde48b383df41792fc9c955a5a23bdb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8737: e17f1c739f3f4bfe59ec5192330fdea1e109ea34 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4441: e60d247eb359f044caf0c09904da14e39d7adca1 @ git://anongit.freedesktop.org/piglit
== Linux commits ==
e17f1c739f3f drm/crc: Only report a single overflow when a CRC fd is opened
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8737/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/crc: Only report a single overflow when a CRC fd is opened
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: drm/crc: Only report a single overflow when a CRC fd is opened
URL : https://patchwork.freedesktop.org/series/41897/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4066_full -> Patchwork_8737_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8737_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_8737_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/41897/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8737_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-vebox:
shard-kbl: PASS -> SKIP
igt@perf_pmu@rc6:
shard-kbl: SKIP -> PASS +1== Known issues ==
Here are the changes found in Patchwork_8737_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-hsw: PASS -> FAIL (fdo#102887)
igt@kms_setmode@basic:
shard-hsw: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@drv_suspend@forcewake:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: INCOMPLETE (fdo#106023, fdo#103665) -> PASS
igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
shard-hsw: FAIL (fdo#105767) -> PASS
igt@kms_flip@2x-dpms-vs-vblank-race:
shard-hsw: FAIL (fdo#103060) -> PASS
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-hsw: FAIL (fdo#102887) -> PASS
igt@kms_flip@flip-vs-blocking-wf-vblank:
shard-hsw: FAIL (fdo#100368) -> PASS
igt@kms_frontbuffer_tracking@fbc-farfromfence:
shard-kbl: DMESG-WARN (fdo#103558, fdo#105602) -> PASS +2
igt@kms_sysfs_edid_timing:
shard-apl: WARN (fdo#100047) -> PASS fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (9 -> 4) ==
Missing (5): shard-glk8 shard-glk6 shard-glk7 shard-glk shard-glkb
== Build changes ==
* Linux: CI_DRM_4066 -> Patchwork_8737
CI_DRM_4066: e1fbca4821d0700551df233285a5c28db09fd0f6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4441: 83ba5b7d3bde48b383df41792fc9c955a5a23bdb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8737: e17f1c739f3f4bfe59ec5192330fdea1e109ea34 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4441: e60d247eb359f044caf0c09904da14e39d7adca1 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8737/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx