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

Commit aa20b1c1 authored by Andhavarapu Karthik's avatar Andhavarapu Karthik
Browse files

disp: msm: sde: add cwb virtual mixers support



In yupik target, cwb path has pingpong block without any layer mixer.
Add virtual mixer to support reservation of pp block in such case.
This virtual mixer will be used only for cwb use case.

Change-Id: Iacc1a3f5e7d99d9fc36288450b0e19081b3ef763
Signed-off-by: default avatarAndhavarapu Karthik <kartkart@codeaurora.org>
parent 5dcc9ed4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2109,6 +2109,9 @@ static int sde_mixer_parse_dt(struct device_node *np,
		if (cwb_pref && !strcmp(cwb_pref, "cwb"))
			set_bit(SDE_DISP_CWB_PREF, &mixer->features);

		if (BIT(mixer->id - LM_0) & sde_cfg->cwb_virtual_mixers_mask)
			set_bit(SDE_MIXER_IS_VIRTUAL, &mixer->features);

		mixer->pingpong = pp_count > 0 ? pp_idx + PINGPONG_0
							: PINGPONG_MAX;
		mixer->dspp = dspp_count > 0 ? dspp_idx + DSPP_0
@@ -4828,6 +4831,7 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
		sde_cfg->mdss_hw_block_size = 0x158;
		sde_cfg->has_trusted_vm_support = true;
		sde_cfg->rc_lm_flush_override = false;
		sde_cfg->cwb_virtual_mixers_mask = 0x2;
	} else {
		SDE_ERROR("unsupported chipset id:%X\n", hw_rev);
		sde_cfg->perf.min_prefill_lines = 0xffff;
+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.
 */

#ifndef _SDE_HW_CATALOG_H
@@ -333,6 +333,7 @@ enum {
	SDE_DISP_SECONDARY_PREF,
	SDE_DISP_CWB_PREF,
	SDE_MIXER_COMBINED_ALPHA,
	SDE_MIXER_IS_VIRTUAL,
	SDE_MIXER_MAX
};

@@ -1540,6 +1541,7 @@ struct sde_mdss_cfg {

	u32 mixer_count;
	struct sde_lm_cfg mixer[MAX_BLOCKS];
	u32 cwb_virtual_mixers_mask;

	struct sde_dspp_top_cfg dspp_top;

+7 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt)	"[drm:%s] " fmt, __func__
@@ -1002,6 +1002,12 @@ static bool _sde_rm_check_lm_and_get_connected_blks(
		 lm_cfg->id, lm_cfg->dspp, lm_cfg->ds, lm_cfg->pingpong,
		 lm_cfg->features, (int)reqs->hw_res.display_type);

	if (!RM_RQ_CWB(reqs) && (lm_cfg->features & BIT(SDE_MIXER_IS_VIRTUAL))) {
		SDE_DEBUG("lm %d is a virtual mixer and use case is not CWB",
				lm_cfg->id);
		return false;
	}

	/* Check if this layer mixer is a peer of the proposed primary LM */
	if (primary_lm) {
		const struct sde_lm_cfg *prim_lm_cfg =