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

Commit f8846e93 authored by Abhijit Kulkarni's avatar Abhijit Kulkarni Committed by Krishna Srinivas Kundurthi
Browse files

drm/msm/sde: adding implementation for mdp_top in hw driver



Add mdp_top block support to hw layer, provides split pipe
control, and interface select. Use mdp_top from intf block
to program interface select.

Change-Id: I15f2070f7d552a6ec11bda0302f362e22ca6e84e
Signed-off-by: default avatarAbhijit Kulkarni <kabhijit@codeaurora.org>
Signed-off-by: default avatarKrishna Srinivas Kundurthi <kskund@codeaurora.org>
parent d199f382
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -89,5 +89,6 @@ obj-$(CONFIG_DRM_MSM) += sde/sde_hw_catalog.o \
	sde/sde_hw_sspp.o \
	sde/sde_hw_wb.o \
	sde/sde_hw_pingpong.o \
	sde/sde_hw_mdp_top.o \
	sde/sde_hw_interrupts.o \
	sde/sde_mdp_formats.o
+11 −3
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include "sde_hwio.h"
#include "sde_hw_catalog.h"
#include "sde_hw_intf.h"
#include "sde_hw_mdp_top.h"

#define INTF_TIMING_ENGINE_EN           0x000
#define INTF_CONFIG                     0x004
@@ -205,10 +206,16 @@ static void sde_hw_intf_enable_timing_engine(

	/* Display interface select */
	if (enable) {
		intf_sel = SDE_REG_READ(c, DISP_INTF_SEL);
		/* top block */
		struct sde_hw_mdp *mdp = sde_hw_mdptop_init(MDP_TOP,
				c->base_off,
				intf->mdss);
		struct sde_hw_blk_reg_map *top = &mdp->hw;

		intf_sel |= (intf->cap->type << ((intf->idx) * 8));
		SDE_REG_WRITE(c, DISP_INTF_SEL,  intf_sel);
		intf_sel = SDE_REG_READ(top, DISP_INTF_SEL);

		intf_sel |= (intf->cap->type << ((intf->idx - INTF_0) * 8));
		SDE_REG_WRITE(top, DISP_INTF_SEL,  intf_sel);
	}

	SDE_REG_WRITE(c, INTF_TIMING_ENGINE_EN,
@@ -366,6 +373,7 @@ struct sde_hw_intf *sde_hw_intf_init(enum sde_intf idx,
	 */
	c->idx = idx;
	c->cap = cfg;
	c->mdss = m;
	_setup_intf_ops(&c->ops, c->cap->features);

	/*
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ struct sde_hw_intf {
	/* intf */
	enum sde_intf idx;
	const struct sde_intf_cfg *cap;
	const struct sde_mdss_cfg *mdss;

	/* ops */
	struct sde_hw_intf_ops ops;
+2 −2
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ static void sde_hw_lm_setup_out(struct sde_hw_mixer *ctx,
	SDE_REG_WRITE(c, LM_OUT_SIZE, outsize);

	/* SPLIT_LEFT_RIGHT */
	opmode = (opmode & ~(1 << 31)) | (mixer->right_mixer & 1 << 31);
	opmode = (opmode & ~(1 << 31)) | ((mixer->right_mixer) ? (1 << 31) : 0);
	SDE_REG_WRITE(c, LM_OP_MODE, opmode);
}

@@ -128,7 +128,7 @@ static void sde_hw_lm_setup_blendcfg(struct sde_hw_mixer *ctx,
			fg->const_alpha);
	SDE_REG_WRITE(c, LM_BLEND0_BG_ALPHA + stage_off,
			bg->const_alpha);
	SDE_REG_WRITE(c, LM_OP_MODE, blend_op);
	SDE_REG_WRITE(c, LM_BLEND0_OP + stage_off, blend_op);
}

static void sde_hw_lm_setup_color3(struct sde_hw_mixer *ctx,
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#define _SDE_HW_MDP_CTL_H

#include "sde_hw_mdss.h"
#include "sde_hw_mdp_util.h"
#include "sde_hw_catalog.h"

struct sde_hw_ctl;
Loading