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

2021-08-23 Thread Steven Price
On 23 August 2021 22:09:08 BST, Alyssa Rosenzweig wrote: >> > In lock_region, simplify the calculation of the region_width parameter. >> > This field is the size, but encoded as log2(ceil(size)) - 1. >> > log2(ceil(size)) may be computed directly as fls(size - 1). However, we >> > want to use the

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

2021-08-23 Thread Alyssa Rosenzweig
> > In lock_region, simplify the calculation of the region_width parameter. > > This field is the size, but encoded as log2(ceil(size)) - 1. > > log2(ceil(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.

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

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

[PATCH 1/3] drm/panfrost: Simplify lock_region calculation

2021-08-20 Thread Alyssa Rosenzweig
In lock_region, simplify the calculation of the region_width parameter. This field is the size, but encoded as log2(ceil(size)) - 1. log2(ceil(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