OSDN Git Service

drm/vmwgfx: Introduce a new placement for MOB page tables
authorZack Rusin <zackr@vmware.com>
Fri, 5 Nov 2021 19:38:45 +0000 (15:38 -0400)
committerZack Rusin <zackr@vmware.com>
Wed, 1 Dec 2021 16:58:35 +0000 (11:58 -0500)
commitf6be23264bbac88d1e2bb39658e1b8a397e3f46d
tree2509fa3782425491c26f9c5e90ff9b584d2f70ed
parentc451af78f301ff5156998d571c37cab329c10051
drm/vmwgfx: Introduce a new placement for MOB page tables

For larger (bigger than a page) and noncontiguous mobs we have
to create page tables that allow the host to find the memory.
Those page tables just used regular system memory. Unfortunately
in TTM those BO's are not allowed to be busy thus can't be
fenced and we have to fence those bo's  because we don't want
to destroy the page tables while the host is still executing
the command buffers which might be accessing them.

To solve it we introduce a new placement VMW_PL_SYSTEM which
is very similar to TTM_PL_SYSTEM except that it allows
fencing. This fixes kernel oops'es during unloading of the driver
(and pci hot remove/add) which were caused by busy BO's in
TTM_PL_SYSTEM being present in the delayed deletion list in
TTM (TTM_PL_SYSTEM manager is destroyed before the delayed
deletions are executed)

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211105193845.258816-5-zackr@vmware.com
drivers/gpu/drm/vmwgfx/Makefile
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c [new file with mode: 0644]
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c