All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Todd Previte <tprevite@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 02/10] drm/i915: Add counters in the drm_dp_aux struct for I2C NACKs and DEFERs
Date: Tue, 4 Nov 2014 23:19:39 +0100	[thread overview]
Message-ID: <20141104221939.GR26941@phenom.ffwll.local> (raw)
In-Reply-To: <54594F4B.5090103@gmail.com>

On Tue, Nov 04, 2014 at 03:12:27PM -0700, Todd Previte wrote:
> >Does it really need to be uint8_t? I see on patch 7 that you don't
> >really write this value to a place that only accepts uint8_t-sized
> >arguments, so I fear that if we get 256 NACKs or DEFERs we may end up
> >doing the wrong thing.
> 
> There are no compliance tests that are concerned with the number of native
> DEFERs or NACKs received, hence why they are not addressed here.
> There's no requirement for the size of this value and I selected uint8_t as
> the smallest reasonable size for it. It's only used to count the number of
> NACKs and DEFERs during compliance testing and it gets reset to 0 at the
> beginning of the test block where it's used in a later patch. It's unlikely
> that a case would occur during this compliance test where exactly 256 NACKs
> or DEFERs occur, but your point is well-taken. I'll make them uint32s and be
> done with it. I don't think 6 extra bytes is going to run the kernel out of
> memory. :)

Du to struct alignement rules a lone uint8_t will actually occupy as much
as a plain unsigned. Also uint8_t in drivers has a bit the air of a
carefully picked size, usually in relation to some hw limit (e.g. register
size).

Imo just go with unsigned, it's clearer in intent and actually doesn't use
more space.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-11-04 22:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09 15:38 [intel-gfx] Displayport compliance testing Todd Previte
2014-10-09 15:38 ` [PATCH 01/10] drm/i915: Add automated testing support for " Todd Previte
2014-10-20 17:48   ` Paulo Zanoni
2014-10-23 16:58     ` Todd Previte
2014-10-24  8:24       ` Daniel Vetter
2014-10-21 13:02   ` Daniel Vetter
2014-11-04 22:31   ` Todd Previte
2014-10-09 15:38 ` [PATCH 02/10] drm/i915: Add counters in the drm_dp_aux struct for I2C NACKs and DEFERs Todd Previte
2014-10-21 17:10   ` [Intel-gfx] " Paulo Zanoni
2014-11-04 22:12     ` Todd Previte
2014-11-04 22:19       ` Daniel Vetter [this message]
2014-10-09 15:38 ` [PATCH 03/10] drm/i915: Update intel_dp_check_link_status() for Displayport compliance testing Todd Previte
2014-10-09 15:38 ` [PATCH 04/10] drm/i915: Add a delay in Displayport AUX transactions for " Todd Previte
2014-10-09 15:38 ` [PATCH 05/10] drm/i915: Add debugfs interface for Displayport debug and " Todd Previte
2014-10-23 12:50   ` Daniel Vetter
2014-10-23 12:58     ` Paulo Zanoni
2014-10-23 15:43       ` Daniel Vetter
2014-11-13 18:44         ` Jesse Barnes
2014-11-13 20:44           ` Daniel Vetter
2014-11-13 21:00             ` Dave Airlie
2014-11-13 21:07               ` Jesse Barnes
2014-10-09 15:38 ` [PATCH 06/10] drm/i915: Add debugfs interface and support functions to notify userspace apps for Displayport " Todd Previte
2014-10-09 15:38 ` [PATCH 07/10] drm/i915: Add structures for Displayport compliance testing parameters Todd Previte
2014-10-09 15:38 ` [PATCH 08/10] drm/i915: Update the EDID automated compliance test function Todd Previte
2014-10-09 15:38 ` [PATCH 09/10] drm/i915: Update intel_dp_compute_config() to respond to Displayport compliance test requests appropriately Todd Previte
2014-10-09 15:38 ` [PATCH 10/10] drm/i915: Fix intel_dp_hot_plug() Todd Previte
2014-10-09 15:49   ` Chris Wilson
2014-10-10  3:38     ` Dave Airlie
2014-10-11  0:20       ` Todd Previte

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=20141104221939.GR26941@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tprevite@gmail.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.