mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-18 13:26:30 +00:00
Add PCH chipset type check for Cougarpoint
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
This commit is contained in:
parent
c3832aefbf
commit
2b40fc83d1
@ -54,3 +54,13 @@ struct pci_device *intel_get_pci_device(void);
|
||||
uint32_t intel_get_drm_devid(int fd);
|
||||
|
||||
void intel_map_file(char *);
|
||||
|
||||
enum pch_type {
|
||||
PCH_IBX,
|
||||
PCH_CPT,
|
||||
};
|
||||
|
||||
extern enum pch_type pch;
|
||||
void intel_check_pch(void);
|
||||
|
||||
#define HAS_CPT (pch == PCH_CPT)
|
||||
|
@ -39,6 +39,8 @@
|
||||
|
||||
#include "intel_gpu_tools.h"
|
||||
|
||||
enum pch_type pch;
|
||||
|
||||
struct pci_device *
|
||||
intel_get_pci_device(void)
|
||||
{
|
||||
@ -69,3 +71,18 @@ intel_get_pci_device(void)
|
||||
|
||||
return pci_dev;
|
||||
}
|
||||
|
||||
void
|
||||
intel_check_pch(void)
|
||||
{
|
||||
struct pci_device *pch_dev;
|
||||
|
||||
pch_dev = pci_device_find_by_slot(0, 0, 31, 0);
|
||||
if (pch_dev == NULL)
|
||||
return;
|
||||
|
||||
if (pch_dev->vendor_id == 0x8086 &&
|
||||
(pch_dev->device_id & 0xff00) == 0x1c00)
|
||||
pch = PCH_CPT;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user