drm/msm/sde: handle retire fence during late ctl_start_irq

In ideal cases, CTL_START_IRQ is received just before
the RD_PTR_IRQ (TE), but in rare cases the order is reversed.
Currently, the retire fence is signalled at the TE after
CTL_START_IRQ. So in late CTL_START_IRQ cases, the retire
fence signalling is pushed to the next TE. Since late ctl_start
is a possible case as per HW guidelines and frame would actually
be picked in the current TE, signal the retire fence at the
CTL_START_IRQ if it happens within a threshold from TE.

Change-Id: I723fa775870e6d452055f46fa999cfba0f6b63eb
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2 files changed