]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 31 May 2017 19:05:14 +0000 (20:05 +0100)
committerJani Nikula <jani.nikula@intel.com>
Wed, 7 Jun 2017 13:31:27 +0000 (16:31 +0300)
commita3e2e201bc0c24cff0d78e2baa438b29bba376e5
tree6f921ea6ad492b66a0ad2f346ef7b2bac2b45602
parent0c2cf4210f641ac0cbf07e888bea0f02215cdfa8
drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally

Commit a2db359d106b ("drm/i915: Invalidate the guc ggtt TLB upon
insertion") added the restoration of the invalidation routine after the
GuC was disabled, but missed that the GuC was unconditionally disabled
when not used. This then overwrites the invalidate routine for the older
chipsets, causing havoc and breaking resume as the most obvious victim.

We place the guard inside i915_ggtt_disable_guc() to be backport
friendly (the bug was introduced into v4.11) but it would be preferred
to be in more control over when this was guard (i.e. do not try and
teardown the data structures before we have enabled them). That should
be true with the reorganisation of the guc loaders.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: a2db359d106b ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: <stable@vger.kernel.org> # v4.11+
Link: http://patchwork.freedesktop.org/patch/msgid/20170531190514.3691-1-chris@chris-wilson.co.uk
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
(cherry picked from commit cb60606d835ca8b2f744835116bcabe64ce88849)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_gem_gtt.c