[PATCH v2 3/3] drm/i915: Replaced hardcoded value 4095 with PAGE_SIZE - 1
Krzysztof Karas
krzysztof.karas at intel.com
Thu Jul 17 14:58:42 UTC 2025
Hi Sebastian,
> The value 4095 is most likely intended to represent PAGE_SIZE - 1.
Andi noticed in the previous version of this patch that
"most likely" might be too vague and I agree. The original
commit that introduced this magic number 4095:
5f22cc0b134ab702d7f64b714e26018f7288ffee, which explains a bit
why it was introduced:
"commit 48ea1e32c39d ("drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1
page") suggests that there is a genuine problem with stateless addressing
that cannot utilize the last page in 4G and so we purposefully excluded
it. This means that the quick pin pass may cause us to utilize a buggy
placement."
So in this case I'd assume that change from " - 1" to "+ 4095"
is indeed supposed to include that last page (which is of
PAGE_SIZE length).
Would you mind checking out that commit and seeing if you agree
with my assumptions? If yes, then please add a reference to the
commit 5f22cc0b134ab702d7f64b714e26018f7288ffee and change
"most likely" part in the commit message.
--
Best Regards,
Krzysztof
More information about the Intel-gfx
mailing list