]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:30:40 +0000 (09:30 +0200)
commit62cc0ff266575670cada4326e6f63a43c00f0ef5
tree4f11a362c69ec7b7080a3e3ec97dd97fe83c27eb
parent9cb84c2cb3e85293fef593aab8568dfeb15b67a8
drm/vmwgfx: Fix cpu updates of coherent multisample surfaces

BugLink: https://bugs.launchpad.net/bugs/1938340
[ Upstream commit 88509f698c4e38e287e016e86a0445547824135c ]

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: 9ca7d19ff8ba ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/vmwgfx/device_include/svga3d_surfacedefs.h
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c