Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b42271e authored by Shubhashree Dhar's avatar Shubhashree Dhar
Browse files

drm/msm/sde: Correct initialization value for frame count



For calculating fps, correct frame count initialization
from 1 to 0 to avoid counting one extra frame on every
periodicity window.

Change-Id: I3da5cc1f810da6b2f75b98772f116f5c1be433a9
Signed-off-by: default avatarShubhashree Dhar <dhar@codeaurora.org>
parent d033f644
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -778,7 +778,7 @@ static ssize_t measured_fps_show(struct device *device,
	struct drm_crtc *crtc;
	struct sde_crtc *sde_crtc;
	unsigned int fps_int, fps_decimal;
	u64 fps = 0, frame_count = 1;
	u64 fps = 0, frame_count = 0;
	ktime_t current_time;
	int i = 0, current_time_index;
	u64 diff_us;
@@ -857,7 +857,7 @@ static ssize_t measured_fps_show(struct device *device,
	fps_int = (unsigned int) sde_crtc->fps_info.measured_fps;
	fps_decimal = do_div(fps_int, 10);
	return scnprintf(buf, PAGE_SIZE,
		"fps: %d.%d duration:%d frame_count:%llu", fps_int, fps_decimal,
	"fps: %d.%d duration:%d frame_count:%llu\n", fps_int, fps_decimal,
			sde_crtc->fps_info.fps_periodic_duration, frame_count);
}