Commit 27f0da96 authored by Ksenija Stanojevic's avatar Ksenija Stanojevic Committed by Seth Forshee

Staging: fbtft: Fix bug in fbtft-core

BugLink: http://bugs.launchpad.net/bugs/1631468

commit fc1e2c8e upstream.

Commit 367e8560 introduced a bug
in fbtft-core where fps is always 0, this is because variable
update_time is not assigned correctly.
Signed-off-by: default avatarKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Fixes: 367e8560 ("Staging: fbtbt: Replace timespec with ktime_t")
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 5f2ce042
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment