1. 08 Dec, 2023 2 commits
    • Ville Syrjälä's avatar
      drm/i915: Fix intel_atomic_setup_scalers() plane_state handling · e8114410
      Ville Syrjälä authored
      Since the plane_state variable is declared outside the scaler_users
      loop in intel_atomic_setup_scalers(), and it's never reset back to
      NULL inside the loop we may end up calling intel_atomic_setup_scaler()
      with a non-NULL plane state for the pipe scaling case. That is bad
      because intel_atomic_setup_scaler() determines whether we are doing
      plane scaling or pipe scaling based on plane_state!=NULL. The end
      result is that we may miscalculate the scaler mode for pipe scaling.
      
      The hardware becomes somewhat upset if we end up in this situation
      when scanning out a planar format on a SDR plane. We end up
      programming the pipe scaler into planar mode as well, and the
      result is a screenfull of garbage.
      
      Fix the situation by making sure we pass the correct plane_state==NULL
      when calculating the scaler mode for pipe scaling.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-2-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      e8114410
    • Ville Syrjälä's avatar
      drm/i915: Fix remapped stride with CCS on ADL+ · 2c12eb36
      Ville Syrjälä authored
      On ADL+ the hardware automagically calculates the CCS AUX surface
      stride from the main surface stride, so when remapping we can't
      really play a lot of tricks with the main surface stride, or else
      the AUX surface stride would get miscalculated and no longer
      match the actual data layout in memory.
      
      Supposedly we could remap in 256 main surface tile units
      (AUX page(4096)/cachline(64)*4(4x1 main surface tiles per
      AUX cacheline)=256 main surface tiles), but the extra complexity
      is probably not worth the hassle.
      
      So let's just make sure our mapping stride is calculated from
      the full framebuffer stride (instead of the framebuffer width).
      This way the stride we program into PLANE_STRIDE will be the
      original framebuffer stride, and thus there will be no change
      to the AUX stride/layout.
      
      Cc: stable@vger.kernel.org
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20231205180308.7505-1-ville.syrjala@linux.intel.comReviewed-by: default avatarImre Deak <imre.deak@intel.com>
      2c12eb36
  2. 07 Dec, 2023 7 commits
  3. 05 Dec, 2023 1 commit
  4. 04 Dec, 2023 7 commits
  5. 01 Dec, 2023 5 commits
  6. 29 Nov, 2023 10 commits
  7. 27 Nov, 2023 2 commits
  8. 24 Nov, 2023 2 commits
  9. 23 Nov, 2023 4 commits