linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: fbtft: Fix bug in fbtft-core
@ 2016-10-01  9:40 Ksenija Stanojevic
  2016-10-02 15:16 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Ksenija Stanojevic @ 2016-10-01  9:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: thomas.petazzoni, noralf, gregkh, devel, Ksenija Stanojevic

Commit 367e8560e8d7a62d96e9b1d644028a3816e04206 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>
---
 drivers/staging/fbtft/fbtft-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index d9046162..587f68a 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Staging: fbtft: Fix bug in fbtft-core
  2016-10-01  9:40 [PATCH] Staging: fbtft: Fix bug in fbtft-core Ksenija Stanojevic
@ 2016-10-02 15:16 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-10-02 15:16 UTC (permalink / raw)
  To: Ksenija Stanojevic; +Cc: linux-kernel, noralf, devel

On Sat, Oct 01, 2016 at 11:40:52AM +0200, Ksenija Stanojevic wrote:
> Commit 367e8560e8d7a62d96e9b1d644028a3816e04206 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>

Can you add a "Fixes:" tag here, showing the short sha1 id and name of
the patch this is fixing, and add a cc: stable line as well?  That way
we can know to backport this to the relevant kernels (4.4 and newer).

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-02 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-01  9:40 [PATCH] Staging: fbtft: Fix bug in fbtft-core Ksenija Stanojevic
2016-10-02 15:16 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).