[Intel-xe] [PATCH v4 3/3] drm/xe/display: Don't try to use vram if not available
Ruhl, Michael J
michael.j.ruhl at intel.com
Fri Oct 6 17:30:21 UTC 2023
>-----Original Message-----
>From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Juha-
>Pekka Heikkila
>Sent: Friday, October 6, 2023 9:46 AM
>To: intel-xe at lists.freedesktop.org
>Subject: [Intel-xe] [PATCH v4 3/3] 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.
Looks reasonable.
Reviewed-by: Michael J. Ruhl <michael.j.ruhl at intel.com>
M
>Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
>---
> drivers/gpu/drm/xe/display/xe_fb_pin.c | 11 ++++++-----
> 1 file 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 e8e38091c8e6..c46fee304f92 100644
>--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
>+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
>@@ -96,11 +96,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 (tile0->mem.vram.usable_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);
>+ else
> dpt = xe_bo_create_pin_map(xe, tile0, NULL, dpt_size,
> ttm_bo_type_kernel,
> XE_BO_CREATE_STOLEN_BIT |
>--
>2.25.1
More information about the Intel-xe
mailing list