From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Klaus Krause 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 Message-ID: <50F3EF15.8030703@spth.de> References: <1357934277-3300-1-git-send-email-rodrigo.vivi@gmail.com> <1357934277-3300-3-git-send-email-rodrigo.vivi@gmail.com> <20130111201540.GK5737@phenom.ffwll.local> <20130114112227.GD3867@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from smtp2.informatik.uni-freiburg.de (mx2.informatik.uni-freiburg.de [132.230.150.5]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C1AEE5BF3 for ; Mon, 14 Jan 2013 04:07:34 -0800 (PST) In-Reply-To: <20130114112227.GD3867@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: =?ISO-8859-1?Q?Ville_Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Am 14.01.2013 12:22, schrieb Ville Syrj=E4l=E4: > 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 >>> >>> Signed-off-by: Sateesh Kavuri >>> >>> 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 >>> >>> v3: removing unecessary identation at DP_RECEIVER_CAP_SIZE >>> >>> Signed-off-by: Rodrigo Vivi >> >> 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