All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Klaus Krause <pkk@spth.de>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/8] drm/i915: Added SDP and VSC structures for handling PSR for eDP
Date: Mon, 14 Jan 2013 12:42:13 +0100	[thread overview]
Message-ID: <50F3EF15.8030703@spth.de> (raw)
In-Reply-To: <20130114112227.GD3867@intel.com>

Am 14.01.2013 12:22, schrieb Ville Syrjälä:
> On Fri, Jan 11, 2013 at 09:15:40PM +0100, Daniel Vetter wrote:
>> On Fri, Jan 11, 2013 at 05:57:51PM -0200, Rodrigo Vivi wrote:
>>> From: Shobhit Kumar <shobhit.kumar@intel.com>
>>>
>>> Signed-off-by: Sateesh Kavuri <sateesh.kavuri@intel.com>
>>>
>>> v2: Modified and corrected the structures to be more in line for
>>> kernel coding guidelines and rebased the code on Paulo's DP patchset
>>>
>>> Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
>>>
>>> v3: removing unecessary identation at DP_RECEIVER_CAP_SIZE
>>>
>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>>
>> DP spec stuff should be put into the drm core imo, i.e. into
>> include/drm/drm_dp_helper.h Since all bitfields are u8 we also have no
>> problems with endianess for this.
> 
> I don't think C guarantees anything about the order of bits inside
> bitfieds.
> 

C11 standard, section 6.7.2.1:

"An implementation may allocate any addressable storage unit large
enough to hold a bit-field. If enough space remains, a bit-field that
immediately follows another bit-field in a structure shall be packed
into adjacent bits of the same unit. If insufficient space remains,
whether a bit-field that does not fit is put into the next unit or
overlaps adjacent units is implementation-defined. The order of
allocation of bit-fields within a unit (high-order to low-order or
low-order to high-order) is implementation-defined. The alignment of the
addressable storage unit is unspecified."

C doesn't guarantee that your u8 is a valid type for bit-fields. The
only types a C compiler must support for bit-fields are bool, int,
signed int and unsigned int (note that bit-fields are also the only
place where the type int can be different from signed int).

Philipp

  reply	other threads:[~2013-01-14 12:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 19:57 [PATCH 0/8] Enable eDP PSR funcionality at HSW Rodrigo Vivi
2013-01-11 19:57 ` [PATCH 1/8] drm/i915: Added eDP PSR registers Rodrigo Vivi
2013-01-15 13:36   ` Paulo Zanoni
2013-01-11 19:57 ` [PATCH 2/8] drm/i915: Added SDP and VSC structures for handling PSR for eDP Rodrigo Vivi
2013-01-11 20:15   ` Daniel Vetter
2013-01-14 11:22     ` Ville Syrjälä
2013-01-14 11:42       ` Philipp Klaus Krause [this message]
2013-01-11 19:57 ` [PATCH 3/8] drm/i915: Read the EDP DPCD and PSR Capability Rodrigo Vivi
2013-01-23 15:22   ` Paulo Zanoni
2013-01-11 19:57 ` [PATCH 4/8] drm/i915: Setup EDP PSR AUX Registers Rodrigo Vivi
2013-01-23 15:36   ` Paulo Zanoni
2013-01-11 19:57 ` [PATCH 5/8] drm/i915: VBT Parsing for the PSR Feature Block for HSW Rodrigo Vivi
2013-01-11 20:46   ` Daniel Vetter
2013-01-15 13:23     ` Rodrigo Vivi
2013-01-15 13:32       ` Daniel Vetter
2013-01-11 19:57 ` [PATCH 6/8] drm/i915: Enable/Disable PSR on HSW Rodrigo Vivi
2013-01-11 19:57 ` [PATCH 7/8] drm/i915: Added debugfs support for PSR Status Rodrigo Vivi
2013-01-11 19:57 ` [PATCH 8/8] drm/i915: Hook PSR functionality Rodrigo Vivi
2013-01-11 20:49   ` Daniel Vetter
2013-01-15 13:25     ` Rodrigo Vivi
2013-01-15 13:31       ` Daniel Vetter

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=50F3EF15.8030703@spth.de \
    --to=pkk@spth.de \
    --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.