1. 17 Apr, 2024 11 commits
  2. 11 Apr, 2024 7 commits
  3. 10 Apr, 2024 7 commits
  4. 09 Apr, 2024 13 commits
  5. 08 Apr, 2024 2 commits
    • Ville Syrjälä's avatar
      drm/i915: Update pipes in reverse order for bigjoiner · e02ef555
      Ville Syrjälä authored
      With bigjoiner the master crtc is the one that will send out the
      uapi event/etc. We want that to happen after all the slaves are
      done, so let's try to do the commits in reverse order so that
      the master comes last.
      
      Even worse, the modeset helper will simply complete the commit
      on the slave pipe immediately as it consider the crtc to be inactive
      (it can't see our crtc_state->hw.active/etc.).
      
      With regular sync updates this generally doesn't matter all that
      much as the slave pipe should typically finish its work during the
      same frame as the master pipe. However in case the slave pipe's commit
      slips into the next frame we end up in a bit of trouble. This is most
      visible with either async flips (currently disabled with bigjoiner
      exactly for this reason), and DSB gamma updates. With DSB the problem
      happens because the DSB itself will wait until the next start vblank
      before starting to execute. So if the master pipe already finished its
      commit and the DSB on the slave pipe is still waiting for the next
      vblank we will assume the DSB as gotten stuck and terminate it.
      
      Reversing the commit order should ameliarate this for the most part
      as the master pipe is guaranteed to start its commit after the slave
      pipe started. The one thing that can still screw us over is the fact
      that we aren't necessarily going to commit the pipes in the reverse
      order as the actual order is dictated by the DDB overlap avoidance.
      But that can only happen while other pipes are being enabled/disabled,
      and so in the normal steady state we should be safe.
      
      The full fix will involve making the commit machinery aware of the
      slave pipes and not finish their commits prematurely. But that
      will involve a bit more work than this. And this commit order
      reversal will still be beneficial to avoid userspace getting an
      -EBUSY from the following page flip if the second pipe's commit
      does stretch into the next frame.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240404213441.17637-2-ville.syrjala@linux.intel.comReviewed-by: default avatarArun R Murthy <arun.r.murthy@intel.com>
      Reviewed-by: default avatarVandita Kulkarni <vandita.kulkarni@intel.com>
      e02ef555
    • Ville Syrjälä's avatar
      drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner · 3a5e09d8
      Ville Syrjälä authored
      Currently intel_modeset_pipe_config_late() is called after the
      bigjoiner state copy, and it will actually not do anything for
      bigjoiner slaves. This can lead to a mismatched state between
      the master and slave.
      
      The two things that we do in the encoder .compute_config_late()
      hook are mst master transcoder and port sync master transcoder
      elections. So if either of either MST or port sync is combined
      with bigjoiner then we can see the mismatch.
      
      Currently this problem is more or less theoretical; MST+bigjoiner
      has not been implemented yet, and port sync+bigjoiner would
      require a tiled display with >5k tiles (or a very high
      dotclock per tile). Although we do have kms_tiled_display in
      igt which can fake a tiled display, and we can now force bigjoiner
      via debugfs, so it is possible to trigger this if you try hard
      enough.
      
      Reorder the code such that intel_modeset_pipe_config_late()
      will be called before the bigjoiner state copy happens so
      that both pipes will end up with the same state.
      Tested-by: default avatarVidya Srinivas <vidya.srinivas@intel.com>
      Reviewed-by: default avatarVandita Kulkarni <vandita.kulkarni@intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240404213441.17637-7-ville.syrjala@linux.intel.com
      3a5e09d8