[Intel-xe] [PATCH 3/3] fixup! drm/xe/display: Implement display support

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Nov 14 21:12:33 UTC 2023


---
 drivers/gpu/drm/xe/display/xe_fb_pin.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index 602d35fc62eb..ffd35a59f405 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -249,6 +249,8 @@ static int __xe_pin_fb_vma_ggtt(struct intel_framebuffer *fb,
 static struct i915_vma *__xe_pin_fb_vma(struct intel_framebuffer *fb,
 					const struct i915_gtt_view *view)
 {
+	struct drm_device *dev = fb->base.dev;
+	struct xe_device *xe = to_xe_device(dev);
 	struct i915_vma *vma = kzalloc(sizeof(*vma), GFP_KERNEL);
 	struct xe_bo *bo = intel_fb_obj(&fb->base);
 	int ret;
@@ -281,7 +283,10 @@ static struct i915_vma *__xe_pin_fb_vma(struct intel_framebuffer *fb,
 	if (ret)
 		goto err;
 
-	ret = xe_bo_validate(bo, NULL, true);
+	if (IS_DGFX(xe))
+		ret = xe_bo_migrate(bo, XE_PL_VRAM0);
+	else
+		ret = xe_bo_validate(bo, NULL, true);
 	if (!ret)
 		ttm_bo_pin(&bo->ttm);
 	ttm_bo_unreserve(&bo->ttm);
-- 
2.41.0



More information about the Intel-xe mailing list