linux-stable/drivers
Christian König a473943294 dma-buf: add dma_fence_timestamp helper
commit b83ce9cb4a upstream.

When a fence signals there is a very small race window where the timestamp
isn't updated yet. sync_file solves this by busy waiting for the
timestamp to appear, but on other ocassions didn't handled this
correctly.

Provide a dma_fence_timestamp() helper function for this and use it in
all appropriate cases.

Another alternative would be to grab the spinlock when that happens.

v2 by teddy: add a wait parameter to wait for the timestamp to show up, in case
   the accurate timestamp is needed and/or the timestamp is not based on
   ktime (e.g. hw timestamp)
v3 chk: drop the parameter again for unified handling

Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 1774baa64f ("drm/scheduler: Change scheduled fence track v2")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20230929104725.2358-1-christian.koenig@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:11:07 +02:00
..
accel accel/ivpu: Use cached buffers for FW loading 2023-10-06 13:16:06 +02:00
accessibility
acpi ACPI: EC: Add quirk for the HP Pavilion Gaming 15-dk1xxx 2023-10-19 23:11:04 +02:00
amba amba: bus: fix refcount leak 2023-09-13 09:53:44 +02:00
android binder: fix memory leaks of spam and pending work 2023-10-19 23:11:04 +02:00
ata ata: libata-scsi: Disable scsi device manage_system_start_stop 2023-10-19 23:10:56 +02:00
atm
auxdisplay
base regmap: rbtree: Fix wrong register marked as in-cache when creating new node 2023-10-10 22:03:00 +02:00
bcma
block rbd: take header_rwsem in rbd_dev_refresh() only when updating 2023-10-06 13:16:30 +02:00
bluetooth Bluetooth: btusb: Add support for another MediaTek 7922 VID/PID 2023-09-23 11:14:21 +02:00
bus bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up 2023-10-06 13:16:03 +02:00
cdrom
cdx
char parisc: sba: Fix compile warning wrt list of SBA devices 2023-10-06 13:16:08 +02:00
clk clk: tegra: fix error return case for recalc_rate 2023-10-06 13:16:02 +02:00
clocksource clocksource/drivers/arm_arch_timer: Disable timer before programming CVAL 2023-09-19 12:30:22 +02:00
comedi Revert "comedi: add HAS_IOPORT dependencies" 2023-09-23 11:14:37 +02:00
connector
counter mfd: rz-mtu3: Link time dependencies 2023-09-13 09:53:47 +02:00
cpufreq cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug 2023-09-13 09:53:56 +02:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-13 09:53:32 +02:00
crypto crypto: stm32 - fix MDMAT condition 2023-09-13 09:53:56 +02:00
cxl cxl/pci: Fix appropriate checking for _OSC while handling CXL RAS registers 2023-10-06 13:16:25 +02:00
dax
dca
devfreq PM / devfreq: Fix leak in devfreq_dev_release() 2023-09-13 09:53:49 +02:00
dio
dma dmaengine: stm32-mdma: set in_flight_bytes in case CRQA flag is set 2023-10-19 23:11:02 +02:00
dma-buf dma-buf: add dma_fence_timestamp helper 2023-10-19 23:11:07 +02:00
edac EDAC/igen6: Fix the issue of no error events 2023-09-13 09:53:29 +02:00
eisa
extcon extcon: cht_wc: add POWER_SUPPLY dependency 2023-09-13 09:53:38 +02:00
firewire scsi: sd: Differentiate system and runtime start/stop management 2023-10-06 13:16:22 +02:00
firmware firmware: cirrus: cs_dsp: Only log list of algorithms in debug build 2023-10-06 13:16:15 +02:00
fpga
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-13 09:53:40 +02:00
gnss
gpio gpio: pxa: disable pinctrl calls for MMP_GPIO 2023-10-10 22:03:05 +02:00
gpu dma-buf: add dma_fence_timestamp helper 2023-10-19 23:11:07 +02:00
greybus
hid HID: logitech-hidpp: Fix kernel crash on receiver USB disconnect 2023-10-19 23:10:56 +02:00
hsi
hte
hv Drivers: hv: vmbus: Don't dereference ACPI root object handle 2023-09-13 09:53:48 +02:00
hwmon hwmon: (tmp513) Fix the channel number in tmp51x_is_visible() 2023-09-13 09:53:11 +02:00
hwspinlock hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation 2023-09-19 12:30:23 +02:00
hwtracing coresight: trbe: Fix TRBE potential sleep in atomic context 2023-09-13 09:53:43 +02:00
i2c i2c: i801: unregister tco_pdev in i801_probe() error path 2023-10-06 13:16:23 +02:00
i3c i3c: master: svc: Describe member 'saved_regs' 2023-09-19 12:30:15 +02:00
idle Revert "intel_idle: Add support for using intel_idle in a VM guest using just hlt" 2023-07-19 20:10:03 +02:00
iio iio: addac: Kconfig: update ad74413r selections 2023-10-19 23:11:03 +02:00
infiniband RDMA/cxgb4: Check skb value for failure to allocate 2023-10-19 23:10:55 +02:00
input Input: goodix - ensure int GPIO is in input for gpio_count == 1 && gpio_int_idx == 0 case 2023-10-19 23:11:06 +02:00
interconnect interconnect: Teach lockdep about icc_bw_lock order 2023-09-23 11:14:39 +02:00
iommu iommu/mediatek: Fix share pgtable for iova over 4GB 2023-10-10 22:03:00 +02:00
ipack
irqchip irqchip: renesas-rzg2l: Fix logic to clear TINT interrupt source 2023-10-19 23:10:57 +02:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-03 18:08:32 -07:00
leds leds: Drop BUG_ON check for LED_COLOR_ID_MULTI 2023-10-10 22:02:59 +02:00
macintosh
mailbox mailbox: qcom-ipcc: fix incorrect num_chans counting 2023-09-19 12:30:13 +02:00
mcb mcb: remove is_added flag from mcb_device struct 2023-10-19 23:11:05 +02:00
md dm crypt: Fix reqsize in crypt_iv_eboiv_gen 2023-10-19 23:10:56 +02:00
media media: subdev: Don't report V4L2_SUBDEV_CAP_STREAMS when the streams API is disabled 2023-10-19 23:11:03 +02:00
memory memory: tegra: make icc_set_bw return zero if BWMGR not supported 2023-07-25 22:09:20 +02:00
memstick
message
mfd mfd: rk808: Make MFD_RK8XX tristate 2023-09-13 09:53:47 +02:00
misc misc: rtsx: Fix some platforms can not boot and move the l1ss judgment to probe 2023-10-06 13:16:20 +02:00
mmc mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450 2023-09-23 11:14:21 +02:00
most
mtd ubi: Refuse attaching if mtd's erasesize is 0 2023-10-10 22:02:58 +02:00
mux
net can: sja1000: Always restart the Tx queue after an overrun 2023-10-19 23:11:06 +02:00
nfc
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-13 09:53:53 +02:00
nubus
nvdimm virtio_pmem: add the missing REQ_OP_WRITE for flush bio 2023-09-13 09:53:50 +02:00
nvme nvme-pci: do not set the NUMA node of device if it has none 2023-10-06 13:16:12 +02:00
nvmem
of of: dynamic: Fix potential memory leak in of_changeset_action() 2023-10-10 22:03:04 +02:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-13 09:52:59 +02:00
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 13:16:08 +02:00
parport parport: gsc: remove DMA leftover code 2023-08-03 14:40:37 +02:00
pci PCI: qcom: Fix IPQ8074 enumeration 2023-10-10 22:02:57 +02:00
pcmcia
peci
perf perf/arm-cmn: Fix the unhandled overflow status of counter 4 to 7 2023-10-19 23:10:55 +02:00
phy phy: lynx-28g: serialize concurrent phy_set_mode_ext() calls to shared registers 2023-10-19 23:10:59 +02:00
pinctrl pinctrl: renesas: rzn1: Enable missing PINMUX 2023-10-19 23:11:01 +02:00
platform platform/x86: hp-wmi:: Mark driver struct with __refdata to prevent section mismatch warning 2023-10-19 23:10:55 +02:00
pnp
power power: supply: qcom_battmgr: fix enable request endianness 2023-10-19 23:11:06 +02:00
powercap powercap: intel_rapl: Fix invalid setting of Power Limit 4 2023-09-13 09:53:52 +02:00
pps
ps3
ptp ptp: ocp: Fix error handling in ptp_ocp_device_init 2023-10-10 22:03:01 +02:00
pwm pwm: lpc32xx: Remove handling of PWM channels 2023-09-19 12:30:15 +02:00
rapidio
ras
regulator regulator/core: regulator_register: set device->class earlier 2023-10-10 22:03:00 +02:00
remoteproc remoteproc: stm32: fix incorrect optional pointers 2023-09-13 09:53:48 +02:00
reset
rpmsg rpmsg: glink: Add check for kstrdup 2023-09-13 09:53:46 +02:00
rtc rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff 2023-09-06 21:22:22 +01:00
s390 net/smc: Fix dependency of SMC on ISM 2023-10-19 23:11:00 +02:00
sbus
scsi scsi: Do not rescan devices with a suspended queue 2023-10-19 23:10:56 +02:00
sh
siox
slimbus
soc soc: imx8m: Enable OCOTP clock for imx8mm before reading registers 2023-10-06 13:16:05 +02:00
soundwire
spi spi: zynqmp-gqspi: fix clock imbalance on probe failure 2023-10-06 13:16:19 +02:00
spmi
ssb
staging Fix nomenclature for USB and PCI wireless devices 2023-09-23 11:14:23 +02:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 22:03:00 +02:00
tc
tee tee: amdtee: fix use-after-free vulnerability in amdtee_close_session 2023-10-19 23:11:06 +02:00
thermal thermal: sysfs: Fix trip_point_hyst_store() 2023-10-06 13:16:27 +02:00
thunderbolt thunderbolt: Restart XDomain discovery handshake after failure 2023-10-19 23:11:05 +02:00
tty serial: core: Fix checks for tx runtime PM state 2023-10-19 23:11:04 +02:00
ufs scsi: ufs: core: Poll HCS.UCRDY before issuing a UIC command 2023-10-06 13:16:09 +02:00
uio
usb usb: typec: ucsi: Use GET_CAPABILITY attributes data to set power supply scope 2023-10-19 23:11:06 +02:00
vdpa pds_vdpa: fix up debugfs feature bit printing 2023-08-10 15:51:46 -04:00
vfio vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent() 2023-10-06 13:16:01 +02:00
vhost vringh: don't use vringh_kiov_advance() in vringh_iov_xfer() 2023-10-10 22:02:56 +02:00
video fbdev/sh7760fb: Depend on FB=y 2023-10-06 13:16:18 +02:00
virt
virtio virtio_ring: fix avail_wrap_counter in virtqueue_add_packed 2023-09-13 09:53:48 +02:00
vlynq
w1
watchdog watchdog: advantech_ec_wdt: fix Kconfig dependencies 2023-09-19 12:30:21 +02:00
xen xen/events: replace evtchn_rwlock with RCU 2023-10-10 22:03:06 +02:00
zorro
Kconfig
Makefile