[Intel-xe] [PATCH 02/15] drm/xe/stolen: don't map stolen on small-bar

Lucas De Marchi lucas.demarchi at intel.com
Tue Feb 14 16:11:21 UTC 2023


On Tue, Feb 14, 2023 at 11:21:23AM +0000, Matthew Auld wrote:
>The driver should still be functional with small-bar, just that the vram
>size is clamped to the BAR size (until we add proper support for tiered
>vram). For stolen we shouldn't iomap anything if the BAR size doesn't
>also also contain the stolen portion. Stolen should still be functional,

maybe a sentence that for the known platforms stolen is on top of
of the device memory, so if BAR2 doesn't cover all the memory, it's not
accessible?


>just that allocating CPU visible io memory will always return an error.
>
>Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/209
>Reported-by: Lucas De Marchi <lucas.demarchi at intel.com>
>Signed-off-by: Matthew Auld <matthew.auld at intel.com>
>---
> drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
>index b4e9c88644e4..e5a992ce432a 100644
>--- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
>+++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
>@@ -150,7 +150,7 @@ void xe_ttm_stolen_mgr_init(struct xe_device *xe)
> 	drm_dbg_kms(&xe->drm, "Initialized stolen memory support with %llu bytes\n",
> 		    stolen_size);
>
>-	if (!xe_ttm_stolen_inaccessible(xe))
>+	if (mgr->io_base && !xe_ttm_stolen_inaccessible(xe))


what I wrote above made me think:  shouldn't the check for mgr->io_base
be in the xe_ttm_stolen_inaccessible()? or should we differentiate
between CPU vs GPU accessible?

Lucas De Marchi

> 		mgr->mapping = devm_ioremap_wc(&pdev->dev, mgr->io_base, stolen_size);
> }
>
>-- 
>2.39.1
>


More information about the Intel-xe mailing list