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

Commit 5c150381 authored by Adrian Salido-Moreno's avatar Adrian Salido-Moreno Committed by Narendra Muppalla
Browse files

Merge branch 'mdss-final-replay' into msm-4.4



This merge brings all display changes from msm-3.18 kernel.

* (58 commits)
  msm: mdss: add support for additional DMA pipes
  msm: mdss: refactor device tree pipe parsing logic
  msm: mdss: refactor mixer configuration code
  msm: mdss: add support for secure display on msm8953.
  msm: mdss: disable ECG feature on 28nm PHY platform
  msm: mdss: send DSI command using TPG when in secure session
  msm: mdss: Update histogram and PA LUT in mdss V3
  msm: mdss: validate layer count before copying userdata
  msm: mdss: Fix potential NULL pointer dereferences
  Revert "msm: mdss: Remove redundant handoff pending check"
  msm: mdss: hdmi: Do not treat intermediate ddc error as failure
  msm: mdss: revisit igc pipe enumeration logic
  msm: mdss: Add PA support for mdss V3
  msm: mdss: Add support for mdss v3 ops
  msm: mdss: Update the postprocessing ops using mdss revision
  msm: mdss: update the caching payload based on mdss version
  msm: clk: hdmi: add support for atomic update
  msm: sde: Add v4l2 rotator driver to enable multi-context usecase
  msm: mdss: refactor pipe type checks
  msm: mdss: add proper layer zorder validation
  msm: mdss: stub bus scaling functions if driver is disabled
  msm: mdss: avoid failure if primary panel pref is not enabled
  msm: adv7533: add support for clients to read audio block
  msm: mdss: add lineptr interrupt support for command mode panels
  msm: mdss: update rotator frame rate in the pipe configuration
  mdss: msm: Avoid excessive failure logs in igc config
  msm: mdss: delay dma commands for split-dsi cmd mode panels
  msm: mdss: enable GDSC before enabling clocks in MDP3 probe
  mdss: dsi: turn off phy power supply during static screen
  mdss: dsi: read dsi and phy revision during dsi ctrl probe
  msm: mdss: Fix memory leak in MDP3 driver
  msm: mdss: delay overlay start until first update for external
  msm: mdss: free splash memory for MSM8909w after splash done
  msm: mdss: hdmi: separate audio from transmitter core
  msm: mdss: disable dsi burst mode when idle is enabled
  msm: mdss: remove invalid csc initialization during hw init
  msm: mdss: dsi: increase dsi error count only for valid errors
  msm: mdss: remove HIST LUT programming in mdss_hw_init
  msm: mdss: dsi: ignore error interrupt when mask not set
  msm: mdss: add support to configure bus scale vectors from dt
  msm: mdss: unstage the pipe if there is z_order mismatch
  msm: mdss: squash MDP3 driver changes and SMMU change
  msm: mdss: Read the bridge chip name and instance id from DTSI
  msm: mdss: Enable continuous splash on bridge chip
  msm: mdss: Fix multiple bridge chip usecase
  msm: mdss: Enable export of mdss interrupt to external driver
  msm: mdss: rotator: turn off rotator clock in wq release
  msm: mdss: fix ulps during suspend feature logic
  clk: msm: mdss: program correct divider for PLL configuration
  msm: mdss: fix DSI PHY timing configuration logic
  msm: mdss: hdmi: add support for hdmi simulation
  msm: mdss: handle race condition in pingpong done counter
  clk: qcom: mdss: calculate pixel clock for HDMI during handoff
  msm: mdss: ensure proper dynamic refresh programming for dual DSI
  msm: mdss: Add fps flag and update blit request version
  msm: mdss: initialize fb split values during fb probe
  mdss: mdp: fix rotator compat layer copy
  msm: mdss: handle DSI ctrl/PHY regulator control properly

