drm/ttm: Add ttm_bo_kmap_try_from_panic()
authorJocelyn Falempe <jfalempe@redhat.com>
Tue, 24 Jun 2025 09:01:14 +0000 (11:01 +0200)
committerMaarten Lankhorst <dev@lankhorst.se>
Fri, 27 Jun 2025 09:48:22 +0000 (11:48 +0200)
commit718370ff283284f191155a5eb9d4f376aaf93bb8
tree8ec303218effc21b9c097bfaa0378172c10448c5
parent796f437d7bc9ff0a5099fa2b8018c9736877555b
drm/ttm: Add ttm_bo_kmap_try_from_panic()

If the ttm bo is backed by pages, then it's possible to safely kmap
one page at a time, using kmap_try_from_panic().
Unfortunately there is no way to do the same with ioremap, so it
only supports the kmap case.
This is needed for proper drm_panic support with xe driver.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250624091501.257661-6-jfalempe@redhat.com
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
drivers/gpu/drm/ttm/ttm_bo_util.c
include/drm/ttm/ttm_bo.h