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:

committed by
Dhaval Patel

parent
3be27eafcc
commit
6daf1c58e7
@@ -449,26 +449,6 @@ static bool sde_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
return true;
|
||||
}
|
||||
|
||||
static int _sde_crtc_get_ctlstart_timeout(struct drm_crtc *crtc)
|
||||
{
|
||||
struct drm_encoder *encoder;
|
||||
int rc = 0;
|
||||
|
||||
if (!crtc || !crtc->dev)
|
||||
return 0;
|
||||
|
||||
list_for_each_entry(encoder,
|
||||
&crtc->dev->mode_config.encoder_list, head) {
|
||||
if (encoder->crtc != crtc)
|
||||
continue;
|
||||
|
||||
if (sde_encoder_get_intf_mode(encoder) == INTF_MODE_CMD)
|
||||
rc += sde_encoder_get_ctlstart_timeout_state(encoder);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void _sde_crtc_setup_blend_cfg(struct sde_crtc_mixer *mixer,
|
||||
struct sde_plane_state *pstate, struct sde_format *format)
|
||||
{
|
||||
@@ -3157,13 +3137,7 @@ static void sde_crtc_atomic_begin(struct drm_crtc *crtc,
|
||||
if (unlikely(!sde_crtc->num_mixers))
|
||||
goto end;
|
||||
|
||||
if (_sde_crtc_get_ctlstart_timeout(crtc)) {
|
||||
_sde_crtc_blend_setup(crtc, old_state, false);
|
||||
SDE_ERROR("border fill only commit after ctlstart timeout\n");
|
||||
} else {
|
||||
_sde_crtc_blend_setup(crtc, old_state, true);
|
||||
}
|
||||
|
||||
_sde_crtc_blend_setup(crtc, old_state, true);
|
||||
_sde_crtc_dest_scaler_setup(crtc);
|
||||
|
||||
/* cancel the idle notify delayed work */
|
||||
|
Reference in New Issue
Block a user