From 4cd21795d2ba882a4197769e516b021a5a4c806d Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Tue, 11 Sep 2012 19:01:46 +0200 Subject: tests/prime_nv_pcopy.c: fail if nouveau_pushbuf_kick fails rather than spinning --- tests/prime_nv_pcopy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/prime_nv_pcopy.c') diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c index 21dccf38..7ed5cf4f 100644 --- a/tests/prime_nv_pcopy.c +++ b/tests/prime_nv_pcopy.c @@ -534,6 +534,7 @@ static int perform_copy(struct nouveau_bo *nvbo, const rect *dst, uint32_t cpp = 1, exec = 0x00003000; /* QUERY|QUERY_SHORT|FORMAT */ uint32_t src_off = 0, dst_off = 0; struct nouveau_pushbuf *push = npush; + int ret; if (nvbi->config.nv50.tile_mode == tile_intel_y) dbg("src is y-tiled\n"); @@ -591,9 +592,9 @@ static int perform_copy(struct nouveau_bo *nvbo, const rect *dst, BEGIN_NVXX(push, SUBC_COPY(0x0300), 1); PUSH_DATA (push, exec); - nouveau_pushbuf_kick(push, push->channel); - while (*query < query_counter) { usleep(1000); } - return 0; + ret = nouveau_pushbuf_kick(push, push->channel); + while (!ret && *query < query_counter) { usleep(1000); } + return ret; } static int check1_macro(uint32_t *p, uint32_t w, uint32_t h) -- cgit v1.2.3