linux-stable/drivers
Bryan O'Donoghue e428d0f3e4 media: qcom: camss: Fix VFE-17x vfe_disable_output()
commit 3143ad282f upstream.

There are two problems with the current vfe_disable_output() routine.

Firstly we rightly use a spinlock to protect output->gen2.active_num
everywhere except for in the IDLE timeout path of vfe_disable_output().
Even if that is not racy "in practice" somehow it is by happenstance not
by design.

Secondly we do not get consistent behaviour from this routine. On
sc8280xp 50% of the time I get "VFE idle timeout - resetting". In this
case the subsequent capture will succeed. The other 50% of the time, we
don't hit the idle timeout, never do the VFE reset and subsequent
captures stall indefinitely.

Rewrite the vfe_disable_output() routine to

- Quiesce write masters with vfe_wm_stop()
- Set active_num = 0

remembering to hold the spinlock when we do so followed by

- Reset the VFE

Testing on sc8280xp and sdm845 shows this to be a valid fix.

Fixes: 7319cdf189 ("media: camss: Add support for VFE hardware version Titan 170")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:15:16 +00:00
..
accel
accessibility
acpi ACPI: FPDT: properly handle invalid FPDT subtables 2023-11-28 17:15:06 +00:00
amba
android
ata
atm atm: iphase: Do PCI error checks on own line 2023-11-28 17:14:48 +00:00
auxdisplay
base driver core: Release all resources during unbind before updating device links 2023-11-28 17:15:07 +00:00
bcma
block virtio-blk: fix implicit overflow on virtio_max_dma_size 2023-11-28 17:14:50 +00:00
bluetooth Bluetooth: btusb: Add date->evt_skb is NULL check 2023-11-28 17:14:43 +00:00
bus
cdrom
cdx
char parisc/agp: Use 64-bit LE values in SBA IOMMU PDIR table 2023-11-28 17:15:03 +00:00
clk clk: qcom: ipq6018: drop the CLK_SET_RATE_PARENT flag from PLL clocks 2023-11-28 17:15:04 +00:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 17:14:41 +00:00
comedi
connector
counter
cpufreq cpufreq: stats: Fix buffer overflow detection in trans_stats() 2023-11-28 17:15:03 +00:00
cpuidle
crypto crypto: hisilicon/qm - prevent soft lockup in receive loop 2023-11-28 17:14:49 +00:00
cxl cxl/port: Fix delete_endpoint() vs parent unregistration race 2023-11-28 17:15:09 +00:00
dax
dca
devfreq
dio
dma dmaengine: stm32-mdma: correct desc prep when channel running 2023-11-28 17:15:08 +00:00
dma-buf
edac
eisa
extcon
firewire
firmware firmware: qcom_scm: use 64-bit calling convention only when client is 64-bit 2023-11-28 17:15:05 +00:00
fpga
fsi
gnss
gpio gpiolib: of: Add quirk for mt2701-cs42448 ASoC sound 2023-11-28 17:14:47 +00:00
gpu drm/mediatek/dp: fix memory leak on ->get_edid callback error path 2023-11-28 17:15:14 +00:00
greybus
hid hid: lenovo: Resend all settings on reset_resume for compact keyboards 2023-11-28 17:15:07 +00:00
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c i2c: i801: fix potential race in i801_block_transaction_byte_by_byte 2023-11-28 17:15:13 +00:00
i3c i3c: master: svc: fix random hot join failure since timeout error 2023-11-28 17:15:09 +00:00
idle
iio iio: adc: stm32-adc: harden against NULL pointer deref in stm32_adc_probe() 2023-11-28 17:14:49 +00:00
infiniband RDMA/hfi1: Use FIELD_GET() to extract Link Width 2023-11-28 17:14:47 +00:00
input Input: synaptics-rmi4 - fix use after free in rmi_unregister_function() 2023-11-20 11:57:21 +01:00
interconnect interconnect: fix error handling in qnoc_probe() 2023-11-20 11:57:16 +01:00
iommu iommufd: Fix missing update of domains_itree after splitting iopt_area 2023-11-28 17:15:01 +00:00
ipack
irqchip
isdn
leds leds: trigger: netdev: Move size check in set_device_name 2023-11-28 17:15:06 +00:00
macintosh
mailbox
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 17:15:08 +00:00
md dm-verity: don't use blocking calls from tasklets 2023-11-28 17:15:14 +00:00
media media: qcom: camss: Fix VFE-17x vfe_disable_output() 2023-11-28 17:15:16 +00:00
memory memory: tegra: Set BPMP msg flags to reset IPC channels 2023-11-20 11:57:06 +01:00
memstick
message
mfd mfd: qcom-spmi-pmic: Fix revid implementation 2023-11-28 17:15:06 +00:00
misc misc: pci_endpoint_test: Add Device ID for R-Car S4-8 PCIe controller 2023-11-28 17:14:48 +00:00
mmc mmc: sdhci-pci-gli: GL9750: Mask the replay timer timeout of AER 2023-11-28 17:15:15 +00:00
most
mtd mtd: cfi_cmdset_0001: Byte swap OTP info 2023-11-28 17:15:08 +00:00
mux
net r8169: add handling DASH when DASH is disabled 2023-11-28 17:15:15 +00:00
nfc
ntb
nubus
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:57:08 +01:00
nvme nvme: fix error-handling for io_uring nvme-passthrough 2023-11-20 11:57:23 +01:00
nvmem
of of: address: Fix address translation when address-size is greater than 2 2023-11-28 17:14:43 +00:00
opp
parisc parisc/power: Fix power soft-off when running on qemu 2023-11-28 17:15:10 +00:00
parport
pci PCI: Lengthen reset delay for VideoPropulsion Torrent QN16e card 2023-11-28 17:15:09 +00:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:57:19 +01:00
peci
perf drivers: perf: Check find_first_bit() return value 2023-11-28 17:14:58 +00:00
phy phy: qualcomm: phy-qcom-eusb2-repeater: Zero out untouched tuning regs 2023-11-28 17:14:49 +00:00
pinctrl pinctrl: renesas: rzg2l: Make reverse order of enable() for disable() 2023-11-20 11:57:13 +01:00
platform platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e 2023-11-28 17:14:43 +00:00
pnp
power
powercap powercap: intel_rapl: Downgrade BIOS locked limits pr_warn() to pr_debug() 2023-11-28 17:15:03 +00:00
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 17:14:55 +00:00
pwm pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume 2023-11-20 11:57:21 +01:00
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call 2023-11-20 11:57:18 +01:00
s390 s390/ap: fix AP bus crash on early config change callback invocation 2023-11-28 17:15:12 +00:00
sbus
scsi scsi: qla2xxx: Fix system crash due to bad pointer access 2023-11-28 17:14:59 +00:00
sh
siox
slimbus
soc pmdomain: imx: Make imx pgc power domain also set the fwnode 2023-11-28 17:15:09 +00:00
soundwire soundwire: dmi-quirks: update HP Omen match 2023-11-28 17:14:49 +00:00
spi spi: spi-zynq-qspi: add spi-mem to driver kconfig dependencies 2023-11-20 11:57:25 +01:00
spmi
ssb
staging media: cedrus: Fix clock/reset sequence 2023-11-20 11:57:20 +01:00
target
tc
tee
thermal thermal: intel: powerclamp: fix mismatch in get function for max_idle 2023-11-28 17:15:05 +00:00
thunderbolt thunderbolt: Apply USB 3.x bandwidth quirk only in software connection manager 2023-11-28 17:14:49 +00:00
tty hvc/xen: fix event channel handling for secondary consoles 2023-11-28 17:15:00 +00:00
ufs scsi: ufs: core: Fix racing issue between ufshcd_mcq_abort() and ISR 2023-11-28 17:14:59 +00:00
uio
usb xhci: Enable RPM on controllers that support low-power states 2023-11-28 17:15:10 +00:00
vdpa vdpa_sim_blk: allocate the buffer zeroed 2023-11-28 17:14:53 +00:00
vfio
vhost vhost-vdpa: fix use after free in vhost_vdpa_probe() 2023-11-28 17:14:53 +00:00
video fbdev: fsl-diu-fb: mark wr_reg_wa() static 2023-11-20 11:57:25 +01:00
virt virt: sevguest: Fix passing a stack buffer as a scatterlist target 2023-11-20 11:57:18 +01:00
virtio
vlynq
w1
watchdog sbsa_gwdt: Calculate timeout with 64-bit math 2023-11-28 17:15:12 +00:00
xen xen/events: fix delayed eoi list handling 2023-11-28 17:14:55 +00:00
zorro
Kconfig
Makefile