disp: msm: sde: reset ctl on autorefresh disable failure

Reset MDP ctl path and DSI ctl on autorefresh
disable failure. This will enable the hardware
to recover from the hang.

Change-Id: Ia9acc8573c22e0713179ef4f6ef604caacabfadb
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran
2019-11-22 15:27:32 -08:00
committed by Gerrit - the friendly Code Review server
szülő 363aadd666
commit bceea4e1fe
7 fájl változott, egészen pontosan 48 új sor hozzáadva és 18 régi sor törölve

Fájl megtekintése

@@ -252,6 +252,7 @@ struct sde_crtc_misr_info {
* @ltm_hist_en : flag to indicate whether LTM hist is enabled or not
* @ltm_buffer_lock : muttx to protect ltm_buffers allcation and free
* @ltm_lock : Spinlock to protect ltm buffer_cnt, hist_en and ltm lists
* @needs_hw_reset : Initiate a hw ctl reset
*/
struct sde_crtc {
struct drm_crtc base;
@@ -330,6 +331,7 @@ struct sde_crtc {
struct drm_msm_ltm_cfg_param ltm_cfg;
struct mutex ltm_buffer_lock;
spinlock_t ltm_lock;
bool needs_hw_reset;
};
#define to_sde_crtc(x) container_of(x, struct sde_crtc, base)
@@ -494,6 +496,22 @@ static inline int sde_crtc_frame_pending(struct drm_crtc *crtc)
return atomic_read(&sde_crtc->frame_pending);
}
/**
* sde_crtc_set_needs_hw_reset - set hw reset flag, to handle reset during
* commit kickoff
* @crtc: Pointer to DRM crtc instance
*/
static inline void sde_crtc_set_needs_hw_reset(struct drm_crtc *crtc)
{
struct sde_crtc *sde_crtc;
if (!crtc)
return;
sde_crtc = to_sde_crtc(crtc);
sde_crtc->needs_hw_reset = true;
}
/**
* sde_crtc_reset_hw - attempt hardware reset on errors
* @crtc: Pointer to DRM crtc instance