1. 05 Feb, 2019 2 commits
    • Lionel Landwerlin's avatar
      drm/i915/perf: lock powergating configuration to default when active · ec431eae
      Lionel Landwerlin authored
      If some of the contexts submitting workloads to the GPU have been
      configured to shutdown slices/subslices, we might loose the NOA
      configurations written in the NOA muxes.
      
      One possible solution to this problem is to reprogram the NOA muxes
      when we switch to a new context. We initially tried this in the
      workaround batchbuffer but some concerns where raised about the cost
      of reprogramming at every context switch. This solution is also not
      without consequences from the userspace point of view. Reprogramming
      of the muxes can only happen once the powergating configuration has
      changed (which happens after context switch). This means for a window
      of time during the recording, counters recorded by the OA unit might
      be invalid. This requires userspace dealing with OA reports to discard
      the invalid values.
      
      Minimizing the reprogramming could be implemented by tracking of the
      last programmed configuration somewhere in GGTT and use MI_PREDICATE
      to discard some of the programming commands, but the command streamer
      would still have to parse all the MI_LRI instructions in the
      workaround batchbuffer.
      
      Another solution, which this change implements, is to simply disregard
      the user requested configuration for the period of time when i915/perf
      is active.
      
      On most platforms there are no issues with this apart from a performance
      penality for some media workloads that benefit from running on a partially
      powergated GPU. We already prevent RC6 from affecting the programming so
      it doesn't sound completely unreasonable to hold on powergating for the
      same reason.
      
      On Icelake however there would a functional problem if the slices not-
      containing the VME block were left enabled with a running media workload
      which explicitly disabled them. To avoid a GPU hang in this case, on
      Icelake we lock the enablement to only slices which contain VME blocks.
      Downside is that it means degraded GPU performance when OA is active but
      there is no known alternative solution for this.
      
      v2: Leave RPCS programming in intel_lrc.c (Lionel)
      
      v3: Update for s/union intel_sseu/struct intel_sseu/ (Lionel)
          More to_intel_context() (Tvrtko)
          s/dev_priv/i915/ (Tvrtko)
      
      Tvrtko Ursulin:
      
      v4:
       * Rebase for make_rpcs changes.
      
      v5:
       * Apply OA restriction from make_rpcs directly.
      
      v6:
       * Rebase for context image setup changes.
      
      v7:
       * Move stream assignment before metric enable.
      
      v8-9:
       * Rebase.
      
      v10:
       * Squashed with ICL support patch.
      
      Bspec: 21140
      Co-developed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v9
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190205095032.22673-2-tvrtko.ursulin@linux.intel.com
      ec431eae
    • Lionel Landwerlin's avatar
      drm/i915: Record the sseu configuration per-context & engine · 87f1ef22
      Lionel Landwerlin authored
      We want to expose the ability to reconfigure the slices, subslice and
      eu per context and per engine. To facilitate that, store the current
      configuration on the context for each engine, which is initially set
      to the device default upon creation.
      
      v2: record sseu configuration per context & engine (Chris)
      
      v3: introduce the i915_gem_context_sseu to store powergating
          programming, sseu_dev_info has grown quite a bit (Lionel)
      
      v4: rename i915_gem_sseu into intel_sseu (Chris)
          use to_intel_context() (Chris)
      
      v5: More to_intel_context() (Tvrtko)
          Switch intel_sseu from union to struct (Tvrtko)
          Move context default sseu in existing loop (Chris)
      
      v6: s/intel_sseu_from_device_sseu/intel_device_default_sseu/ (Tvrtko)
      
      Tvrtko Ursulin:
      
      v7:
       * Pass intel_sseu by pointer instead of value to make_rpcs.
       * Rebase for make_rpcs changes.
      
      v8:
       * Rebase for RPCS edit on pin.
      
      v9:
       * Rebase for context image setup changes.
      
      v10:
       * Rename dev_priv to i915. (Chris Wilson)
      
      v11:
       * Rebase.
      
      v12:
       * Rebase for IS_GEN changes.
      
      v13:
       * Rebase for RUNTIME_INFO.
      
      v14:
       * Rebase for intel_context_init.
      
      v15:
       * Rebase for drm-tip changes.
      
      v16:
       * Moved struct intel_sseu definition to i915_gem_context.h.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190205095032.22673-1-tvrtko.ursulin@linux.intel.com
      87f1ef22
  2. 04 Feb, 2019 2 commits
    • Chris Wilson's avatar
      drm/i915: Trim NEWCLIENT boosting · 1413b2bc
      Chris Wilson authored
      Limit the NEWCLIENT boost to only give its small priority boost to fresh
      clients only that have no dependencies.
      
      The idea for using NEWCLIENT boosting, commit b16c7651 ("drm/i915:
      Priority boost for new clients"), is that short-lived streams are often
      interactive and require lower latency -- and that by executing those
      ahead of the long running hogs, the short-lived clients do little to
      interfere with the system throughput by virtue of their short-lived
      nature. However, we were only considering the client's own timeline for
      determining whether or not it was a fresh stream. This allowed for
      compositors to wake up before their vblank and bump all of its client
      streams. However, in testing with media-bench this results in chaining
      all cooperating contexts together preventing us from being able to
      reorder contexts to reduce bubbles (pipeline stalls), overall increasing
      latency, and reducing system throughput. The exact opposite of our
      intent. The compromise of applying the NEWCLIENT boost to strictly fresh
      clients (that do not wait upon anything else) should maintain the
      "real-time response under load" characteristics of FQ_CODEL, without
      locking together the long chains of dependencies across the system.
      
      References: b16c7651 ("drm/i915: Priority boost for new clients")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190204150101.30759-1-chris@chris-wilson.co.uk
      1413b2bc
    • Chris Wilson's avatar
      drm/i915: Allow normal clients to always preempt idle priority clients · 3d7a64b9
      Chris Wilson authored
      When first enabling preemption, we hesitated from making it a free-for-all
      where every higher priority client would force a preempt-to-idle cycle
      and take over from all lower priority clients. We hesitated because we
      were uncertain just how well preemption would work in practice, whether
      the preemption latency itself would detract from the latency gains for
      higher priority tasks and whether it would work at all. Since
      introducing preemption, we have been enabling it for more common tasks,
      even giving normal clients a small preemptive boost when they first
      start (to aide fairness and improve interactivity). Now lets take one
      step further and give permission for all normal (priority:0) clients to
      preempt any idle (priority:<0) task so that users running long compute
      jobs do not overly impact other jobs (i.e. their desktop) and the system
      remains responsive under such idle loads.
      
      References: f6322edd ("drm/i915/preemption: Allow preemption between submission ports")
      References: b16c7651 ("drm/i915: Priority boost for new clients")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Cc: "Bloomfield, Jon" <jon.bloomfield@intel.com>
      Cc: "Stead, Alan" <alan.stead@intel.com>
      Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190204084116.3013-1-chris@chris-wilson.co.uk
      3d7a64b9
  3. 02 Feb, 2019 1 commit
  4. 31 Jan, 2019 1 commit
  5. 01 Feb, 2019 5 commits
  6. 31 Jan, 2019 9 commits
  7. 30 Jan, 2019 10 commits
  8. 29 Jan, 2019 10 commits