Am 11.12.20 um 18:31 schrieb Darren Salt:
[SNIP]
If that isn't the case use fls() to get the highest set bit < 13.
That suggests that it'll be easiest to clear each bit after the corresponding
size is checked, I think.

Ok, well you don't seem to understand my constrain here: Never check more than one size!

Find the first valid size which is good for you and then try to resize to that one, if this doesn't work abort.

Also, this looks like it's adding complexity to
try to make rarely-executed code slightly faster in some cases (I can't see
it helping where available_sizes == 0x3F00, for example).

The intention here is not to make the code faster, but to prevent issues on system where we probe multiple GPUs at once.

Regards,
Christian.

Incidentally, is it worth trying to reduce the BAR size at all? Thinking
mainly of two situations – limiting the maximum size, and the BIOS having
allocated one much too large.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to