mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	lib/ioctl: api polish for gem_context_has_param
Just push the igt_require down to align with the usual style. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
		
							parent
							
								
									c66b2425e7
								
							
						
					
					
						commit
						c18b2d57a9
					
				@ -33,7 +33,7 @@
 | 
			
		||||
 | 
			
		||||
void igt_require_hang_ring(int fd, int ring)
 | 
			
		||||
{
 | 
			
		||||
	igt_require(gem_context_has_param(fd, LOCAL_CONTEXT_PARAM_BAN_PERIOD));
 | 
			
		||||
	gem_context_require_param(fd, LOCAL_CONTEXT_PARAM_BAN_PERIOD);
 | 
			
		||||
	igt_require(intel_gen(intel_get_drm_devid(fd)) >= 5);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1080,7 +1080,7 @@ int gem_context_set_param(int fd, struct local_i915_gem_context_param *p)
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int gem_context_has_param(int fd, uint64_t param)
 | 
			
		||||
void gem_context_require_param(int fd, uint64_t param)
 | 
			
		||||
{
 | 
			
		||||
	struct local_i915_gem_context_param p;
 | 
			
		||||
 | 
			
		||||
@ -1089,5 +1089,5 @@ int gem_context_has_param(int fd, uint64_t param)
 | 
			
		||||
	p.value = 0;
 | 
			
		||||
	p.size = 0;
 | 
			
		||||
 | 
			
		||||
	return gem_context_get_param(fd, &p) == 0;
 | 
			
		||||
	igt_require(gem_context_get_param(fd, &p) == 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -113,7 +113,7 @@ struct local_i915_gem_context_param {
 | 
			
		||||
	uint64_t value;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
int gem_context_has_param(int fd, uint64_t param);
 | 
			
		||||
void gem_context_require_param(int fd, uint64_t param);
 | 
			
		||||
int gem_context_get_param(int fd, struct local_i915_gem_context_param *p);
 | 
			
		||||
int gem_context_set_param(int fd, struct local_i915_gem_context_param *p);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user