drm/xe: limit GGTT size to GUC_GGTT_TOP
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 14 Jun 2023 17:47:54 +0000 (10:47 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:34:42 +0000 (11:34 -0500)
commitab10e976fbda8349163ceee2ce99b2bfc97031b8
treed9dd64d7b922eb508852b8791d47a9381e2277f4
parentff063430caa810f2195d2390e79a990eb101c527
drm/xe: limit GGTT size to GUC_GGTT_TOP

The GuC can't access addresses above GUC_GGTT_TOP, so any GuC-accessible
objects can't be mapped above that offset. Instead of checking each
object to see if GuC may access it or not before mapping it, we just
limit the GGTT size to GUC_GGTT_TOP. This wastes a bit of address space
(about ~18 MBs, which is in addition to what already removed at the bottom
of the GGTT), but it is a good tradeoff to keep the code simple.

The in-code comment has also been updated to explain the limitation.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://lore.kernel.org/r/20230615002521.2587250-1-daniele.ceraolospurio@intel.com/
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_ggtt.c