Re: [PATCH v3 2/5] drm/nouveau/uvmm: Allow larger pages

From: M Henning

Date: Thu Oct 30 2025 - 20:52:48 EST


On Thu, Oct 30, 2025 at 7:04 PM Mohamed Ahmed
<mohamedahmedegypt2001@xxxxxxxxx> wrote:
> +static bool
> +op_map_aligned_to_page_shift(const struct drm_gpuva_op_map *op, u8 page_shift)
> +{
> + u64 non_page_bits = (1ULL << page_shift) - 1;
> +
> + return op->va.addr & non_page_bits == 0 &&
> + op->va.range & non_page_bits == 0 &&
> + op->gem.offset & non_page_bits == 0;
> +}

As discussed on irc/discord, this is buggy because it needs more
parenthesis 🤦‍♀️