1. 21 9月, 2018 1 次提交
  2. 20 9月, 2018 1 次提交
  3. 14 9月, 2018 6 次提交
  4. 06 9月, 2018 3 次提交
  5. 05 9月, 2018 1 次提交
    • C
      drm/i915: Reduce context HW ID lifetime · 288f1ced
      Chris Wilson 提交于
      Future gen reduce the number of bits we will have available to
      differentiate between contexts, so reduce the lifetime of the ID
      assignment from that of the context to its current active cycle (i.e.
      only while it is pinned for use by the HW, will it have a constant ID).
      This means that instead of a max of 2k allocated contexts (worst case
      before fun with bit twiddling), we instead have a limit of 2k in flight
      contexts (minus a few that have been pinned by the kernel or by perf).
      
      To reduce the number of contexts id we require, we allocate a context id
      on first and mark it as pinned for as long as the GEM context itself is,
      that is we keep it pinned it while active on each engine. If we exhaust
      our context id space, then we try to reclaim an id from an idle context.
      In the extreme case where all context ids are pinned by active contexts,
      we force the system to idle in order to recover ids.
      
      We cannot reduce the scope of an HW-ID to an engine (allowing the same
      gem_context to have different ids on each engine) as in the future we
      will need to preassign an id before we know which engine the
      context is being executed on.
      
      v2: Improved commentary (Tvrtko) [I tried at least]
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=107788Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180904153117.3907-1-chris@chris-wilson.co.uk
      288f1ced
  6. 04 9月, 2018 1 次提交
  7. 03 9月, 2018 1 次提交
  8. 31 8月, 2018 1 次提交
  9. 30 8月, 2018 2 次提交
  10. 17 8月, 2018 1 次提交
  11. 16 8月, 2018 1 次提交
  12. 10 8月, 2018 2 次提交
  13. 08 8月, 2018 3 次提交
    • I
      drm/i915/ddi: Use power well CTL IDX instead of ID · 75e39688
      Imre Deak 提交于
      Similarly to the previous patch use a separate request/status HW flag
      index defined right after the corresponding control registers instead of
      depending for this on the power well IDs. Since the set of
      control/status registers varies among the different power wells (on a
      single platform), also add a new i915_power_well_registers struct that
      we populate and assign to each DDI power well as needed.
      
      Also clarify a bit the code comment describing the function and layout
      of the control registers.
      
      This also fixes a problem on ICL, where we incorrectly read the KVMR
      control register in hsw_power_well_requesters() even for DDI and AUX
      power wells.
      
      v2:
      - Clarify platform range tags in code comments. (Paulo)
      - Fix line over 80 chars checkpatch warning.
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-7-imre.deak@intel.com
      75e39688
    • I
      drm/i915/vlv: Use power well CTL IDX instead of ID · d13dd05a
      Imre Deak 提交于
      Atm, we determine the control/status flag offsets within the PUNIT
      control/status registers based on the power well's ID. Since the power
      well ID enum is global across all platforms, the associated macros to
      get the flag offsets involves some magic. This makes checking the
      register/bit definitions against the specification more difficult than
      necessary. Also the values in the power well ID enum must stay fixed,
      making code maintenance of the enum cumbersome.
      
      To solve the above define the control/status flag indices right after
      the corresponding registers and use these to derive the control/status
      flag values by storing the indices in the i915_power_well_desc struct.
      
      Initializing anonymous union fields require the preceding field in the
      struct to be explicitly initialized - even when using named
      initializers - and the initialization to be done right before the union
      initialization, hence the reordering of the .id fields.
      
      v2:
      - Clarify commit log message about anonymous union initializers. (Paulo)
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-6-imre.deak@intel.com
      d13dd05a
    • I
      drm/i915: Constify power well descriptors · f28ec6f4
      Imre Deak 提交于
      It makes sense to keep unchanging data const. Extract such fields from
      the i915_power_well struct into a new i915_power_well_desc struct that
      we initialize during compile time. For the rest of the dynamic
      fields allocate an array of i915_power_well objects in i915 dev_priv,
      and link to each of these objects their corresponding
      i915_power_well_desc object.
      
      v2:
      - Fix checkpatch warnings about missing param name in fn declaration and
        lines over 80 chars. (Paulo)
      - Move check for unique IDs to __set_power_wells().
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      [Fixed checkpatch warn in __set_power_wells()]
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-5-imre.deak@intel.com
      f28ec6f4
  14. 07 8月, 2018 1 次提交
  15. 31 7月, 2018 1 次提交
    • C
      drm/i915: Interactive RPS mode · 60548c55
      Chris Wilson 提交于
      RPS provides a feedback loop where we use the load during the previous
      evaluation interval to decide whether to up or down clock the GPU
      frequency. Our responsiveness is split into 3 regimes, a high and low
      plateau with the intent to keep the gpu clocked high to cover occasional
      stalls under high load, and low despite occasional glitches under steady
      low load, and inbetween. However, we run into situations like kodi where
      we want to stay at low power (video decoding is done efficiently
      inside the fixed function HW and doesn't need high clocks even for high
      bitrate streams), but just occasionally the pipeline is more complex
      than a video decode and we need a smidgen of extra GPU power to present
      on time. In the high power regime, we sample at sub frame intervals with
      a bias to upclocking, and conversely at low power we sample over a few
      frames worth to provide what we consider to be the right levels of
      responsiveness respectively. At low power, we more or less expect to be
      kicked out to high power at the start of a busy sequence by waitboosting.
      
      Prior to commit e9af4ea2 ("drm/i915: Avoid waitboosting on the active
      request") whenever we missed the frame or stalled, we would immediate go
      full throttle and upclock the GPU to max. But in commit e9af4ea2, we
      relaxed the waitboosting to only apply if the pipeline was deep to avoid
      over-committing resources for a near miss. Sadly though, a near miss is
      still a miss, and perceptible as jitter in the frame delivery.
      
      To try and prevent the near miss before having to resort to boosting
      after the fact, we use the pageflip queue as an indication that we are
      in an "interactive" regime and so should sample the load more frequently
      to provide power before the frame misses it vblank. This will make us
      more favorable to providing a small power increase (one or two bins) as
      required rather than going all the way to maximum and then having to
      work back down again. (We still keep the waitboosting mechanism around
      just in case a dramatic change in system load requires urgent uplocking,
      faster than we can provide in a few evaluation intervals.)
      
      v2: Reduce rps_set_interactive to a boolean parameter to avoid the
      confusion of what if they wanted a new power mode after pinning to a
      different mode (which to choose?)
      v3: Only reprogram RPS while the GT is awake, it will be set when we
      wake the GT, and while off warns about being used outside of rpm.
      v4: Fix deferred application of interactive mode
      v5: s/state/interactive/
      v6: Group the mutex with its principle in a substruct
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107111
      Fixes: e9af4ea2 ("drm/i915: Avoid waitboosting on the active request")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180731132629.3381-1-chris@chris-wilson.co.uk
      60548c55
  16. 19 7月, 2018 2 次提交
  17. 13 7月, 2018 4 次提交
  18. 12 7月, 2018 1 次提交
  19. 11 7月, 2018 1 次提交
  20. 10 7月, 2018 1 次提交
  21. 09 7月, 2018 1 次提交
    • C
      drm/i915: Provide a timeout to i915_gem_wait_for_idle() · ec625fb9
      Chris Wilson 提交于
      Usually we have no idea about the upper bound we need to wait to catch
      up with userspace when idling the device, but in a few situations we
      know the system was idle beforehand and can provide a short timeout in
      order to very quickly catch a failure, long before hangcheck kicks in.
      
      In the following patches, we will use the timeout to curtain two overly
      long waits, where we know we can expect the GPU to complete within a
      reasonable time or declare it broken.
      
      In particular, with a broken GPU we expect it to fail during the initial
      GPU setup where do a couple of context switches to record the defaults.
      This is a task that takes a few milliseconds even on the slowest of
      devices, but we may have to wait 60s for hangcheck to give in and
      declare the machine inoperable. In this a case where any gpu hang is
      unacceptable, both from a timeliness and practical standpoint.
      
      The other improvement is that in selftests, we do not need to arm an
      independent timer to inject a wedge, as we can just limit the timeout on
      the wait directly.
      
      v2: Include the timeout parameter in the trace.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180709122044.7028-1-chris@chris-wilson.co.uk
      ec625fb9
  22. 07 7月, 2018 2 次提交
  23. 06 7月, 2018 2 次提交