mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	intel_gpu_dump: Get the devid so we can decode correctly on gen4.
This commit is contained in:
		
							parent
							
								
									b51588b9bd
								
							
						
					
					
						commit
						593a47f00e
					
				@ -54,10 +54,9 @@ intel_get_drm_devid(int fd)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
intel_get_mmio(void)
 | 
			
		||||
intel_get_pci_device(void)
 | 
			
		||||
{
 | 
			
		||||
	int err;
 | 
			
		||||
	int mmio_bar;
 | 
			
		||||
 | 
			
		||||
	err = pci_system_init();
 | 
			
		||||
	if (err != 0) {
 | 
			
		||||
@ -81,6 +80,15 @@ intel_get_mmio(void)
 | 
			
		||||
	if (pci_dev->vendor_id != 0x8086)
 | 
			
		||||
		errx(1, "Graphics card is non-intel");
 | 
			
		||||
	devid = pci_dev->device_id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
intel_get_mmio(void)
 | 
			
		||||
{
 | 
			
		||||
	int mmio_bar;
 | 
			
		||||
	int err;
 | 
			
		||||
 | 
			
		||||
	intel_get_pci_device();
 | 
			
		||||
 | 
			
		||||
	if (IS_9XX(devid))
 | 
			
		||||
		mmio_bar = 0;
 | 
			
		||||
 | 
			
		||||
@ -42,6 +42,7 @@ INREG(uint32_t reg)
 | 
			
		||||
	return *(volatile uint32_t *)((volatile char *)mmio + reg);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void intel_get_pci_device(void);
 | 
			
		||||
void intel_get_mmio(void);
 | 
			
		||||
void intel_get_drm_devid(int fd);
 | 
			
		||||
void intel_copy_bo(struct intel_batchbuffer *batch,
 | 
			
		||||
 | 
			
		||||
@ -47,6 +47,7 @@
 | 
			
		||||
 | 
			
		||||
#include "intel_decode.h"
 | 
			
		||||
#include "intel_chipset.h"
 | 
			
		||||
#include "intel_gpu_tools.h"
 | 
			
		||||
 | 
			
		||||
#define BUFFER_FAIL(_count, _len, _name) do {			\
 | 
			
		||||
    fprintf(out, "Buffer size too small in %s (%d < %d)\n",	\
 | 
			
		||||
@ -1858,11 +1859,12 @@ main (int argc, char *argv[])
 | 
			
		||||
	return 1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    intel_get_pci_device();
 | 
			
		||||
    filename = argv[1];
 | 
			
		||||
 | 
			
		||||
    read_data_file (filename, &data, &count);
 | 
			
		||||
 | 
			
		||||
    intel_decode (data, count, 0, 0);
 | 
			
		||||
    intel_decode (data, count, 0, devid);
 | 
			
		||||
 | 
			
		||||
    free (data);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user