linux/include
Veera Sundaram Sankaran a9b76c4519 UPSTREAM: drm/drm_vblank: set the dma-fence timestamp during send_vblank_event
The explicit out-fences in crtc are signaled as part of vblank event,
indicating all framebuffers present on the Atomic Commit request are
scanned out on the screen. Though the fence signal and the vblank event
notification happens at the same time, triggered by the same hardware
vsync event, the timestamp set in both are different. With drivers
supporting precise vblank timestamp the difference between the two
timestamps would be even higher. This might have an impact on use-mode
frameworks using these fence timestamps for purposes other than simple
buffer usage. For instance, the Android framework [1] uses the
retire-fences as an alternative to vblank when frame-updates are in
progress. Set the fence timestamp during send vblank event using a new
drm_send_event_timestamp_locked variant to avoid discrepancies.

[1] https://android.googlesource.com/platform/frameworks/native/+/master/
services/surfaceflinger/Scheduler/Scheduler.cpp#397

Changes in v2:
- Use drm_send_event_timestamp_locked to update fence timestamp
- add more information to commit text

Changes in v3:
- use same backend helper function for variants of drm_send_event to
avoid code duplications

Changes in v4:
- remove WARN_ON from drm_send_event_timestamp_locked

Bug: 173434777
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Reviewed-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
  [sumits: minor parenthesis alignment correction]
Link: https://patchwork.freedesktop.org/patch/msgid/1610757107-11892-2-git-send-email-veeras@codeaurora.org
(cherry picked from commit a78e7a51d2)
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Change-Id: Iaa29508f72e2c9c7abd2e3fe7a4dc7b9665336a5
2021-04-07 14:20:07 +00:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-03-30 14:32:06 +02:00
asm-generic Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
clocksource
crypto Merge 5.10.22 into android12-5.10 2021-03-11 19:35:01 +01:00
drm UPSTREAM: drm/drm_vblank: set the dma-fence timestamp during send_vblank_event 2021-04-07 14:20:07 +00:00
dt-bindings UPSTREAM: dt-bindings: mediatek: Add binding for mt8192 IOMMU 2021-03-24 12:45:11 -07:00
keys
kunit
kvm FROMGIT: KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key 2021-03-05 16:45:13 +00:00
linux UPSTREAM: dma-fence: allow signaling drivers to set fence timestamp 2021-04-07 14:17:51 +00:00
math-emu
media This is the 5.10.24 stable release 2021-03-19 09:42:56 +01:00
memory
misc
net Revert "can: dev: Move device back to init netns on owning netns delete" 2021-04-02 15:25:51 +02:00
pcmcia
ras
rdma RDMA: Lift ibdev_to_node from rds to common code 2021-02-26 10:12:59 +01:00
scsi scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
soc UPSTREAM: memory: mtk-smi: Allow building as module 2021-03-24 12:45:16 -07:00
sound Merge 5.10.22 into android12-5.10 2021-03-11 19:35:01 +01:00
target scsi: target: core: Add cmd length set before cmd complete 2021-03-17 17:06:25 +01:00
trace ANDROID: usb: typec: tcpm: Add vendor hook to update current limit 2021-04-06 23:49:05 +00:00
uapi ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:11:30 +00:00
vdso
video
xen Xen/gntdev: correct error checking in gntdev_map_grant_pages() 2021-02-23 15:53:24 +01:00
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:11:30 +00:00