On Mon, Feb 25, 2019 at 04:59:55PM +0000, Koenig, Christian wrote: > Am 25.02.19 um 17:39 schrieb Matthew Wilcox: > > On Mon, Feb 25, 2019 at 05:07:24PM +0100, Christian König wrote: > >>> -#define AMDGPU_VM_MAX_NUM_CTX 4096 > >>> +#define AMDGPU_VM_CTX_LIMIT XA_LIMIT(0, 4095) > >> IIRC we actually use 0 as reserved context value in some places. > > That's OK; the ALLOC1 prevents it from using index 0. > > > > You can change it to be XA_LIMIT(1, 4095) if you think that'll be clearer; > > it'll be slightly less efficient assembly (a 64-bit mov-immediate instead > > of a 32-bit mov-immediate), but it's your driver, so it's up to you. > > A code comment should do as well. > > But thinking more about it please DON'T actually change the > AMDGPU_VM_MAX_NUM_CTX define. > > That one needs to be used to calculate the reserved GPU space to map the > context save area, and I really don't want to deal with a XA_LIMIT in > that calculation :) > > I'm really wondering why that doesn't go up in a boom during compilation....
Maybe that code isn't merged in Linus' tree yet? I was basing this on 5.0-rc5 and there's no mention of AMDGPU_VM_MAX_NUM_CTX outside these usages. If I'd seen another usage, I wouldn't've changed it. The rebasing I'm going to have to do on -rc1 is going to be epically challenging. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel