Unverified Commit cce1c477 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin Committed by Rodrigo Vivi
Browse files

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: default avatarTvrtko 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: default avatarUma Shankar <uma.shankar@intel.com>
Link: https://patch.msgid.link/20260324084018.20353-11-tvrtko.ursulin@igalia.com


Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 11dbd2d1
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -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);
	}
}