mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-18 21:36:27 +00:00
tools: add intel_gen
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
61b9806f4e
commit
bf9f149a6d
@ -55,3 +55,21 @@ intel_get_drm_devid(int fd)
|
|||||||
|
|
||||||
return devid;
|
return devid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int intel_gen(uint32_t devid)
|
||||||
|
{
|
||||||
|
if (IS_GEN2(devid))
|
||||||
|
return 2;
|
||||||
|
if (IS_GEN3(devid))
|
||||||
|
return 3;
|
||||||
|
if (IS_GEN4(devid))
|
||||||
|
return 4;
|
||||||
|
if (IS_GEN5(devid))
|
||||||
|
return 4;
|
||||||
|
if (IS_GEN6(devid))
|
||||||
|
return 6;
|
||||||
|
if (IS_GEN7(devid))
|
||||||
|
return 7;
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
@ -79,6 +79,7 @@ OUTREG(uint32_t reg, uint32_t val)
|
|||||||
struct pci_device *intel_get_pci_device(void);
|
struct pci_device *intel_get_pci_device(void);
|
||||||
|
|
||||||
uint32_t intel_get_drm_devid(int fd);
|
uint32_t intel_get_drm_devid(int fd);
|
||||||
|
int intel_gen(uint32_t devid);
|
||||||
|
|
||||||
void intel_map_file(char *);
|
void intel_map_file(char *);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user