From: Andrzej Hajda Date: Thu, 18 Apr 2024 14:03:37 +0000 (+0200) Subject: drm/xe: allow unaligned start and size xe_res_cursor parameters X-Git-Tag: v6.11-rc1~141^2~26^2~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82e0b1299a3ef81a672398c547d8e7f553be793e;p=thirdparty%2Fkernel%2Flinux.git drm/xe: allow unaligned start and size xe_res_cursor parameters xe_res_cursor code does not depend on the alignment. On the other side unaligned accesses are useful from pread/pwrite point of view. Signed-off-by: Andrzej Hajda Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240418-xe_res_cursor-no-align-v1-1-8df7834266c9@intel.com Signed-off-by: Nirmoy Das --- diff --git a/drivers/gpu/drm/xe/xe_res_cursor.h b/drivers/gpu/drm/xe/xe_res_cursor.h index 0a306963aa8e5..655af89b31a98 100644 --- a/drivers/gpu/drm/xe/xe_res_cursor.h +++ b/drivers/gpu/drm/xe/xe_res_cursor.h @@ -157,8 +157,6 @@ static inline void xe_res_first_sg(const struct sg_table *sg, struct xe_res_cursor *cur) { XE_WARN_ON(!sg); - XE_WARN_ON(!IS_ALIGNED(start, PAGE_SIZE) || - !IS_ALIGNED(size, PAGE_SIZE)); cur->node = NULL; cur->start = start; cur->remaining = size;