sna: Nullify pixmap->devPrivate.ptr after promoting CPU bo to GPU
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Jan 2014 08:40:34 +0000 (08:40 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Jan 2014 09:16:38 +0000 (09:16 +0000)
commit5f3ee21a307a4ff4db189bd53e58a70ec01ee6bc
tree8c27e35bf373041f3dbedd1438eb25244870f9a2
parent34192006c65640327bc81e2765f5ef5db3c539e3
sna: Nullify pixmap->devPrivate.ptr after promoting CPU bo to GPU

When we convert a CPU bo into a GPU bo, we need to remove any dangling
shadow pointers we use for devPrivate.ptr. Whilst the bo remains alive
these are incoherent, but if we ever replace the GPU bo (for example to
change tiling for DRI2) then the dangling pointer becomes invalid and
will explode on next use.

Reported-by: Mike Aury <mike.auty@gmail.com>
Reported-by: Marti Raudsepp <marti@juffo.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73351
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_accel.c