drm/i915: check ppgtt validity when init reg state
authorZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 9 Jan 2017 13:14:53 +0000 (21:14 +0800)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 12 Jan 2017 08:39:41 +0000 (08:39 +0000)
commit34869776c76b0aa3bb882ec8a4b6f1ebb6d6f937
tree65d436703b83ccac43cc123f0912c73038266307
parent16ee20619f636abc4c72b4215f5cb9cf2f3e1b5b
drm/i915: check ppgtt validity when init reg state

Check if ppgtt is valid for context when init reg state. For gvt
context which has no i915 allocated ppgtt, failed to check that
would cause kernel null ptr reference error.

v2: remove !48bit ppgtt case as we'll always update before submit (Chris)

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170109131453.3943-1-zhenyuw@linux.intel.com
drivers/gpu/drm/i915/intel_lrc.c