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

Commit e19e2e3a authored by Nirmal Abraham's avatar Nirmal Abraham
Browse files

sde: rotator: use shared lock while accessing vbif



Since rotator and MDP shares same VBIF, use a lock which
is shared with MDP while accessing VBIF from rotator.
Update the QOS LVL REMAP reg base address for SDM660.

Change-Id: If9181e563058891ff3fad0e376802d7cd21bd42f
Signed-off-by: default avatarNirmal Abraham <nabrah@codeaurora.org>
parent d64fa8eb
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012, 2015-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012, 2015-2021, The Linux Foundation. All rights reserved.
 */
#define pr_fmt(fmt)	"%s: " fmt, __func__

@@ -136,18 +136,32 @@ static bool force_on_xin_clk(u32 bit_off, u32 clk_ctl_reg_off, bool enable)

void vbif_lock(struct platform_device *parent_pdev)
{
#ifdef CONFIG_FB_MSM_MDSS
	struct sde_rot_data_type *mdata = sde_rot_get_mdata();

	if (mdata && mdata->vbif_reg_lock)
		mdata->vbif_reg_lock();
#else
	if (!parent_pdev)
		return;

//	mdp_vbif_lock(parent_pdev, true);
	mdp_vbif_lock(parent_pdev, true);
#endif
}

void vbif_unlock(struct platform_device *parent_pdev)
{
#ifdef CONFIG_FB_MSM_MDSS
	struct sde_rot_data_type *mdata = sde_rot_get_mdata();

	if (mdata && mdata->vbif_reg_unlock)
		mdata->vbif_reg_unlock();
#else
	if (!parent_pdev)
		return;

//	mdp_vbif_lock(parent_pdev, false);
	mdp_vbif_lock(parent_pdev, false);
#endif
}

void sde_mdp_halt_vbif_xin(struct sde_mdp_vbif_halt_params *params)
+2 −0
Original line number Diff line number Diff line
@@ -277,6 +277,8 @@ struct sde_rot_data_type {
	int (*iommu_ctrl)(int enable);
	int (*secure_session_ctrl)(int enable);
	int (*wait_for_transition)(int state, int request);
	void (*vbif_reg_lock)(void);
	void (*vbif_reg_unlock)(void);
	struct sde_rot_vbif_debug_bus *nrt_vbif_dbg_bus;
	u32 nrt_vbif_dbg_bus_size;
	struct sde_rot_debug_bus *rot_dbg_bus;
+5 −2
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
 */

#ifndef SDE_ROTATOR_HWIO_H
@@ -59,8 +59,11 @@
#define MMSS_VBIF_NRT_VBIF_OUT_WR_LIM_CONF0		0x00D4
#define MMSS_VBIF_NRT_VBIF_OUT_AXI_AMEMTYPE_CONF0	0x0160
#define MMSS_VBIF_NRT_VBIF_QOS_RP_REMAP_000		0x0550
#ifdef CONFIG_FB_MSM_MDSS
#define MMSS_VBIF_NRT_VBIF_QOS_LVL_REMAP_000		0x0570
#else
#define MMSS_VBIF_NRT_VBIF_QOS_LVL_REMAP_000		0x0590

#endif
#define SDE_MDP_REG_TRAFFIC_SHAPER_EN			BIT(31)
#define SDE_MDP_REG_TRAFFIC_SHAPER_RD_CLIENT(num)	(0x030 + (num * 4))
#define SDE_MDP_REG_TRAFFIC_SHAPER_WR_CLIENT(num)	(0x060 + (num * 4))
+3 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt)	"%s: " fmt, __func__
@@ -380,6 +380,8 @@ static void sde_smmu_callback(struct mdss_smmu_intf *smmu)

	/* Copy mmu device info into sde private structure */
	mdata->iommu_ctrl = smmu->iommu_ctrl;
	mdata->vbif_reg_lock = smmu->reg_lock;
	mdata->vbif_reg_unlock = smmu->reg_unlock;
	mdata->wait_for_transition = smmu->wait_for_transition;
	mdata->secure_session_ctrl = smmu->secure_session_ctrl;
	if (smmu->is_secure) {