From: Chris Wilson Subject: Re: [PATCH 1/2] drm/i915: split PCI IDs out into i915_drm.h v3 Date: Fri, 26 Jul 2013 00:06:17 +0100 Message-ID: <20130725230617.GE13295@cantiga.alporthouse.com> References: <1374770269-3223-1-git-send-email-jbarnes@virtuousgeek.org> <1374770269-3223-2-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1374770269-3223-2-git-send-email-jbarnes@virtuousgeek.org> Sender: linux-kernel-owner@vger.kernel.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@elte.hu, tglx@linutronix.de, torvalds@linux-foundation.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 25, 2013 at 09:37:48AM -0700, Jesse Barnes wrote: > For use by userspace (at some point in the future) and other kernel code. > > v2: move PCI IDs to uabi (Chris) > move PCI IDs to drm/ (Dave) > v3: fixup Quanta detection - needs to come first (Daniel) One last comment! > +#define INTEL_VGA_DEVICE(id, info) { \ > + .class = PCI_BASE_CLASS_DISPLAY << 16, \ > + .class_mask = 0xff0000, \ > + .vendor = 0x8086, \ > + .device = id, \ > + .subvendor = PCI_ANY_ID, \ > + .subdevice = PCI_ANY_ID, \ > + .driver_data = (unsigned long) info } libpciaccess doesn't define either PCI_BASE_CLASS_DISPLAY or PCI_ANY_ID. Since we use the hex values for the rest of the elements, it would seem to be tidier to also use 0x3 << 16 instead of PCI_BASE_CLASS_DISPLAY << 16. I would leave PCI_ANY_ID as a symbolic value though. -Chris -- Chris Wilson, Intel Open Source Technology Centre