linux-stable/drivers/gpu/drm/panfrost
Boris Brezillon e18070c622 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:23:37 +02:00
..
Kconfig drm/panfrost: fix GENERIC_ATOMIC64 dependency 2023-01-18 11:09:57 +00:00
Makefile drm/panfrost: Add fdinfo support GPU load metrics 2023-10-04 13:04:15 +02:00
TODO
panfrost_debugfs.c drm/panfrost: Add fdinfo support GPU load metrics 2023-10-04 13:04:15 +02:00
panfrost_debugfs.h drm/panfrost: Add fdinfo support GPU load metrics 2023-10-04 13:04:15 +02:00
panfrost_devfreq.c drm/panfrost: Fix incorrect updating of current device frequency 2023-11-30 10:53:42 +00:00
panfrost_devfreq.h drm/panfrost: Add fdinfo support GPU load metrics 2023-10-04 13:04:15 +02:00
panfrost_device.c drm/panfrost: Synchronize and disable interrupts before powering off 2023-12-05 11:39:59 +01:00
panfrost_device.h drm/panfrost: Synchronize and disable interrupts before powering off 2023-12-05 11:39:59 +01:00
panfrost_drv.c Merge drm/drm-next into drm-misc-next 2023-11-15 10:56:44 +01:00
panfrost_dump.c drm/panfrost: Remove incorrect IS_ERR() check 2023-10-30 15:00:14 +00:00
panfrost_dump.h
panfrost_features.h
panfrost_gem.c drm/panfrost: Consider dma-buf imported objects as resident 2023-11-30 10:53:07 +00:00
panfrost_gem.h Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
panfrost_gem_shrinker.c drm/panfrost: dynamically allocate the drm-panfrost shrinker 2023-10-04 10:32:25 -07:00
panfrost_gpu.c drm/panfrost: fix power transition timeout warnings 2024-04-10 16:38:10 +02:00
panfrost_gpu.h drm/panfrost: Synchronize and disable interrupts before powering off 2023-12-05 11:39:59 +01:00
panfrost_issues.h
panfrost_job.c drm/panfrost: Synchronize and disable interrupts before powering off 2023-12-05 11:39:59 +01:00
panfrost_job.h drm/panfrost: Synchronize and disable interrupts before powering off 2023-12-05 11:39:59 +01:00
panfrost_mmu.c drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr() 2024-04-17 11:23:37 +02:00
panfrost_mmu.h drm/panfrost: Synchronize and disable interrupts before powering off 2023-12-05 11:39:59 +01:00
panfrost_perfcnt.c
panfrost_perfcnt.h
panfrost_regs.h drm/panfrost: Perform hard reset to recover GPU if soft reset fails 2023-11-10 14:11:25 +00:00