1. 24 3月, 2021 1 次提交
    • I
      drm/i915: Fix the GT fence revocation runtime PM logic · 8840e3bd
      Imre Deak 提交于
      To optimize some task deferring it until runtime resume unless someone
      holds a runtime PM reference (because in this case the task can be done
      w/o the overhead of runtime resume), we have to use the runtime PM
      get-if-active logic: If the runtime PM usage count is 0 (and so
      get-if-in-use would return false) the runtime suspend handler is not
      necessarily called yet (it could be just pending), so the device is not
      necessarily powered down, and so the runtime resume handler is not
      guaranteed to be called.
      
      The fence revocation depends on the above deferral, so add a
      get-if-active helper and use it during fence revocation.
      
      v2:
      - Add code comment explaining the fence reg programming deferral logic
        to i915_vma_revoke_fence(). (Chris)
      - Add Cc: stable and Fixes: tags. (Chris)
      - Fix the function docbook comment.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: <stable@vger.kernel.org> # v4.12+
      Fixes: 181df2d4 ("drm/i915: Take rpm wakelock for releasing the fence on unbind")
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210322204223.919936-1-imre.deak@intel.com
      (cherry picked from commit 9d58aa46)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      8840e3bd
  2. 23 3月, 2021 5 次提交
  3. 17 3月, 2021 2 次提交
    • U
      i915/perf: Start hrtimer only if sampling the OA buffer · 6a77c6bb
      Umesh Nerlige Ramappa 提交于
      SAMPLE_OA parameter enables sampling of OA buffer and results in a call
      to init the OA buffer which initializes the OA unit head/tail pointers.
      The OA_EXPONENT parameter controls the periodicity of the OA reports in
      the OA buffer and results in starting a hrtimer.
      
      Before gen12, all use cases required the use of the OA buffer and i915
      enforced this setting when vetting out the parameters passed. In these
      platforms the hrtimer was enabled if OA_EXPONENT was passed. This worked
      fine since it was implied that SAMPLE_OA is always passed.
      
      With gen12, this changed. Users can use perf without enabling the OA
      buffer as in OAR use cases. While an OAR use case should ideally not
      start the hrtimer, we see that passing an OA_EXPONENT parameter will
      start the hrtimer even though SAMPLE_OA is not specified. This results
      in an uninitialized OA buffer, so the head/tail pointers used to track
      the buffer are zero.
      
      This itself does not fail, but if we ran a use-case that SAMPLED the OA
      buffer previously, then the OA_TAIL register is still pointing to an old
      value. When the timer callback runs, it ends up calculating a
      wrong/large number of available reports. Since we do a spinlock_irq_save
      and start processing a large number of reports, NMI watchdog fires and
      causes a crash.
      
      Start the timer only if SAMPLE_OA is specified.
      
      v2:
      - Drop SAMPLE OA check when appending samples (Ashutosh)
      - Prevent read if OA buffer is not being sampled
      
      Fixes: 00a7f0d7 ("drm/i915/tgl: Add perf support on TGL")
      Signed-off-by: NUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Reviewed-by: NAshutosh Dixit <ashutosh.dixit@intel.com>
      Signed-off-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210305210947.58751-1-umesh.nerlige.ramappa@intel.com
      (cherry picked from commit be0bdd67)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      6a77c6bb
    • V
      drm/i915: Workaround async flip + VT-d corruption on HSW/BDW · 8e62438a
      Ville Syrjälä 提交于
      On HSW/BDW with VT-d active the first tile row scanned out
      after the first async flip of the frame often ends up corrupted.
      
      Whether the corruption happens or not depends on the scanline
      on which the async flip happens, but the behaviour seems very
      consistent. Ie. the same set of scanlines (which are most scanlines)
      always show the corruption. And another set of scanlines (far less
      of them) never shows the corruption.
      
      I discovered that disabling the fetch-stride stretching
      feature cures the corruption. This is some kind of TLB related
      prefetch thing AFAIK. We already disable it on SNB primary
      planes due to a documented workaround. The hardware folks
      indicated that disabling this should be fine, so let's go
      with that.
      
      And while we're here, let's document the relevant bits on all
      pre-skl platforms.
      
      Fixes: 2a636e24 ("drm/i915: Implement async flip for ivb/hsw")
      Fixes: cda195f1 ("drm/i915: Implement async flips for bdw")
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210220103303.3448-1-ville.syrjala@linux.intel.comReviewed-by: NKarthik B S <karthik.b.s@intel.com>
      (cherry picked from commit b7a7053a)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      8e62438a
  4. 12 3月, 2021 1 次提交
  5. 23 2月, 2021 2 次提交
  6. 22 2月, 2021 3 次提交
  7. 17 2月, 2021 2 次提交
  8. 16 2月, 2021 1 次提交
  9. 10 2月, 2021 2 次提交
  10. 09 2月, 2021 7 次提交
  11. 08 2月, 2021 1 次提交
  12. 02 2月, 2021 10 次提交
  13. 30 1月, 2021 3 次提交