mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	tests/*storedw*: add subcases with more outstanding batches
Just in case this is better at hitting seqno signalling races ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
		
							parent
							
								
									826326bc7c
								
							
						
					
					
						commit
						1422c22e89
					
				@ -48,12 +48,14 @@ static int has_ppgtt = 0;
 | 
			
		||||
 | 
			
		||||
/* Like the store dword test, but we create new command buffers each time */
 | 
			
		||||
static void
 | 
			
		||||
store_dword_loop(void)
 | 
			
		||||
store_dword_loop(int div)
 | 
			
		||||
{
 | 
			
		||||
	int cmd, i, val = 0, ret;
 | 
			
		||||
	uint32_t *buf;
 | 
			
		||||
	drm_intel_bo *cmd_bo;
 | 
			
		||||
 | 
			
		||||
	printf("running storedw loop with stall every %i batch\n", div);
 | 
			
		||||
 | 
			
		||||
	cmd = MI_STORE_DWORD_IMM;
 | 
			
		||||
	if (!has_ppgtt)
 | 
			
		||||
		cmd |= MI_MEM_VIRTUAL;
 | 
			
		||||
@ -104,6 +106,9 @@ store_dword_loop(void)
 | 
			
		||||
			exit(-1);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (i % div != 0)
 | 
			
		||||
			goto cont;
 | 
			
		||||
 | 
			
		||||
		drm_intel_bo_wait_rendering(cmd_bo);
 | 
			
		||||
 | 
			
		||||
		drm_intel_bo_map(target_bo, 1);
 | 
			
		||||
@ -118,6 +123,7 @@ store_dword_loop(void)
 | 
			
		||||
		buf[0] = 0; /* let batch write it again */
 | 
			
		||||
		drm_intel_bo_unmap(target_bo);
 | 
			
		||||
 | 
			
		||||
cont:
 | 
			
		||||
		drm_intel_bo_unreference(cmd_bo);
 | 
			
		||||
 | 
			
		||||
		val++;
 | 
			
		||||
@ -162,7 +168,10 @@ int main(int argc, char **argv)
 | 
			
		||||
		exit(-1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	store_dword_loop();
 | 
			
		||||
	store_dword_loop(1);
 | 
			
		||||
	store_dword_loop(2);
 | 
			
		||||
	store_dword_loop(3);
 | 
			
		||||
	store_dword_loop(5);
 | 
			
		||||
 | 
			
		||||
	drm_intel_bo_unreference(target_bo);
 | 
			
		||||
	drm_intel_bufmgr_destroy(bufmgr);
 | 
			
		||||
 | 
			
		||||
@ -52,11 +52,13 @@ static int has_ppgtt = 0;
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
store_dword_loop(void)
 | 
			
		||||
store_dword_loop(int div)
 | 
			
		||||
{
 | 
			
		||||
	int cmd, i, val = 0;
 | 
			
		||||
	uint32_t *buf;
 | 
			
		||||
 | 
			
		||||
	printf("running storedw loop on blt with stall every %i batch\n", div);
 | 
			
		||||
 | 
			
		||||
	cmd = MI_STORE_DWORD_IMM;
 | 
			
		||||
	if (!has_ppgtt)
 | 
			
		||||
		cmd |= MI_MEM_VIRTUAL;
 | 
			
		||||
@ -72,6 +74,9 @@ store_dword_loop(void)
 | 
			
		||||
 | 
			
		||||
		intel_batchbuffer_flush_on_ring(batch, I915_EXEC_BLT);
 | 
			
		||||
 | 
			
		||||
		if (i % div != 0)
 | 
			
		||||
			goto cont;
 | 
			
		||||
 | 
			
		||||
		drm_intel_bo_map(target_buffer, 0);
 | 
			
		||||
 | 
			
		||||
		buf = target_buffer->virtual;
 | 
			
		||||
@ -84,6 +89,7 @@ store_dword_loop(void)
 | 
			
		||||
 | 
			
		||||
		drm_intel_bo_unmap(target_buffer);
 | 
			
		||||
 | 
			
		||||
cont:
 | 
			
		||||
		val++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -142,7 +148,10 @@ int main(int argc, char **argv)
 | 
			
		||||
		exit(-1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	store_dword_loop();
 | 
			
		||||
	store_dword_loop(1);
 | 
			
		||||
	store_dword_loop(2);
 | 
			
		||||
	store_dword_loop(3);
 | 
			
		||||
	store_dword_loop(5);
 | 
			
		||||
 | 
			
		||||
	drm_intel_bo_unreference(target_buffer);
 | 
			
		||||
	intel_batchbuffer_free(batch);
 | 
			
		||||
 | 
			
		||||
@ -52,11 +52,13 @@ static int has_ppgtt = 0;
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
store_dword_loop(void)
 | 
			
		||||
store_dword_loop(int div)
 | 
			
		||||
{
 | 
			
		||||
	int cmd, i, val = 0;
 | 
			
		||||
	uint32_t *buf;
 | 
			
		||||
 | 
			
		||||
	printf("running storedw loop on bsd with stall every %i batch\n", div);
 | 
			
		||||
 | 
			
		||||
	cmd = MI_STORE_DWORD_IMM;
 | 
			
		||||
	if (!has_ppgtt)
 | 
			
		||||
		cmd |= MI_MEM_VIRTUAL;
 | 
			
		||||
@ -72,6 +74,9 @@ store_dword_loop(void)
 | 
			
		||||
 | 
			
		||||
		intel_batchbuffer_flush_on_ring(batch, I915_EXEC_BSD);
 | 
			
		||||
 | 
			
		||||
		if (i % div != 0)
 | 
			
		||||
			goto cont;
 | 
			
		||||
 | 
			
		||||
		drm_intel_bo_map(target_buffer, 0);
 | 
			
		||||
 | 
			
		||||
		buf = target_buffer->virtual;
 | 
			
		||||
@ -84,6 +89,7 @@ store_dword_loop(void)
 | 
			
		||||
 | 
			
		||||
		drm_intel_bo_unmap(target_buffer);
 | 
			
		||||
 | 
			
		||||
cont:
 | 
			
		||||
		val++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -148,7 +154,10 @@ int main(int argc, char **argv)
 | 
			
		||||
		exit(-1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	store_dword_loop();
 | 
			
		||||
	store_dword_loop(1);
 | 
			
		||||
	store_dword_loop(2);
 | 
			
		||||
	store_dword_loop(3);
 | 
			
		||||
	store_dword_loop(5);
 | 
			
		||||
 | 
			
		||||
	drm_intel_bo_unreference(target_buffer);
 | 
			
		||||
	intel_batchbuffer_free(batch);
 | 
			
		||||
 | 
			
		||||
@ -52,11 +52,13 @@ static int has_ppgtt = 0;
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
store_dword_loop(void)
 | 
			
		||||
store_dword_loop(int div)
 | 
			
		||||
{
 | 
			
		||||
	int cmd, i, val = 0;
 | 
			
		||||
	uint32_t *buf;
 | 
			
		||||
 | 
			
		||||
	printf("running storedw loop on render with stall every %i batch\n", div);
 | 
			
		||||
 | 
			
		||||
	cmd = MI_STORE_DWORD_IMM;
 | 
			
		||||
	if (!has_ppgtt)
 | 
			
		||||
		cmd |= MI_MEM_VIRTUAL;
 | 
			
		||||
@ -72,6 +74,9 @@ store_dword_loop(void)
 | 
			
		||||
 | 
			
		||||
		intel_batchbuffer_flush_on_ring(batch, 0);
 | 
			
		||||
 | 
			
		||||
		if (i % div != 0)
 | 
			
		||||
			goto cont;
 | 
			
		||||
 | 
			
		||||
		drm_intel_bo_map(target_buffer, 0);
 | 
			
		||||
 | 
			
		||||
		buf = target_buffer->virtual;
 | 
			
		||||
@ -84,6 +89,7 @@ store_dword_loop(void)
 | 
			
		||||
 | 
			
		||||
		drm_intel_bo_unmap(target_buffer);
 | 
			
		||||
 | 
			
		||||
cont:
 | 
			
		||||
		val++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -136,7 +142,10 @@ int main(int argc, char **argv)
 | 
			
		||||
		exit(-1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	store_dword_loop();
 | 
			
		||||
	store_dword_loop(1);
 | 
			
		||||
	store_dword_loop(2);
 | 
			
		||||
	store_dword_loop(3);
 | 
			
		||||
	store_dword_loop(5);
 | 
			
		||||
 | 
			
		||||
	drm_intel_bo_unreference(target_buffer);
 | 
			
		||||
	intel_batchbuffer_free(batch);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user