mirror-linux/drivers/gpu/drm/ttm
Thomas Hellström d2151c5d9d drm/ttm/pool: Fix ttm_pool_alloc error path
[ Upstream commit 379989e7cb ]

When hitting an error, the error path forgot to unmap dma mappings and
could call set_pages_wb() on already uncached pages.

Fix this by introducing a common ttm_pool_free_range() function that
does the right thing.

v2:
- Simplify that common function (Christian König)
v3:
- Rename that common function to ttm_pool_free_range() (Christian König)

Fixes: d099fc8f54 ("drm/ttm: new TT backend allocation pool v3")
Cc: Christian König <christian.koenig@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230404200650.11043-2-thomas.hellstrom@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:03:13 +09:00
..
Makefile
ttm_agp_backend.c
ttm_bo.c Merge tag 'drm-misc-next-2022-09-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2022-09-11 22:03:07 +10:00
ttm_bo_util.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
ttm_bo_vm.c
ttm_device.c drm/ttm: Fix a NULL pointer dereference 2023-03-22 13:33:56 +01:00
ttm_execbuf_util.c
ttm_module.c LoongArch: Add writecombine support for drm 2022-06-03 20:09:27 +08:00
ttm_module.h
ttm_pool.c drm/ttm/pool: Fix ttm_pool_alloc error path 2023-05-11 23:03:13 +09:00
ttm_range_manager.c drm/ttm: Implement intersect/compatible functions 2022-08-22 15:33:50 +02:00
ttm_resource.c drm/ttm: Switch to using the new res callback 2022-08-22 15:36:29 +02:00
ttm_sys_manager.c
ttm_tt.c