1
0
Fork 0
remarkable-linux/drivers
Daniel Drake 8ebd655833 PCI: Reprogram bridge prefetch registers on resume
commit 083874549f upstream.

On 38+ Intel-based ASUS products, the NVIDIA GPU becomes unusable after S3
suspend/resume.  The affected products include multiple generations of
NVIDIA GPUs and Intel SoCs.  After resume, nouveau logs many errors such
as:

  fifo: fault 00 [READ] at 0000005555555000 engine 00 [GR] client 04
        [HUB/FE] reason 4a [] on channel -1 [007fa91000 unknown]
  DRM: failed to idle channel 0 [DRM]

Similarly, the NVIDIA proprietary driver also fails after resume (black
screen, 100% CPU usage in Xorg process).  We shipped a sample to NVIDIA for
diagnosis, and their response indicated that it's a problem with the parent
PCI bridge (on the Intel SoC), not the GPU.

Runtime suspend/resume works fine, only S3 suspend is affected.

We found a workaround: on resume, rewrite the Intel PCI bridge
'Prefetchable Base Upper 32 Bits' register (PCI_PREF_BASE_UPPER32).  In the
cases that I checked, this register has value 0 and we just have to rewrite
that value.

Linux already saves and restores PCI config space during suspend/resume,
but this register was being skipped because upon resume, it already has
value 0 (the correct, pre-suspend value).

Intel appear to have previously acknowledged this behaviour and the
requirement to rewrite this register:
https://bugzilla.kernel.org/show_bug.cgi?id=116851#c23

Based on that, rewrite the prefetch register values even when that appears
unnecessary.

We have confirmed this solution on all the affected models we have in-hands
(X542UQ, UX533FD, X530UN, V272UN).

