OSDN Git Service

drm/i915: Use same test for eviction and submitting kernel context
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Oct 2017 22:08:55 +0000 (23:08 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 Oct 2017 11:13:03 +0000 (12:13 +0100)
commit20ccd4d3f689ac14dce8632d76769be0ac952060
tree434734b5ef5cecac5acf428f01b162a6e4673dcd
parentb1f9107e1b251b2cbd413062fad3636570d2ea20
drm/i915: Use same test for eviction and submitting kernel context

During evict, we wish to idle the GPU if we see that the GGTT is full.
However, our test for idle in i915_gem_evict_something() and in
i915_gem_switch_to_kernel_context() do not match leading to
disappointment - we never believe that we are idle and keep trying to
flush the GGTT ad infinitum.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103438
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171024220855.30155-2-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_ringbuffer.h