Re: [PATCH 36/72] drm: cleaned up device probing / initialization

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Tue, Dec 29, 2015 at 10:17:14AM +0100, Enrico Weigelt, metux IT consult wrote:
> +    /* using switch statements, so the compiler has better chance for optimizations */
> +    switch (vendor_id)

However, we share pci ids between projects as:

/*
 * A pci_device_id struct {
 *      __u32 vendor, device;
 *      __u32 subvendor, subdevice;
 *      __u32 class, class_mask;
 *      kernel_ulong_t driver_data;
 * };
 * Don't use C99 here because "class" is reserved and we want to
 * give userspace flexibility.
 */

so iterating over a table is a lot more amenable to plugging in the
common chipset identifiers.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.