diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-08-17 12:45:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-08-17 12:45:24 +0100 |
commit | 1b3cf1efe3c091f5c4c519c81381475fb2587383 (patch) | |
tree | fd3e99f337ef5bc8f5d5084289d06e8cfb1cf805 /src/sna/sna_dri2.c | |
parent | 9b0ed16385ae076c262a2e09639822d9488ccf57 (diff) |
sna/dri2: Check that the copy succeeds before associating the request
If the DRI2 copy ends up on the CPU, then we will not have a GPU
request for the operation.
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri2.c')
-rw-r--r-- | src/sna/sna_dri2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 8e1a46de..43898164 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -1327,7 +1327,7 @@ __sna_dri2_copy_region(struct sna *sna, DrawablePtr draw, RegionPtr region, if (flags & (DRI2_SYNC | DRI2_BO)) { /* STAT! */ struct kgem_request *rq = RQ(dst_bo->rq); - if (rq != (void *)&sna->kgem) { + if (rq && rq != (void *)&sna->kgem) { if (rq->bo == NULL) kgem_submit(&sna->kgem); if (rq->bo) { /* Becareful in case the gpu is wedged */ |