Skip to content

Commit 1ab7827

Browse files
committed
FROMLIST: drm/xe/query: use PAGE_SIZE as the minimum page alignment
As this component hooks into userspace API, it should be assumed that it will play well with non-4K/64K pages. Use `PAGE_SIZE' as the final reference for page alignment instead. Cc: stable@vger.kernel.org Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Fixes: 801989b ("drm/xe/uapi: Make constant comments visible in kernel doc") Tested-by: Mingcong Bai <jeffbai@aosc.io> Tested-by: Haien Liang <27873200@qq.com> Tested-by: Shirong Liu <lsr1024@qq.com> Tested-by: Haofeng Wu <s2600cw2@126.com> Link: FanFansfan@22c55ab Co-developed-by: Shang Yatsen <429839446@qq.com> Signed-off-by: Shang Yatsen <429839446@qq.com> Signed-off-by: Mingcong Bai <jeffbai@aosc.io> Link: https://lore.kernel.org/all/20250613-upstream-xe-non-4k-v2-v2-1-934f82249f8a@aosc.io/ Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
1 parent 8a5cdf6 commit 1ab7827

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/xe/xe_query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static int query_config(struct xe_device *xe, struct drm_xe_device_query *query)
344344
config->info[DRM_XE_QUERY_CONFIG_FLAGS] |=
345345
DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY;
346346
config->info[DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT] =
347-
xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K ? SZ_64K : SZ_4K;
347+
xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K ? SZ_64K : PAGE_SIZE;
348348
config->info[DRM_XE_QUERY_CONFIG_VA_BITS] = xe->info.va_bits;
349349
config->info[DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY] =
350350
xe_exec_queue_device_get_max_priority(xe);

include/uapi/drm/xe_drm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ struct drm_xe_query_mem_regions {
413413
* device supports the userspace hint %DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION.
414414
* This is exposed only on Xe2+.
415415
* - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment
416-
* required by this device, typically SZ_4K or SZ_64K
416+
* required by this device, typically PAGE_SIZE.
417417
* - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address
418418
* - %DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY - Value of the highest
419419
* available exec queue priority

0 commit comments

Comments
 (0)