Skip to content
  1. Nov 19, 2021
    • Ville Syrjälä's avatar
      drm/i915: Declare .(de)gamma_lut_tests for icl+ · a37795cb
      Ville Syrjälä authored
      
      
      All interpolated gamma modes including the icl+ multi segment
      mode require non-decreasing entries for the interpolation to
      work correctly. For some reason we're forgetting to declare
      that for icl+. Let us do so.
      
      References: https://gitlab.freedesktop.org/drm/intel/-/issues/3916
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211014181856.17581-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
      a37795cb
    • Ville Syrjälä's avatar
      drm/i915: Fix framestart_delay commens in VRR code · 9cca74b5
      Ville Syrjälä authored
      
      
      Since I originally wrote these comments we decided to change our
      definition of framestart_delay from 0-3 to 1-4. Adjust the comments
      to match that new convention. The actual code was adjusted already.
      
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211117183103.27418-3-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
      9cca74b5
    • Ville Syrjälä's avatar
      drm/i915: Do vblank evasion correctly if vrr push has already been sent · 0088d39b
      Ville Syrjälä authored
      
      
      Let's adjust the vblank evasion to account for the case where
      a push has already been sent. In that case the vblank exit will start
      at vmin vblank start (as opposed to vmax vblank start when no push
      has been sent).
      
      This should minimize the effects of the tiny race between sampling
      the frame counter vs. intel_vrr_send_push() during the previous frame.
      This will also be required if we want to do mailbox style updates with
      vrr since then we'd definitely do multiple commits per frame. Currently
      mailbox updates are only used by the legacy cursor, but we don't do
      vrr push for those.
      
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211117183103.27418-2-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
      0088d39b
    • Ville Syrjälä's avatar
      drm/i915: Move vrr push after the frame counter sampling again · 4765d061
      Ville Syrjälä authored
      Moving the vrr push to happen before sampling the frame counter
      was wrong. If we are already in vblank when the push is sent
      the vblank exit will start immediately which causes the sampled
      frame counter to correspond to the next frame instead of the current
      frame.
      
      So put things back into the original order (except we should
      keep the vrr push within the irq disable section to avoid
      pointless irq related delays here).
      
      We'll just have to accept the tiny race that exists between
      sampling the frame counter vs. vrr push. And let's at least
      document said race properly in a comment.
      
      I suppose we could try to minimize the race by sampling the frame
      counter just before sending the push, but that would require
      changing drm_crtc_arm_vblank_event() to accept a caller provided
      vblank counter value, so leave it be for now. Another thing we
      could do is change the vblank evasion to account for the case
      where a push was already sent. That would anyway be required
      for mailbox style updates. Currently mailbox updates are only
      used by the legacy cursor, but we don't do a vrr push for those.
      
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Fixes: 6f9976bd
      
       ("drm/i915: Do vrr push before sampling the frame counter")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211117183103.27418-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
      4765d061
  2. Nov 18, 2021
    • Hans de Goede's avatar
      drm/i915/vlv_dsi: Double pixelclock on read-back for dual-link panels · 41211134
      Hans de Goede authored
      
      
      In intel_dsi_get_config() double the pclk returned by foo_dsi_get_pclk()
      for dual-link panels. This fixes the following WARN triggering:
      
       i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in pixel_rate (expected 235710, found 118056)
       i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in hw.pipe_mode.crtc_clock (expected 235710, found 118056)
       i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in hw.adjusted_mode.crtc_clock (expected 235710, found 118056)
       i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in port_clock (expected 235710, found 118056)
       ------------[ cut here ]------------
       pipe state doesn't match!
       WARNING: CPU: 3 PID: 136 at drivers/gpu/drm/i915/display/intel_display.c:9125 intel_display_finish_reset+0x1bd3/0x2050 [i915]
       ...
      
      This has been tested on a Xiaomi Mi Pad 2 (with CHT x5-Z8500 SoC) tablet,
      with a 1536x2048 dual-link DSI panel.
      
      Note this fix was taken from icl_dsi.c which does the same in
      its get_config().
      
      Cc: Tsuchiya Yuto <kitakar@gmail.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211024155020.126328-1-hdegoede@redhat.com
      41211134
    • Imre Deak's avatar
      drm/i915: Fix fastsets on TypeC ports following a non-blocking modeset · a59308a5
      Imre Deak authored
      
      
      After a non-blocking modeset on a TypeC port's CRTC - possibly blocked
      later in drm_atomic_helper_wait_for_dependencies() - a fastset on the
      same CRTC may copy the state of CRTC before this gets updated to reflect
      the up-to-date DP-alt vs. TBT-alt TypeC mode DPLL used for the CRTC. In
      this case after the first (non-blocking) commit completes enabling the
      DPLL required for the up-to-date TypeC mode the following fastset will
      update the CRTC state pointing to the wrong DPLL. A subsequent disabling
      modeset will try to disable the wrong PLL, triggering a state checker
      WARN (and leaving the DPLL which is actually used active for good).
      
      Fix the above race by copying the DPLL state for fastset CRTCs from the
      old CRTC state at the point where it's guaranteed to be up-to-date
      already. This could be handled in the encoder's update_prepare() hook as
      well, but that's a bigger change, which is better done as a follow-up.
      
      v2: Copy dpll_hw_state as well. (Ville)
      
      Testcase: igt/kms_busy/extended-modeset-hang-newfb-with-reset
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4308
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarMika Kahola <mika.kahola@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211115181121.156197-1-imre.deak@intel.com
      a59308a5
  3. Nov 17, 2021
  4. Nov 16, 2021
  5. Nov 15, 2021
  6. Nov 12, 2021
    • Colin Ian King's avatar
      drm/i915: make array states static const · 2a2d23b6
      Colin Ian King authored
      
      
      Don't populate the read-only array states on the stack but instead it
      static. Also makes the object code smaller.
      
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210915112702.12783-1-colin.king@canonical.com
      2a2d23b6
    • José Roberto de Souza's avatar
      drm/i915/psr: Fix PSR2 handling of multiplanar format · c582ffad
      José Roberto de Souza authored
      When a plane with a multiplanar format is added to the state by
      drm_atomic_add_affected_planes(), only the UV plane is
      added, so a intel_atomic_get_new_plane_state() call to get the Y
      plane state can return a null pointer.
      To fix this, intel_atomic_get_plane_state() should be called and
      the return needs to be checked for errors, as it could return a EAGAIN
      as other atomic state could be holding the lock for the Y plane.
      
      Other issue with the patch being fixed is that the Y plane is not
      being committed to hardware because the corresponded plane bit is not
      set in update_planes when UV and Y planes are added to the state by
      drm_atomic_add_affected_planes().
      
      Cc: Jouni Högander <jouni.hogander@intel.com>
      Cc: Mika Kahola <mika.kahola@intel.com>
      Fixes: 3809991f
      
       ("drm/i915/display: Add initial selective fetch support for biplanar formats")
      Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: default avatarJouni Högander <jouni.hogander@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211108213807.39865-1-jose.souza@intel.com
      c582ffad
  7. Nov 11, 2021