]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/i915_gem.c
drm/i915: Force the switch to the i915->kernel_context
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 10 Nov 2017 14:26:28 +0000 (14:26 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:42:20 +0000 (01:42 -0500)
commit0fe7ad04a6264d60bcbddaddbfffc3f77f819dbe
treeff72c160dfa993c56e5c44af4fcebf8155bdbb5d
parent3fdb06ea5a3e8915f1e1c04e6c47984921d41c99
drm/i915: Force the switch to the i915->kernel_context

BugLink: https://bugs.launchpad.net/bugs/1862840
In the next few patches, we will have a hard requirement that we emit a
context-switch to the perma-pinned i915->kernel_context (so that we can
save the HW state using that context-switch). As the first context
itself may be classed as a kernel context, we want to be explicit in our
comparison. For an extra-layer of finesse, we can check the last
unretired context on the engine; as well as the last retired context
when idle.

v2: verbose verbosity
v3: Always force the switch, even when the engine is idle, and update
the assert that this happens before suspend.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> #v1
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171110142634.10551-2-chris@chris-wilson.co.uk
CVE-2020-8832

(cherry picked from commit ae6c4574782dbfebcbf1f7e3620bcaf58ceb69e3)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_engine_cs.c