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

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

drm/msm/sde: add support for plane layout for quadpipe topology



quad pipe topology requires 2 ctl paths where in data path involving
second mixer pair on ctl 1 will start on a new coordinate system

SSPPs will be marked with layout flag, which will be used in
staging the composition.

Change-Id: I806be6451567fbcae5590d0bca9a079cd3fa85e4
Signed-off-by: default avatarKalyan Thota <kalyant@codeaurora.org>
parent 27ec06cd
Loading
Loading
Loading
Loading
+2 −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.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -123,6 +123,7 @@ enum msm_mdp_plane_property {
	PLANE_PROP_SRC_CONFIG,
	PLANE_PROP_FB_TRANSLATION_MODE,
	PLANE_PROP_MULTIRECT_MODE,
	PLANE_PROP_LAYOUT,

	/* total # of properties */
	PLANE_PROP_COUNT
+9 −0
Original line number Diff line number Diff line
@@ -1603,6 +1603,8 @@ static void _sde_crtc_blend_setup_mixer(struct drm_crtc *crtc,
					sde_plane_pipe(plane);
		stage_cfg->multirect_index[pstate->stage][stage_idx] =
					pstate->multirect_index;
		stage_cfg->layout_index[pstate->stage][stage_idx] =
			    sde_plane_get_property(pstate, PLANE_PROP_LAYOUT);

		SDE_EVT32(DRMID(crtc), DRMID(plane), stage_idx,
			sde_plane_pipe(plane) - SSPP_VIG0, pstate->stage,
@@ -1782,6 +1784,7 @@ static void _sde_crtc_blend_setup(struct drm_crtc *crtc,
			mixer[i].flush_mask);

		ctl->ops.setup_blendstage(ctl, mixer[i].hw_lm->idx,
			mixer[i].hw_lm->cfg.flags,
			&sde_crtc->stage_cfg);
	}

@@ -2984,6 +2987,7 @@ static void _sde_crtc_setup_mixer_for_encoder(

		if (!sde_rm_get_hw(rm, &lm_iter))
			break;

		mixer->hw_lm = (struct sde_hw_mixer *)lm_iter.hw;

		/* CTL may be <= LMs, if <, multiple LMs controlled by 1 CTL */
@@ -3006,6 +3010,11 @@ static void _sde_crtc_setup_mixer_for_encoder(
			return;
		}

		if (sde_crtc->num_mixers < mixer_per_ctl)
			mixer->hw_lm->cfg.flags |= SDE_MIXER_LAYOUT_LEFT;
		else
			mixer->hw_lm->cfg.flags |= SDE_MIXER_LAYOUT_RIGHT;

		mixer->hw_lm->cfg.right_mixer =
			(sde_crtc->num_mixers & 1) ? true : false;

+2 −1
Original line number Diff line number Diff line
@@ -4125,7 +4125,8 @@ int sde_encoder_helper_reset_mixers(struct sde_encoder_phys *phys_enc,
		/* only enable border color on LM */
		if (phys_enc->hw_ctl->ops.setup_blendstage)
			phys_enc->hw_ctl->ops.setup_blendstage(
					phys_enc->hw_ctl, hw_lm->idx, NULL);
					phys_enc->hw_ctl, hw_lm->cfg.flags,
					hw_lm->idx, NULL);
	}

	if (!lm_valid) {
+8 −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
@@ -410,7 +410,7 @@ static void sde_hw_ctl_clear_all_blendstages(struct sde_hw_ctl *ctx)
}

static void sde_hw_ctl_setup_blendstage(struct sde_hw_ctl *ctx,
	enum sde_lm lm, struct sde_hw_stage_cfg *stage_cfg)
	enum sde_lm lm, int flags, struct sde_hw_stage_cfg *stage_cfg)
{
	struct sde_hw_blk_reg_map *c = &ctx->hw;
	u32 mixercfg = 0, mixercfg_ext = 0, mix, ext;
@@ -443,6 +443,12 @@ static void sde_hw_ctl_setup_blendstage(struct sde_hw_ctl *ctx,
			enum sde_sspp_multirect_index rect_index =
				stage_cfg->multirect_index[i][j];

			enum sde_sspp_layout_index layout_index =
				stage_cfg->layout_index[i][j];

			if (layout_index && (flags != layout_index))
				continue;

			switch (stage_cfg->stage[i][j]) {
			case SSPP_VIG0:
				if (rect_index == SDE_SSPP_RECT_1) {
+4 −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
@@ -53,6 +53,8 @@ struct sde_hw_stage_cfg {
	enum sde_sspp stage[SDE_STAGE_MAX][PIPES_PER_STAGE];
	enum sde_sspp_multirect_index multirect_index
					[SDE_STAGE_MAX][PIPES_PER_STAGE];
	enum sde_sspp_layout_index layout_index
					[SDE_STAGE_MAX][PIPES_PER_STAGE];
};

/**
@@ -246,7 +248,7 @@ struct sde_hw_ctl_ops {
	 * @cfg       : blend stage configuration
	 */
	void (*setup_blendstage)(struct sde_hw_ctl *ctx,
		enum sde_lm lm, struct sde_hw_stage_cfg *cfg);
		enum sde_lm lm, int flags, struct sde_hw_stage_cfg *cfg);

	void (*setup_sbuf_cfg)(struct sde_hw_ctl *ctx,
		struct sde_ctl_sbuf_cfg *cfg);
Loading