diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2023-01-13 01:25:36 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-12 22:06:00 +0300 |
commit | c343bacfad5db03c4156ff3a44e3a5547afb246f (patch) | |
tree | e857cf71da63a286712416799b50d0761aea754d /drivers/gpu/drm/xe/xe_bo.h | |
parent | 5e37266307df08f981d929c267bab6bfae8c4d53 (diff) | |
download | linux-c343bacfad5db03c4156ff3a44e3a5547afb246f.tar.xz |
drm/xe: Fix hidden gotcha regression with bo create
The bo_create ioctl relied on the internal ordering of memory regions to
be the same, make sure we don't allocate stolen instead of VRAM0.
Also remove a debug warning left in.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Philippe Lecluse <philippe.lecluse1@gmail.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_bo.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h index 8d8a3332dbc8..8c2cdbe51ab5 100644 --- a/drivers/gpu/drm/xe/xe_bo.h +++ b/drivers/gpu/drm/xe/xe_bo.h @@ -13,10 +13,12 @@ #define XE_DEFAULT_GTT_SIZE_MB 3072ULL /* 3GB by default */ #define XE_BO_CREATE_USER_BIT BIT(0) +/* The bits below need to be contiguous, or things break */ #define XE_BO_CREATE_SYSTEM_BIT BIT(1) -#define XE_BO_CREATE_STOLEN_BIT BIT(2) -#define XE_BO_CREATE_VRAM0_BIT BIT(3) -#define XE_BO_CREATE_VRAM1_BIT BIT(4) +#define XE_BO_CREATE_VRAM0_BIT BIT(2) +#define XE_BO_CREATE_VRAM1_BIT BIT(3) +/* -- */ +#define XE_BO_CREATE_STOLEN_BIT BIT(4) #define XE_BO_CREATE_VRAM_IF_DGFX(gt) \ (IS_DGFX(gt_to_xe(gt)) ? XE_BO_CREATE_VRAM0_BIT << gt->info.vram_id : \ XE_BO_CREATE_SYSTEM_BIT) |