1. 29 Nov, 2020 9 commits
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_hw_sspp: Fix kernel-doc formatting abuse · 6008cd43
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:240: warning: Function parameter or member 'ctx' not described in 'dpu_hw_sspp_setup_format'
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:240: warning: Function parameter or member 'fmt' not described in 'dpu_hw_sspp_setup_format'
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:240: warning: Function parameter or member 'flags' not described in 'dpu_hw_sspp_setup_format'
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:240: warning: Function parameter or member 'rect_mode' not described in 'dpu_hw_sspp_setup_format'
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:446: warning: Function parameter or member 'ctx' not described in 'dpu_hw_sspp_setup_rects'
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:446: warning: Function parameter or member 'cfg' not described in 'dpu_hw_sspp_setup_rects'
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:446: warning: Function parameter or member 'rect_index' not described in 'dpu_hw_sspp_setup_rects'
      
      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: Jonathan Marek <jonathan@marek.ca>
      Cc: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      6008cd43
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_hw_lm: Fix misnaming of parameter 'ctx' · 0177aef3
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c:55: warning: Function parameter or member 'ctx' not described in '_stage_offset'
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c:55: warning: Excess function parameter 'c' description in '_stage_offset'
      
      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: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      0177aef3
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_encoder: Fix a few parameter/member formatting issues · cca5ff94
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:207: warning: Function parameter or member 'cur_slave' not described in 'dpu_encoder_virt'
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:207: warning: Function parameter or member 'hw_pp' not described in 'dpu_encoder_virt'
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:207: warning: Function parameter or member 'intfs_swapped' not described in 'dpu_encoder_virt'
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1445: warning: Function parameter or member 'drm_enc' not described in '_dpu_encoder_trigger_flush'
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1445: warning: Function parameter or member 'phys' not described in '_dpu_encoder_trigger_flush'
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1445: warning: Function parameter or member 'extra_flush_bits' not described in '_dpu_encoder_trigger_flush'
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1481: warning: Function parameter or member 'phys' not described in '_dpu_encoder_trigger_start'
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1564: warning: Function parameter or member 'dpu_enc' not described in '_dpu_encoder_kickoff_phys'
      
      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: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      cca5ff94
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_hw_catalog: Move definitions to the only place they are used · 09c7e370
      Lee Jones authored
      These tables are not large or overbearing, so moving them into the
      source file seems like the right thing to do.  The alternative is to
      use __maybe_unused, which is undesirable.
      
      Fixes the following W=1 kernel build warning(s):
      
       In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:11:
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:7:23: warning: ‘qcom_compressed_supported_formats’ defined but not used [-Wunused-const-variable=]
       7 | static const uint32_t qcom_compressed_supported_formats[] = {
       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:48:23: warning: ‘plane_formats_yuv’ defined but not used [-Wunused-const-variable=]
       48 | static const uint32_t plane_formats_yuv[] = {
       | ^~~~~~~~~~~~~~~~~
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:17:23: warning: ‘plane_formats’ defined but not used [-Wunused-const-variable=]
       17 | static const uint32_t plane_formats[] = {
       | ^~~~~~~~~~~~~
      
      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: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      09c7e370
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_hw_catalog: Remove duplicated initialisation of 'max_linewidth' · 14bcdfe4
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:124:19: warning: initialized field overwritten [-Woverride-init]
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:124:19: note: (near initialization for ‘sm8250_dpu_caps.max_linewidth’)
      
      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: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      14bcdfe4
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_formats: Demote non-conformant kernel-doc header · 0070e6d2
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'fmt' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'a' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'r' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'g' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'b' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'e0' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'e1' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'e2' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'e3' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'uc' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'alpha' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'bp' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'flg' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'fm' not described in 'INTERLEAVED_RGB_FMT'
       drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'np' not described in 'INTERLEAVED_RGB_FMT'
      
      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: Fritz Koenig <frkoenig@google.com>
      Cc: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      0070e6d2
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_hw_blk: Add one missing and remove an extra param description · dbce3d09
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c:28: warning: Function parameter or member 'hw_blk' not described in 'dpu_hw_blk_init'
       drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c:120: warning: Excess function parameter 'free_blk' description in 'dpu_hw_blk_put'
      
      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: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      dbce3d09
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_core_perf: Fix kernel-doc formatting issues · 2785fd47
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:31: warning: Enum value 'DPU_PERF_MODE_MAX' not described in enum 'dpu_perf_mode'
       drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:34: warning: Cannot understand  * @_dpu_core_perf_calc_bw() - to calculate BW per crtc
       drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:73: warning: Function parameter or member 'kms' not described in '_dpu_core_perf_calc_clk'
       drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:73: warning: Function parameter or member 'crtc' not described in '_dpu_core_perf_calc_clk'
       drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:73: warning: Function parameter or member 'state' not described in '_dpu_core_perf_calc_clk'
       drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:249: warning: Cannot understand  * @dpu_core_perf_crtc_release_bw() - request zero bandwidth
      
      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: Kalyan Thota <kalyan_t@codeaurora.org>
      Cc: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      2785fd47
    • Rob Clark's avatar
      msm/mdp5: Fix some kernel-doc warnings · 03b6f2d6
      Rob Clark authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function parameter or member 'ctl' not described in 'mdp5_ctl_set_encoder_state'
       drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function parameter or member 'pipeline' not described in 'mdp5_ctl_set_encoder_state'
       drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function parameter or member 'enabled' not described in 'mdp5_ctl_set_encoder_state'
       drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Excess function parameter 'enable' description in 'mdp5_ctl_set_encoder_state'
       drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function parameter or member 'ctl' not described in 'mdp5_ctl_commit'
       drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function parameter or member 'pipeline' not described in 'mdp5_ctl_commit'
       drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function parameter or member 'flush_mask' not described in 'mdp5_ctl_commit'
       drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function parameter or member 'start' not described in 'mdp5_ctl_commit'
      
      Cc: Lee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      03b6f2d6
  2. 24 Nov, 2020 1 commit
    • Lee Jones's avatar
      drm/msm/disp/dpu1/dpu_encoder: Remove a bunch of unused variables · ff8b941a
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function ‘dpu_encoder_virt_mode_set’:
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:981:31: warning: variable ‘num_dspp’ set but not used [-Wunused-but-set-variable]
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:976:30: warning: variable ‘topology’ set but not used [-Wunused-but-set-variable]
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function ‘_dpu_encoder_virt_enable_helper’:
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1099:26: warning: variable ‘priv’ set but not used [-Wunused-but-set-variable]
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function ‘dpu_encoder_virt_disable’:
       drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1210:18: warning: variable ‘dpu_kms’ set but not used [-Wunused-but-set-variable]
      
      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: linux-arm-msm@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      ff8b941a
  3. 23 Nov, 2020 4 commits
  4. 21 Nov, 2020 3 commits
    • Rob Clark's avatar
      drm/msm/shrinker: Only iterate dontneed objs · 3edfa30f
      Rob Clark authored
      In situations where the GPU is mostly idle, all or nearly all buffer
      objects will be in the inactive list.  But if the system is under memory
      pressure (from something other than GPU), we could still get a lot of
      shrinker calls.  Which results in traversing a list of thousands of objs
      and in the end finding nothing to shrink.  Which isn't so efficient.
      
      Instead split the inactive_list into two lists, one inactive objs which
      are shrinkable, and a second one for those that are not.  This way we
      can avoid traversing objs which we know are not shrinker candidates.
      
      v2: Fix inverted logic think-o
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      3edfa30f
    • Rob Clark's avatar
      drm/msm/shrinker: We can vmap shrink active_list too · fcd371c2
      Rob Clark authored
      Just because a obj is active, if the vmap_count is zero, we can still
      tear down the vmap.
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      fcd371c2
    • Rob Clark's avatar
      drm/msm: Protect obj->active_count under obj lock · ab5c54cb
      Rob Clark authored
      Previously we only held obj lock in the _active_get() path, and relied
      on atomic_dec_return() to not be racy in the _active_put() path where
      obj lock was not held.
      
      But this is a false sense of security.  Unlike obj lifetime refcnt,
      where you do not expect to *increase* the refcnt after the last put
      (which would mean that something has gone horribly wrong with the
      object liveness reference counting), the active_count can increase
      again from zero.  Racing _active_put()s and _active_get()s could leave
      the obj on the wrong mm list.
      
      But in the retire path, immediately after the _active_put(), the
      _unpin_iova() would acquire obj lock.  So just move the locking earlier
      and rely on that to protect obj->active_count.
      
      Fixes: c5c1643c ("drm/msm: Drop struct_mutex from the retire path")
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      ab5c54cb
  5. 10 Nov, 2020 8 commits
    • Abhinav Kumar's avatar
      drm/msm/dp: do not notify audio subsystem if sink doesn't support audio · e8c76581
      Abhinav Kumar authored
      For sinks that do not support audio, there is no need to notify
      audio subsystem of the connection event.
      
      This will make sure that audio routes only to the primary display
      when connected to such sinks.
      
      changes in v2:
        - Added fixes tag
        - Removed nested if condition and removed usage of global pointer
      
      Fixes: d13e36d7 ("drm/msm/dp: add audio support for Display Port on MSM")
      Signed-off-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      e8c76581
    • Kuogee Hsieh's avatar
      drm/msm/dp: promote irq_hpd handle to handle link training correctly · 26b8d66a
      Kuogee Hsieh authored
      Some dongles require link training done at irq_hpd request instead
      of plugin request. This patch promote irq_hpd handler to handle link
      training and setup hpd_state correctly.
      Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      26b8d66a
    • 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
  6. 05 Nov, 2020 15 commits