Skip to content
  1. Feb 28, 2020
    • Chris Wilson's avatar
      drm/i915: Protect i915_request_await_start from early waits · d22d2d07
      Chris Wilson authored
      We need to be extremely careful inside i915_request_await_start() as it
      needs to walk the list of requests in the foreign timeline with very
      little protection. As we hold our own timeline mutex, we can not nest
      inside the signaler's timeline mutex, so all that remains is our RCU
      protection. However, to be safe we need to tell the compiler that we may
      be traversing the list only under RCU protection, and furthermore we
      need to start declaring requests as elements of the timeline from their
      construction.
      
      Fixes: 9ddc8ec0 ("drm/i915: Eliminate the trylock for awaiting an earlier request")
      Fixes: 6a79d848
      
       ("drm/i915: Lock signaler timeline while navigating")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200227085723.1961649-11-chris@chris-wilson.co.uk
      d22d2d07
    • Chris Wilson's avatar
      drm/i915/selftests: Check recovery from corrupted LRC · 24eba7a9
      Chris Wilson authored
      
      
      Check that we can recover if the LRC is totally corrupted. Based on a
      very simple theory that anything that can be adjusted via the context
      (i.e. on behalf of the user), should be under the purview of the
      per-engine-reset.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200227085723.1961649-13-chris@chris-wilson.co.uk
      24eba7a9
    • Chris Wilson's avatar
      drm/i915/selftests: Verify LRC isolation · efb69b98
      Chris Wilson authored
      
      
      Record the LRC registers before/after a preemption event to ensure that
      the first context sees nothing from the second client; at least in the
      normal per-context register state.
      
      References: https://gitlab.freedesktop.org/drm/intel/issues/1233
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200227085723.1961649-12-chris@chris-wilson.co.uk
      efb69b98
    • Chris Wilson's avatar
      drm/i915/gt: Pull marking vm as closed underneath the vm->mutex · ad2f9bc9
      Chris Wilson authored
      Pull the final atomic_dec of vm->open (marking the vm as closed)
      underneath the same vm->mutex as used to close it. This is required to
      correctly serialise with attempting to reuse the vma as the vm is closed
      by a second thread.
      
      References: 00de702c
      
       ("drm/i915: Check that the vma hasn't been closed before we insert it")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200227085723.1961649-10-chris@chris-wilson.co.uk
      ad2f9bc9
    • Chris Wilson's avatar
      drm/i915/gt: Check engine-is-awake on reset later · d3b03d8b
      Chris Wilson authored
      
      
      As we drop the engine-pm on retiring, that may happen while there are
      still CS events in the buffer. As such we cannot assert the engine is
      still active on reset, until we know that the current request is still
      in flight.
      
      Closes: https://gitlab.freedesktop.org/drm/intel/issues/1338
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200227204727.2009346-1-chris@chris-wilson.co.uk
      d3b03d8b
    • Chris Wilson's avatar
      drm/i915/selftests: Disable heartbeat around manual pulse tests · 950da301
      Chris Wilson authored
      
      
      Still chasing the mystery of the stray idle flush, let's ensure that the
      heartbeat does not run at the same time as our test and confuse us.
      
      References: https://gitlab.freedesktop.org/drm/intel/issues/541
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200227085723.1961649-8-chris@chris-wilson.co.uk
      950da301
    • Chris Wilson's avatar
      drm/i915: Skip barriers inside waits · c0e31018
      Chris Wilson authored
      Attaching to the i915_active barrier is a two stage process, and a flush
      is only effective when the barrier is activation. Thus it is possible
      for us to see a barrier, and attempt to flush, only for our flush to
      have no effect. As such, before attempting to activate signaling on the
      fence we need to double check it is a fence!
      
      Fixes: d13a3177
      
       ("drm/i915: Flush idle barriers when waiting")
      Closes: https://gitlab.freedesktop.org/drm/intel/issues/1333
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200227085723.1961649-1-chris@chris-wilson.co.uk
      c0e31018
    • Daniele Ceraolo Spurio's avatar
      drm/i915/ggtt: do not set bits 1-11 in gen12 ptes · 69edc390
      Daniele Ceraolo Spurio authored
      
      
      On TGL, bits 2-4 in the GGTT PTE are not ignored anymore and are
      instead used for some extra VT-d capabilities. We don't (yet?) have
      support for those capabilities, but, given that we shared the pte_encode
      function betweed GGTT and PPGTT, we still set those bits to the PPGTT
      PPAT values. The DMA engine gets very confused when those bits are
      set while the iommu is enabled, leading to errors. E.g. when loading
      the GuC we get:
      
      [    9.796218] DMAR: DRHD: handling fault status reg 2
      [    9.796235] DMAR: [DMA Write] Request device [00:02.0] PASID ffffffff fault addr 0 [fault reason 02] Present bit in context entry is clear
      [    9.899215] [drm:intel_guc_fw_upload [i915]] *ERROR* GuC firmware signature verification failed
      
      To fix this, just have dedicated gen8_pte_encode function per type of
      gtt. Also, explicitly set vm->pte_encode for gen8_ppgtt, even if we
      don't use it, to make sure we don't accidentally assign it to the GGTT
      one, like we do for gen6_ppgtt, in case we need it in the future.
      
      Reported-by: default avatar"Sodhi, Vunny" <vunny.sodhi@intel.com>
      Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200226185657.26445-1-daniele.ceraolospurio@intel.com
      69edc390
    • Lucas De Marchi's avatar
      drm/i915/tgl: Add Wa_1608008084 · e94bda14
      Lucas De Marchi authored
      Wa_1608008084 is an additional WA that applies to writes on FF_MODE2
      register. We can't read it back either from CPU or GPU. Since the other
      bits should be 0, recommendation to handle Wa_1604555607 is to actually
      just write the timer value.
      
      Do a write only and don't try to read it, neither before or after
      the WA is applied.
      
      Fixes: ff690b21
      
       ("drm/i915/tgl: Implement Wa_1604555607")
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200224191258.15668-1-lucas.demarchi@intel.com
      e94bda14
    • Ville Syrjälä's avatar
      drm/i915: Set up PIPE_MISC truncate bit on tgl+ · 041be481
      Ville Syrjälä authored
      
      
      Looks like the pipe rounding mode bit has moved from PIPE_CHICKEN to
      PIPE_MISC on tgl. Frob the new location.
      
      Bspec does still document the old bits as well, so I left the code
      for them as is until we get clarification from the hw folks on
      whether the old bits still do something useful.
      
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200226163054.9509-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      041be481
    • Lucas De Marchi's avatar
      drm/i915: remove ICP_PP_CONTROL · 945fa3bc
      Lucas De Marchi authored
      
      
      This register was placed in the middle of the PP_STATUS definition
      instead of together with the PP_CONTROL where it should. Since it's not
      used and there are no current plans to use it, just remove the
      definition.
      
      v2: remove the define rather than moving it.
      
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190308232321.30168-1-lucas.demarchi@intel.com
      945fa3bc
  2. Feb 27, 2020
  3. Feb 26, 2020
  4. Feb 25, 2020
  5. Feb 24, 2020
    • Ville Syrjälä's avatar
      drm/i915: Correctly terminate connector iteration · b7079cbd
      Ville Syrjälä authored
      One should use drm_connector_list_iter_end() rather than
      drm_connector_list_iter_begin() to terminate the connector
      iteration.
      
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Cc: Uma Shankar <uma.shankar@intel.com>
      Closes: https://gitlab.freedesktop.org/drm/intel/issues/1278
      Fixes: e24bcd34
      
       ("drm/i915/dp: Add all tiled and port sync conns to modeset")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200221154310.14858-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
      b7079cbd
    • Jani Nikula's avatar
      drm/i915: fix header test with GCOV · 408c1b32
      Jani Nikula authored
      
      
      $(CC) with $(CFLAGS_GCOV) assumes the output filename with .gcno suffix
      appended is writable. This is not the case when the output filename is
      /dev/null:
      
        HDRTEST drivers/gpu/drm/i915/display/intel_frontbuffer.h
      /dev/null:1:0: error: cannot open /dev/null.gcno
        HDRTEST drivers/gpu/drm/i915/display/intel_ddi.h
      /dev/null:1:0: error: cannot open /dev/null.gcno
      make[5]: *** [../drivers/gpu/drm/i915/Makefile:307:
      drivers/gpu/drm/i915/display/intel_ddi.hdrtest] Error 1
      make[5]: *** Waiting for unfinished jobs....
      make[5]: *** [../drivers/gpu/drm/i915/Makefile:307:
      drivers/gpu/drm/i915/display/intel_frontbuffer.hdrtest] Error 1
      
      Filter out $(CFLAGS_GVOC) from the header test $(c_flags) as they don't
      make sense here anyway.
      
      References: http://lore.kernel.org/r/d8112767-4089-4c58-d7d3-2ce03139858a@infradead.org
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Fixes: c6d4a099
      
       ("drm/i915: reimplement header test feature")
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200221105414.14358-1-jani.nikula@intel.com
      408c1b32