linux/drivers/gpu/drm/panfrost
Boris Brezillon 1fc9af813b drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr()
Subject: [PATCH] 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
2024-04-04 18:11:01 +03: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 drm/panfrost: Add support for devcoredump 2022-08-08 12:39:55 +01:00
panfrost_features.h drm/panfrost: Add Mali-G57 "Natt" support 2022-05-26 09:53:38 -04:00
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-03-28 16:23:10 +00:00
panfrost_gpu.h drm/panfrost: Synchronize and disable interrupts before powering off 2023-12-05 11:39:59 +01:00
panfrost_issues.h drm/panfrost: Add Mali-G57 "Natt" support 2022-05-26 09:53:38 -04:00
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-04 18:11:01 +03:00
panfrost_mmu.h drm/panfrost: Synchronize and disable interrupts before powering off 2023-12-05 11:39:59 +01:00
panfrost_perfcnt.c drm/gem: Take reservation lock for vmap/vunmap operations 2022-10-18 01:21:38 +03:00
panfrost_perfcnt.h drm/panfrost: Open/close the perfcnt BO 2019-12-06 11:06:20 -06:00
panfrost_regs.h drm/panfrost: Perform hard reset to recover GPU if soft reset fails 2023-11-10 14:11:25 +00:00