1. 16 8月, 2018 1 次提交
  2. 10 8月, 2018 2 次提交
  3. 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
  4. 07 8月, 2018 1 次提交
  5. 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
  6. 19 7月, 2018 2 次提交
  7. 13 7月, 2018 4 次提交
  8. 12 7月, 2018 1 次提交
  9. 11 7月, 2018 1 次提交
  10. 10 7月, 2018 1 次提交
  11. 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
  12. 07 7月, 2018 2 次提交
  13. 06 7月, 2018 2 次提交
  14. 05 7月, 2018 2 次提交
  15. 29 6月, 2018 3 次提交
  16. 27 6月, 2018 1 次提交
  17. 21 6月, 2018 2 次提交
  18. 19 6月, 2018 2 次提交
  19. 15 6月, 2018 4 次提交
    • M
      drm/i915: Fix context ban and hang accounting for client · 14921f3c
      Mika Kuoppala 提交于
      If client is smart or lucky enough to create a new context
      after each hang, our context banning mechanism will never
      catch up, and as a result of that it will be saved from
      client banning. This can result in a never ending streak of
      gpu hangs caused by bad or malicious client, preventing
      access from other legit gpu clients.
      
      Fix this by always incrementing per client ban score if
      it hangs in short successions regardless of context ban
      scoring. The exception are non bannable contexts. They remain
      detached from client ban scoring mechanism.
      
      v2: xchg timestamp, tidyup (Chris)
      v3: comment, bannable & banned together (Chris)
      
      Fixes: b083a087 ("drm/i915: Add per client max context ban limit")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180615104429.31477-1-mika.kuoppala@linux.intel.com
      14921f3c
    • C
      drm/i915: Keep the ctx workarounds tightly packed · 548764bb
      Chris Wilson 提交于
      For each platform, we have a few registers that are rewritten with
      different values -- they are not part of a sequence, just different parts
      of a masked register set at different times (e.g. platform and gen
      workarounds). Consolidate these into a single register write to keep the
      table compact, important since we are running of room in the current
      fixed sized buffer.
      
      While adjusting the construction of the wa table, make it non fatal so
      that the driver still loads but keeping the warning and extra details
      for inspection.
      
      Inspecting the changes for a Kabylake system,
      Before:
      	Address	val		mask		read
      	0x07014	0x20002000	0x00002000	0x00002100
      	0x0E194	0x01000100	0x00000100	0x00000114
      	0x0E4F0	0x81008100	0x00008100	0xFFFF8120
      	0x0E184	0x00200020	0x00000020	0x00000022
      	0x0E194	0x00140014	0x00000014	0x00000114
      	0x07004	0x00420042	0x00000042	0x000029C2
      	0x0E188	0x00080000	0x00000008	0x00008030
      	0x07300	0x80208020	0x00008020	0x00008830
      	0x07300	0x00100010	0x00000010	0x00008830
      	0x0E184	0x00020002	0x00000002	0x00000022
      	0x0E180	0x20002000	0x00002000	0x00002000
      	0x02580	0x00010000	0x00000001	0x00000004
      	0x02580	0x00060004	0x00000006	0x00000004
      	0x07014	0x01000100	0x00000100	0x00002100
      	0x0E100	0x00100010	0x00000010	0x00008050
      
      After:
      	Address	val		mask		read
      	0x02580	0x00070004	0x00000007	0x00000004
      	0x07004	0x00420042	0x00000042	0x000029C2
      	0x07014	0x21002100	0x00002100	0x00002100
      	0x07300	0x80308030	0x00008030	0x00008830
      	0x0E100	0x00100010	0x00000010	0x00008050
      	0x0E180	0x20002000	0x00002000	0x00002000
      	0x0E184	0x00220022	0x00000022	0x00000022
      	0x0E188	0x00080000	0x00000008	0x00008030
      	0x0E194	0x01140114	0x00000114	0x00000114
      	0x0E4F0	0x81008100	0x00008100	0xFFFF8120
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Oscar Mateo <oscar.mateo@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180615120207.13952-1-chris@chris-wilson.co.uk
      548764bb
    • C
      drm/i915: Declare the driver wedged if hangcheck makes no progress · 1fd00c0f
      Chris Wilson 提交于
      Hangcheck is our back up in case the GPU or the driver gets stuck. It
      detects when the GPU is not making any progress and issues a GPU reset.
      However, if the driver is failing to make any progress, we can get
      ourselves into a situation where we continually try resetting the GPU to
      no avail. Employ a second timeout such that if we continue to see the
      same seqno (the stalled engine has made no progress at all) over the
      course of several hangchecks, declare the driver wedged and attempt to
      start afresh.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180602104853.17140-1-chris@chris-wilson.co.ukReviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      1fd00c0f
    • R
      drm/i915/psr: Kill delays when activating psr back. · 5422b37c
      Rodrigo Vivi 提交于
      The immediate enabling was actually not an issue for the
      HW perspective for core platforms that have HW tracking.
      HW will wait few identical idle frames before transitioning
      to actual psr active anyways.
      
      Now that we removed VLV/CHV out of the picture completely
      we can safely remove any delays.
      
      Note that this patch also remove the delayed activation
      on HSW and BDW introduced by commit 'd0ac896a
      ("drm/i915: Delay first PSR activation.")'. This was
      introduced to fix a blank screen on VLV/CHV and also
      masked some frozen screens on other core platforms.
      Probably the same that we are now properly hunting and fixing.
      
      v2:(DK): Remove unnecessary WARN_ONs and make some other
               VLV | CHV more readable.
      v3: Do it regardless the timer rework.
      v4: (DK/CI): Add VLV || CHV check on cancel work at psr_disable.
      v5: Kill remaining items and fully rework activation functions.
      v6: Rebase on top of VLV/CHV clean-up and keep the reactivation
          on a regular non-delayed work to avoid extra delays on exit
          calls and allow us to add few more safety checks before
          real activation.
      
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180613192600.3955-1-rodrigo.vivi@intel.com
      5422b37c
  20. 13 6月, 2018 1 次提交
  21. 11 6月, 2018 2 次提交
  22. 07 6月, 2018 1 次提交