1. 29 9月, 2021 4 次提交
  2. 24 9月, 2021 1 次提交
    • V
      drm/i915/fbc: Rework cfb stride/size calculations · bdc1a2d2
      Ville Syrjälä 提交于
      The code to calculate the cfb stride/size is a bit of mess.
      The cfb size is getting calculated based purely on the plane
      stride and plane height. That doesn't account for extra
      alignment we want for the cfb stride. The gen9 override
      stride OTOH is just calculated based on the plane width, and
      it does try to make things more aligned but any extra alignment
      added there is not considered in the cfb size calculations.
      So not at all convinced this is working as intended. Additionally
      the compression limit handling is split between the cfb allocation
      code and g4x_dpfc_ctl_limit() (for the 16bpp case), which is just
      confusing.
      
      Let's streamline the whole thing:
      - Start with the plane stride, convert that into cfb stride (cfb is
        always 4 bytes per pixel). All the calculations will assume 1:1
        compression limit since that will give us the max values, and we
        don't yet know how much stolen memory we will be able to allocate
      - Align the cfb stride to 512 bytes on modern platforms. This guarantees
        the 4 line segment will be 512 byte aligned regardles of the final
        compression limit we choose later. The 512 byte alignment for the
        segment is required by at least some of the platforms, and just doing
        it always seems like the easiest option
      - Figure out if we need to use the override stride or not. For X-tiled
        it's never needed since the plane stride is already 512 byte aligned,
        for Y-tiled it will be needed if the plane stride is not a multiple
        of 512 bytes, and for linear it's apparently always needed because the
        hardware miscalculates the cfb stride as PLANE_STRIDE*512 instead of
        the PLANE_STRIDE*64 that it use with linear.
      - The cfb size will be calculated based on the aligned cfb stride to
        guarantee we actually reserved enough stolen memory and the FBC hw
        won't end up scribbling over whatever else is allocated in stolen
      - The compression limit handling we just do fully in the cfb allocation
        code to make things less confusing
      
      v2: Write the min cfb segment stride calculation in a more
          explicit way to make it clear what is going on
      v3: Remeber to update fbc->limit when changing to 16bpp
      
      Reviewed-by: Uma Shankar <uma.shankar@intel.com> #v2
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210923042151.19052-1-ville.syrjala@linux.intel.com
      bdc1a2d2
  3. 20 9月, 2021 1 次提交
  4. 08 9月, 2021 1 次提交
  5. 07 9月, 2021 6 次提交
  6. 31 8月, 2021 1 次提交
  7. 30 8月, 2021 1 次提交
  8. 25 8月, 2021 2 次提交
  9. 20 8月, 2021 1 次提交
  10. 05 8月, 2021 1 次提交
  11. 31 7月, 2021 2 次提交
  12. 30 7月, 2021 1 次提交
  13. 28 7月, 2021 1 次提交
  14. 27 7月, 2021 2 次提交
    • S
      drm/i915: Implement PSF GV point support · 192fbfb7
      Stanislav Lisovskiy 提交于
      PSF GV points are an additional factor that can limit the
      bandwidth available to display, separate from the traditional
      QGV points.  Whereas traditional QGV points represent possible
      memory clock frequencies, PSF GV points reflect possible
      frequencies of the memory fabric.
      
      Switching between PSF GV points has the advantage of incurring
      almost no memory access block time and thus does not need to be
      accounted for in watermark calculations.
      
      This patch adds support for those on top of regular QGV points.
      Those are supposed to be used simultaneously, i.e we are always
      at some QGV and some PSF GV point, based on the current video
      mode requirements.
      Bspec: 64631, 53998
      
      v2: Seems that initial assumption made during ml conversation
          was wrong, PCode rejects any masks containing points beyond
          the ones returned, so even though BSpec says we have around
          8 points theoretically, we can mask/unmask only those which
          are returned, trying to manipulate those beyond causes a
          failure from PCode. So switched back to generating mask
          from 1 - num_qgv_points, where num_qgv_points is the actual
          amount of points, advertised by PCode.
      
      v3: - Extended restricted qgv point mask to 0xf, as we have now
            3:2 bits for PSF GV points(Matt Roper)
          - Replaced val2 with NULL from PCode request, since its not being
            used(Matt Roper)
          - Replaced %d to 0x%x for better readability(thanks for spotting)
      Signed-off-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210531064845.4389-2-stanislav.lisovskiy@intel.com
      192fbfb7
    • M
      drm/i915: document caching related bits · 3821cc7f
      Matthew Auld 提交于
      Try to document the object caching related bits, like cache_coherent and
      cache_dirty.
      
      v2(Ville):
       - As pointed out by Ville, fix the completely incorrect assumptions
         about the "partial" coherency on shared LLC platforms.
      v3(Daniel):
       - Fix nonsense about "dirtying" the cache with reads.
      v4(Daniel):
       - Various improvements, including adding some more details for WT.
      Suggested-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NMatthew Auld <matthew.auld@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210723105045.400841-1-matthew.auld@intel.com
      3821cc7f
  15. 23 7月, 2021 4 次提交
  16. 22 7月, 2021 2 次提交
    • M
      drm/i915: Make display workaround upper bounds exclusive · 46b0d709
      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 display changes to apply through intel-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
      46b0d709
    • 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
  17. 19 7月, 2021 1 次提交
    • J
      drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser" · c9d9fdbc
      Jason Ekstrand 提交于
      This reverts 686c7c35 ("drm/i915/gem: Asynchronous cmdparser").  The
      justification for this commit in the git history was a vague comment
      about getting it out from under the struct_mutex.  While this may
      improve perf for some workloads on Gen7 platforms where we rely on the
      command parser for features such as indirect rendering, no numbers were
      provided to prove such an improvement.  It claims to closed two
      gitlab/bugzilla issues but with no explanation whatsoever as to why or
      what bug it's fixing.
      
      Meanwhile, by moving command parsing off to an async callback, it leaves
      us with a problem of what to do on error.  When things were synchronous,
      EXECBUFFER2 would fail with an error code if parsing failed.  When
      moving it to async, we needed another way to handle that error and the
      solution employed was to set an error on the dma_fence and then trust
      that said error gets propagated to the client eventually.  Moving back
      to synchronous will help us untangle the fence error propagation mess.
      
      This also reverts most of 0edbb9ba ("drm/i915: Move cmd parser
      pinning to execbuffer") which is a refactor of some of our allocation
      paths for asynchronous parsing.  Now that everything is synchronous, we
      don't need it.
      
      v2 (Daniel Vetter):
       - Add stabel Cc and Fixes tag
      Signed-off-by: NJason Ekstrand <jason@jlekstrand.net>
      Cc: <stable@vger.kernel.org> # v5.6+
      Fixes: 9e31c1fe ("drm/i915: Propagate errors on awaiting already signaled fences")
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210714193419.1459723-2-jason@jlekstrand.net
      (cherry picked from commit 93b71330)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      c9d9fdbc
  18. 17 7月, 2021 1 次提交
    • J
      drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser" · 93b71330
      Jason Ekstrand 提交于
      This reverts 686c7c35 ("drm/i915/gem: Asynchronous cmdparser").  The
      justification for this commit in the git history was a vague comment
      about getting it out from under the struct_mutex.  While this may
      improve perf for some workloads on Gen7 platforms where we rely on the
      command parser for features such as indirect rendering, no numbers were
      provided to prove such an improvement.  It claims to closed two
      gitlab/bugzilla issues but with no explanation whatsoever as to why or
      what bug it's fixing.
      
      Meanwhile, by moving command parsing off to an async callback, it leaves
      us with a problem of what to do on error.  When things were synchronous,
      EXECBUFFER2 would fail with an error code if parsing failed.  When
      moving it to async, we needed another way to handle that error and the
      solution employed was to set an error on the dma_fence and then trust
      that said error gets propagated to the client eventually.  Moving back
      to synchronous will help us untangle the fence error propagation mess.
      
      This also reverts most of 0edbb9ba ("drm/i915: Move cmd parser
      pinning to execbuffer") which is a refactor of some of our allocation
      paths for asynchronous parsing.  Now that everything is synchronous, we
      don't need it.
      
      v2 (Daniel Vetter):
       - Add stabel Cc and Fixes tag
      Signed-off-by: NJason Ekstrand <jason@jlekstrand.net>
      Cc: <stable@vger.kernel.org> # v5.6+
      Fixes: 9e31c1fe ("drm/i915: Propagate errors on awaiting already signaled fences")
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210714193419.1459723-2-jason@jlekstrand.net
      93b71330
  19. 15 7月, 2021 7 次提交