[Intel-xe] [PATCH v2 12/30] fixup! drm/xe/display: Implement display support
Lucas De Marchi
lucas.demarchi at intel.com
Fri May 26 21:14:00 UTC 2023
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
Lucas De Marchi
On Fri, May 19, 2023 at 04:18:09PM -0700, Matt Roper wrote:
>---
> drivers/gpu/drm/i915/display/intel_dsb.c | 5 +++--
> drivers/gpu/drm/i915/display/intel_fbc.c | 3 ++-
> drivers/gpu/drm/i915/display/intel_fbdev.c | 7 ++++---
> drivers/gpu/drm/xe/display/xe_fb_pin.c | 7 ++++---
> drivers/gpu/drm/xe/display/xe_plane_initial.c | 2 +-
> 5 files changed, 14 insertions(+), 10 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
>index 7c93580282b4..3830309aacf4 100644
>--- a/drivers/gpu/drm/i915/display/intel_dsb.c
>+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
>@@ -379,9 +379,10 @@ struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
> #else
> /* ~1 qword per instruction, full cachelines */
> size = ALIGN(max_cmds * 8, 64);
>- obj = xe_bo_create_pin_map(i915, to_gt(i915), NULL, PAGE_ALIGN(size),
>+ obj = xe_bo_create_pin_map(i915, xe_device_get_root_tile(i915),
>+ NULL, PAGE_ALIGN(size),
> ttm_bo_type_kernel,
>- XE_BO_CREATE_VRAM_IF_DGFX(to_gt(i915)) |
>+ XE_BO_CREATE_VRAM_IF_DGFX(xe_device_get_root_tile(i915)) |
> XE_BO_CREATE_GGTT_BIT);
> if (IS_ERR(obj)) {
> kfree(dsb);
>diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
>index 9dc7083fe974..0e8e899f596b 100644
>--- a/drivers/gpu/drm/i915/display/intel_fbc.c
>+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
>@@ -71,7 +71,8 @@ static int i915_gem_stolen_insert_node_in_range(struct xe_device *xe, struct xe_
> int err;
> u32 flags = XE_BO_CREATE_PINNED_BIT | XE_BO_CREATE_STOLEN_BIT;
>
>- *bo = xe_bo_create_locked_range(xe, to_gt(xe), NULL, size, start, end,
>+ *bo = xe_bo_create_locked_range(xe, xe_device_get_root_tile(xe),
>+ NULL, size, start, end,
> ttm_bo_type_kernel, flags);
> if (IS_ERR(*bo)) {
> err = PTR_ERR(*bo);
>diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
>index 95f4cbc2e675..ebb07d0ccff6 100644
>--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
>+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
>@@ -210,7 +210,8 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
> }
> #else
> if (!IS_DGFX(dev_priv)) {
>- obj = xe_bo_create_pin_map(dev_priv, to_gt(dev_priv), NULL, size,
>+ obj = xe_bo_create_pin_map(dev_priv, xe_device_get_root_tile(dev_priv),
>+ NULL, size,
> ttm_bo_type_kernel, XE_BO_SCANOUT_BIT |
> XE_BO_CREATE_STOLEN_BIT |
> XE_BO_CREATE_PINNED_BIT);
>@@ -220,9 +221,9 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
> drm_info(&dev_priv->drm, "Allocated fbdev into stolen failed: %li\n", PTR_ERR(obj));
> }
> if (IS_ERR(obj)) {
>- obj = xe_bo_create_pin_map(dev_priv, to_gt(dev_priv), NULL, size,
>+ obj = xe_bo_create_pin_map(dev_priv, xe_device_get_root_tile(dev_priv), NULL, size,
> ttm_bo_type_kernel, XE_BO_SCANOUT_BIT |
>- XE_BO_CREATE_VRAM_IF_DGFX(to_gt(dev_priv)) |
>+ XE_BO_CREATE_VRAM_IF_DGFX(xe_device_get_root_tile(dev_priv)) |
> XE_BO_CREATE_PINNED_BIT);
> }
> #endif
>diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
>index 27e4d29aa73d..97e9be79b154 100644
>--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
>+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
>@@ -45,6 +45,7 @@ static int __xe_pin_fb_vma_dpt(struct intel_framebuffer *fb,
> struct i915_vma *vma)
> {
> struct xe_device *xe = to_xe_device(fb->base.dev);
>+ struct xe_tile *tile0 = xe_device_get_root_tile(xe);
> struct xe_bo *bo = intel_fb_obj(&fb->base), *dpt;
> u32 dpt_size, size = bo->ttm.base.size;
>
>@@ -55,17 +56,17 @@ 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, to_gt(xe), NULL, dpt_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))
>- dpt = xe_bo_create_pin_map(xe, to_gt(xe), NULL, dpt_size,
>+ dpt = xe_bo_create_pin_map(xe, tile0, NULL, dpt_size,
> ttm_bo_type_kernel,
> XE_BO_CREATE_STOLEN_BIT |
> XE_BO_CREATE_GGTT_BIT);
> if (IS_ERR(dpt))
>- dpt = xe_bo_create_pin_map(xe, to_gt(xe), NULL, dpt_size,
>+ dpt = xe_bo_create_pin_map(xe, tile0, NULL, dpt_size,
> ttm_bo_type_kernel,
> XE_BO_CREATE_SYSTEM_BIT |
> XE_BO_CREATE_GGTT_BIT);
>diff --git a/drivers/gpu/drm/xe/display/xe_plane_initial.c b/drivers/gpu/drm/xe/display/xe_plane_initial.c
>index 39dd97acae08..99c35a4ef673 100644
>--- a/drivers/gpu/drm/xe/display/xe_plane_initial.c
>+++ b/drivers/gpu/drm/xe/display/xe_plane_initial.c
>@@ -115,7 +115,7 @@ initial_plane_bo(struct xe_device *xe,
> page_size);
> size -= base;
>
>- bo = xe_bo_create_pin_map_at(xe, &tile0->primary_gt, NULL, size, phys_base,
>+ bo = xe_bo_create_pin_map_at(xe, tile0, NULL, size, phys_base,
> ttm_bo_type_kernel, flags);
> if (IS_ERR(bo)) {
> drm_dbg(&xe->drm,
>--
>2.40.0
>
More information about the Intel-xe
mailing list