diff options
author | Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> | 2023-10-12 16:52:08 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:44:32 +0300 |
commit | ff180adfb923b2619f6a46c5a369d833b543a9f1 (patch) | |
tree | 261d5940dc416af2102d821cdd0644dd7ac6a630 /drivers/gpu/drm/xe/display | |
parent | 95ab70f134d837a566f2d998b3090f40227a1b60 (diff) | |
download | linux-ff180adfb923b2619f6a46c5a369d833b543a9f1.tar.xz |
drm/xe/display: Don't try to use vram if not available
Trying to get bo from vram when vram not available will cause
WARN_ON() hence avoid touching vram if not available.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/display')
-rw-r--r-- | drivers/gpu/drm/xe/display/xe_fb_pin.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c index 16e04b24daee..9fc2147a2f10 100644 --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c @@ -62,11 +62,12 @@ static int __xe_pin_fb_vma_dpt(struct intel_framebuffer *fb, dpt_size = ALIGN(intel_rotation_info_size(&view->rotated) * 8, XE_PAGE_SIZE); - dpt = xe_bo_create_pin_map(xe, tile0, NULL, dpt_size, - ttm_bo_type_kernel, - XE_BO_CREATE_VRAM0_BIT | - XE_BO_CREATE_GGTT_BIT); - if (IS_ERR(dpt)) + if (IS_DGFX(xe)) + dpt = xe_bo_create_pin_map(xe, tile0, NULL, dpt_size, + ttm_bo_type_kernel, + XE_BO_CREATE_VRAM0_BIT | + XE_BO_CREATE_GGTT_BIT); + else dpt = xe_bo_create_pin_map(xe, tile0, NULL, dpt_size, ttm_bo_type_kernel, XE_BO_CREATE_STOLEN_BIT | |