[Mesa-dev] [PATCH 2/2] intel: Use the CHIPSET macro in the PCI ID tables for the device name.

Emil Velikov emil.l.velikov at gmail.com
Wed Jun 5 12:27:48 PDT 2013


On 05/06/13 20:05, Kenneth Graunke wrote:
> Putting the human readable device names directly in the PCI ID list
> consolidates things in one place.  It also makes it easy to customize
> the name on a per-PCI ID basis without a huge code explosion.
> Based on a patch by Kristian Høgsberg.
> 
Hi Kenneth

This is one sweet idea, to shift all the data to i9*5_pci_ids.h

Got a couple of questions inline
> Cc: Rodrigo Vivi <rodrigo.vivi at gmail.com>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  include/pci_ids/i915_pci_ids.h             |  30 ++---
>  include/pci_ids/i965_pci_ids.h             | 186 ++++++++++++++--------------
>  include/pci_ids/pci_id_driver_map.h        |   4 +-
>  src/mesa/drivers/dri/intel/intel_context.c | 187 +----------------------------
>  4 files changed, 113 insertions(+), 294 deletions(-)
> 
> diff --git a/include/pci_ids/i915_pci_ids.h b/include/pci_ids/i915_pci_ids.h
> index 964b1cb..faca90b 100644
[...]
> +CHIPSET(0x3577, I830_M,   "Intel(R) 845G")
                    ^^^^               ^^^^
> +CHIPSET(0x2562, 845_G,    "Intel(R) 830M")
                    ^^^^               ^^^^
I think that the strings got unintentionally swapped here

[...]
> diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
> index ab7f80b..65c0230 100644
> --- a/src/mesa/drivers/dri/intel/intel_context.c
> +++ b/src/mesa/drivers/dri/intel/intel_context.c
> @@ -77,190 +77,9 @@ intelGetString(struct gl_context * ctx, GLenum name)
[...]
> +#define CHIPSET(id, symbol, str) case id: chipset = str; break;
> +#include "pci_ids/i915_pci_ids.h"
> +#include "pci_ids/i965_pci_ids.h"
Missing #undef CHIPSET, as seen in pci_id_driver_map.h

Emil
>        default:
>           chipset = "Unknown Intel Chipset";
>           break;
> 



More information about the mesa-dev mailing list