sna: Add a DBG aide to disable hardware execution

Submit a dummy batch so that we still build, submit batches and perform
relocations, but do not actually invoke the GPU. This can be useful when
looking at mysterious hardware hangs.

References: https://bugs.freedesktop.org/show_bug.cgi?id=77263
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-04-22 12:30:29 +01:00
parent f6bc0e390b
commit b12bc035fb
1 changed files with 9 additions and 0 deletions

View File

@ -61,6 +61,7 @@ static struct kgem_bo *
search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
#define DBG_NO_HW 0
#define DBG_NO_EXEC 0
#define DBG_NO_TILING 0
#define DBG_NO_CACHE 0
#define DBG_NO_CACHE_LEVEL 0
@ -2743,6 +2744,14 @@ static int kgem_batch_write(struct kgem *kgem, uint32_t handle, uint32_t size)
ASSERT_IDLE(kgem, handle);
#if DBG_NO_EXEC
{
uint32_t batch[] = { MI_BATCH_BUFFER_END, 0};
return gem_write(kgem->fd, handle, 0, sizeof(batch), batch);
}
#endif
retry:
/* If there is no surface data, just upload the batch */
if (kgem->surface == kgem->batch_size) {