1. 23 7月, 2021 16 次提交
  2. 22 7月, 2021 5 次提交
    • D
      drm/i915: Ditch i915 globals shrink infrastructure · 4f62a7e0
      Daniel Vetter 提交于
      This essentially reverts
      
      commit 84a10749
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Wed Jan 24 11:36:08 2018 +0000
      
          drm/i915: Shrink the GEM kmem_caches upon idling
      
      mm/vmscan.c:do_shrink_slab() is a thing, if there's an issue with it
      then we need to fix that there, not hand-roll our own slab shrinking
      code in i915.
      
      Also when this was added there was only one other caller of
      kmem_cache_shrink (added 2005 to the acpi code). Now there's a 2nd one
      outside of i915 code in a kunit test, which seems legit since that
      wants to very carefully control what's in the kmem_cache. This out of
      a total of over 500 calls to kmem_cache_create. This alone should have
      been warning sign enough that we're doing something silly.
      
      Noticed while reviewing a patch set from Jason to fix up some issues
      in our i915_init() and i915_exit() module load/cleanup code. Now that
      i915_globals.c isn't any different than normal init/exit functions, we
      should convert them over to one unified table and remove
      i915_globals.[hc] entirely.
      
      v2: Improve commit message (Jason)
      Reviewed-by: NJason Ekstrand <jason@jlekstrand.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Jason Ekstrand <jason@jlekstrand.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210721183229.4136488-1-daniel.vetter@ffwll.ch
      4f62a7e0
    • M
      drm/i915: Make GT workaround upper bounds exclusive · 6b73a7f3
      Matt Roper 提交于
      Workarounds are documented in the bspec with an exclusive upper bound
      (i.e., a "fixed" stepping that no longer needs the workaround).  This
      makes our driver's use of an inclusive upper bound for stepping ranges
      confusing; the differing notation between code and bspec makes it very
      easy for mistakes to creep in.
      
      Let's switch the upper bound of our IS_{GT,DISP}_STEP macros over to use
      an exclusive upper bound like the bspec does.  This also has the benefit
      of helping make sure workarounds are properly handled for new minor
      steppings that show up (e.g., an A1 between the A0 and B0 we already
      knew about) --- if the new intermediate stepping pulls in hardware fixes
      early, there will be an update to the workaround definition which lets
      us know we need to change our code.  If the new stepping does not pull a
      hardware fix earlier, then the new stepping will already be captured
      properly by the "[begin, fix)" range in the code.
      
      We'll probably need to be extra vigilant in code review of new
      workarounds for the near future to make sure developers notice the new
      semantics of workaround bounds.  But we just migrated a bunch of our
      platforms from the IS_REVID bounds over to IS_{GT,DISP}_STEP, so people
      are already adjusting to the new macros and now is a good time to make
      this change too.
      
      [mattrope: Split out GT changes to apply through gt-next tree]
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210717051426.4120328-8-matthew.d.roper@intel.com
      6b73a7f3
    • M
      drm/i915: Program DFR enable/disable as a GT workaround · 1e1824de
      Matt Roper 提交于
      DFR programming (which we enable as an optimization on gen11, but must
      ensure is disabled on gen12) should be handled as a GT workaround rather
      than clock gating initialization.  This will ensure that the programming
      of these registers is verified with our typical workaround checks.
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210717051426.4120328-4-matthew.d.roper@intel.com
      1e1824de
    • M
      drm/i915/icl: Drop a couple unnecessary workarounds · 131b1252
      Matt Roper 提交于
      While doing a quick sanity check of the ICL workarounds in the driver I
      noticed a few things that should be updated:
      
       * There's no mention in the bspec that WaPipelineFlushCoherentLines
         is needed on gen11 (both the current WA database and the old,
         deprecated page 20196 were checked); it appears this might have just
         been copied from the gen9 list?  Even if this were needed, it doesn't
         seem like this was the correct implementation anyway since the gen9
         workaround is supposed to be implemented in the indirect context bb
         (as we do in gen8_emit_flush_coherentl3_wa() on gen8/gen9).
      
       * WaForwardProgressSoftReset does not appear in the current workaround
         database.  The old deprecated workaround list has a note indicating
         the workaround was dropped in 2017, so we should be safe to drop it
         from the code too.
      
      While we're at it, add the formal workaround ID number to
      WaDisableBankHangMode (our hardware team made a transition from
      text-based workaround names to ID numbers partway through the
      development of ICL, which is why some workarounds only have names, some
      only have numbers, and some have both).
      
      Bspec: 33450
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210717051426.4120328-3-matthew.d.roper@intel.com
      131b1252
    • M
      drm/i915: Fix application of WaInPlaceDecompressionHang · f4fa096a
      Matt Roper 提交于
      On SKL we've been applying this workaround on H0+ steppings, which is
      actually backwards; H0 is supposed to be the first stepping where the
      workaround is no longer needed.  Flip the bounds so that the workaround
      applies to all steppings _before_ H0.
      
      On BXT we've been applying this workaround to all steppings, but the
      bspec tells us it's only needed until C0.  Pre-C0 GT steppings only
      appeared in pre-production hardware, which we no longer support in the
      driver, so we can drop the workaround completely for this platform.
      
      On ICL we've been applying this workaround to all steppings, but there
      doesn't seem to be any indication that this workaround was ever needed
      for this platform (even now-deprecated page 20196 of the bspec doesn't
      mention it).  We can go ahead and drop it.
      
      I also don't see any mention of this workaround being needed for KBL,
      although this may be an oversight since the workaround is needed for all
      steppings of CFL.  I'll leave the workaround in place for KBL to be
      safe.
      
      Bspec: 14091, 33450
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210717051426.4120328-2-matthew.d.roper@intel.com
      f4fa096a
  3. 17 7月, 2021 1 次提交
  4. 15 7月, 2021 6 次提交
  5. 14 7月, 2021 11 次提交
  6. 11 7月, 2021 1 次提交
    • V
      drm/i915/gt: Fix -EDEADLK handling regression · 78d2ad7e
      Ville Syrjälä 提交于
      The conversion to ww mutexes failed to address the fence code which
      already returns -EDEADLK when we run out of fences. Ww mutexes on
      the other hand treat -EDEADLK as an internal errno value indicating
      a need to restart the operation due to a deadlock. So now when the
      fence code returns -EDEADLK the higher level code erroneously
      restarts everything instead of returning the error to userspace
      as is expected.
      
      To remedy this let's switch the fence code to use a different errno
      value for this. -ENOBUFS seems like a semi-reasonable unique choice.
      Apart from igt the only user of this I could find is sna, and even
      there all we do is dump the current fence registers from debugfs
      into the X server log. So no user visible functionality is affected.
      If we really cared about preserving this we could of course convert
      back to -EDEADLK higher up, but doesn't seem like that's worth
      the hassle here.
      
      Not quite sure which commit specifically broke this, but I'll
      just attribute it to the general gem ww mutex work.
      
      Cc: stable@vger.kernel.org
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Thomas Hellström <thomas.hellstrom@intel.com>
      Testcase: igt/gem_pread/exhaustion
      Testcase: igt/gem_pwrite/basic-exhaustion
      Testcase: igt/gem_fenced_exec_thrash/too-many-fences
      Fixes: 80f0b679 ("drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.")
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210630164413.25481-1-ville.syrjala@linux.intel.comReviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      78d2ad7e