summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorIngrid Gallardo <ingridg@codeaurora.org>2015-01-21 17:20:09 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:39:46 -0700
commitee6e565bcc44e9038af8dd11ae320b57dbc7dd6f (patch)
treea687d7013c0035ecebf9f9b8177fc3390d1da766 /drivers/video/fbdev
parent172cc23834446916789d1a882cbcced28926bf73 (diff)
msm: mdss: debugfs: xlog: fix xlog corruption in ramdump
Display driver debug feature xlog, allocates some memory to copy some of the MDP registers that are needed for debugging and then it panics. Current memory allocation api has a problem, where data from this memory allocation is shown corrupted in the ramdump. This change workaround this problem by changing the memory allocation to a dma alloc which works fine to keep the data correct in the ramdump. Change-Id: I391419095fb7ebfd3eb88faf26d2b473c255f28c Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_debug_xlog.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_debug_xlog.c b/drivers/video/fbdev/msm/mdss_debug_xlog.c
index 766edefb3766..e0b3f64a7435 100644
--- a/drivers/video/fbdev/msm/mdss_debug_xlog.c
+++ b/drivers/video/fbdev/msm/mdss_debug_xlog.c
@@ -16,6 +16,7 @@
#include <linux/ktime.h>
#include <linux/debugfs.h>
#include <linux/uaccess.h>
+#include <linux/dma-buf.h>
#include "mdss.h"
#include "mdss_mdp.h"
@@ -205,8 +206,10 @@ u32 get_dump_range(struct dump_offset *range_node, size_t max_offset)
static void mdss_dump_reg(u32 reg_dump_flag,
char *addr, int len, u32 *dump_mem)
{
+ struct mdss_data_type *mdata = mdss_mdp_get_mdata();
bool in_log, in_mem;
u32 *dump_addr = NULL;
+ phys_addr_t phys = 0;
int i;
in_log = (reg_dump_flag & MDSS_REG_DUMP_IN_LOG);
@@ -221,7 +224,8 @@ static void mdss_dump_reg(u32 reg_dump_flag,
if (in_mem) {
if (!dump_mem)
- dump_mem = kzalloc(len * 16, GFP_KERNEL);
+ dump_mem = dma_alloc_coherent(&mdata->pdev->dev,
+ len * 16, &phys, GFP_KERNEL);
if (dump_mem) {
dump_addr = dump_mem;