]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Fix cpu updates of coherent multisample surfaces
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 5 May 2021 03:57:37 +0000 (23:57 -0400)
committerZack Rusin <zackr@vmware.com>
Tue, 11 May 2021 17:37:15 +0000 (13:37 -0400)
commit1b897f7e44dec4f878ba6fa601115a11513ed64d
treed476283272c3b4a69c777f5d9515983def8dfce8
parent4482d1b89d637020e97dabd16346de0643fcb333
drm/vmwgfx: Fix cpu updates of coherent multisample surfaces

In cases where the dirty linear memory range spans multiple sample sheets
in a surface, the dirty surface region is incorrectly computed.
To do this correctly and in an optimized fashion  we would have to compute
the dirty region of each sample sheet and compute the union of those
regions.

But assuming that cpu writing to a multisample surface is rather a corner
case than a common case, just set the dirty region to the full surface.

This fixes OpenGL piglit errors with SVGA_FORCE_COHERENT=1
and the piglit test:

fbo-depthstencil blit default_fb -samples=2 -auto

Fixes: c35008c2b0be ("drm/vmwgfx: Add surface dirty-tracking callbacks")
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210505035740.286923-4-zackr@vmware.com
drivers/gpu/drm/vmwgfx/device_include/svga3d_surfacedefs.h
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c