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

Commit fb120b75 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: add support to change border color through debugfs"

parents a5eb2c93 52a1ea5c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -411,6 +411,10 @@ struct mdss_data_type {
	struct mdss_max_bw_settings *max_bw_settings;
	u32 bw_mode_bitmap;
	u32 max_bw_settings_cnt;

	u32 bcolor0;
	u32 bcolor1;
	u32 bcolor2;
};
extern struct mdss_data_type *mdss_res;

+7 −0
Original line number Diff line number Diff line
@@ -1095,6 +1095,13 @@ int mdss_debugfs_init(struct mdss_data_type *mdata)
		goto err;
	}

	mdd->bordercolor = debugfs_create_dir("bordercolor", mdd->root);
	if (IS_ERR_OR_NULL(mdd->root)) {
		pr_err("debugfs_create_dir for mdp failed, error %ld\n",
		       PTR_ERR(mdd->root));
		goto err;
	}

	mdss_debugfs_perf_init(mdd, mdata);

	if (mdss_create_xlog_debug(mdd))
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ struct mdss_debug_base {
struct mdss_debug_data {
	struct dentry *root;
	struct dentry *perf;
	struct dentry *bordercolor;
	struct list_head base_list;
};

+18 −6
Original line number Diff line number Diff line
@@ -3601,15 +3601,23 @@ update_mixer:
		mixer_op_mode |= BIT(31);

	mdp_mixer_write(mixer, MDSS_MDP_REG_LM_OP_MODE, mixer_op_mode);

	mdp_mixer_write(mixer, MDSS_MDP_REG_LM_BORDER_COLOR_0,
		(mdata->bcolor0 & 0xFFF) | ((mdata->bcolor1 & 0xFFF) << 16));
	mdp_mixer_write(mixer, MDSS_MDP_REG_LM_BORDER_COLOR_1,
		mdata->bcolor2 & 0xFFF);

	off = __mdss_mdp_ctl_get_mixer_off(mixer);
	mdss_mdp_ctl_write(ctl, off, mixercfg);
	/* Program ctl layer extension bits */
	mdss_mdp_ctl_write(ctl, off + MDSS_MDP_REG_CTL_LAYER_EXTN_OFFSET,
		mixercfg_extn);

	pr_debug("mixer=%d cfg=0%08x cfg_extn=0x%08x op_mode=0x%08x w=%d h=%d\n",
	pr_debug("mixer=%d cfg=0%08x cfg_extn=0x%08x op_mode=0x%08x w=%d h=%d bc0=0x%x bc1=0x%x\n",
		mixer->num, mixercfg, mixercfg_extn,
		mixer_op_mode, mixer->roi.w, mixer->roi.h);
		mixer_op_mode, mixer->roi.w, mixer->roi.h,
		(mdata->bcolor0 & 0xFFF) | ((mdata->bcolor1 & 0xFFF) << 16),
		mdata->bcolor2 & 0xFFF);
	MDSS_XLOG(mixer->num, mixercfg, mixercfg_extn, mixer_op_mode,
		mixer->roi.h, mixer->roi.w);
}
@@ -4256,11 +4264,15 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg,
		/* postprocessing setup, including dspp */
		mdss_mdp_pp_setup_locked(ctl);

	if (sctl && ctl->split_flush_en) {
	if (sctl) {
		if (ctl->split_flush_en) {
			ctl->flush_bits |= sctl->flush_bits;
			sctl->flush_bits = 0;
			sctl_flush_bits = 0;
		} else {
			sctl_flush_bits = sctl->flush_bits;
		}
	}
	ctl_flush_bits = ctl->flush_bits;

	ATRACE_END("postproc_programming");
+7 −0
Original line number Diff line number Diff line
@@ -389,6 +389,13 @@ int mdss_mdp_debugfs_init(struct mdss_data_type *mdata)
	debugfs_create_bool("serialize_wait4pp", 0644, mdd->root,
		(u32 *)&mdata->serialize_wait4pp);

	debugfs_create_u32("color0", 0644, mdd->bordercolor,
		(u32 *)&mdata->bcolor0);
	debugfs_create_u32("color1", 0644, mdd->bordercolor,
		(u32 *)&mdata->bcolor1);
	debugfs_create_u32("color2", 0644, mdd->bordercolor,
		(u32 *)&mdata->bcolor2);

	return 0;
}
#endif