1. 09 Feb, 2024 3 commits
  2. 08 Feb, 2024 2 commits
  3. 07 Feb, 2024 9 commits
  4. 06 Feb, 2024 11 commits
  5. 05 Feb, 2024 2 commits
  6. 02 Feb, 2024 5 commits
  7. 30 Jan, 2024 2 commits
  8. 26 Jan, 2024 3 commits
  9. 23 Jan, 2024 1 commit
  10. 22 Jan, 2024 2 commits
    • Ville Syrjälä's avatar
      Revert "drm/i915/xe2lpd: Treat cursor plane as regular plane for DDB allocation" · 6bc41f9c
      Ville Syrjälä authored
      This reverts commit cfeff354.
      
      A core design consideration with legacy cursor updates is that the
      cursor must not touch any other plane, even if we were to force it
      to take the slow path. That is the real reason why the cursor uses
      a fixed ddb allocation, not because bspec says so.
      
      Treating cursors as any other plane during ddb allocation
      violates that, which means we can now pull other planes into
      fully unsynced legacy cursor mailbox commits. That is
      definitely not something we've ever considered when designing
      the rest of the code. The noarm+arm register write split in
      particular makes that dangerous as previous updates can get
      disarmed pretty much at any random time, and not necessarily
      in an order that is actually safe (eg. against ddb overlaps).
      
      So if we were to do this then:
      - someone needs to expend the appropriate amount of brain
        cells thinking through all the tricky details
      - we should do it for all skl+ platforms since all
        of those have double buffered wm/ddb registers. The current
        arbitrary mtl+ cutoff doesn't really make sense
      
      For the moment just go back to the original behaviour where
      the cursor's ddb alloation does not change outside of
      modeset/fastset. As of now anything else isn't safe.
      
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Lucas 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/20231213102519.13500-10-ville.syrjala@linux.intel.comReviewed-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
      6bc41f9c
    • Ville Syrjälä's avatar
      drm/i915: Perform vblank evasion around legacy cursor updates · 1de63528
      Ville Syrjälä authored
      Our legacy cursor updates are actually mailbox updates.
      Ie. the hardware latches things once per frame on start of
      vblank, but we issue an number of updates per frame,
      withough any attempt to synchronize against the vblank
      in software. So in theory only the last update issued
      during the frame will latch, and the previous ones are
      discarded.
      
      However this can lead to problems with maintaining the
      ggtt/iommu mappings as we have no idea which updates
      will actually latch.
      
      The problem is exacerbated by the hardware's annoying disarming
      behaviour; any non-arming register write will disarm an already
      armed update, only to be rearmed later by the arming register
      (CURBASE in case of cursors). If a disarming write happens
      just before the start of vblank, and the arming write happens
      after start of vblank we have effectively prevented the hardware
      from latching anything. And if we manage to straddle multiple
      sequential vblank starts in this manner we effectively prevent
      the hardware from latching any new registers for an arbitrary
      amount of time. This provides more time for the (potentially
      still in use by the hardware) gtt/iommu mappings to be torn
      down.
      
      A partial solution, of course, is to use vblank evasion to
      avoid the register writes from spreading on both sides of
      the start of vblank.
      
      I've previously highlighted this problem as a general issue
      affecting mailbox updates. I even added some notes to the
      {i9xx,skl}_crtc_planes_update_arm() to remind us that the noarm
      and arm phases both need to pulled into the vblank evasion
      critical section if we actually decided to implement mailbox
      updates in general. But as I never impelemented the noarm+arm
      split for cursors we don't have to worry about that for the
      moment.
      
      We've been lucky enough so far that this hasn't really caused
      problems. One thing that does help is that Xorg generally
      sticks to the same cursor BO. But igt seems pretty good at
      hitting this on MTL now, so apparently we have to start
      thinking about this.
      
      v2: Wait for PSR exit to avoid the vblank evasion timeout (1ms)
          tripping due to PSR exit latency (~5ms typically)
      Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240116204927.23499-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJouni Högander <jouni.hogander@intel.com>
      Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
      1de63528