[Intel-gfx] [PATCH] Update intel_chipset macros
Damien Lespiau
damien.lespiau at intel.com
Tue Feb 18 15:27:10 CET 2014
On Tue, Feb 18, 2014 at 01:15:12PM +0000, joao.santos at intel.com wrote:
> From: Joao Santos <joao.santos at intel.com>
>
> 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
>
> Signed-off-by: Joao Santos <joao.santos at intel.com>
> ---
> intel/intel_chipset.h | 49 +++++++++++++++++++++++++++++++++++++++++++------
> 1 file changed, 43 insertions(+), 6 deletions(-)
>
> diff --git a/intel/intel_chipset.h b/intel/intel_chipset.h
> index e5589be..f7771a7 100644
> --- a/intel/intel_chipset.h
> +++ b/intel/intel_chipset.h
> @@ -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
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list