1. 12 8月, 2022 1 次提交
  2. 05 7月, 2022 3 次提交
  3. 19 6月, 2022 1 次提交
    • K
      drm/msm/dp: force link training for display resolution change · a6e2af64
      Kuogee Hsieh 提交于
      Display resolution change is implemented through drm modeset. Older
      modeset (resolution) has to be disabled first before newer modeset
      (resolution) can be enabled. Display disable will turn off both
      pixel clock and main link clock so that main link have to be
      re-trained during display enable to have new video stream flow
      again. At current implementation, display enable function manually
      kicks up irq_hpd_handle which will read panel link status and start
      link training if link status is not in sync state.
      
      However, there is rare case that a particular panel links status keep
      staying in sync for some period of time after main link had been shut
      down previously at display disabled. In this case, main link retraining
      will not be executed by irq_hdp_handle(). Hence video stream of newer
      display resolution will fail to be transmitted to panel due to main
      link is not in sync between host and panel.
      
      This patch will bypass irq_hpd_handle() in favor of directly call
      dp_ctrl_on_stream() to always perform link training in regardless of
      main link status. So that no unexpected exception resolution change
      failure cases will happen. Also this implementation are more efficient
      than manual kicking off irq_hpd_handle function.
      
      Changes in v2:
      -- set force_link_train flag on DP only (is_edp == false)
      
      Changes in v3:
      -- revise commit  text
      -- add Fixes tag
      
      Changes in v4:
      -- revise commit  text
      
      Changes in v5:
      -- fix spelling at commit text
      
      Changes in v6:
      -- split dp_ctrl_on_stream() for phy test case
      -- revise commit text for modeset
      
      Changes in v7:
      -- drop 0 assignment at local variable (ret = 0)
      
      Changes in v8:
      -- add patch to remove pixel_rate from dp_ctrl
      
      Changes in v9:
      -- forward declare dp_ctrl_on_stream_phy_test_report()
      
      Fixes: 62671d2e ("drm/msm/dp: fixes wrong connection state caused by failure of link train")
      Signed-off-by: NKuogee Hsieh <quic_khsieh@quicinc.com>
      Reviewed-by: NStephen Boyd <swboyd@chromium.org>
      Patchwork: https://patchwork.freedesktop.org/patch/489895/
      Link: https://lore.kernel.org/r/1655411200-7255-1-git-send-email-quic_khsieh@quicinc.comSigned-off-by: NRob Clark <robdclark@chromium.org>
      a6e2af64
  4. 02 6月, 2022 1 次提交
    • K
      drm/msm/dp: Always clear mask bits to disable interrupts at dp_ctrl_reset_irq_ctrl() · 993a2adc
      Kuogee Hsieh 提交于
      dp_catalog_ctrl_reset() will software reset DP controller. But it will
      not reset programmable registers to default value. DP driver still have
      to clear mask bits to interrupt status registers to disable interrupts
      after software reset of controller.
      
      At current implementation, dp_ctrl_reset_irq_ctrl() will software reset dp
      controller but did not call dp_catalog_ctrl_enable_irq(false) to clear hpd
      related interrupt mask bits to disable hpd related interrupts due to it
      mistakenly think hpd related interrupt mask bits will be cleared by software
      reset of dp controller automatically. This mistake may cause system to crash
      during suspending procedure due to unexpected irq fired and trigger event
      thread to access dp controller registers with controller clocks are disabled.
      
      This patch fixes system crash during suspending problem by removing "enable"
      flag condition checking at dp_ctrl_reset_irq_ctrl() so that hpd related
      interrupt mask bits are cleared to prevent unexpected from happening.
      
      Changes in v2:
      -- add more details commit text
      
      Changes in v3:
      -- add synchrons_irq()
      -- add atomic_t suspended
      
      Changes in v4:
      -- correct Fixes's commit ID
      -- remove synchrons_irq()
      
      Changes in v5:
      -- revise commit text
      
      Changes in v6:
      -- add event_lock to protect "suspended"
      
      Changes in v7:
      -- delete "suspended" flag
      
      Fixes: 989ebe7b ("drm/msm/dp: do not initialize phy until plugin interrupt received")
      Signed-off-by: NKuogee Hsieh <quic_khsieh@quicinc.com>
      Reviewed-by: NStephen Boyd <swboyd@chromium.org>
      Patchwork: https://patchwork.freedesktop.org/patch/486591/
      Link: https://lore.kernel.org/r/1652804494-19650-1-git-send-email-quic_khsieh@quicinc.comSigned-off-by: NAbhinav Kumar <quic_abhinavk@quicinc.com>
      993a2adc
  5. 02 5月, 2022 4 次提交
  6. 26 4月, 2022 1 次提交
  7. 25 4月, 2022 1 次提交
  8. 18 2月, 2022 4 次提交
  9. 17 1月, 2022 1 次提交
  10. 29 11月, 2021 2 次提交
  11. 11 8月, 2021 3 次提交
  12. 08 8月, 2021 1 次提交
  13. 27 7月, 2021 1 次提交
  14. 23 6月, 2021 3 次提交
  15. 28 4月, 2021 2 次提交
  16. 08 2月, 2021 1 次提交
    • S
      drm/msm/dp: Add a missing semi-colon · 182b4a2d
      Stephen Boyd 提交于
      A missing semicolon here causes my external display to stop working.
      Indeed, missing the semicolon on the return statement leads to
      dp_panel_update_tu_timings() not existing because the compiler thinks
      it's part of the return statement of a void function, so it must not be
      important.
      
        $ ./scripts/bloat-o-meter before.o after.o
        add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140)
        Function                                     old     new   delta
        dp_panel_update_tu_timings                     -    7400   +7400
        _dp_ctrl_calc_tu.constprop                 18024   17900    -124
        dp_panel_update_tu_timings.constprop        7416       -   -7416
        Total: Before=54440, After=54300, chg -0.26%
      
      Add a semicolon so this function works like it used to.
      
      Cc: Sean Paul <sean@poorly.run>
      Cc: Kuogee Hsieh <khsieh@codeaurora.org>
      Cc: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Cc: Lee Jones <lee.jones@linaro.org>
      Fixes: cc9014bf ("drm/msm/dp/dp_ctrl: Move 'tu' from the stack to the heap")
      Signed-off-by: NStephen Boyd <swboyd@chromium.org>
      Signed-off-by: NRob Clark <robdclark@chromium.org>
      182b4a2d
  17. 07 2月, 2021 1 次提交
  18. 01 2月, 2021 2 次提交
  19. 21 1月, 2021 1 次提交
  20. 30 11月, 2020 1 次提交
    • L
      drm/msm/dp/dp_ctrl: Move 'tu' from the stack to the heap · cc9014bf
      Lee Jones 提交于
      'struct tu_algo_data' is huge ~400 Bytes.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/dp/dp_ctrl.c: In function ‘_dp_ctrl_calc_tu.constprop’:
       drivers/gpu/drm/msm/dp/dp_ctrl.c:938:1: warning: the frame size of 1184 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Chandan Uddaraju <chandanu@codeaurora.org>
      Cc: Kuogee Hsieh <khsieh@codeaurora.org>
      Cc: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NRob Clark <robdclark@chromium.org>
      cc9014bf
  21. 11 11月, 2020 3 次提交
    • K
      drm/msm/dp: skip checking LINK_STATUS_UPDATED bit · ea530388
      Kuogee Hsieh 提交于
      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: NKuogee Hsieh <khsieh@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@chromium.org>
      ea530388
    • K
      drm/msm/dp: deinitialize mainlink if link training failed · 231a04fc
      Kuogee Hsieh 提交于
      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: NKuogee Hsieh <khsieh@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@chromium.org>
      231a04fc
    • K
      drm/msm/dp: return correct connection status after suspend · 19e52bcb
      Kuogee Hsieh 提交于
      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: NStephen Boyd <swboyd@chromium.org>
      Signed-off-by: NKuogee Hsieh <khsieh@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@chromium.org>
      19e52bcb
  22. 05 11月, 2020 2 次提交