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>
Dieser Commit ist enthalten in:
Veera Sundaram Sankaran
2018-07-09 15:32:41 -07:00
committet von Dhaval Patel
Ursprung 3be27eafcc
Commit 6daf1c58e7
8 geänderte Dateien mit 74 neuen und 216 gelöschten Zeilen

Datei anzeigen

@@ -647,6 +647,7 @@ struct sde_splash_data {
* needs to be above the read pointer
* @start_pos: The position from which the start_threshold value is added
* @rd_ptr_irq: The read pointer line at which interrupt has to be generated
* @wr_ptr_irq: The write pointer line at which interrupt has to be generated
* @hw_vsync_mode: Sync with external frame sync input
*/
struct sde_hw_tear_check {
@@ -657,6 +658,7 @@ struct sde_hw_tear_check {
u32 sync_threshold_continue;
u32 start_pos;
u32 rd_ptr_irq;
u32 wr_ptr_irq;
u8 hw_vsync_mode;
};