Update intel_chipset macros
PATCH 1/1 Update intel_chipset macros
From: Joao Santos <[email protected]>
Added in new macros to support new platforms.
--- intel/intel_chipset.h | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-)
intel/intel_chipset.h +43 -6
@@ -314,12 +314,49 @@#define IS_GEN8 (devid) IS_BROADWELL(devid) -#define IS_9XX (dev) (IS_GEN3(dev) || \ - IS_GEN4(dev) || \ - IS_GEN5(dev) || \ - IS_GEN6(dev) || \ - IS_GEN7(dev) || \ - IS_GEN8(dev)) +#define IS_965 (devid) (IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_9XX (devid) (IS_GEN3(devid) || \ + IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_INTEL (devid) (IS_GEN2(devid) || \ + IS_GEN3(devid) || \ + IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define HAS_PCH_SPLIT (devid) (IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_IVYBRIDGE(devid) || IS_HASWELL(devid) || \ + IS_GEN8(devid)) + +#define HAS_BLT_RING (devid) (IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define HAS_BSD_RING (devid) (IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_BROADWATER (devid) ((devid) == PCI_CHIP_I946_GZ || \ + (devid) == PCI_CHIP_I965_G_1 || \ + (devid) == PCI_CHIP_I965_Q || \ + (devid) == PCI_CHIP_I965_G) + +#define IS_CRESTLINE (devid) ((devid) == PCI_CHIP_I965_GM || \ + (devid) == PCI_CHIP_I965_GME) +#define HAS_VEBOX_RING (devid) (IS_HASWELL(devid))#endif /* _INTEL_CHIPSET_H */
Signature · 1 line
1.7.9.5
Quoted 3 lines · On Tue, Feb 18, 2014 at 01:15:12PM +0000, [email protected] wrote:
From: Joao Santos <[email protected]>
Added in new macros to support new platforms.
What's the real purpose of this patch? you're adding a bunch of defines here without any user. I'd argue that we really want to move away from those defines, they are quite dreadful.
If the purpose is to make libdrm's and intel-gpu-tools' intel_chipset.h look alike, a worthy goal for sure, I'd vote for splitting the i-g-t specific defines into a separate file in i-g-t, waiting for someone fed-up enough with the current situation to create a more structured way to store per-platform feature flags/limits.
Signature · 1 line
Damien
Quoted 73 lines
Signed-off-by Joao Santos <[email protected]>--- intel/intel_chipset.h | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-)intel/intel_chipset.h +43
-6@@ -314,12 +314,49 @@#define IS_GEN8 (devid) IS_BROADWELL(devid) -#define IS_9XX (dev) (IS_GEN3(dev) || \ - IS_GEN4(dev) || \ - IS_GEN5(dev) || \ - IS_GEN6(dev) || \ - IS_GEN7(dev) || \ - IS_GEN8(dev)) +#define IS_965 (devid) (IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_9XX (devid) (IS_GEN3(devid) || \ + IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_INTEL (devid) (IS_GEN2(devid) || \ + IS_GEN3(devid) || \ + IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define HAS_PCH_SPLIT (devid) (IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_IVYBRIDGE(devid) || IS_HASWELL(devid) || \ + IS_GEN8(devid)) + +#define HAS_BLT_RING (devid) (IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define HAS_BSD_RING (devid) (IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_BROADWATER (devid) ((devid) == PCI_CHIP_I946_GZ || \ + (devid) == PCI_CHIP_I965_G_1 || \ + (devid) == PCI_CHIP_I965_Q || \ + (devid) == PCI_CHIP_I965_G) + +#define IS_CRESTLINE (devid) ((devid) == PCI_CHIP_I965_GM || \ + (devid) == PCI_CHIP_I965_GME) +#define HAS_VEBOX_RING (devid) (IS_HASWELL(devid))#endif /* _INTEL_CHIPSET_H */ Signature · 6 lines
1.7.9.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
The idea behind this patch was indeed to standardize both libdrm's and igt's intel_chipset.h.
That's sounds like a (!very) sane idea to me. I really don't mind taking that on later but right now I need to get a patch tested out of the door.
Joao.
-----Original Message-----
From: Lespiau, Damien
Sent: Tuesday, February 18, 2014 2:27 PM
To: Santos, Joao
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] Update intel_chipset macros
Quoted 3 lines · On Tue, Feb 18, 2014 at 01:15:12PM +0000, [email protected] wrote:
From: Joao Santos <[email protected]>
Added in new macros to support new platforms.
What's the real purpose of this patch? you're adding a bunch of defines here without any user. I'd argue that we really want to move away from those defines, they are quite dreadful.
If the purpose is to make libdrm's and intel-gpu-tools' intel_chipset.h look alike, a worthy goal for sure, I'd vote for splitting the i-g-t specific defines into a separate file in i-g-t, waiting for someone fed-up enough with the current situation to create a more structured way to store per-platform feature flags/limits.
--
Damien
Quoted 73 lines
Signed-off-by Joao Santos <[email protected]>--- intel/intel_chipset.h | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-)intel/intel_chipset.h index renamed from intel/intel_chipset.h +0
-0e5589be..f7771a7 100644
intel/intel_chipset.h +43
-7@@ -314,12 +314,49 @@#define IS_GEN8 (devid) IS_BROADWELL(devid) -#define IS_9XX (dev) (IS_GEN3(dev) || \ - IS_GEN4(dev) || \ - IS_GEN5(dev) || \ - IS_GEN6(dev) || \ - IS_GEN7(dev) || \ - IS_GEN8(dev)) +#define IS_965 (devid) (IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_9XX (devid) (IS_GEN3(devid) || \ + IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_INTEL (devid) (IS_GEN2(devid) || \ + IS_GEN3(devid) || \ + IS_GEN4(devid) || \ + IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define HAS_PCH_SPLIT (devid) (IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_IVYBRIDGE(devid) || IS_HASWELL(devid) || \ + IS_GEN8(devid)) + +#define HAS_BLT_RING (devid) (IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define HAS_BSD_RING (devid) (IS_GEN5(devid) || \ + IS_GEN6(devid) || \ + IS_GEN7(devid) || \ + IS_GEN8(devid)) + +#define IS_BROADWATER (devid) ((devid) == PCI_CHIP_I946_GZ || \ + (devid) == PCI_CHIP_I965_G_1 || \ + (devid) == PCI_CHIP_I965_Q || \ + (devid) == PCI_CHIP_I965_G) + +#define IS_CRESTLINE (devid) ((devid) == PCI_CHIP_I965_GM || \ + (devid) == PCI_CHIP_I965_GME) +#define HAS_VEBOX_RING (devid) (IS_HASWELL(devid))#endif /* _INTEL_CHIPSET_H */ --1.7.9.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx