OSDN Git Service

drm/i915/gvt: Fix shadow ctx ppgtt destroy function
authorXiong Zhang <xiong.y.zhang@intel.com>
Thu, 29 Nov 2018 08:25:54 +0000 (16:25 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 7 Dec 2018 04:01:09 +0000 (12:01 +0800)
commitf39a89b8f738b683e720185cdbbd1e6d626fada9
tree85d6c55d02d9dd26a96db098e326be3c68aeb8ac
parent77453c9f2b67956911d0074e07e30a5e59e51a6e
drm/i915/gvt: Fix shadow ctx ppgtt destroy function

Recently gvt shadow ctx create ppgtt table and this ppgtt's root
pointer is modified at workload dispatch, then we lose the original
ppgtt's root pointer, this causes the ppgtt destroy function abnormal
as it will release the wrong root table.

This patch save i915 context ppgtt root pointer at shadow
ctx creation and restore it at shadow ctx destruction.

v2: Split save and restore function (Zhenyu)

Fixes:4f15665ccbba("drm/i915: Add ppgtt to GVT GEM context")
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/scheduler.c