Skip to content
  1. Jun 25, 2021
  2. Jun 24, 2021
  3. Jun 21, 2021
    • Daniel Vetter's avatar
      drm/i915/eb: Fix pagefault disabling in the first slowpath · ca319ee9
      Daniel Vetter authored
      In
      
      commit ebc0808f
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Oct 18 13:02:51 2016 +0100
      
          drm/i915: Restrict pagefault disabling to just around copy_from_user()
      
      we entirely missed that there's a slow path call to eb_relocate_entry
      (or i915_gem_execbuffer_relocate_entry as it was called back then)
      which was left fully wrapped by pagefault_disable/enable() calls.
      Previously any issues with blocking calls where handled by the
      following code:
      
      	/* we can't wait for rendering with pagefaults disabled */
      	if (pagefault_disabled() && !object_is_idle(obj))
      		return -EFAULT;
      
      Now at this point the prefaulting was still around, which means in
      normal applications it was very hard to hit this bug. No idea why the
      regressions in igts weren't caught.
      
      Now this all changed big time with 2 patches merged closely together.
      
      First
      
      commit 2889caa9
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Jun 16 15:05:19 2017 +0100
      
          drm/i915: Eliminate lots of iterations over the execobjects array
      
      removes the prefaulting from the first relocation path, pushing it into
      the first slowpath (of which this patch added a total of 3 escalation
      levels). This would have really quickly uncovered the above bug, were
      it not for immediate adding a duct-tape on top with
      
      commit 7dd4f672
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Jun 16 15:05:24 2017 +0100
      
          drm/i915: Async GPU relocation processing
      
      by pushing all all the relocation patching to the gpu if the buffer
      was busy, which avoided all the possible blocking calls.
      
      The entire slowpath was then furthermore ditched in
      
      commit 7dc8f114
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Wed Mar 11 16:03:10 2020 +0000
      
              drm/i915/gem: Drop relocation slowpath
      
      and resurrected in
      
      commit fd1500fc
      
      
      Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Date:   Wed Aug 19 16:08:43 2020 +0200
      
              Revert "drm/i915/gem: Drop relocation slowpath".
      
      but this did not further impact what's going on.
      
      Since pagefault_disable/enable is an atomic section, any sleeping in
      there is prohibited, and we definitely do that without gpu relocations
      since we have to wait for the gpu usage to finish before we can patch
      up the relocations.
      
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Jon Bloomfield <jon.bloomfield@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Jason Ekstrand <jason@jlekstrand.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210618214503.1773805-1-daniel.vetter@ffwll.ch
      ca319ee9
    • Tvrtko Ursulin's avatar
      drm/i915: Document the Virtual Engine uAPI · 57772953
      Tvrtko Ursulin authored
      
      
      A little bit of documentation covering the topics of engine discovery,
      context engine maps and virtual engines. It is not very detailed but
      supposed to be a starting point of giving a brief high level overview of
      general principles and intended use cases.
      
      v2:
       * Have the text in uapi header and link from there.
      
      v4:
       * Link from driver-uapi.rst.
      
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210618150036.2507653-1-tvrtko.ursulin@linux.intel.com
      57772953
  4. Jun 19, 2021
  5. Jun 18, 2021
    • Matt Roper's avatar
      drm/i915: Add support for explicit L3BANK steering · 31939274
      Matt Roper authored
      
      
      Because Render Power Gating restricts us to just a single subslice as a
      valid steering target for reads of multicast registers in a SUBSLICE
      range, the default steering we setup at init may not lead to a suitable
      target for L3BANK multicast register.  In cases where it does not, use
      explicit runtime steering whenever an L3BANK multicast register is read.
      
      While we're at it, let's simplify the function a little bit and drop its
      support for gen10/CNL since no such platforms ever materialized for real
      use.  Multicast register steering is already an area that causes enough
      confusion; no need to complicate it with what's effectively dead code.
      
      v2:
       - Use gt->uncore instead of gt->i915->uncore.  (Tvrtko)
       - Use {} as table terminator.  (Rodrigo)
      
      v3:
       - L3bank fuse register is a disable mask rather than an enable mask.
         We need to invert it before use.  (CI)
      
      v4:
       - L3bank ID goes in the subslice field, not the slice field.  (CI)
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210617211425.1943662-4-matthew.d.roper@intel.com
      31939274
    • Matt Roper's avatar
      drm/i915: Add GT support for multiple types of multicast steering · 0957e931
      Matt Roper authored
      
      
      Although most of our multicast registers are replicated per-subslice, we
      also have a small number of multicast registers that are replicated
      per-l3 bank instead.  For both types of multicast registers we need to
      make sure we steer reads of these registers to a valid instance.
      Ideally we'd like to find a specific instance ID that would steer reads
      of either type of multicast register to a valid instance (i.e., not
      fused off and not powered down), but sometimes the combination of
      part-specific fusing and the additional restrictions imposed by Render
      Power Gating make it impossible to find any overlap between the set of
      valid subslices and valid l3 banks.  This problem will become even more
      noticeable on our upcoming platforms since they will be adding
      additional types of multicast registers with new types of replication
      and rules for finding valid instances for reads.
      
      To handle this we'll continue to pick a suitable subslice instance at
      driver startup and program this as the default (sliceid,subsliceid)
      setting in the steering control register (0xFDC).  In cases where we
      need to read another type of multicast GT register, but the default
      subslice steering would not correspond to a valid instance, we'll
      explicitly re-steer the single read to a valid value, perform the read,
      and then reset the steering to it's "subslice" default.
      
      This patch adds the general functionality to prepare for this explicit
      steering of other multicast register types.  We'll plug L3 bank steering
      into this in the next patch, and then add additional types of multicast
      registers when the support for our next upcoming platform arrives.
      
      v2:
       - Use entry->end==0 as table terminator.  (Rodrigo)
       - Grab forcewake in wa_list_verify() now that we're using accessors
         that assume forcewake is already held.
      
      v3:
       - Fix loop condition when iterating over steering range tables.
         (Rodrigo)
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210617211425.1943662-3-matthew.d.roper@intel.com
      0957e931
    • Daniele Ceraolo Spurio's avatar
      drm/i915: extract steered reg access to common function · 932641f0
      Daniele Ceraolo Spurio authored
      
      
      New steering cases will be added in the follow-up patches, so prepare a
      common helper to avoid code duplication.
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210617211425.1943662-2-matthew.d.roper@intel.com
      932641f0
    • Wan Jiabing's avatar
      drm/i915: Remove duplicate include of intel_region_lmem.h · 6796c772
      Wan Jiabing authored
      
      
      Fix the following checkinclude.pl warning:
      drivers/gpu/drm/i915/gt/intel_region_lmem.c
      8	#include "intel_region_lmem.h"
           12	#include "intel_region_lmem.h"
      
      Signed-off-by: default avatarWan Jiabing <wanjiabing@vivo.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210615113522.6867-1-wanjiabing@vivo.com
      6796c772
  6. Jun 17, 2021
  7. Jun 16, 2021