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

Commit be7e59c1 authored by Ujwal Patel's avatar Ujwal Patel Committed by Matt Wagantall
Browse files

msm: mdss: xlog: add new xlog messages and remove unnecessary ones



Add new xlog messages to aid in debugging of MDSS issues. Some of the new
messages include information regarding mixer configuration, write-back
configuration at start and finish of the operation, pipe configuration
and pixel extensions etc. Also remove old mixer reg xlog and report xlog
from mdp_clk_ctrl only once to prevent flooding.

Conflicts:
	drivers/video/msm/mdss/mdss_mdp_ctl.c

Change-Id: I11fd63a220b1ccd102dcd48d3878cf96fc91bc5f
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent b0068f9f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -822,7 +822,9 @@ void mdss_mdp_clk_ctrl(int enable)
		}
	}

	MDSS_XLOG(mdp_clk_cnt, changed, enable, current->pid);
	if (changed)
		MDSS_XLOG(mdp_clk_cnt, enable, current->pid);

	pr_debug("%s: clk_cnt=%d changed=%d enable=%d\n",
			__func__, mdp_clk_cnt, changed, enable);

+2 −20
Original line number Diff line number Diff line
@@ -24,13 +24,11 @@

#include "mdss_fb.h"
#include "mdss_mdp.h"
#include "mdss_debug.h"
#include "mdss_mdp_trace.h"
#include "mdss_debug.h"

#define MDSS_MDP_WB_OUTPUT_BPP	3

static void mdss_mdp_xlog_mixer_reg(struct mdss_mdp_ctl *ctl);
static inline u64 fudge_factor(u64 val, u32 numer, u32 denom)
{
	u64 result = (val * (u64)numer);
@@ -3155,6 +3153,8 @@ update_mixer:
	pr_debug("mixer=%d cfg=0%08x cfg_extn=0x%08x op_mode=0x%08x w=%d h=%d\n",
		mixer->num, mixercfg, mixercfg_extn,
		mixer_op_mode, mixer->roi.w, mixer->roi.h);
	MDSS_XLOG(mixer->num, mixercfg, mixercfg_extn, mixer_op_mode,
		mixer->roi.h, mixer->roi.w);
}

int mdss_mdp_mixer_addr_setup(struct mdss_data_type *mdata,
@@ -3754,8 +3754,6 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg,
	}
	ATRACE_END("postproc_programming");

	mdss_mdp_xlog_mixer_reg(ctl);

	ATRACE_BEGIN("frame_ready");
	mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_CFG_DONE);
	if (commit_cb)
@@ -4082,21 +4080,6 @@ int mdss_mdp_mixer_handoff(struct mdss_mdp_ctl *ctl, u32 num,
	return rc;
}

static void mdss_mdp_xlog_mixer_reg(struct mdss_mdp_ctl *ctl)
{
	int i, off;
	u32 data[MDSS_MDP_INTF_MAX_LAYERMIXER];

	for (i = 0; i < MDSS_MDP_INTF_MAX_LAYERMIXER; i++) {
		off =  MDSS_MDP_REG_CTL_LAYER(i);
		data[i] = mdss_mdp_ctl_read(ctl, off);
	}
	MDSS_XLOG(data[MDSS_MDP_INTF_LAYERMIXER0],
		data[MDSS_MDP_INTF_LAYERMIXER1],
		data[MDSS_MDP_INTF_LAYERMIXER2],
		data[MDSS_MDP_INTF_LAYERMIXER3], off);
}

struct mdss_mdp_writeback *mdss_mdp_wb_alloc(u32 caps, u32 reg_index)
{
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
@@ -4186,4 +4169,3 @@ void mdss_mdp_wb_free(struct mdss_mdp_writeback *wb)
			&mdata->wb_lock))
		mutex_unlock(&mdata->wb_lock);
}
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include "mdss_rotator_internal.h"
#include "mdss_panel.h"
#include "mdss_mdp_trace.h"
#include "mdss_debug.h"

/*
 * if BWC enabled and format is H1V2 or 420, do not use site C or I.
@@ -547,6 +548,7 @@ static void mdss_mdp_writeback_intr_done(void *arg)
	spin_unlock(&ctx->wb_lock);

	complete_all(&ctx->wb_comp);
	MDSS_XLOG(ctx->wb_num, ctx->type, ctx->xin_id, ctx->intf_num);
}

static bool mdss_mdp_traffic_shaper_helper(struct mdss_mdp_ctl *ctl,
@@ -774,6 +776,8 @@ static int mdss_mdp_writeback_display(struct mdss_mdp_ctl *ctl, void *arg)
	mdss_mdp_ctl_write(ctl, MDSS_MDP_REG_CTL_START, 1);
	wmb();

	MDSS_XLOG(ctx->wb_num, ctx->type, ctx->xin_id, ctx->intf_num,
		ctx->dst_rect.w, ctx->dst_rect.h);
	pr_debug("ctx%d type:%d xin_id:%d intf_num:%d start\n",
		ctx->wb_num, ctx->type, ctx->xin_id, ctx->intf_num);

+12 −3
Original line number Diff line number Diff line
@@ -1647,6 +1647,9 @@ static int mdss_mdp_image_setup(struct mdss_mdp_pipe *pipe,
	mdss_mdp_pipe_write(pipe, MDSS_MDP_REG_SSPP_DECIMATION_CONFIG,
		decimation);

	MDSS_XLOG(pipe->num, src_size, src_xy, dst_size, dst_xy,
		pipe->bwc_mode);

	return 0;
}

@@ -1935,14 +1938,19 @@ int mdss_mdp_pipe_queue_data(struct mdss_mdp_pipe *pipe,
		((pipe->type == MDSS_MDP_PIPE_TYPE_DMA) &&
		 (pipe->mixer_left->type == MDSS_MDP_MIXER_TYPE_WRITEBACK) &&
		 (ctl->mdata->mixer_switched)) || ctl->roi_changed;
	if ((!(pipe->flags & MDP_VPU_PIPE) &&
			(src_data == NULL)) ||
	if ((!(pipe->flags & MDP_VPU_PIPE) && (src_data == NULL)) ||
	    (pipe->flags & MDP_SOLID_FILL)) {
		pipe->params_changed = 0;
		mdss_mdp_pipe_solidfill_setup(pipe);

		MDSS_XLOG(pipe->num, pipe->mixer_left->num, pipe->play_cnt,
			0x111);

		goto update_nobuf;
	}

	MDSS_XLOG(pipe->num, pipe->mixer_left->num, pipe->play_cnt, 0x222);

	if (params_changed) {
		pipe->params_changed = 0;

@@ -2067,6 +2075,7 @@ static inline void __mdss_mdp_pipe_program_pixel_extn_helper(
	writel_relaxed(tot_req_pixels, pipe->base +
			MDSS_MDP_REG_SSPP_SW_PIX_EXT_C0_REQ_PIXELS + off);

	MDSS_XLOG(pipe->num, plane, lr_pe, tb_pe, tot_req_pixels);
	pr_debug("pipe num=%d, plane=%d, LR PE=0x%x, TB PE=0x%x, req_pixels=0x0%x\n",
		pipe->num, plane, lr_pe, tb_pe, tot_req_pixels);
}