[PATCH 1/2] Revert "drm/crc: Only report a single overflow when a CRC fd is opened"
Chris Wilson
chris at chris-wilson.co.uk
Fri Jul 6 19:42:02 UTC 2018
This reverts commit a012024571d98e2e4bf29a9168fb7ddc44b7ab86.
---
drivers/gpu/drm/drm_debugfs_crc.c | 9 +--------
include/drm/drm_debugfs_crc.h | 3 +--
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
index 99961192bf03..9f8312137cad 100644
--- a/drivers/gpu/drm/drm_debugfs_crc.c
+++ b/drivers/gpu/drm/drm_debugfs_crc.c
@@ -139,7 +139,6 @@ 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;
@@ -392,14 +391,8 @@ 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 was_overflow = crc->overflow;
-
- crc->overflow = true;
spin_unlock(&crc->lock);
-
- if (!was_overflow)
- DRM_ERROR("Overflow of CRC buffer, userspace reads too slow.\n");
-
+ DRM_ERROR("Overflow of CRC buffer, userspace reads too slow.\n");
return -ENOBUFS;
}
diff --git a/include/drm/drm_debugfs_crc.h b/include/drm/drm_debugfs_crc.h
index b225eeb30d05..7d63b1d4adb9 100644
--- a/include/drm/drm_debugfs_crc.h
+++ b/include/drm/drm_debugfs_crc.h
@@ -43,7 +43,6 @@ 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
@@ -53,7 +52,7 @@ struct drm_crtc_crc_entry {
struct drm_crtc_crc {
spinlock_t lock;
const char *source;
- bool opened, overflow;
+ bool opened;
struct drm_crtc_crc_entry *entries;
int head, tail;
size_t values_cnt;
--
2.18.0
More information about the Intel-gfx-trybot
mailing list