mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 03:58:27 +00:00 
			
		
		
		
	kms_addfb_basic: move tiling functionality into each subtest
Because calls to gem_set_tiling will cause the subtest to be skipped on drivers other than i915, move them to each subtest that needs them so the other subtests aren't skipped as well. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
		
							parent
							
								
									decbf5a3b1
								
							
						
					
					
						commit
						c94a828f15
					
				@ -156,17 +156,17 @@ static void pitch_tests(int fd)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	igt_fixture
 | 
			
		||||
		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 | 
			
		||||
	f.pitches[0] = 1024*4;
 | 
			
		||||
 | 
			
		||||
	igt_subtest("basic-X-tiled") {
 | 
			
		||||
		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 | 
			
		||||
		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 | 
			
		||||
		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
 | 
			
		||||
		f.fb_id = 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	igt_subtest("framebuffer-vs-set-tiling") {
 | 
			
		||||
		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 | 
			
		||||
		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 | 
			
		||||
		igt_assert(__gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4) == -EBUSY);
 | 
			
		||||
		igt_assert(__gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4) == -EBUSY);
 | 
			
		||||
@ -176,14 +176,14 @@ static void pitch_tests(int fd)
 | 
			
		||||
 | 
			
		||||
	f.pitches[0] = 512*4;
 | 
			
		||||
	igt_subtest("tile-pitch-mismatch") {
 | 
			
		||||
		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 | 
			
		||||
		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
 | 
			
		||||
			   errno == EINVAL);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	igt_fixture
 | 
			
		||||
		gem_set_tiling(fd, gem_bo, I915_TILING_Y, 1024*4);
 | 
			
		||||
	f.pitches[0] = 1024*4;
 | 
			
		||||
	igt_subtest("basic-Y-tiled") {
 | 
			
		||||
		gem_set_tiling(fd, gem_bo, I915_TILING_Y, 1024*4);
 | 
			
		||||
		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
 | 
			
		||||
			   errno == EINVAL);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user