linux/drivers
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
..
accessibility speakup: fix uninitialized flush_lock 2020-12-30 11:53:44 +01:00
acpi Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
amba Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
android ANDROID: usb: typec: tcpm: Add vendor hook to update current limit 2021-04-06 23:49:05 +00:00
ata ata: ahci_brcm: Add back regulators management 2021-03-04 11:37:45 +01:00
atm atm: idt77252: fix null-ptr-dereference 2021-03-30 14:31:50 +02:00
auxdisplay auxdisplay: ht16k33: Fix refresh rate handling 2021-03-04 11:38:00 +01:00
base FROMGIT: driver core: Use unbound workqueue for deferred probes 2021-04-05 17:46:33 +05:30
bcma
block Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
bluetooth Merge 5.10.23 into android12-5.10 2021-03-11 19:36:03 +01:00
bus bus: omap_l3_noc: mark l3 irqs as IRQF_NO_THREAD 2021-03-30 14:31:56 +02:00
cdrom
char Merge 5.10.22 into android12-5.10 2021-03-11 19:35:01 +01:00
clk Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
clocksource Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
connector
counter counter: stm32-timer-cnt: fix ceiling miss-alignment with reload register 2021-03-25 09:04:16 +01:00
cpufreq Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
cpuidle ANDROID: cpuidle: Move vendor hook to enter proper state 2021-03-25 19:14:33 +00:00
crypto crypto: sun4i-ss - initialize need_fallback 2021-03-04 11:38:32 +01:00
dax device-dax: Fix default return code of range_parse() 2021-03-04 11:38:15 +01:00
dca
devfreq
dio
dma Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
dma-buf UPSTREAM: dma-fence: allow signaling drivers to set fence timestamp 2021-04-07 14:17:51 +00:00
edac EDAC/amd64: Do not load on family 0x15, model 0x13 2021-03-07 12:34:08 +01:00
eisa
extcon extcon: max77693: Fix modalias string 2020-12-30 11:53:49 +01:00
firewire
firmware Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
fpga fpga: Specify HAS_IOMEM dependency for FPGA_DFL 2020-12-01 18:46:24 +01:00
fsi fsi: Aspeed: Add mutex to protect HW access 2020-12-30 11:53:46 +01:00
gnss
gpio Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
gpu UPSTREAM: drm/drm_vblank: set the dma-fence timestamp during send_vblank_event 2021-04-07 14:20:07 +00:00
greybus
hid This is the 5.10.24 stable release 2021-03-19 09:42:56 +01:00
hsi HSI: Fix PM usage counter unbalance in ssi_hw_init 2021-03-04 11:37:52 +01:00
hv Drivers: hv: vmbus: Avoid use-after-free in vmbus_onoffer_rescind() 2021-03-04 11:37:46 +01:00
hwmon FROMLIST: hwmon: (scmi) port driver to the new scmi_sensor_proto_ops interface 2021-03-02 17:34:33 -08:00
hwspinlock
hwtracing coresight: etm4x: Handle accesses to TRCSTALLCTLR 2021-03-04 11:38:37 +01:00
i2c This is the 5.10.24 stable release 2021-03-19 09:42:56 +01:00
i3c i3c master: fix missing destroy_workqueue() on error in i3c_master_register 2021-01-06 14:56:53 +01:00
ide ide/falconide: Fix module unload 2021-03-04 11:38:21 +01:00
idle intel_idle: Build fix 2020-12-03 10:00:23 +01:00
iio iio: hid-sensor-temperature: Fix issues of timestamp channel 2021-03-25 09:04:16 +01:00
infiniband RDMA/cxgb4: Fix adapter LE hash errors while destroying ipv6 listening server 2021-03-30 14:32:04 +02:00
input This is the 5.10.24 stable release 2021-03-19 09:42:56 +01:00
interconnect interconnect: imx8mq: Use icc_sync_state 2021-01-27 11:55:29 +01:00
iommu Merge branch 'android12-5.10-lts' into 'android12-5.10' 2021-03-26 08:25:46 +01:00
ipack
irqchip Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
isdn misdn: dsp: select CONFIG_BITREVERSE 2021-01-19 18:27:26 +01:00
leds leds: trigger: fix potential deadlock with libata 2021-02-03 23:28:41 +01:00
lightnvm lightnvm: fix memory leak when submit fails 2021-01-27 11:55:22 +01:00
macintosh macintosh/adb-iop: Use big-endian autopoll mask 2021-03-04 11:37:42 +01:00
mailbox mailbox: sprd: correct definition of SPRD_OUTBOX_FIFO_FULL 2021-03-04 11:38:15 +01:00
mcb
md Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
media FROMGIT: media: v4l2-ctrls: Fix h264 hierarchical coding type menu ctrl 2021-03-30 21:18:58 +00:00
memory UPSTREAM: memory: mtk-smi: Allow building as module 2021-03-24 12:45:16 -07:00
memstick memstick: r592: Fix error return in r592_probe() 2020-12-30 11:53:34 +01:00
message
mfd mfd: gateworks-gsc: Fix interrupt type 2021-03-04 11:38:40 +01:00
misc Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
mmc Merge branch 'android12-5.10' into branch 'android12-5.10-lts' 2021-03-21 15:02:08 +01:00
most
mtd mtd: spi-nor: hisi-sfc: Put child node np on error path 2021-03-04 11:38:37 +01:00
mux
net Revert "net: phy: introduce phydev->port" 2021-04-02 15:25:51 +02:00
nfc nfc: s3fwrn5: Release the nfc firmware 2020-12-30 11:53:53 +01:00
ntb
nubus
nvdimm libnvdimm/dimm: Avoid race between probe and available_slots_show() 2021-02-10 09:29:17 +01:00
nvme nvme: fix the nsid value to print in nvme_validate_or_alloc_ns 2021-03-30 14:32:08 +02:00
nvmem nvmem: qcom-spmi-sdam: Fix uninitialized pdev pointer 2021-03-04 11:38:39 +01:00
of Merge 5.10.22 into android12-5.10 2021-03-11 19:35:01 +01:00
opp Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
oprofile
parisc
parport
pci Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
pcmcia
perf perf/arm-cmn: Move IRQs when migrating context 2021-03-04 11:37:44 +01:00
phy phy: lantiq: rcu-usb2: wait after clock enable 2021-03-04 11:38:24 +01:00
pinctrl UPSTREAM: pinctrl/meson: enable building as modules 2021-02-11 12:20:51 +00:00
platform Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
pnp
power Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
powercap UPSTREAM: powercap/drivers/dtpm: Add the experimental label to the option description 2021-03-22 15:24:47 +00:00
pps
ps3 powerpc/ps3: use dma_mapping_error() 2020-12-30 11:53:53 +01:00
ptp phy: dp83640: select CONFIG_CRC32 2021-01-17 14:17:02 +01:00
pwm Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
rapidio
ras
regulator Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
remoteproc This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
reset FROMLIST: reset: reset-scmi: port driver to the new scmi_reset_proto_ops interface 2021-03-02 17:34:33 -08:00
rpmsg
rtc Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
s390 Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
sbus
scsi Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
sfi
sh
siox
slimbus slimbus: qcom: fix potential NULL dereference in qcom_slim_prg_slew() 2020-12-30 11:53:47 +01:00
soc Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
soundwire soundwire: intel: fix possible crash when no device is detected 2021-03-04 11:38:22 +01:00
spi Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
spmi spmi: spmi-pmic-arb: Fix hw_irq overflow 2021-03-04 11:38:40 +01:00
ssb
staging Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
target scsi: target: core: Prevent underflow for service actions 2021-03-17 17:06:26 +01:00
tc
tee optee: simplify i2c access 2021-03-04 11:37:28 +01:00
thermal ANDROID: thermal: Add logic for filter on-die tz genl event. 2021-03-16 23:42:07 +00:00
thunderbolt thunderbolt: Increase runtime PM reference count on DP tunnel discovery 2021-03-25 09:04:15 +01:00
tty Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
uio
usb ANDROID: usb: typec: tcpm: Add vendor hook to update current limit 2021-04-06 23:49:05 +00:00
vdpa vdpa/mlx5: fix param validation in mlx5_vdpa_get_config() 2021-03-04 11:37:17 +01:00
vfio Merge 5.10.26 into android12-5.10-lts 2021-03-25 17:15:27 +01:00
vhost vhost_vdpa: fix the missing irq_bypass_unregister_producer() invocation 2021-03-25 09:04:08 +01:00
video This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
virt virt: vbox: Do not use wait_event_interruptible when called from kernel context 2021-03-04 11:37:18 +01:00
virtio FROMGIT: mm, page_poison: remove CONFIG_PAGE_POISONING_NO_SANITY 2021-03-24 15:09:17 -07:00
visorbus
vlynq
vme
w1 w1: w1_therm: Fix conversion result for negative temperatures 2021-03-04 11:37:18 +01:00
watchdog Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
xen xen/x86: make XEN_BALLOON_MEMORY_HOTPLUG_LIMIT depend on MEMORY_HOTPLUG 2021-03-30 14:32:04 +02:00
zorro
Kconfig
Makefile vdpa: mlx5: fix vdpa/vhost dependencies 2020-12-02 04:09:56 -05:00
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:11:30 +00:00