linux-stable/drivers/gpu/drm/panfrost
Boris Brezillon 31806711e8 drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr()
commit 1fc9af813b upstream.

Subject: drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr()

If some the pages or sgt allocation failed, we shouldn't release the
pages ref we got earlier, otherwise we will end up with unbalanced
get/put_pages() calls. We should instead leave everything in place
and let the BO release function deal with extra cleanup when the object
is destroyed, or let the fault handler try again next time it's called.

Fixes: 187d292920 ("drm/panfrost: Add support for GPU heap allocations")
Cc: <stable@vger.kernel.org>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Co-developed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240105184624.508603-18-dmitry.osipenko@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-17 11:19:34 +02:00
..
Kconfig drm/panfrost: fix GENERIC_ATOMIC64 dependency 2023-01-18 11:09:57 +00:00
Makefile
TODO
panfrost_devfreq.c drm/panfrost: Skip speed binning on EOPNOTSUPP 2023-08-21 15:38:54 +01:00
panfrost_devfreq.h
panfrost_device.c drm: panfrost: Remove #ifdef guards for PM related functions 2022-12-12 13:07:01 +00:00
panfrost_device.h drm/panfrost: Increase MAX_PM_DOMAINS to 5 2023-03-23 10:43:17 +01:00
panfrost_drv.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
panfrost_dump.c drm-misc-next for 6.2: 2022-10-25 11:42:18 +10:00
panfrost_dump.h
panfrost_features.h
panfrost_gem.c drm/panfrost: Fix GEM handle creation ref-counting 2022-12-21 15:04:42 +00:00
panfrost_gem.h drm/panfrost: Fix GEM handle creation ref-counting 2022-12-21 15:04:42 +00:00
panfrost_gem_shrinker.c drm/shmem-helper: Switch to reservation lock 2023-06-21 20:22:20 +03:00
panfrost_gpu.c drm/panfrost: fix power transition timeout warnings 2024-04-10 16:35:58 +02:00
panfrost_gpu.h
panfrost_issues.h
panfrost_job.c drm/panfrost: Sync IRQ by job's timeout handler 2023-08-10 08:41:21 +02:00
panfrost_job.h
panfrost_mmu.c drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr() 2024-04-17 11:19:34 +02:00
panfrost_mmu.h
panfrost_perfcnt.c drm/gem: Take reservation lock for vmap/vunmap operations 2022-10-18 01:21:38 +03:00
panfrost_perfcnt.h
panfrost_regs.h