Re: [PATCH v2 1/4] drm/panfrost: Simplify lock_region calculation

2021-08-25 Thread Steven Price
On 24/08/2021 18:30, Alyssa Rosenzweig wrote: > In lock_region, simplify the calculation of the region_width parameter. > This field is the size, but encoded as ceil(log2(size)) - 1. > ceil(log2(size)) may be computed directly as fls(size - 1). However, we > want to use the 64-bit versions as the a

[PATCH v2 1/4] drm/panfrost: Simplify lock_region calculation

2021-08-24 Thread Alyssa Rosenzweig
In lock_region, simplify the calculation of the region_width parameter. This field is the size, but encoded as ceil(log2(size)) - 1. ceil(log2(size)) may be computed directly as fls(size - 1). However, we want to use the 64-bit versions as the amount to lock can exceed 32-bits. This avoids undefin