drm/i915: Flush everything on switching to the kernel_context
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 26 Nov 2017 21:48:56 +0000 (21:48 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 27 Nov 2017 16:37:15 +0000 (16:37 +0000)
commitc82297fcfaff2862686094061772070e6763e00c
treecc1f7b9c00613a866f4a7db2ac558bcaf9c24f5f
parentfd94d53e55bd487368dfee9f1af24da78b2bb582
drm/i915: Flush everything on switching to the kernel_context

Even though all rendering should have been flushed at the end of the
previous requests, add an extra flush after switching to the
kernel_context. As the switch to the kernel_context is used when idling
the gpu (e.g. suspend), having an extra layer of paranoia to ensure
everything is flushed to memory seems sensible.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171126214856.23702-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_gem_context.c