winsys/amdgpu: Retrieve WC flags from imported buffers.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 13 Apr 2020 23:44:10 +0000 (01:44 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Apr 2020 13:51:28 +0000 (13:51 +0000)
commitd80fb024302aa6058945826a79ba0caf9611fcc1
tree08145519c8b884f0287e25cdd80bc73657661f11
parent80797edd7193409d0109d4d3378dd1b8d2597f80
winsys/amdgpu: Retrieve WC flags from imported buffers.

Otherwise reading from an imported mapped GTT+WC linear texture
is painfully slow.

Sadly no radeon winsys implementation, as I don't know a suitable
kernel driver operation.

Hit this  in vaGetImage with an image imported from minigbm (which
we are switching to allocate WC for SCANOUT images).

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4542>
src/gallium/drivers/radeon/radeon_winsys.h
src/gallium/drivers/radeonsi/si_texture.c
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
src/gallium/winsys/amdgpu/drm/amdgpu_bo.h