drm: Reserve/unreserve GEM VRAM BOs from within pin/unpin functions
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 16 May 2019 16:27:46 +0000 (18:27 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 17 May 2019 11:14:11 +0000 (13:14 +0200)
commit5b24f715042da2a7f3fd059f15cc5a6fbd4f4ec6
tree10786a77f38388273e4a631717232ba30cd3557c
parent82ff2fb5d184e95c7877c58359cef4f5d43df9c1
drm: Reserve/unreserve GEM VRAM BOs from within pin/unpin functions

The original bochs and vbox implementations of pin and unpin functions
automatically reserved BOs during validation. This functionality got lost
while converting the code to a generic implementation. This may result
in validating unlocked TTM BOs.

Adding the reserve and unreserve operations to GEM VRAM's pin and unpin
functions fixes the bochs and vbox drivers. Additionally the patch changes
the mgag200, ast and hibmc drivers to not reserve BOs by themselves.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: kernel test robot <lkp@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190516162746.11636-3-tzimmermann@suse.de
Fixes: a3232987fdbf ("drm/bochs: Convert bochs driver to |struct drm_gem_vram_object|")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/ast/ast_mode.c
drivers/gpu/drm/drm_gem_vram_helper.c
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
drivers/gpu/drm/mgag200/mgag200_mode.c