misc: tegra-throughput: warn on short frames
Ilan Aelion [Tue, 7 Aug 2012 15:27:45 +0000 (09:27 -0600)]
issue a warning on flip events less than 1 microsecond apart.

Bug 1027664
Bug 1028850

Signed-off-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-on: http://git-master/r/121810
(cherry picked from commit 6c0e907b437765fb9f7093599911b71a836d49a6)

Change-Id: Ie15256e35475d345b2ebe6ddb637ccc181fcb61e
Reviewed-on: http://git-master/r/122326
Reviewed-by: Donghan Ryu <dryu@nvidia.com>
Tested-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

drivers/misc/tegra-throughput.c

index c90a6a0..bff5323 100644 (file)
@@ -57,8 +57,11 @@ static int throughput_flip_notifier(struct notifier_block *nb,
                        else
                                last_frame_time = (unsigned short) timediff;
 
-                       if (last_frame_time == 0)
+                       if (last_frame_time == 0) {
+                               pr_warn("%s: notifications %lld nsec apart\n",
+                                       __func__, now.tv64 - last_flip.tv64);
                                return NOTIFY_DONE;
+                       }
 
                        throughput_hint =
                                ((int) target_frame_time * 100)/last_frame_time;