mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
Staging: fbtft: Fix bug in fbtft-core
commitfc1e2c8ea8upstream. Commit367e8560e8introduced 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") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
62dd9cf78b
commit
be93c69e9b
@@ -392,11 +392,11 @@ static void fbtft_update_display(struct fbtft_par *par, unsigned 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);
|
||||
|
||||
Reference in New Issue
Block a user