mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
Staging: fbtft: Fix bug in fbtft-core
Commit367e8560e8
introduced a bug in fbtft-core where fps is always 0, this is because variable update_time is not assigned correctly. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Fixes:367e8560e8
("Staging: fbtbt: Replace timespec with ktime_t") Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
23bf40424a
commit
fc1e2c8ea8
1 changed files with 2 additions and 2 deletions
|
@ -391,11 +391,11 @@ static void fbtft_update_display(struct fbtft_par *par, unsigned int start_line,
|
|||
|
||||
if (unlikely(timeit)) {
|
||||
ts_end = ktime_get();
|
||||
if (ktime_to_ns(par->update_time))
|
||||
if (!ktime_to_ns(par->update_time))
|
||||
par->update_time = ts_start;
|
||||
|
||||
par->update_time = ts_start;
|
||||
fps = ktime_us_delta(ts_start, par->update_time);
|
||||
par->update_time = ts_start;
|
||||
fps = fps ? 1000000 / fps : 0;
|
||||
|
||||
throughput = ktime_us_delta(ts_end, ts_start);
|
||||
|
|
Loading…
Reference in a new issue