twx-linux/drivers
Thomas Zimmermann 3603996432 drm/fbdev-dma: Add shadow buffering for deferred I/O
DMA areas are not necessarily backed by struct page, so we cannot
rely on it for deferred I/O. Allocate a shadow buffer for drivers
that require deferred I/O and use it as framebuffer memory.

Fixes driver errors about being "Unable to handle kernel NULL pointer
dereference at virtual address" or "Unable to handle kernel paging
request at virtual address".

The patch splits drm_fbdev_dma_driver_fbdev_probe() in an initial
allocation, which creates the DMA-backed buffer object, and a tail
that sets up the fbdev data structures. There is a tail function for
direct memory mappings and a tail function for deferred I/O with
the shadow buffer.

It is no longer possible to use deferred I/O without shadow buffer.
It can be re-added if there exists a reliably test for usable struct
page in the allocated DMA-backed buffer object.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: Nuno Gonçalves <nunojpg@gmail.com>
CLoses: https://lore.kernel.org/dri-devel/CAEXMXLR55DziAMbv_+2hmLeH-jP96pmit6nhs6siB22cpQFr9w@mail.gmail.com/
Tested-by: Nuno Gonçalves <nunojpg@gmail.com>
Fixes: 5ab91447aa13 ("drm/tiny/ili9225: Use fbdev-dma")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: <stable@vger.kernel.org> # v6.11+
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241211090643.74250-1-tzimmermann@suse.de
2025-02-27 09:37:55 +01:00
..
accel accel/amdxdna: Add missing include linux/slab.h 2025-02-19 09:42:17 -08:00
accessibility
acpi ACPI: video: Fix random crashes due to bad kfree() 2025-01-13 21:09:10 +01:00
amba
android Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
ata ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys() 2024-12-09 09:06:58 +09:00
atm Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
auxdisplay Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
base topology: Keep the cpumask unchanged when printing cpumap 2025-01-07 17:58:08 +01:00
bcma Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
block zram: fix potential UAF of zram table 2025-01-12 19:03:37 -08:00
bluetooth Bluetooth: btmtk: Fix failed to send func ctrl for MediaTek devices. 2025-01-08 11:14:03 -05:00
bus bus: mhi: host: pci_generic: fix MHI BAR mapping 2024-12-02 15:14:33 +05:30
cache
cdrom cdrom: Fix typo, 'devicen' to 'device' 2024-12-30 12:56:06 -07:00
cdx module: Convert default symbol namespace to string literal 2024-12-03 08:22:25 -08:00
char Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
clk A randconfig build fix and a performance fix: 2025-01-05 10:28:34 -08:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2024-12-09 18:42:42 +00:00
comedi
connector
counter module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cpufreq cpufreq: Move endif to the end of Kconfig file 2025-01-14 20:54:04 +01:00
cpuidle cpuidle: teo: Update documentation after previous changes 2025-01-13 20:46:27 +01:00
crypto crypto: hisilicon/debugfs - fix the struct pointer incorrectly offset problem 2024-12-10 13:40:25 +08:00
cxl cxl/region: Fix region creation for greater than x2 switches 2024-12-10 14:50:34 -07:00
dax module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
dca
devfreq Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
dio
dma dmaengine fixes for v6.13 2024-12-26 10:43:25 -08:00
dma-buf Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
dpll
edac EDAC/amd64: Simplify ECC check on unified memory controllers 2024-12-11 21:47:33 +01:00
eisa
extcon Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
firewire firewire updates for v6.13 2024-11-25 17:12:54 -08:00
firmware soc: fixes for 6.13, part 2 2024-12-21 15:45:06 -08:00
fpga module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
fsi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
gnss
gpio gpio: xilinx: Convert gpio_lock to raw spinlock 2025-01-14 14:04:38 +01:00
gpu drm/fbdev-dma: Add shadow buffering for deferred I/O 2025-02-27 09:37:55 +01:00
greybus
hid hid-for-linus-2024120501 2024-12-05 10:06:47 -08:00
hsi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hte Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hv Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet 2024-12-09 18:44:15 +00:00
hwmon hwmon: (ltc2991) Fix mixed signed/unsigned in DIV_ROUND_CLOSEST 2025-01-15 13:52:43 -08:00
hwspinlock Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hwtracing Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
i2c i2c: testunit: on errors, repeat NACK until STOP 2025-01-15 19:44:21 +01:00
i3c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
idle
iio IIO: 1st set of fixes for 6.13 cycle. 2024-12-16 16:29:55 +01:00
infiniband RDMA v6.13 first rc pull request 2025-01-03 11:09:35 -08:00
input Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
interconnect interconnect: icc-clk: check return values of devm_kasprintf() 2024-12-17 14:03:34 +02:00
iommu iommu/vt-d: Avoid draining PRQ in sva mm release path 2024-12-13 15:54:27 +01:00
ipack
irqchip irqchip: Plug a OF node reference leak in platform_irqchip_probe() 2025-01-15 10:38:43 +01:00
isdn
leds module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
macintosh Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
mailbox TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
mcb module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
md - dm-array fixes 2025-01-08 10:12:01 -08:00
media [GIT PULL for 6.13-rc4] media fixes 2024-12-21 10:56:34 -08:00
memory Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
memstick Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
message scsi: message: fusion: Constify struct pci_device_id 2024-11-20 21:38:24 -05:00
mfd module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
misc misc: microchip: pci1xxxx: Resolve return code mismatch during GPIO set config 2025-01-08 15:47:39 +01:00
mmc mmc: sdhci-msm: fix crypto key eviction 2024-12-19 14:42:10 +01:00
most
mtd Revert "mtd: spi-nor: core: replace dummy buswidth from addr to data" 2025-01-15 18:44:23 +01:00
mux
net net/mlx5e: Always start IPsec sequence number from 1 2025-01-16 12:45:47 +01:00
nfc
ntb
nubus
nvdimm module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
nvme nvme fixes for Linux 6.13 2024-12-31 10:41:58 -07:00
nvmem Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
of Devicetree fixes for 6.13, part 2: 2025-01-17 15:01:24 -08:00
opp OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized 2024-12-23 16:27:24 +05:30
parisc Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
parport Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
pci pci-v6.13-fixes-3 2025-01-14 11:32:14 -08:00
pcmcia Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
peci module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
perf Merge patch series "SBI PMU event related fixes" 2025-01-09 09:37:12 -08:00
phy phy: mediatek: phy-mtk-hdmi: add regulator dependency 2024-12-24 20:38:53 +05:30
pinctrl Pin control fixes for the v6.13 series: 2025-01-03 10:57:57 -08:00
platform platform-drivers-x86 for v6.13-6 2025-01-17 14:40:09 -08:00
pmdomain pmdomain: imx8mp-blk-ctrl: add missing loop break condition 2025-01-16 16:10:32 +01:00
pnp
power power: supply: bq24190: Fix BQ24296 Vbus regulator support 2024-12-19 00:35:30 +01:00
powercap module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
pps Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ps3
ptp ptp: kvm: x86: Return EOPNOTSUPP instead of ENODEV from kvm_arch_ptp_init() 2024-12-06 17:38:11 -08:00
pwm pwm: Fix regression in pwm-stm32 driver when converting to new waveform support 2024-12-19 08:50:05 -08:00
rapidio
ras
regulator regulator: rename regulator-uv-survival-time-ms according to DT binding 2024-12-19 11:15:24 +00:00
remoteproc
reset Reset controller fixes for v6.13 2025-01-15 14:58:22 +01:00
rpmsg Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
rtc module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
s390 Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
sbus Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
scsi scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request 2025-01-09 21:01:25 -05:00
sh sh updates for v6.13 2024-11-30 14:45:29 -08:00
siox
slimbus Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
soc Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
soundwire module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
spi spi: rockchip-sfc: Fix error in remove progress 2024-12-18 16:02:08 +00:00
spmi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ssb
staging Char/Misc/IIO driver fixes for 6.13-rc7 2025-01-12 14:34:00 -08:00
target Merge branch '6.13/scsi-queue' into 6.13/scsi-fixes 2024-12-02 12:36:18 -05:00
tc
tee Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
thermal thermal: of: fix OF node leak in of_thermal_zone_find() 2025-01-07 20:05:32 +01:00
thunderbolt thunderbolt: Improve redrive mode handling 2024-12-16 09:59:38 +02:00
tty serial: stm32: use port lock wrappers for break control 2024-12-23 19:01:54 +01:00
ufs scsi: ufs: qcom: Power down the controller/device during system suspend for SM8550/SM8650 SoCs 2025-01-02 13:00:16 -05:00
uio Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
usb USB-serial device ids for 6.13-rc7 2025-01-10 14:59:20 +01:00
vdpa
vfio vfio/pci: Fallback huge faults for unaligned pfn 2025-01-03 08:49:05 -07:00
vhost
video Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
virt virt: tdx-guest: Just leak decrypted memory on unrecoverable errors 2024-12-29 10:18:44 +01:00
virtio virtio_ring: add a func argument 'recycle_done' to virtqueue_reset() 2024-12-10 11:22:21 +01:00
w1 Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
watchdog watchdog: stm32_iwdg: fix error message during driver probe 2024-12-30 15:28:02 +01:00
xen module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
zorro
Kconfig
Makefile