disp: msm: sde: use wr_ptr interrupt instead of ctl_start

SDE driver triggers the frame and waits for the
ctl_start interrupt for command mode display. This interrupt
provides confirmation that hardware has picked up the
frame. Retire fence signaling is associated with
this interrupt and it is sent at the rd_ptr interrupt
after ctl_start. Due to lut dma delay, ctl_start interrupt
may be trigger before rd_ptr or after rd_ptr. SW manages
this complexity and handle retire fence for different cases
with 500us threshold logic.

This change replaces the ctl_start interrupt with wr_ptr
interrupt by programming it to trigger at 1st write line
count. This is guaranteed to come every time and it is close
to rd_ptr interrupt. That allows retire fence trigger at
wr_ptr interrupt and simplifies the SW logic. CRTC commit
thread would be held slightly longer with this change
as the wr_ptr is always close to rd_ptr and after
ctl_start.

Change-Id: Ic47a8f82c854b4aded0d70c95af853b28a68ffd6
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran
2018-07-09 15:32:41 -07:00
committed by Dhaval Patel
parent 3be27eafcc
commit 6daf1c58e7
8 changed files with 74 additions and 216 deletions

View File

@@ -163,11 +163,11 @@ void sde_encoder_kickoff(struct drm_encoder *encoder, bool is_error);
* @encoder: encoder pointer
* @event: event to wait for
* MSM_ENC_COMMIT_DONE - Wait for hardware to have flushed the current pending
* frames to hardware at a vblank or ctl_start
* frames to hardware at a vblank or wr_ptr_start
* Encoders will map this differently depending on the
* panel type.
* vid mode -> vsync_irq
* cmd mode -> ctl_start
* cmd mode -> wr_ptr_start_irq
* MSM_ENC_TX_COMPLETE - Wait for the hardware to transfer all the pixels to
* the panel. Encoders will map this differently
* depending on the panel type.
@@ -339,11 +339,4 @@ int sde_encoder_in_cont_splash(struct drm_encoder *enc);
*/
void sde_encoder_uidle_enable(struct drm_encoder *drm_enc, bool enable);
/*
* sde_encoder_get_ctlstart_timeout_state - checks if ctl start timeout happened
* @drm_enc: Pointer to drm encoder structure
* @Return: non zero value if ctl start timeout occurred
*/
int sde_encoder_get_ctlstart_timeout_state(struct drm_encoder *enc);
#endif /* __SDE_ENCODER_H__ */