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

Commit 27ec06cd authored by Kalyan Thota's avatar Kalyan Thota Committed by Jayant Shekhar
Browse files

drm/msm/sde: add support for Quad pipe topology in resource manager



Add support for quad pipe topology, that includes 3d mux
and dsc variants.

Change-Id: I8cef3df02d87c1dd54afc8cda9d29a2d7906d13a
Signed-off-by: default avatarKalyan Thota <kalyant@codeaurora.org>
parent 72ea3ec4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2019, 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
@@ -48,6 +48,9 @@ static const struct drm_prop_enum_list e_topology_name[] = {
	{SDE_RM_TOPOLOGY_DUALPIPE_3DMERGE_DSC,	"sde_dualpipemerge_dsc"},
	{SDE_RM_TOPOLOGY_DUALPIPE_DSCMERGE,	"sde_dualpipe_dscmerge"},
	{SDE_RM_TOPOLOGY_PPSPLIT,	"sde_ppsplit"},
	{SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE,	"sde_quadpipemerge"},
	{SDE_RM_TOPOLOGY_QUADPIPE_DSCMERGE,	"sde_quadpipe_dscmerge"},
	{SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE_DSC,	"sde_quadpipe_3dmerge_dsc"}
};
static const struct drm_prop_enum_list e_topology_control[] = {
	{SDE_RM_TOPCTL_RESERVE_LOCK,	"reserve_lock"},
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -1432,6 +1432,7 @@ static int _sde_encoder_dsc_setup(struct sde_encoder_virt *sde_enc,
		ret = _sde_encoder_dsc_2_lm_2_enc_1_intf(sde_enc, params);
		break;
	case SDE_RM_TOPOLOGY_DUALPIPE_DSC:
	case SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE_DSC:
		ret = _sde_encoder_dsc_2_lm_2_enc_2_intf(sde_enc, params);
		break;
	default:
+7 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019 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
@@ -547,6 +547,12 @@ static inline enum sde_3d_blend_mode sde_encoder_helper_get_3d_blend_mode(
			 topology == SDE_RM_TOPOLOGY_DUALPIPE_3DMERGE_DSC))
		return BLEND_3D_H_ROW_INT;

	if ((phys_enc->split_role == ENC_ROLE_MASTER ||
		phys_enc->split_role == ENC_ROLE_SLAVE) &&
		 ((topology == SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE) ||
		 (topology == SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE_DSC)))
		return BLEND_3D_H_ROW_INT;

	return BLEND_3D_NONE;
}

+5 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, 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
@@ -521,7 +521,10 @@ static bool _sde_encoder_phys_is_dual_ctl(struct sde_encoder_phys *phys_enc)

	topology = sde_connector_get_topology_name(phys_enc->connector);
	if ((topology == SDE_RM_TOPOLOGY_DUALPIPE_DSC) ||
		(topology == SDE_RM_TOPOLOGY_DUALPIPE))
		(topology == SDE_RM_TOPOLOGY_DUALPIPE) ||
		(topology == SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE) ||
		(topology == SDE_RM_TOPOLOGY_QUADPIPE_DSCMERGE) ||
		(topology == SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE_DSC))
		return true;

	return false;
+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@ static const struct sde_rm_topology_def g_top_table[] = {
	{   SDE_RM_TOPOLOGY_DUALPIPE_3DMERGE_DSC, 2, 1, 1, 1, false },
	{   SDE_RM_TOPOLOGY_DUALPIPE_DSCMERGE,    2, 2, 1, 1, false },
	{   SDE_RM_TOPOLOGY_PPSPLIT,              1, 0, 2, 1, true  },
	{   SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE,     4, 0, 2, 2, true  },
	{   SDE_RM_TOPOLOGY_QUADPIPE_DSCMERGE,    4, 4, 2, 2, true  },
	{   SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE_DSC, 4, 2, 2, 2, true  },
};

/**
Loading