aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorZack Rusin2022-04-20 00:03:28 -0400
committerZack Rusin2022-04-20 21:30:43 -0400
commit298799a28264ce400d9ff95c51b7adcb123d866e (patch)
tree6f2c822488860c6322f153bf19f04a36034b5dce /virt
parent4dee8eebcfc1a99d7550855ec40720503df4842b (diff)
drm/vmwgfx: Fix gem refcounting and memory evictions
v2: Add the last part of the ref count fix which was spotted by Philipp Sieweck where the ref count of cpu writers is off due to ERESTARTSYS or EBUSY during bo waits. The initial GEM port broke refcounting on shareable (prime) surfaces and memory evictions. The prime surfaces broke because the parent surfaces weren't increasing the ref count on GEM surfaces, which meant that the memory backing textures could have been deleted while the texture was still accessible. The evictions broke due to a typo, the code was supposed to exit if the passed buffers were not vmw_buffer_object not if they were. They're tied because the evictions depend on having memory to actually evict. This fixes crashes with XA state tracker which is used for xrender acceleration on xf86-video-vmware, apps/tests which use a lot of memory (a good test being the piglit's streaming-texture-leak) and desktops. Signed-off-by: Zack Rusin <zackr@vmware.com> Fixes: 8afa13a0583f ("drm/vmwgfx: Implement DRIVER_GEM") Reported-by: Philipp Sieweck <psi@informatik.uni-kiel.de> Cc: <stable@vger.kernel.org> # v5.17+ Reviewed-by: Maaz Mombasawala <mombasawalam@vmware.com> Reviewed-by: Martin Krastev <krastevm@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220420040328.1007409-1-zack@kde.org
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions