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

Commit ef5cb73d authored by Zohaib Alam's avatar Zohaib Alam
Browse files

msm: mdss: Use MDSS reg for version



MDSS and MDP regs have same version value for all the targets
other than mpq8092. In mpq, MDSS version is different, so using
it instead of MDP version to get the unique value, and using this
new version to check correct write-back format.

Change-Id: Ide7335815d61681c7a6909b9da95d0b6f4851d54
Signed-off-by: default avatarZohaib Alam <zalam@codeaurora.org>
parent 57eccdad
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1011,8 +1011,8 @@ int mdss_hw_init(struct mdss_data_type *mdata)
	struct mdss_mdp_pipe *vig;

	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON, false);
	mdata->mdp_rev = readl_relaxed(mdata->mdp_base +
		MDSS_MDP_REG_HW_VERSION);
	mdata->mdp_rev = readl_relaxed(mdata->mdss_base + MDSS_REG_HW_VERSION);

	pr_info_once("MDP Rev=%x\n", mdata->mdp_rev);

	/* disable hw underrun recovery */
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@

#define MDSS_MDP_FETCH_CONFIG_RESET_VALUE	0x00000087

#define MDSS_REG_HW_VERSION				0x0
#define MDSS_REG_HW_INTR_STATUS				0x10

#define MDSS_INTR_MDP				BIT(0)
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -184,7 +184,8 @@ static int mdss_mdp_writeback_format_setup(struct mdss_mdp_writeback_ctx *ctx,
	}

	mdata = mdss_mdp_get_mdata();
	if (mdata && mdata->mdp_rev >= MDSS_MDP_HW_REV_102) {
	if (mdata && mdata->mdp_rev >= MDSS_MDP_HW_REV_102 &&
			mdata->mdp_rev < MDSS_MDP_HW_REV_200) {
		pattern = (fmt->element[3] << 24) |
			  (fmt->element[2] << 16) |
			  (fmt->element[1] << 8)  |