[PATCH 2/2] drm/amdgpu: handle all fragment sizes v3

Christian König deathsimple at vodafone.de
Thu Aug 31 08:11:48 UTC 2017


Am 31.08.2017 um 04:00 schrieb zhoucm1:
>
>
> On 2017年08月30日 21:48, Christian König wrote:
>> [SNIP]
>> +    while (start != end) {
>> +        /* This intentionally wraps around if no bit is set */
>> +        frag = min(ffs(start), fls64(end - start)) - 1;
>> +        if (frag >= max_frag)
>> +            break;
> Seem we can simplify more, frag = min(frag, max_frag) instead of 
> break, this way, one while will solve all loop.

It's not so easy, but still an interesting idea.

Need to change the handling a bit, but going to give that a try in the v4.

Christian.


More information about the amd-gfx mailing list