Re: [PATCH v2, 3/3] mt8183: emi: add bandwidth driver support

Hsin-Yi Wang
2019-07-11T06:58:55Z

On Thu, Jul 11, 2019 at 2:43 PM Xi Chen <xixi.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> wrote:

> I understand your idea, but emi driver stores the last 67ms bandwidth,
> and just the last 67ms, not all the time. So, we will move the array
> elements every 1ms.

We can still don't need to move the array elements every 1 ms for
keeping last 67ms.
The idea is like

original:
st ed
| |
0, 1, 2, 3, .... 66

insert 67, move st and ed by 1, and 67 inserted to ed position:
ed st
| |
67, 1, 2, 3,... 66

insert 68, move st and ed by 1, and 68 inserted to ed position:
ed st
| |
67, 68, 2, 3,... 66

But might be more complicated to implement this than current code, and
array size is small, so just an idea for your reference.