diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 472939f5c18f..d0ef50bf930a 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1677,9 +1677,26 @@ static int switch_context(struct i915_request *rq) | |||
1677 | GEM_BUG_ON(HAS_EXECLISTS(rq->i915)); | 1677 | GEM_BUG_ON(HAS_EXECLISTS(rq->i915)); |
1678 | 1678 | ||
1679 | if (ppgtt) { | 1679 | if (ppgtt) { |
1680 | ret = load_pd_dir(rq, ppgtt); | 1680 | int loops; |
1681 | if (ret) | 1681 | |
1682 | goto err; | 1682 | /* |
1683 | * Baytail takes a little more convincing that it really needs | ||
1684 | * to reload the PD between contexts. It is not just a little | ||
1685 | * longer, as adding more stalls after the load_pd_dir (i.e. | ||
1686 | * adding a long loop around flush_pd_dir) is not as effective | ||
1687 | * as reloading the PD umpteen times. 32 is derived from | ||
1688 | * experimentation (gem_exec_parallel/fds) and has no good | ||
1689 | * explanation. | ||
1690 | */ | ||
1691 | loops = 1; | ||
1692 | if (engine->id == BCS && IS_VALLEYVIEW(engine->i915)) | ||
1693 | loops = 32; | ||
1694 | |||
1695 | do { | ||
1696 | ret = load_pd_dir(rq, ppgtt); | ||
1697 | if (ret) | ||
1698 | goto err; | ||
1699 | } while (--loops); | ||
1683 | 1700 | ||
1684 | if (intel_engine_flag(engine) & ppgtt->pd_dirty_rings) { | 1701 | if (intel_engine_flag(engine) & ppgtt->pd_dirty_rings) { |
1685 | unwind_mm = intel_engine_flag(engine); | 1702 | unwind_mm = intel_engine_flag(engine); |