Conflicts:
	Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
	Documentation/devicetree/bindings/fb/mdss-dsi.txt
	Documentation/devicetree/bindings/fb/mdss-mdp.txt
	arch/arm/boot/dts/qcom/dsi-adv7533-1080p.dtsi
	arch/arm/boot/dts/qcom/dsi-adv7533-720p.dtsi
	arch/arm/boot/dts/qcom/msm8996-agave-adp.dtsi
	drivers/media/platform/msm/Kconfig
	drivers/media/platform/msm/Makefile
	drivers/misc/hdcp.c
	drivers/video/fbdev/msm/Makefile
	drivers/video/fbdev/msm/mdp3.c
	drivers/video/fbdev/msm/mdp3.h
	drivers/video/fbdev/msm/mdp3_ctrl.c
	drivers/video/fbdev/msm/mdp3_ctrl.h
	drivers/video/fbdev/msm/mdp3_dma.c
	drivers/video/fbdev/msm/mdp3_dma.h
	drivers/video/fbdev/msm/mdp3_hwio.h
	drivers/video/fbdev/msm/mdp3_ppp.c
	drivers/video/fbdev/msm/mdp3_ppp.h
	drivers/video/fbdev/msm/mdp3_ppp_hwio.c
	drivers/video/fbdev/msm/mdss.h
	drivers/video/fbdev/msm/mdss_compat_utils.c
	drivers/video/fbdev/msm/mdss_dba_utils.c
	drivers/video/fbdev/msm/mdss_dba_utils.h
	drivers/video/fbdev/msm/mdss_debug.c
	drivers/video/fbdev/msm/mdss_dsi.c
	drivers/video/fbdev/msm/mdss_dsi.h
	drivers/video/fbdev/msm/mdss_dsi_clk.c
	drivers/video/fbdev/msm/mdss_dsi_host.c
	drivers/video/fbdev/msm/mdss_dsi_panel.c
	drivers/video/fbdev/msm/mdss_fb.c
	drivers/video/fbdev/msm/mdss_fb.h
	drivers/video/fbdev/msm/mdss_hdmi_edid.c
	drivers/video/fbdev/msm/mdss_hdmi_hdcp2p2.c
	drivers/video/fbdev/msm/mdss_hdmi_tx.c
	drivers/video/fbdev/msm/mdss_hdmi_tx.h
	drivers/video/fbdev/msm/mdss_hdmi_util.c
	drivers/video/fbdev/msm/mdss_mdp.c
	drivers/video/fbdev/msm/mdss_mdp.h
	drivers/video/fbdev/msm/mdss_mdp_ctl.c
	drivers/video/fbdev/msm/mdss_mdp_hwio.h
	drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
	drivers/video/fbdev/msm/mdss_mdp_intf_writeback.c
	drivers/video/fbdev/msm/mdss_mdp_layer.c
	drivers/video/fbdev/msm/mdss_mdp_overlay.c
	drivers/video/fbdev/msm/mdss_mdp_pipe.c
	drivers/video/fbdev/msm/mdss_mdp_pp.c
	drivers/video/fbdev/msm/mdss_mdp_pp.h
	drivers/video/fbdev/msm/mdss_mdp_pp_cache_config.c
	drivers/video/fbdev/msm/mdss_mdp_pp_v1_7.c
	drivers/video/fbdev/msm/mdss_mdp_util.c
	drivers/video/fbdev/msm/mdss_panel.h
	drivers/video/fbdev/msm/mdss_rotator.c
	drivers/video/fbdev/msm/mdss_rotator_internal.h
	drivers/video/fbdev/msm/mdss_smmu.c
	drivers/video/fbdev/msm/msm_dba/adv7533.c
	drivers/video/fbdev/msm/msm_mdss_io_8974.c
	include/uapi/linux/msm_mdp.h
	include/video/msm_dba.h

CRs-Fixed: 1000197d
Change-Id: I521519c8abe8eed6924e2fbe3e1a026126582b77
Signed-off-by: default avatarAdrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: default avatarNarendra Muppalla <narendram@codeaurora.org>
parent 0c323c0a
Loading
Loading
Loading
Loading
+151 −0
Original line number Diff line number Diff line
SDE Rotator

SDE rotator is a v4l2 rotator driver, which manages the rotator hw
block inside the Snapdragon Display Engine (or Mobile Display Subsystem)

Required properties
- compatible:		Must be "qcom,sde-rotator".
- reg:			offset and length of the register set for the device.
- reg-names:		names to refer to register sets related to this device
- interrupt-parent:	phandle for the interrupt controller that
			services interrupts for this device.
- interrupts:		Interrupt associated with rotator.
- <name>-supply:	Phandle for <name> regulator device node.
- qcom,supply-names:	names to refer to regulator device node.
- clocks:		List of Phandles for clock device nodes
			needed by the device.
- clock-names:		List of clock names needed by the device.
Bus Scaling Data:
- qcom,msm-bus,name:		String property describing rotator client.
- qcom,msm-bus,num-cases:	This is the the number of Bus Scaling use cases
				defined in the vectors property. This must be
				set to <3> for rotator driver where use-case 0 is
				used to take off rotator BW votes from the system.
				And use-case 1 & 2 are used in ping-pong fashion
				to generate run-time BW requests.
