]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Extract context switch skip and add pd load logic
authorBen Widawsky <benjamin.widawsky@intel.com>
Mon, 16 Mar 2015 16:00:55 +0000 (16:00 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 20 Mar 2015 10:48:17 +0000 (11:48 +0100)
commitba0aac58e63f2d8f09b6cb2c35639ab4887fbf6e
tree5e910d15ff93ffc2f8548c1dbe22be3dc9e02032
parentdc3652ff70a5623151447672bfda0a00eab34ce6
drm/i915: Extract context switch skip and add pd load logic

In Gen8, PDPs are saved and restored with legacy contexts (legacy contexts
only exist on the render ring). So change the ordering of LRI vs MI_SET_CONTEXT
for the initialization of the context. Also the only cases in which we
need to manually update the PDPs are when MI_RESTORE_INHIBIT has been
set in MI_SET_CONTEXT (i.e. when the context is not yet initialized or
it is the default context).

Legacy submission is not available post GEN8, so it isn't necessary to
add extra checks for newer generations.

v2: Use new functions to replace the logic right away (Daniel)
v3: Add missing pd load logic.
v4: Add warning in case pd_load_pre & pd_load_post are true, and add
missing trace_switch_mm. Cleaned up pd_load conditions. Add more
information about when is pd_load_post needed. (Mika)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v2+)
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_context.c