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

Commit d67cf4ab authored by Dhaval Patel's avatar Dhaval Patel
Browse files

drm/msm/sde: update play count on sde crtc



The total play count on crtc provides number of frames
committed on the certain virtual crtc.

Change-Id: Iaa19200cf37a47ae5da2560eaf5c11042eb73638
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent 9f28bf89
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -2117,6 +2117,7 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc)
		SDE_DEBUG("crtc%d commit\n", crtc->base.id);
		SDE_DEBUG("crtc%d commit\n", crtc->base.id);
		SDE_EVT32(DRMID(crtc), 2);
		SDE_EVT32(DRMID(crtc), 2);
	}
	}
	sde_crtc->play_count++;


	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
		if (encoder->crtc != crtc)
		if (encoder->crtc != crtc)
@@ -3282,10 +3283,9 @@ static int _sde_debugfs_status_show(struct seq_file *s, void *data)
				sde_crtc->vblank_cb_count * 1000, diff_ms) : 0;
				sde_crtc->vblank_cb_count * 1000, diff_ms) : 0;


		seq_printf(s,
		seq_printf(s,
			"vblank fps:%lld count:%u total:%llums\n",
			"vblank fps:%lld count:%u total:%llums total_framecount:%llu\n",
				fps,
				fps, sde_crtc->vblank_cb_count,
				sde_crtc->vblank_cb_count,
				ktime_to_ms(diff), sde_crtc->play_count);
				ktime_to_ms(diff));


		/* reset time & count for next measurement */
		/* reset time & count for next measurement */
		sde_crtc->vblank_cb_count = 0;
		sde_crtc->vblank_cb_count = 0;
+2 −0
Original line number Original line Diff line number Diff line
@@ -121,6 +121,7 @@ struct sde_crtc_event {
 * @stage_cfg     : H/w mixer stage configuration
 * @stage_cfg     : H/w mixer stage configuration
 * @debugfs_root  : Parent of debugfs node
 * @debugfs_root  : Parent of debugfs node
 * @vblank_cb_count : count of vblank callback since last reset
 * @vblank_cb_count : count of vblank callback since last reset
 * @play_count    : frame count between crtc enable and disable
 * @vblank_cb_time  : ktime at vblank count reset
 * @vblank_cb_time  : ktime at vblank count reset
 * @vblank_refcount : reference count for vblank enable request
 * @vblank_refcount : reference count for vblank enable request
 * @suspend         : whether or not a suspend operation is in progress
 * @suspend         : whether or not a suspend operation is in progress
@@ -167,6 +168,7 @@ struct sde_crtc {
	struct dentry *debugfs_root;
	struct dentry *debugfs_root;


	u32 vblank_cb_count;
	u32 vblank_cb_count;
	u64 play_count;
	ktime_t vblank_cb_time;
	ktime_t vblank_cb_time;
	atomic_t vblank_refcount;
	atomic_t vblank_refcount;
	bool suspend;
	bool suspend;