1. 10 Nov, 2020 6 commits
    • Kuogee Hsieh's avatar
      drm/msm/dp: skip checking LINK_STATUS_UPDATED bit · ea530388
      Kuogee Hsieh authored
      Some dongle will not clear LINK_STATUS_UPDATED bit after
      DPCD read which cause link training failed. This patch
      just read 6 bytes of DPCD link status from sink and return
      without checking LINK_STATUS_UPDATED bit.
      Only 8 bits are used to represent link rate at sinker DPCD.
      The really link rate is 2.7Mb times the 8 bits value.
      For example, 0x0A at DPCD is equal to 2.7Gb (10 * 2.7Mb).
      This patch also convert 8 bits value of DPCD to really link
      rate to fix worng link rate error during phy compliance test.
      
      Fixes: 6625e263 ("drm/msm/dp: DisplayPort PHY compliance tests fixup")
      Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      ea530388
    • Kuogee Hsieh's avatar
      drm/msm/dp: deinitialize mainlink if link training failed · 231a04fc
      Kuogee Hsieh authored
      DP compo phy have to be enable to start link training. When
      link training failed phy need to be disabled so that next
      link traning can be proceed smoothly at next plug in. This
      patch de-initialize mainlink to disable phy if link training
      failed. This prevent system crash due to
      disp_cc_mdss_dp_link_intf_clk stuck at "off" state.  This patch
      also perform checking power_on flag at dp_display_enable() and
      dp_display_disable() to avoid crashing when unplug cable while
      display is off.
      Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      231a04fc
    • Kuogee Hsieh's avatar
      drm/msm/dp: fixes wrong connection state caused by failure of link train · 62671d2e
      Kuogee Hsieh authored
      Connection state is not set correctly happen when either failure of link
      train due to cable unplugged in the middle of aux channel reading or
      cable plugged in while in suspended state. This patch fixes these problems.
      This patch also replace ST_SUSPEND_PENDING with ST_DISPLAY_OFF.
      
      Changes in V2:
      -- Add more information to commit message.
      
      Changes in V3:
      -- change base
      
      Changes in V4:
      -- add Fixes tag
      Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      62671d2e
    • Kuogee Hsieh's avatar
      drm/msm/dp: return correct connection status after suspend · 19e52bcb
      Kuogee Hsieh authored
      During suspend, dp host controller and hpd block are disabled due to
      both ahb and aux clock are disabled. Therefore hpd plug/unplug interrupts
      will not be generated. At dp_pm_resume(), reinitialize both dp host
      controller and hpd block so that hpd plug/unplug interrupts will be
      generated and handled by driver so that hpd connection state is updated
      correctly. This patch will fix link training flaky issues.
      
      Changes in v2:
      -- use container_of to cast correct dp_display_private pointer
         at both dp_pm_suspend() and dp_pm_resume().
      
      Changes in v3:
      -- replace hpd_state atomic_t  with u32
      
      Changes in v4
      -- call dp_display_host_deinit() at dp_pm_suspend()
      -- call dp_display_host_init() at msm_dp_display_enable()
      -- fix phy->init_count unbalance which causes link training failed
      
      Changes in v5
      --  add Fixes tag
      
      Fixes:  8ede2ecc (drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets)
      Tested-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      19e52bcb
    • Rob Clark's avatar
      drm/msm/a5xx: Clear shadow on suspend · 5771de5d
      Rob Clark authored
      Similar to the previous patch, clear shadow on suspend to avoid timeouts
      waiting for ringbuffer space.
      
      Fixes: 8907afb4 ("drm/msm: Allow a5xx to mark the RPTR shadow as privileged")
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      5771de5d
    • Rob Clark's avatar
      drm/msm/a6xx: Clear shadow on suspend · e8b0b994
      Rob Clark authored
      Clear the shadow rptr on suspend.  Otherwise, when we resume, we can
      have a stale value until CP_WHERE_AM_I executes.  If we suspend near
      the ringbuffer wraparound point, this can lead to a chicken/egg
      situation where we are waiting for ringbuffer space to write the
      CP_WHERE_AM_I (or CP_INIT) packet, because we mistakenly believe that
      the ringbuffer is full (due to stale rptr value in the shadow).
      
      Fixes errors like:
      
        [drm:adreno_wait_ring [msm]] *ERROR* timeout waiting for space in ringbuffer 0
      
      in the resume path.
      
      Fixes: d3a569fc ("drm/msm: a6xx: Use WHERE_AM_I for eligible targets")
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      e8b0b994
  2. 05 Nov, 2020 25 commits
  3. 04 Nov, 2020 9 commits