Additionally, this solves an issue where r8169 MSI-X interrupts were broken
after S3 suspend/resume on ASUS X441UAR.  This issue was recently worked
around in commit 7bb05b85bc ("r8169: don't use MSI-X on RTL8106e").  It
also fixes the same issue on RTL6186evl/8111evl on an Aimfor-tech laptop
that we had not yet patched.  I suspect it will also fix the issue that was
worked around in commit 7c53a72245 ("r8169: don't use MSI-X on
RTL8168g").

Thomas Martitz reports that this change also solves an issue where the AMD
Radeon Polaris 10 GPU on the HP Zbook 14u G5 is unresponsive after S3
suspend/resume.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=201069
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-By: Peter Wu <peter@lekensteyn.nl>
CC: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-13 09:27:24 +02:00
..
accessibility
acpi ACPI / scan: Initialize status to ACPI_STA_DEFAULT 2018-09-15 09:45:30 +02:00
amba ARM: amba: Don't read past the end of sysfs "driver_override" buffer 2018-05-01 12:58:21 -07:00
android android: binder: fix the race mmap and alloc_new_buf_locked 2018-09-19 22:43:35 +02:00
ata ata: ftide010: Add a quirk for SQ201 2018-10-03 17:00:59 -07:00
atm atm: zatm: Fix potential Spectre v1 2018-07-22 14:28:43 +02:00
auxdisplay auxdisplay: fix broken menu 2018-07-03 11:24:56 +02:00
base drivers/base: stop new probing during shutdown 2018-09-26 08:38:04 +02:00
bcma
block floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl 2018-10-03 17:00:54 -07:00
bluetooth Bluetooth: Add a new Realtek 8723DE ID 0bda:b009 2018-10-03 17:00:46 -07:00
bus drivers/perf: arm-ccn: don't log to dmesg in event_init 2018-08-03 07:50:31 +02:00
cdrom cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status 2018-09-05 09:26:42 +02:00
char ipmi: Fix I2C client removal in the SSIF driver 2018-09-26 08:38:06 +02:00
clk clk: tegra: bpmp: Don't crash when a clock fails to register 2018-09-26 08:38:13 +02:00
clocksource clocksource/drivers/timer-atmel-pit: Properly handle error cases 2018-10-13 09:27:23 +02:00
connector
cpufreq cpufreq: governor: Avoid accessing invalid governor_data 2018-09-09 19:55:58 +02:00
cpuidle cpuidle: powernv: Fix promotion from snooze if next state disabled 2018-07-03 11:24:51 +02:00
crypto crypto: caam/jr - fix ablkcipher_edesc pointer arithmetic 2018-10-10 08:54:28 +02:00
dax dev-dax: check_vma: ratelimit dev_info-s 2018-08-24 13:09:08 +02:00
dca
devfreq PM / devfreq: Fix potential NULL pointer dereference in governor_store 2018-04-12 12:32:13 +02:00
dio
dma dmaengine: mv_xor_v2: kill the tasklets upon exit 2018-09-26 08:38:05 +02:00
dma-buf dma-buf: remove redundant initialization of sg_table 2018-06-05 11:41:57 +02:00
edac EDAC: Fix memleak in module init error path 2018-10-03 17:00:53 -07:00
eisa
extcon extcon: Release locking when sending the notification of connector state 2018-09-09 19:55:56 +02:00
firewire firewire-ohci: work around oversized DMA reads on JMicron controllers 2018-04-26 11:02:03 +02:00
firmware efi/esrt: Only call efi_mem_reserve() for boot services memory 2018-09-26 08:38:10 +02:00
fmc
fpga fpga-manager: altera-ps-spi: preserve nCONFIG state 2018-05-01 12:58:24 -07:00
fsi
gpio gpiolib: Free the last requested descriptor 2018-10-10 08:54:28 +02:00
gpu drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set 2018-10-13 09:27:23 +02:00
hid HID: sensor-hub: Restore fixup for Lenovo ThinkPad Helix 2 sensor hub report 2018-10-10 08:54:24 +02:00
hsi
hv Drivers: hv: vmbus: Use get/put_cpu() in vmbus_connect() 2018-10-10 08:54:28 +02:00
hwmon hwmon: (adt7475) Make adt7475_read_word() return errors 2018-10-03 17:00:58 -07:00
hwspinlock
hwtracing intel_th: Fix device removal logic 2018-10-03 17:00:54 -07:00
i2c i2c: uniphier-f: issue STOP only for last message or I2C_M_STOP 2018-10-10 08:54:21 +02:00
ide cdrom: do not call check_disk_change() inside cdrom_open() 2018-05-30 07:52:34 +02:00
idle intel_idle: Graceful probe failure when MWAIT is disabled 2018-08-09 12:16:39 +02:00
iio Revert "iio: temperature: maxim_thermocouple: add MAX31856 part" 2018-10-10 08:54:24 +02:00
infiniband RDMA/ucma: check fd type in ucma_migrate_id() 2018-10-10 08:54:24 +02:00
input Input: elantech - enable middle button of touchpad on ThinkPad P72 2018-10-03 17:00:56 -07:00
iommu iommu/amd: Clear memory encryption mask from physical address 2018-10-10 08:54:27 +02:00
ipack
irqchip irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP 2018-09-15 09:45:29 +02:00
isdn isdn: Disable IIOCDBGVAR 2018-08-22 07:46:11 +02:00
leds leds: pm8058: Silence pointer to integer size warning 2018-03-19 08:42:50 +01:00
lightnvm lightnvm: pblk: free padded entries in write buffer 2018-09-15 09:45:35 +02:00
macintosh macintosh/via-pmu: Add missing mmio accessors 2018-09-19 22:43:41 +02:00
mailbox mailbox: xgene-slimpro: Fix potential NULL pointer dereference 2018-09-09 19:55:54 +02:00
mcb
md dm thin metadata: fix __udivdi3 undefined on 32-bit 2018-10-10 08:54:28 +02:00
media media: v4l: event: Prevent freeing event subscriptions while accessed 2018-10-03 17:01:00 -07:00
memory memory: tegra: Apply interrupts mask per SoC 2018-08-03 07:50:38 +02:00
memstick
message scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo() 2018-05-25 16:17:47 +02:00
mfd mfd: 88pm860x-i2c: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT) 2018-09-26 08:38:12 +02:00
misc misc: sram: enable clock before registering regions 2018-10-03 17:00:46 -07:00
mmc mmc: sdhci: do not try to use 3.3V signaling if not supported 2018-09-26 08:38:11 +02:00
mtd mtd: rawnand: atmel: add module param to avoid using dma 2018-10-03 17:00:50 -07:00
mux mux: core: fix double get_device() 2018-01-17 09:45:27 +01:00
net xen-netback: fix input validation in xenvif_set_hash_mapping() 2018-10-13 09:27:23 +02:00
nfc NFC: pn533: Fix wrong GFP flag usage 2018-08-24 13:09:06 +02:00
ntb ntb_transport: Fix bug with max_mw_size parameter 2018-04-26 11:02:13 +02:00
nubus
nvdimm libnvdimm: fix ars_status output length calculation 2018-09-09 19:56:01 +02:00
nvme nvmet-rdma: fix possible bogus dereference under heavy load 2018-10-10 08:54:24 +02:00
nvmem nvmem: Don't let a NULL cell_id for nvmem_cell_get() crash us 2018-08-24 13:09:14 +02:00
of of: platform: stop accessing invalid dev in of_platform_device_destroy 2018-07-03 11:24:52 +02:00
oprofile
parisc parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode 2018-05-30 07:52:28 +02:00
parport parport: sunbpp: fix error return code 2018-09-26 08:38:12 +02:00
pci PCI: Reprogram bridge prefetch registers on resume 2018-10-13 09:27:24 +02:00
pcmcia PCMCIA / PM: Avoid noirq suspend aborts during suspend-to-idle 2018-05-30 07:52:39 +02:00
perf drivers/perf: xgene_pmu: Fix IOB SLOW PMU parser error 2018-08-24 13:08:59 +02:00
phy phy: phy-mtk-tphy: use auto instead of force to bypass utmi signals 2018-08-15 18:12:48 +02:00
pinctrl pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant 2018-09-26 08:38:13 +02:00
platform platform/x86: alienware-wmi: Correct a memory leak 2018-09-29 03:06:03 -07:00
pnp
power power: remove possible deadlock when unregistering power_supply 2018-10-03 17:00:47 -07:00
powercap
pps
ps3
ptp ptp: fix missing break in switch 2018-07-25 11:25:10 +02:00
pwm pwm: meson: Fix mux clock names 2018-09-15 09:45:27 +02:00
rapidio
ras
regulator regulator: fix crash caused by null driver data 2018-10-03 17:00:55 -07:00
remoteproc remoteproc: qcom: Fix potential device node leaks 2018-06-21 04:02:48 +09:00
reset reset: imx7: Fix always writing bits as 0 2018-09-26 08:38:03 +02:00
rpmsg Revert "rpmsg: core: add support to power domains for devices" 2018-09-29 03:06:04 -07:00
rtc rtc: bq4802: add error handling for devm_ioremap 2018-09-26 08:38:13 +02:00
s390 s390/qeth: don't dump past end of unknown HW header 2018-10-10 08:54:26 +02:00
sbus
scsi scsi: qedi: Add the CRC size within iSCSI NVM image 2018-10-10 08:54:23 +02:00
sfi
sh
sn
soc soc: imx: gpc: restrict register range for regmap access 2018-08-24 13:09:19 +02:00
spi spi: rspi: Fix interrupted DMA transfers 2018-10-03 17:00:55 -07:00
spmi
ssb
staging staging: android: ashmem: Fix mmap size validation 2018-10-03 17:00:50 -07:00
target scsi: iscsi: target: Set conn->sess to NULL when iscsi_login_set_conn_values fails 2018-10-10 08:54:23 +02:00
tc
tee tee: check shm references are consistent in offset/size 2018-06-21 04:02:54 +09:00
thermal thermal: of-thermal: disable passive polling when thermal zone is disabled 2018-10-03 17:00:57 -07:00
thunderbolt thunderbolt: Prevent crash when ICM firmware is not running 2018-04-24 09:36:29 +02:00
tty serial: mvebu-uart: Fix reporting of effective CSIZE to userspace 2018-10-10 08:54:18 +02:00
uio uio: potential double frees if __uio_register_device() fails 2018-09-19 22:43:40 +02:00
usb USB: yurex: Check for truncation in yurex_read() 2018-10-10 08:54:24 +02:00
uwb uwb: hwa-rc: fix memory leak at probe 2018-10-03 17:00:46 -07:00
vfio vfio/type1: Fix task tracking for QEMU vCPU hotplug 2018-08-03 07:50:23 +02:00
vhost vhost: correctly check the iova range when waking virtqueue 2018-09-15 09:45:25 +02:00
video fbdev/omapfb: fix omapfb_memory_read infoleak 2018-10-13 09:27:23 +02:00
virt
virtio virtio: pci-legacy: Validate queue pfn 2018-09-15 09:45:27 +02:00
vlynq
vme
w1 1wire: family module autoload fails because of upper/lower case mismatch. 2018-07-03 11:24:47 +02:00
watchdog watchdog: da9063: Fix updating timeout value 2018-08-03 07:50:24 +02:00
xen xen: fix GCC warning and remove duplicate EVTCHN_ROW/EVTCHN_COL usage 2018-10-10 08:54:26 +02:00
zorro zorro: Set up z->dev.dma_mask for the DMA API 2018-05-30 07:52:30 +02:00
Kconfig
Makefile usb: build drivers/usb/common/ when USB_SUPPORT is set 2018-02-25 11:07:53 +01:00