From 32d59d1eaab6d12e189ca16a172041fb382b6d44 Mon Sep 17 00:00:00 2001 From: Ujwal Patel Date: Tue, 5 Nov 2013 18:01:55 -0800 Subject: msm: mdss: Fix debugfs string overwrite If more than one display paths are active, like split display or external mirroring, and stat debugfs node is read then debug data for only one display is shown. Fix this by using correct offsets. Change-Id: Ia8b36eb3105f6df8f096ff544b82cc49c9b31a48 Signed-off-by: Ujwal Patel --- drivers/video/fbdev/msm/mdss_mdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c index e74f07aa1afa..be587ef4e9e5 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.c +++ b/drivers/video/fbdev/msm/mdss_mdp.c @@ -894,7 +894,8 @@ static int mdss_debug_dump_stats(void *data, char *buf, int len) int i, total = 0; for (i = 0; i < mdata->nctl; i++) - total += mdss_debug_stat_ctl_dump(mdata->ctl_off + i, buf, len); + total += mdss_debug_stat_ctl_dump(mdata->ctl_off + i, + buf + total, len - total); total += scnprintf(buf + total, len - total, "\n"); -- cgit v1.2.3