summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>2026-03-24 11:40:16 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2026-03-24 16:29:11 +0300
commitcce1c47726579f0974e12e03e8471053d29182da (patch)
tree9c55999354fc2e1b505642182624101e37632376
parent11dbd2d14663450111a6104a6d9aec5267405c86 (diff)
downloadlinux-cce1c47726579f0974e12e03e8471053d29182da.tar.xz
drm/xe/display: Respect remapped plane alignment
Instead of assuming PAGE_SIZE alignment between the remapped planes respect the value set in the struct intel_remapped_info. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Cc: Michael J. Ruhl <michael.j.ruhl@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20260324084018.20353-11-tvrtko.ursulin@igalia.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/xe/display/xe_fb_pin.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index ead70ee48028..23a7ec41f01d 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -83,9 +83,6 @@ write_dpt_remapped_tiled(struct xe_bo *bo, struct iosys_map *map,
plane->dst_stride - plane->width);
}
- /* Align to next page */
- dest = ALIGN(dest, XE_PAGE_SIZE);
-
return dest;
}
@@ -100,6 +97,18 @@ write_dpt_remapped(struct xe_bo *bo,
const struct intel_remapped_plane_info *plane =
&remap_info->plane[i];
+ if (!plane->linear && !plane->width && !plane->height)
+ continue;
+
+ if (dest && remap_info->plane_alignment) {
+ const unsigned int index = dest / sizeof(u64);
+ const unsigned int pad =
+ ALIGN(index, remap_info->plane_alignment) -
+ index;
+
+ dest = write_dpt_padding(map, dest, pad);
+ }
+
dest = write_dpt_remapped_tiled(bo, map, dest, plane);
}
}