Oh, I though we have fixed all of those.
Basic idea is that TTM always only works with bytes or rather arbitrary
units in the resource backend instead of pages. Background is that we
have resources like GDS, GWS and OA which are allocated in units of 4
bytes (GDS) or arbitrary hardware engine units (GWS, OA).
Because of this Amar, Thomas and me have been working on removing all
references to PAGE_SHIFT and PAGE_SIZE from this part, but looks like we
have missed Nouveau.
So yes, Nouveau needs a change here.
Regards,
Christian.
Am 26.02.24 um 08:34 schrieb Dave Airlie:
This is probably something I knew about and forgot, but I'll ask if
anyone has considered cleaning it up (or maybe I should fix nouveau).
nouveau sets up the resource manager using vram_size >> PAGE_SHIFT as
the bounds, but the bo sizes are in bytes, hence usage ends up being
accounted in bytes, so we have usage > size which looks wierd and also
caused me to screw up adding an ioctl for userspace.
Should I just make nouveau use vram_size instead?
Dave.