diff options
author | Matthew Auld <matthew.auld@intel.com> | 2023-03-14 11:58:38 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:29:47 +0300 |
commit | 69db25e447b8a3b9153db8a9004c50b080d0497e (patch) | |
tree | d186412b621f37059d4f9026a7ecc9aa93ebdaa5 /drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h | |
parent | ddad061e8fbcba69bbdd9ee05b1749810c419920 (diff) | |
download | linux-69db25e447b8a3b9153db8a9004c50b080d0497e.tar.xz |
drm/xe: add xe_ttm_stolen_cpu_access_needs_ggtt()
xe_ttm_stolen_cpu_inaccessible() was originally meant to just cover the
case where stolen is not directly CPU accessible on some older
integrated platforms, and as such a GGTT mapping was also required for
CPU access (as per the check in xe_bo_create_pin_map_at()).
However with small-bar systems on dgfx we have one more case where
stolen is also inaccessible, however here we don't have any fallback
GGTT mode for CPU access. Fix the check in xe_bo_create_pin_map_at() to
make this distinction clear. In such a case the later vmap() will fail
anyway.
v2: fix kernel-doc warning
v3: Simplify further and remove cpu_inaccessible()
Suggested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h index 2fda97b97a05..1777245ff810 100644 --- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h +++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h @@ -14,7 +14,7 @@ struct xe_device; void xe_ttm_stolen_mgr_init(struct xe_device *xe); int xe_ttm_stolen_io_mem_reserve(struct xe_device *xe, struct ttm_resource *mem); -bool xe_ttm_stolen_cpu_inaccessible(struct xe_device *xe); +bool xe_ttm_stolen_cpu_access_needs_ggtt(struct xe_device *xe); u64 xe_ttm_stolen_io_offset(struct xe_bo *bo, u32 offset); u64 xe_ttm_stolen_gpu_offset(struct xe_device *xe); |