- qcom,msm-bus,num-paths:	This represents the number of paths in each
				Bus Scaling Usecase. This value depends on
				how many number of AXI master ports are
				dedicated to rotator for particular chipset.
- qcom,msm-bus,vectors-KBps:	* A series of 4 cell properties, with a format
				of (src, dst, ab, ib) which is defined at
				Documentation/devicetree/bindings/arm/msm/msm_bus.txt
				* Current values of src & dst are defined at
				include/linux/msm-bus-board.h
				src values allowed for rotator are:
					25 = MSM_BUS_MASTER_ROTATOR
				dst values allowed for rotator are:
					512 = MSM_BUS_SLAVE_EBI_CH0
				ab: Represents aggregated bandwidth.
				ib: Represents instantaneous bandwidth.
				* Total number of 4 cell properties will be
				(number of use-cases * number of paths).
				* These values will be overridden by the driver
				based on the run-time requirements. So initial
				ab and ib values defined here are random and
				bare no logic except for the use-case 0 where ab
				and ib values needs to be 0.
				* Define realtime vector properties followed by
				non-realtime vector properties.

Optional properties
- qcom,rot-vbif-settings: 	Array with key-value pairs of constant VBIF register
				settings used to setup MDSS QoS for optimum performance.
				The key used should be offset from "rot_vbif_phys" register
				defined in reg property.
- qcom,mdss-rot-block-size:	This integer value indicates the size of a memory block
				(in pixels) to be used by the rotator. If this property
				is not specified, then a default value of 128 pixels
				would be used.
- qcom,mdss-highest-bank-bit:	This integer value indicate tile format as opposed to usual
				linear format. The value tells the GPU highest memory
				bank bit used.
- qcom,mdss-default-ot-wr-limit: This integer value indicates maximum number of pending
				writes that can be allowed on each WR xin.
				This value can be used to reduce the pending writes
				limit and can be tuned to match performance
				requirements depending upon system state.
				Some platforms require a dynamic ot limiting in
				some cases. Setting this default ot write limit
				will enable this dynamic limiting for the write
				operations in the platforms that require these
				limits.
- qcom,mdss-default-ot-rd-limit: This integer value indicates the default number of pending
				reads that can be allowed on each RD xin.
				Some platforms require a dynamic ot limiting in
				some cases. Setting this default ot read limit
				will enable this dynamic limiting for the read
				operations in the platforms that require these
				limits.
- qcom,mdss-rot-vbif-qos-setting: This array is used to program vbif qos remapper register
				  priority for rotator clients.
- qcom,mdss-rot-mode:		This is integer value indicates operation mode
				of the rotator device

Subnode properties:
- compatible:		Compatible name used in smmu v2.
			smmu_v2 names should be:
			"qcom,smmu_sde_rot_unsec"- smmu context bank device for
						unsecure rotation domain.
			"qcom,smmu_sde_rot_sec"	- smmu context bank device for
						secure rotation domain.
- iommus:		specifies the SID's used by this context bank
- gdsc-mdss-supply: 	Phandle for mdss supply regulator device node.
- clocks:		List of Phandles for clock device nodes
			needed by the device.
- clock-names:		List of clock names needed by the device.


Example:
	mdss_rotator: qcom,mdss_rotator {
		compatible = "qcom,sde_rotator";
		reg = <0xfd900000 0x22100>,
			<0xfd925000 0x1000>;
		reg-names = "mdp_phys", "rot_vbif_phys";
		interrupt-parent = <&mdss_mdp>;
		interrupts = <2 0>;

		qcom,mdss-mdp-reg-offset = <0x00001000>;

		rot-vdd-supply = <&gdsc_mdss>;
		qcom,supply-names = "rot-vdd";

		clocks = <&clock_mmss clk_mmss_mdss_ahb_clk>,
			<&clock_mmss clk_mmss_mdss_rot_clk>;
		clock-names = "iface_clk", "rot_core_clk";

		qcom,mdss-highest-bank-bit = <0x2>;

		/* Bus Scale Settings */
		qcom,msm-bus,name = "mdss_rotator";
		qcom,msm-bus,num-cases = <3>;
		qcom,msm-bus,num-paths = <1>;
		qcom,msm-bus,vectors-KBps =
			<25 512 0 0>,
			<25 512 0 6400000>,
			<25 512 0 6400000>;

		/* VBIF QoS remapper settings*/
		qcom,mdss-rot-vbif-qos-setting = <1 1 1 1>;

		qcom,mdss-default-ot-rd-limit = <8>;
		qcom,mdss-default-ot-wr-limit = <16>;

		smmu_rot_unsec: qcom,smmu_rot_unsec_cb {
			compatible = "qcom,smmu_sde_rot_unsec";
			iommus = <&mdp_smmu 0xe00>;
			gdsc-mdss-supply = <&gdsc_bimc_smmu>;
			clocks = <&clock_mmss clk_bimc_smmu_ahb_clk>,
				<&clock_mmss clk_bimc_smmu_axi_clk>;
			clock-names = "rot_ahb_clk", "rot_axi_clk";
		};

		smmu_sde_rot_sec: qcom,smmu_sde_rot_sec_cb {
			compatible = "qcom,smmu_sde_rot_sec";
			iommus = <&mmss_smmu 0xe01>;
			gdsc-mdss-supply = <&gdsc_bimc_smmu>;
			clocks = <&clock_mmss clk_bimc_smmu_ahb_clk>,
				<&clock_mmss clk_bimc_smmu_axi_clk>;
			clock-names = "rot_ahb_clk", "rot_axi_clk";
		};
	};
