From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/crc: Only report a single overflow when a CRC fd is opened
Date: Fri, 6 Jul 2018 15:08:18 +0200 [thread overview]
Message-ID: <c626cbe9-48c8-5719-66f7-709637108a6e@linux.intel.com> (raw)
In-Reply-To: <20180418153721.GW17795@intel.com>
Op 18-04-18 om 17:37 schreef Ville Syrjälä:
> On Wed, Apr 18, 2018 at 02:51:21PM +0200, Maarten Lankhorst wrote:
>> This reduces the amount of spam when you debug a CRC reading
>> program.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> drivers/gpu/drm/drm_debugfs_crc.c | 9 ++++++++-
>> include/drm/drm_debugfs_crc.h | 3 ++-
>> 2 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
>> index 9f8312137cad..5a052c511e62 100644
>> --- a/drivers/gpu/drm/drm_debugfs_crc.c
>> +++ b/drivers/gpu/drm/drm_debugfs_crc.c
>> @@ -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;
> 'was_overflow' or something to indicate this is the old value?
>
>> +
>> + 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
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thanks, fixed and pushed to drm-misc-next. :)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-07-06 13:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 12:51 [PATCH] drm/crc: Only report a single overflow when a CRC fd is opened Maarten Lankhorst
2018-04-18 15:37 ` Ville Syrjälä
2018-07-06 13:08 ` Maarten Lankhorst [this message]
2018-04-18 16:13 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-04-18 16:27 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-18 21:45 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c626cbe9-48c8-5719-66f7-709637108a6e@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.