summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUjwal Patel <ujwalp@codeaurora.org>2013-11-05 18:01:55 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:23:06 -0700
commit32d59d1eaab6d12e189ca16a172041fb382b6d44 (patch)
tree20c57755142ad2085e62fa80f7c7175190ce6c1d
parent0cd89eac3fcdf4fade8768c963cab247f604ba87 (diff)
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 <ujwalp@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.c3
1 files changed, 2 insertions, 1 deletions
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");