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

Commit 4b1d079d authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: sde: Update rotator OT settings for sdm660"

parents 9d5ec5ad e82bf6b0
Loading
Loading
Loading
Loading
+18 −4
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// 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__
#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)
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)
	if (!parent_pdev)
		return;
		return;


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


void vbif_unlock(struct platform_device *parent_pdev)
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)
	if (!parent_pdev)
		return;
		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)
void sde_mdp_halt_vbif_xin(struct sde_mdp_vbif_halt_params *params)
@@ -242,6 +256,7 @@ u32 sde_mdp_get_ot_limit(u32 width, u32 height, u32 pixfmt, u32 fps, u32 is_rd)
	 */
	 */
	switch (mdata->mdss_version) {
	switch (mdata->mdss_version) {
	case SDE_MDP_HW_REV_540:
	case SDE_MDP_HW_REV_540:
	case SDE_MDP_HW_REV_320:
		if (is_yuv) {
		if (is_yuv) {
			if (res <= (RES_1080p * 30))
			if (res <= (RES_1080p * 30))
				ot_lim = 2;
				ot_lim = 2;
@@ -254,7 +269,6 @@ u32 sde_mdp_get_ot_limit(u32 width, u32 height, u32 pixfmt, u32 fps, u32 is_rd)
		} else if (fmt->bpp == 4 && res <= (RES_WQXGA * 60)) {
		} else if (fmt->bpp == 4 && res <= (RES_WQXGA * 60)) {
			ot_lim = 16;
			ot_lim = 16;
		}
		}

		break;
		break;
	default:
	default:
		if (res <= (RES_1080p * 30))
		if (res <= (RES_1080p * 30))
+2 −0
Original line number Original line Diff line number Diff line
@@ -277,6 +277,8 @@ struct sde_rot_data_type {
	int (*iommu_ctrl)(int enable);
	int (*iommu_ctrl)(int enable);
	int (*secure_session_ctrl)(int enable);
	int (*secure_session_ctrl)(int enable);
	int (*wait_for_transition)(int state, int request);
	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;
	struct sde_rot_vbif_debug_bus *nrt_vbif_dbg_bus;
	u32 nrt_vbif_dbg_bus_size;
	u32 nrt_vbif_dbg_bus_size;
	struct sde_rot_debug_bus *rot_dbg_bus;
	struct sde_rot_debug_bus *rot_dbg_bus;
+5 −2
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/* 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
#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_WR_LIM_CONF0		0x00D4
#define MMSS_VBIF_NRT_VBIF_OUT_AXI_AMEMTYPE_CONF0	0x0160
#define MMSS_VBIF_NRT_VBIF_OUT_AXI_AMEMTYPE_CONF0	0x0160
#define MMSS_VBIF_NRT_VBIF_QOS_RP_REMAP_000		0x0550
#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
#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_EN			BIT(31)
#define SDE_MDP_REG_TRAFFIC_SHAPER_RD_CLIENT(num)	(0x030 + (num * 4))
#define SDE_MDP_REG_TRAFFIC_SHAPER_RD_CLIENT(num)	(0x030 + (num * 4))
#define SDE_MDP_REG_TRAFFIC_SHAPER_WR_CLIENT(num)	(0x060 + (num * 4))
#define SDE_MDP_REG_TRAFFIC_SHAPER_WR_CLIENT(num)	(0x060 + (num * 4))
+3 −1
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// 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__
#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 */
	/* Copy mmu device info into sde private structure */
	mdata->iommu_ctrl = smmu->iommu_ctrl;
	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->wait_for_transition = smmu->wait_for_transition;
	mdata->secure_session_ctrl = smmu->secure_session_ctrl;
	mdata->secure_session_ctrl = smmu->secure_session_ctrl;
	if (smmu->is_secure) {
	if (smmu->is_secure) {