Re: [PATCH v6 4/7] drm/xe: Introduce helpers for xe_vram size

Michal Wajdeczko <[email protected]>
Newsgroups org.freedesktop.lists.intel-xe
Message-ID <[email protected]>

On 8/12/2026 2:43 PM, Satyanarayana K V P wrote:
> Add a new xe_vram_alignment() and xe_vram_needs_64k() helpers to get the
> VRAM minimum alignment (4K vs 64K).
> 
> Signed-off-by: Satyanarayana K V P <[email protected]>
> Cc: Michal Wajdeczko <[email protected]>
> ---
> V5 -> V6:
> - New commit.
> ---

...

>  static u64 pf_get_min_spare_ggtt(struct xe_gt *gt)
> diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
> index dc975f595368..9af98f08b0e5 100644
> --- a/drivers/gpu/drm/xe/xe_query.c
> +++ b/drivers/gpu/drm/xe/xe_query.c
> @@ -289,8 +289,7 @@ static int query_mem_regions(struct xe_device *xe,
>  			mem_regions->mem_regions[mem_regions->num_mem_regions].instance =
>  				mem_regions->num_mem_regions;
>  			mem_regions->mem_regions[mem_regions->num_mem_regions].min_page_size =
> -				xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K ?
> -				SZ_64K : PAGE_SIZE;

it would be cleaner to post s/PAGE_SIZE/SZ_4K change separately
(to collect right acks) and then convert that into a helper 

> +				xe_vram_alignment(xe);
>  			mem_regions->mem_regions[mem_regions->num_mem_regions].total_size =
>  				man->size;
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.