linux-stable/drivers/gpu/drm/etnaviv
Lucas Stach 332f847212 drm/etnaviv: reap idle mapping if it doesn't match the softpin address
When a idle BO, which is held open by another process, gets freed by
userspace and subsequently referenced again by e.g. importing it again,
userspace may assign a different softpin VA than the last time around.
As the kernel GEM object still exists, we likely have a idle mapping
with the old VA still cached, if it hasn't been reaped in the meantime.

As the context matches, we then simply try to resurrect this mapping by
increasing the refcount. As the VA in this mapping does not match the
new softpin address, we consequently fail the otherwise valid submit.
Instead of failing, reap the idle mapping.

Cc: stable@vger.kernel.org # 5.19
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
2022-08-26 21:36:55 +02:00
..
cmdstream.xml.h
common.xml.h
etnaviv_buffer.c drm/etnaviv: return context from etnaviv_iommu_context_get 2021-09-16 10:34:59 +02:00
etnaviv_cmd_parser.c
etnaviv_cmdbuf.c
etnaviv_cmdbuf.h
etnaviv_drv.c drm/etnaviv: Make use of the helper component_compare_of/dev_name 2022-02-25 12:16:12 +01:00
etnaviv_drv.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
etnaviv_dump.c drm/etnaviv: dump: fix sparse warnings 2021-01-22 12:38:17 +01:00
etnaviv_dump.h
etnaviv_gem.c drm/etnaviv: reap idle mapping if it doesn't match the softpin address 2022-08-26 21:36:55 +02:00
etnaviv_gem.h drm/etnaviv: print offender task information on hangcheck recovery 2022-08-19 18:31:43 +02:00
etnaviv_gem_prime.c dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
etnaviv_gem_submit.c drm/etnaviv: print offender task information on hangcheck recovery 2022-08-19 18:31:43 +02:00
etnaviv_gpu.c drm/etnaviv: print offender task information on hangcheck recovery 2022-08-19 18:31:43 +02:00
etnaviv_gpu.h drm/etnaviv: print offender task information on hangcheck recovery 2022-08-19 18:31:43 +02:00
etnaviv_hwdb.c drm/etnaviv: add HWDB entry for GC7000 r6202 2021-07-06 18:31:26 +02:00
etnaviv_iommu.c drm/etnaviv: reference MMU context when setting up hardware state 2021-09-16 10:35:33 +02:00
etnaviv_iommu_v2.c drm/etnaviv: reference MMU context when setting up hardware state 2021-09-16 10:35:33 +02:00
etnaviv_mmu.c drm/etnaviv: move idle mapping reaping into separate function 2022-08-26 21:36:47 +02:00
etnaviv_mmu.h drm/etnaviv: move idle mapping reaping into separate function 2022-08-26 21:36:47 +02:00
etnaviv_perfmon.c drm/etnaviv: add pipe_select(..) helper 2020-09-25 12:02:58 +02:00
etnaviv_perfmon.h
etnaviv_sched.c drm/etnaviv: print offender task information on hangcheck recovery 2022-08-19 18:31:43 +02:00
etnaviv_sched.h drm/etnaviv: Use scheduler dependency handling 2022-04-04 16:45:49 +02:00
Kconfig
Makefile
state.xml.h
state_3d.xml.h
state_blt.xml.h
state_hi.xml.h