+15 −1
Original line number Diff line number Diff line
@@ -99,6 +99,14 @@ int post_n1_div_set_div(struct div_clk *clk, int div)
	struct mdss_pll_resources *pll = clk->priv;
	struct dsi_pll_db *pdb;
	struct dsi_pll_output *pout;
	int rc;
	u32 n1div = 0;

	rc = mdss_pll_resource_enable(pll, true);
	if (rc) {
		pr_err("Failed to enable mdss dsi pll resources\n");
		return rc;
	}

	pdb = (struct dsi_pll_db *)pll->priv;
	pout = &pdb->out;
@@ -116,10 +124,16 @@ int post_n1_div_set_div(struct div_clk *clk, int div)
	pout->pll_postdiv = 1;	/* fixed, divided by 1 */
	pout->pll_n1div  = div;

	n1div = MDSS_PLL_REG_R(pll->pll_base, DSIPHY_CMN_CLK_CFG0);
	n1div &= ~0xf;
	n1div |= (div & 0xf);
	MDSS_PLL_REG_W(pll->pll_base, DSIPHY_CMN_CLK_CFG0, n1div);
	/* ensure n1 divider is programed */
	wmb();
	pr_debug("ndx=%d div=%d postdiv=%x n1div=%x\n",
			pll->index, div, pout->pll_postdiv, pout->pll_n1div);

	/* registers committed at pll_db_commit_8996() */
	mdss_pll_resource_enable(pll, false);

	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -464,7 +464,7 @@ static struct clk_lookup mdss_dsi_pllcc_8996_1[] = {
int dsi_pll_clock_register_8996(struct platform_device *pdev,
				struct mdss_pll_resources *pll_res)
{
	int rc, ndx;
	int rc = 0, ndx;
	int const ssc_freq_default = 31500; /* default h/w recommended value */
	int const ssc_ppm_default = 5000; /* default h/w recommended value */
	struct dsi_pll_db *pdb;
+194 −13
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@
#define HDMI_300MHZ_BIT_CLK_HZ                   300000000
#define HDMI_282MHZ_BIT_CLK_HZ                   282000000
#define HDMI_250MHZ_BIT_CLK_HZ                   250000000
#define HDMI_KHZ_TO_HZ                           1000

/* PLL REGISTERS */
#define QSERDES_COM_ATB_SEL1                     (0x000)
@@ -1414,7 +1415,7 @@ static int hdmi_8996_v3_calculate(u32 pix_clk,
	cfg->com_lock_cmp1_mode0 = (pll_cmp & 0xFF);
	cfg->com_lock_cmp2_mode0 = ((pll_cmp & 0xFF00) >> 8);
	cfg->com_lock_cmp3_mode0 = ((pll_cmp & 0x30000) >> 16);
	cfg->com_lock_cmp_en = 0x0;
	cfg->com_lock_cmp_en = 0x04;
	cfg->com_core_clk_en = 0x2C;
	cfg->com_coreclk_div = HDMI_CORECLK_DIV;
	cfg->phy_mode = (bclk > HDMI_HIGH_FREQ_BIT_CLK_THRESHOLD) ? 0x10 : 0x0;
@@ -2208,14 +2209,82 @@ static int hdmi_8996_v3_1p8_vco_enable(struct clk *c)
	return hdmi_8996_vco_enable(c, HDMI_VERSION_8996_V3_1_8);
}

static int hdmi_8996_vco_get_lock_range(struct clk *c, unsigned long pixel_clk)
{
	u32 rng = 64, cmp_cnt = 1024;
	u32 coreclk_div = 5, clks_pll_divsel = 2;
	u32 vco_freq, vco_ratio, ppm_range;
	u64 bclk;
	struct hdmi_8996_v3_post_divider pd;

	bclk = ((u64)pixel_clk) * HDMI_BIT_CLK_TO_PIX_CLK_RATIO;

	DEV_DBG("%s: rate=%ld\n", __func__, pixel_clk);

	if (hdmi_8996_v3_get_post_div(&pd, bclk) ||
		pd.vco_ratio <= 0 || pd.vco_freq <= 0) {
		DEV_ERR("%s: couldn't get post div\n", __func__);
		return -EINVAL;
	}

	do_div(pd.vco_freq, HDMI_KHZ_TO_HZ * HDMI_KHZ_TO_HZ);

	vco_freq  = (u32) pd.vco_freq;
	vco_ratio = (u32) pd.vco_ratio;

	DEV_DBG("%s: freq %d, ratio %d\n", __func__,
		vco_freq, vco_ratio);

	ppm_range = (rng * HDMI_REF_CLOCK) / cmp_cnt;
	ppm_range /= vco_freq / vco_ratio;
	ppm_range *= coreclk_div * clks_pll_divsel;

	DEV_DBG("%s: ppm range: %d\n", __func__, ppm_range);

	return ppm_range;
}

static int hdmi_8996_vco_rate_atomic_update(struct clk *c,
	unsigned long rate, u32 ver)
{
	struct hdmi_pll_vco_clk *vco = to_hdmi_8996_vco_clk(c);
	struct mdss_pll_resources *io = vco->priv;
	void __iomem *pll;
	struct hdmi_8996_phy_pll_reg_cfg cfg = {0};
	int rc = 0;

	rc = hdmi_8996_calculate(rate, &cfg, ver);
	if (rc) {
		DEV_ERR("%s: PLL calculation failed\n", __func__);
		goto end;
	}

	pll = io->pll_base;

	MDSS_PLL_REG_W(pll, QSERDES_COM_DEC_START_MODE0,
		       cfg.com_dec_start_mode0);
	MDSS_PLL_REG_W(pll, QSERDES_COM_DIV_FRAC_START1_MODE0,
		       cfg.com_div_frac_start1_mode0);
	MDSS_PLL_REG_W(pll, QSERDES_COM_DIV_FRAC_START2_MODE0,
		       cfg.com_div_frac_start2_mode0);
	MDSS_PLL_REG_W(pll, QSERDES_COM_DIV_FRAC_START3_MODE0,
		       cfg.com_div_frac_start3_mode0);

	MDSS_PLL_REG_W(pll, QSERDES_COM_FREQ_UPDATE, 0x01);
	MDSS_PLL_REG_W(pll, QSERDES_COM_FREQ_UPDATE, 0x00);

	DEV_DBG("%s: updated to rate %ld\n", __func__, rate);
end:
	return rc;
}

static int hdmi_8996_vco_set_rate(struct clk *c, unsigned long rate, u32 ver)
{
	struct hdmi_pll_vco_clk *vco = to_hdmi_8996_vco_clk(c);
	struct mdss_pll_resources *io = vco->priv;
	void __iomem		*pll_base;
	void __iomem		*phy_base;
	unsigned int set_power_dwn = 0;
	int rc;
	bool atomic_update = false;
	int rc, pll_lock_range;

	rc = mdss_pll_resource_enable(io, true);
	if (rc) {
@@ -2223,17 +2292,36 @@ static int hdmi_8996_vco_set_rate(struct clk *c, unsigned long rate, u32 ver)
		return rc;
	}

	if (io->pll_on)
		set_power_dwn = 1;
	DEV_DBG("%s: rate %ld\n", __func__, rate);

	if (MDSS_PLL_REG_R(io->pll_base, QSERDES_COM_C_READY_STATUS) & BIT(0) &&
		MDSS_PLL_REG_R(io->phy_base, HDMI_PHY_STATUS) & BIT(0)) {
		pll_lock_range = hdmi_8996_vco_get_lock_range(c, vco->rate);

		if (pll_lock_range > 0 && vco->rate) {
			u32 range_limit;

			range_limit  = vco->rate *
				(pll_lock_range / HDMI_KHZ_TO_HZ);
			range_limit /= HDMI_KHZ_TO_HZ;

			DEV_DBG("%s: range limit %d\n", __func__, range_limit);

	pll_base = io->pll_base;
	phy_base = io->phy_base;
			if (abs(rate - vco->rate) < range_limit)
				atomic_update = true;
		}
	}

	DEV_DBG("HDMI PIXEL CLK rate=%ld\n", rate);
	if (io->pll_on && !atomic_update)
		set_power_dwn = 1;

	if (atomic_update) {
		hdmi_8996_vco_rate_atomic_update(c, rate, ver);
	} else {
		rc = hdmi_8996_phy_pll_set_clk_rate(c, rate, ver);
		if (rc)
			DEV_ERR("%s: Failed to set clk rate\n", __func__);
	}

	mdss_pll_resource_enable(io, false);

@@ -2266,9 +2354,102 @@ static int hdmi_8996_v3_1p8_vco_set_rate(struct clk *c, unsigned long rate)
	return hdmi_8996_vco_set_rate(c, rate, HDMI_VERSION_8996_V3_1_8);
}

static unsigned long hdmi_get_hsclk_sel_divisor(unsigned long hsclk_sel)
{
	unsigned long divisor;

	switch (hsclk_sel) {
	case 0:
		divisor = 2;
		break;
	case 1:
		divisor = 6;
		break;
	case 2:
		divisor = 10;
		break;
	case 3:
		divisor = 14;
		break;
	case 4:
		divisor = 3;
		break;
	case 5:
		divisor = 9;
		break;
	case 6:
	case 13:
		divisor = 15;
		break;
	case 7:
		divisor = 21;
		break;
	case 8:
		divisor = 4;
		break;
	case 9:
		divisor = 12;
		break;
	case 10:
		divisor = 20;
		break;
	case 11:
		divisor = 28;
		break;
	case 12:
		divisor = 5;
		break;
	case 14:
		divisor = 25;
		break;
	case 15:
		divisor = 35;
		break;
	default:
		divisor = 1;
		DEV_ERR("%s: invalid hsclk_sel value = %lu",
				__func__, hsclk_sel);
		break;
	}

	return divisor;
}

static unsigned long hdmi_8996_vco_get_rate(struct clk *c)
{
	unsigned long freq = 0;
	unsigned long freq = 0, hsclk_sel = 0, tx_band = 0, dec_start = 0,
		      div_frac_start = 0, vco_clock_freq = 0;
	struct hdmi_pll_vco_clk *vco = to_hdmi_8996_vco_clk(c);
	struct mdss_pll_resources *io = vco->priv;

	if (mdss_pll_resource_enable(io, true)) {
		DEV_ERR("%s: pll resource can't be enabled\n", __func__);
		return freq;
	}

	dec_start = MDSS_PLL_REG_R(io->pll_base, QSERDES_COM_DEC_START_MODE0);

	div_frac_start =
		MDSS_PLL_REG_R(io->pll_base,
				QSERDES_COM_DIV_FRAC_START1_MODE0) |
		MDSS_PLL_REG_R(io->pll_base,
				QSERDES_COM_DIV_FRAC_START2_MODE0) << 8 |
		MDSS_PLL_REG_R(io->pll_base,
				QSERDES_COM_DIV_FRAC_START3_MODE0) << 16;

	vco_clock_freq = (dec_start + (div_frac_start / (1 << 20)))
		* 4 * (HDMI_REF_CLOCK);

	hsclk_sel = MDSS_PLL_REG_R(io->pll_base, QSERDES_COM_HSCLK_SEL) & 0x15;
	hsclk_sel = hdmi_get_hsclk_sel_divisor(hsclk_sel);
	tx_band = MDSS_PLL_REG_R(io->pll_base + HDMI_TX_L0_BASE_OFFSET,
			QSERDES_TX_L0_TX_BAND) & 0x3;

	freq = vco_clock_freq / (10 * hsclk_sel * (1 << tx_band));

	mdss_pll_resource_enable(io, false);

	DEV_DBG("%s: freq = %lu\n", __func__, freq);

	return freq;
}
+8 −0
Original line number Diff line number Diff line
config MSM_SDE_ROTATOR
	bool "QTI V4L2 based SDE Rotator"
	depends on ARCH_MSM && VIDEO_V4L2
	select V4L2_MEM2MEM_DEV
	select VIDEOBUF2_CORE
	select SW_SYNC if SYNC
	---help---
	  Enable support of V4L2 rotator driver.
 No newline at end of file
Loading