1. 11 11月, 2021 8 次提交
  2. 03 11月, 2021 1 次提交
  3. 01 10月, 2021 1 次提交
    • J
      drm/i915/display: Fix glitches when moving cursor with PSR2 selective fetch enabled · ef39826c
      José Roberto de Souza 提交于
      Legacy cursor APIs are handled by intel_legacy_cursor_update(), that
      calls drm_atomic_helper_update_plane() when going through the
      slow/atomic path to update cursor, what was the case for PSR2
      selective fetch.
      
      drm_atomic_helper_update_plane() sets
      drm_atomic_state->legacy_cursor_update to true when updating the
      cursor plane, to allow several cursor updates to happen within the
      same frame, as userspace does that.
      If drivers waited for a vblank increment at the end of every cursor
      movement that would cause a visible lag in the cursor.
      
      But this optimization do not properly work with PSR2 selective fetch
      dirt area calculation, for example if within a single frame the cursor
      had 3 moves the final dirt area programmed to PSR2_MAN_TRK_CTL would
      be based in the second movement as old state and third movement as new
      state, not updating the area where cursor was in the first state.
      
      So here switching back to the fast path approach in
      intel_legacy_cursor_update() and handling cursor movements as
      frontbuffer rendering(psr_force_hw_tracking_exit()), that is not the
      most optimal for power-savings but is the solution that we have until
      mailbox style updates is implemented.
      
      Also removing the cursor workaround as not it is properly undestand
      the issue and is know that it will never cover all the cases.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Acked-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210930001409.254817-5-jose.souza@intel.com
      ef39826c
  4. 30 9月, 2021 1 次提交
  5. 24 9月, 2021 4 次提交
    • V
      drm/i915/fbc: Allow higher compression limits on FBC1 · 09bbdd87
      Ville Syrjälä 提交于
      On FBC1 we can specify an arbitrary cfb stride. The hw will
      simply throw away any compressed line that would exceed the
      specified limit and keep using the uncompressed data instead.
      Thus we can allow arbitrary compression limits.
      
      The one thing we have to keep in mind though is that the cfb
      stride is specified in units of 32B (gen2) or 64B (gen3+).
      Fortunately X-tile is already 128B (gen2) or 512B (gen3+) wide
      so as long as we limit outselves to the same 4x compression
      limit that FBC2 has we are guaranteed to have a sufficiently
      aligned cfb stride.
      Reviewed-by: NJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210921152517.803-5-ville.syrjala@linux.intel.com
      09bbdd87
    • V
      drm/i915/fbc: Implement Wa_16011863758 for icl+ · 5f524aea
      Ville Syrjälä 提交于
      There's some kind of weird corner cases in FBC which requires
      FBC segments to be separated by at least one extra cacheline.
      Make sure that is present.
      
      v2: Respin to fit in with skl_fbc_min_cfb_stride()
      v3: Make it build
      
      Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> #v1
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210921181245.15091-1-ville.syrjala@linux.intel.com
      5f524aea
    • V
      drm/i915/fbc: Align FBC segments to 512B on glk+ · 2f051f67
      Ville Syrjälä 提交于
      Apply the same 512 byte FBC segment alignment to glk+ as we use
      on skl+. The only real difference is that we now have a dedicated
      register for the FBC override stride. Not 100% sure which
      platforms really need the 512B alignment, but it's easiest
      to just do it on everything.
      
      Also the hardware no longer seems to misclaculate the CFB stride
      for linear, so we can omit the use of the override stride for
      linear unless the stride is misaligned.
      Reviewed-by: NJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210921152517.803-3-ville.syrjala@linux.intel.com
      2f051f67
    • 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
  6. 20 8月, 2021 4 次提交
  7. 17 8月, 2021 1 次提交
  8. 21 7月, 2021 1 次提交
  9. 02 7月, 2021 1 次提交
  10. 25 6月, 2021 9 次提交
  11. 07 5月, 2021 1 次提交
  12. 06 5月, 2021 1 次提交
  13. 26 4月, 2021 1 次提交
  14. 14 4月, 2021 3 次提交
  15. 08 4月, 2021 1 次提交
  16. 30 3月, 2021 1 次提交
    • I
      drm/i915: Unify the FB and plane state view information into one struct · 61169987
      Imre Deak 提交于
      To allow the simplification of FB/plane view computation in the
      follow-up patches, unify the corresponding state in the
      intel_framebuffer and intel_plane_state structs into a new intel_fb_view
      struct.
      
      This adds some overhead to intel_framebuffer as the rotated view will
      have now space for 4 color planes instead of the required 2 and it'll
      also contain the unused offset for each color_plane info. Imo this is an
      acceptable trade-off to get a simplified way of the remap computation.
      
      Use the new intel_fb_view struct for the FB normal view as well, so (in
      the follow-up patches) we can remove the special casing for normal view
      calculation wrt. the calculation of remapped/rotated views. This also
      adds an overhead to the intel_framebuffer struct, as the gtt remap info
      and per-color plane offset/pitch is not required for the normal view,
      but imo this is an acceptable trade-off as above. The per-color plane
      pitch filed will be used by a follow-up patch, so we can retrieve the
      pitch for each view in the same way.
      
      No functional changes in this patch.
      
      v2:
      - Make the patch have _no functional change_.
        (fix skl_check_nv12_aux_surface() and skl_check_main_surface()).
      - s/i915_color_plane_view::pitch/stride/ (Ville)
      Suggested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-17-imre.deak@intel.com
      61169987
  17. 24 3月, 2021 1 次提交
    • M
      drm/i915/display: Simplify GLK display version tests · 2b5a4562
      Matt Roper 提交于
      GLK has always been a bit of a special case since it reports INTEL_GEN()
      as 9, but has version 10 display IP.  Now we can properly represent the
      display version as 10 and simplify the display generation tests
      throughout the display code.
      
      Aside from manually adding the version to the glk_info structure, the
      rest of this patch is generated with a Coccinelle semantic patch.  Note
      that we also need to switch any code that matches gen10 today but *not*
      GLK to be CNL-specific:
      
              @@ expression dev_priv; @@
              - DISPLAY_VER(dev_priv) > 9
              + DISPLAY_VER(dev_priv) >= 10
      
              @@ expression dev_priv, E; @@
              (
              - DISPLAY_VER(dev_priv) >= 10 && E
              + (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)) && E
              |
              - DISPLAY_VER(dev_priv) >= 10
              + DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)
              |
              - IS_DISPLAY_RANGE(dev_priv, 10, E)
              + IS_DISPLAY_RANGE(dev_priv, 11, E) || IS_CANNONLAKE(dev_priv)
              )
      
              @@ expression dev_priv, E, E2; @@
              (
              - (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
              + IS_DISPLAY_VER(dev_priv, 10)
              |
              - E || IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)
              + E || IS_DISPLAY_VER(dev_priv, 10)
              |
              - (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv))
              + IS_DISPLAY_VER(dev_priv, 10)
              |
              - IS_GEMINILAKE(dev_priv) || E || IS_CANNONLAKE(dev_priv)
              + E || IS_DISPLAY_VER(dev_priv, 10)
              |
              - E || IS_GEMINILAKE(dev_priv) || E2 || IS_CANNONLAKE(dev_priv)
              + E || E2 || IS_DISPLAY_VER(dev_priv, 10)
              |
              - (IS_DISPLAY_VER(dev_priv, 10) || IS_GEMINILAKE(dev_priv))
              + IS_DISPLAY_VER(dev_priv, 10)
              |
              - (IS_GEMINILAKE(dev_priv) || IS_DISPLAY_VER(dev_priv, 10))
              + IS_DISPLAY_VER(dev_priv, 10)
              )
      
              @@ expression dev_priv; @@
              - (IS_DISPLAY_VER(dev_priv, 9) && !IS_GEMINILAKE(dev_priv))
              + IS_DISPLAY_VER(dev_priv, 9)
      
              @@ expression dev_priv; @@
              (
              - !(DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10))
              + DISPLAY_VER(dev_priv) < 10
              |
              - (DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10))
              + DISPLAY_VER(dev_priv) >= 10
              )
      
              @@ expression dev_priv, E; @@
              - E || DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10)
              + E || DISPLAY_VER(dev_priv) >= 10
      
              @@ expression dev_priv, E; @@
              - (IS_DISPLAY_RANGE(dev_priv, 11, E) || IS_DISPLAY_VER(dev_priv, 10))
              + IS_DISPLAY_RANGE(dev_priv, 10, E)
      
              @@ expression dev_priv; @@
              (
              - DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv) || IS_GEN9_LP(dev_priv)
              + DISPLAY_VER(dev_priv) >= 10 || IS_GEN9_LP(dev_priv)
              |
              - IS_GEN9_LP(dev_priv) || DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)
              + IS_GEN9_LP(dev_priv) || DISPLAY_VER(dev_priv) >= 10
              )
      
              @@ expression dev_priv, E; @@
              - !(DISPLAY_VER(dev_priv) >= E)
              + DISPLAY_VER(dev_priv) < E
      
      v2:
       - Convert gen10 conditions that don't include GLK into CNL conditions.
         (Ville)
      
      v3:
       - Rework coccinelle rules so that "ver>=10" turns into "ver>=11||is_cnl." (Ville)
      
      v3.1:
       - Manually re-add the ".display.version = 10" to glk_info after
         regenerating patch via Coccinelle.
      
      v4:
       - Also apply cocci rules to intel_pm.c and i915_irq.c!  (CI)
      
      Cc: Ville Syrjälä <ville.syrjala@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210322233840.4056851-1-matthew.d.roper@intel.com
      2b5a4562