Re: [Intel-gfx] [PATCH 1/2] drm/dp: start a DPCD based DP sink/branch device quirk database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 12, 2017 at 9:57 AM, Jani Nikula <jani.nikula@xxxxxxxxx> wrote:
> Personally I don't think enums should be used for defining bits, because
> they are not enumerations. The bits are usually combined to come up with
> values that are not part of the enum.
>
> If we added the quirks to struct intel_dp_desc (and moved to drm
> helpers) we could use enums for defining the bit shifts and add a
> function to query for a specific quirk, say, drm_dp_has_quirk(struct
> drm_dp_desc *desc, enum drm_dpcd_quirk quirk).

It's a bit a gnu-ism afaik, but enums-as-bitfields is very much
standard. gdb even decodes it for you into the individual bits iirc.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux