mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	A realtime display of GPU activity. Note, this is just at the point of minimum usability... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
		
			
				
	
	
		
			23 lines
		
	
	
		
			358 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			358 B
		
	
	
	
		
			C
		
	
	
	
	
	
#define MAX_RINGS 4
 | 
						|
 | 
						|
#include <stdint.h>
 | 
						|
 | 
						|
struct gpu_top {
 | 
						|
	int fd;
 | 
						|
	int num_rings;
 | 
						|
	struct gpu_top_ring {
 | 
						|
		const char *name;
 | 
						|
		union gpu_top_payload {
 | 
						|
			struct {
 | 
						|
				uint8_t busy;
 | 
						|
				uint8_t wait;
 | 
						|
				uint8_t sema;
 | 
						|
			} u;
 | 
						|
			uint32_t payload;
 | 
						|
		} u;
 | 
						|
	} ring[MAX_RINGS];
 | 
						|
};
 | 
						|
 | 
						|
void gpu_top_init(struct gpu_top *gt);
 | 
						|
int gpu_top_update(struct gpu_top *gt);
 |