Skip to content

Commit

Permalink
Staging: fbtft: Fix bug in fbtft-core
Browse files Browse the repository at this point in the history
Commit 367e856 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: 367e856 ("Staging: fbtbt: Replace timespec with ktime_t")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
KsenijaS authored and gregkh committed Oct 2, 2016
1 parent 23bf404 commit fc1e2c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/fbtft/fbtft-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fc1e2c8

Please sign in to comment.