ntel-gpu-tools/tools/quick_dump/intel_chipset.c
Mengdong Lin d566972336 quick_dump/bdw: support Broadwell in device auto-detection
This patch exposes is_broadwell() to python, to be used by device
auto-detection.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00

34 lines
564 B
C

#include <pciaccess.h>
#include "intel_chipset.h"
int is_sandybridge(unsigned short pciid)
{
return IS_GEN6(pciid);
}
int is_ivybridge(unsigned short pciid)
{
return IS_IVYBRIDGE(pciid);
}
int is_valleyview(unsigned short pciid)
{
return IS_VALLEYVIEW(pciid);
}
int is_haswell(unsigned short pciid)
{
return IS_HASWELL(pciid);
}
int is_broadwell(unsigned short pciid)
{
return IS_BROADWELL(pciid);
}
/* Simple helper because I couldn't make this work in the script */
unsigned short pcidev_to_devid(struct pci_device *pdev)
{
return pdev->device_id;
}