drm/ttm: fix pipelined gutting v2
authorChristian König <christian.koenig@amd.com>
Tue, 8 Jun 2021 07:19:30 +0000 (09:19 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 8 Jun 2021 08:36:51 +0000 (10:36 +0200)
commitfc357bc8ebac978631b5f2572c9065771c78a631
tree73b84df80cfd1bcd29d92017d8f61be28fbd867e
parent72db41c9336d155d441541e9010c868e3cf62451
drm/ttm: fix pipelined gutting v2

We need to make sure to allocate the sys_mem resource before the point
of no return.

v2: add missing return value checking, also handle idle case

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210608081931.11339-1-christian.koenig@amd.com
drivers/gpu/drm/ttm/ttm_bo_util.c