mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	igt/gem_exec_flush: Give even batch write a unique value
One property lost in the expansion for various coherency checks was ensuring that every time we overwrote the batch it had a unique value (to ensure that the GPU was seeing the latest value). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
		
							parent
							
								
									7b7503fb6c
								
							
						
					
					
						commit
						6102e2eca9
					
				@ -351,7 +351,7 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,
 | 
				
			|||||||
					b[-1] -= 1;
 | 
										b[-1] -= 1;
 | 
				
			||||||
					*b++ = offset;
 | 
										*b++ = offset;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				*b++ = i;
 | 
									*b++ = cycles + i;
 | 
				
			||||||
				*b++ = MI_BATCH_BUFFER_END;
 | 
									*b++ = MI_BATCH_BUFFER_END;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				switch (mode) {
 | 
									switch (mode) {
 | 
				
			||||||
@ -371,7 +371,6 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,
 | 
				
			|||||||
					break;
 | 
										break;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				gem_execbuf(fd, &execbuf);
 | 
									gem_execbuf(fd, &execbuf);
 | 
				
			||||||
				cycles++;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
				execbuf.batch_start_offset += 64;
 | 
									execbuf.batch_start_offset += 64;
 | 
				
			||||||
				reloc.offset += 64;
 | 
									reloc.offset += 64;
 | 
				
			||||||
@ -384,9 +383,10 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,
 | 
				
			|||||||
			} else
 | 
								} else
 | 
				
			||||||
				gem_sync(fd, obj[0].handle);
 | 
									gem_sync(fd, obj[0].handle);
 | 
				
			||||||
			for (i = 0; i < 1024; i++) {
 | 
								for (i = 0; i < 1024; i++) {
 | 
				
			||||||
				igt_assert_eq(map[i], i);
 | 
									igt_assert_eq_u32(map[i], cycles + i);
 | 
				
			||||||
				map[i] = 0xabcdabcd;
 | 
									map[i] = 0xabcdabcd ^ cycles;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								cycles += 1024;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (mode == BATCH_USER)
 | 
								if (mode == BATCH_USER)
 | 
				
			||||||
				gem_sync(fd, obj[1].handle);
 | 
									gem_sync(fd, obj[1].handle);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user