linux_dsm_epyc7002/drivers/gpu/drm/nouveau
Luca Barbieri d051bbb22e drm/nouveau: Acknowledge DMA_VTX_PROTECTION PGRAPH interrupts
Currently Nouveau is unable to dismiss DMA_VTX_PROTECTION errors,
which results in an infinite loop in the interrupt handler.

These errors are caused both by bugs in the Gallium driver and by
user-specified index buffers with out of bounds indices.

By mmio-tracing the nVidia drivers, I found out how this is done.
On DMA_VTX_PROTECTION, The nVidia driver reads the register 0x402000,
always getting the value 4, and then writes 4 back to 0x402000.

This patch adds that logic by reading 0x402000 and writing the same
value back.
It's unclear what should happen if the value read is not 4, and
the current approach might not be the correct one.

To test this, modify mesa/progs/trivial/vbo-drawrange.c, defining
ELTOBJ to 1 and replacing indices with huge out of bounds integers.

Without this patch, the GPU and/or kernel should lock up.
With this patch, it should misrender as expected but not lock up.

The errors are still logged since they are useful for development.

This has been tested on NV49 and may not work on other cards.

To find out how things work on other cards, run the aforementioned
test using the blob with mmiotrace and grep for a read of the PGRAPH
source register.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-18 09:56:03 +10:00
..
Kconfig drm/i2c/ch7006: Drop build time dependency to nouveau. 2010-01-11 09:06:30 +10:00
Makefile drm/nv40: implement ctxprog/state generation 2009-12-16 17:05:39 +10:00
nouveau_acpi.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_backlight.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_bios.c drm/nouveau: Break some long lines. 2010-01-15 09:28:10 +10:00
nouveau_bios.h drm/nouveau: Kill global state in BIOS script interpreter 2009-12-16 17:05:02 +10:00
nouveau_bo.c drm/nouveau: wait on fence after bo move if validating for another channel 2010-01-14 18:48:38 +10:00
nouveau_calc.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_channel.c drm/nouveau: initialise DMA tracking parameters earlier 2010-01-11 09:06:45 +10:00
nouveau_connector.c drm/nouveau: Unset the EDID connector property when the EDID block goes away. 2010-01-15 09:29:35 +10:00
nouveau_connector.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_crtc.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_debugfs.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_display.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_dma.c drm/nouveau: fix a race condition in nouveau_dma_wait() 2010-01-18 09:55:48 +10:00
nouveau_dma.h drm/nouveau: Allocate a per-channel instance of NV_SW. 2010-01-11 09:06:37 +10:00
nouveau_dp.c drm/nouveau: use drm debug levels 2009-12-16 17:04:48 +10:00
nouveau_drv.c Merge remote branch 'nouveau/for-airlied' into drm-linus 2009-12-23 10:28:24 +10:00
nouveau_drv.h drm/nouveau: reserve VGA area for the moment 2010-01-15 09:29:38 +10:00
nouveau_encoder.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_fb.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_fbcon.c drm/nouveau: create function for "dealing" with gpu lockup 2010-01-11 09:06:40 +10:00
nouveau_fbcon.h drm/nouveau: create function for "dealing" with gpu lockup 2010-01-11 09:06:40 +10:00
nouveau_fence.c drm/nouveau: Use the software object for fencing. 2010-01-11 09:06:38 +10:00
nouveau_gem.c drm/nouveau: check pushbuffer bounds in ioctl 2010-01-15 09:56:50 +10:00
nouveau_grctx.c drm/nv50: fix suspend/resume delays without firmware present 2009-12-16 17:06:05 +10:00
nouveau_grctx.h drm/nv40: implement ctxprog/state generation 2009-12-16 17:05:39 +10:00
nouveau_hw.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_hw.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_i2c.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_i2c.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_ioc32.c drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
nouveau_irq.c drm/nouveau: Acknowledge DMA_VTX_PROTECTION PGRAPH interrupts 2010-01-18 09:56:03 +10:00
nouveau_mem.c drm/nouveau: reserve VGA area for the moment 2010-01-15 09:29:38 +10:00
nouveau_notifier.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_object.c drm/nouveau: Allocate a per-channel instance of NV_SW. 2010-01-11 09:06:37 +10:00
nouveau_reg.h drm/nouveau: Pre-G80 tiling support. 2010-01-11 08:47:56 +10:00
nouveau_sgdma.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nouveau_state.c drm/nv04: differentiate between nv04/nv05 2010-01-11 09:06:44 +10:00
nouveau_ttm.c drm/nouveau: have ttm's fault handler called directly 2010-01-11 09:06:42 +10:00
nv04_crtc.c drm/nouveau: use drm debug levels 2009-12-16 17:04:48 +10:00
nv04_cursor.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv04_dac.c drm/nouveau: Clean up the nv17-nv4x load detection code a bit. 2010-01-11 09:06:34 +10:00
nv04_dfp.c drm/nouveau: use drm debug levels 2009-12-16 17:04:48 +10:00
nv04_display.c drm/nouveau: use drm debug levels 2009-12-16 17:04:48 +10:00
nv04_fb.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv04_fbcon.c drm/nouveau: create function for "dealing" with gpu lockup 2010-01-11 09:06:40 +10:00
nv04_fifo.c drm/nouveau: Add cache_flush/pull fifo engine functions. 2010-01-11 08:47:48 +10:00
nv04_graph.c drm/nv04: Fix set_operation software method. 2010-01-11 09:06:53 +10:00
nv04_instmem.c drm/nouveau: fix thinko in nv04_instmem.c 2010-01-18 09:55:54 +10:00
nv04_mc.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv04_timer.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv04_tv.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv10_fb.c drm/nouveau: Pre-G80 tiling support. 2010-01-11 08:47:56 +10:00
nv10_fifo.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv10_graph.c drm/nouveau: Pre-G80 tiling support. 2010-01-11 08:47:56 +10:00
nv17_gpio.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv17_tv_modes.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv17_tv.c drm/nouveau: Implement nv42-nv43 TV load detection. 2010-01-11 09:06:35 +10:00
nv17_tv.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv20_graph.c drm/nouveau: Pre-G80 tiling support. 2010-01-11 08:47:56 +10:00
nv40_fb.c drm/nouveau: Pre-G80 tiling support. 2010-01-11 08:47:56 +10:00
nv40_fifo.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv40_graph.c drm/nouveau: Pre-G80 tiling support. 2010-01-11 08:47:56 +10:00
nv40_grctx.c drm/nv40: implement ctxprog/state generation 2009-12-16 17:05:39 +10:00
nv40_mc.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv50_crtc.c drm/nouveau: use drm debug levels 2009-12-16 17:04:48 +10:00
nv50_cursor.c drm/nouveau: use drm debug levels 2009-12-16 17:04:48 +10:00
nv50_dac.c drm/nouveau: use drm debug levels 2009-12-16 17:04:48 +10:00
nv50_display.c drm/nv50: ignore vbios table's claim to the contrary if EDID says >8bpc 2010-01-11 09:06:32 +10:00
nv50_display.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv50_evo.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv50_fbcon.c drm/nouveau: create function for "dealing" with gpu lockup 2010-01-11 09:06:40 +10:00
nv50_fifo.c drm/nv50: restore correct cache1 get/put address on fifoctx load 2010-01-11 09:06:41 +10:00
nv50_graph.c drm/nv50: Fix typo in PGRAPH initialisation. 2010-01-14 18:49:05 +10:00
nv50_instmem.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv50_mc.c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
nv50_sor.c drm/nouveau: use drm debug levels 2009-12-16 17:04:48 +10:00
nvreg.h drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00