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

Commit de1dfc1f authored by Kalyan Thota's avatar Kalyan Thota Committed by Ajay Singh Parmar
Browse files

drm/msm/sde: allow selection of panel TE GPIOs



Allow separate GPIO configuration such that secondary
ping-pong can choose panel GPIO that can be sourced
to its TE.

CRs-Fixed: 2254681
Change-Id: I72b77267a3830cd052beebf545b4bdcd1ecea6da
Signed-off-by: default avatarKalyan Thota <kalyant@codeaurora.org>
parent d987555b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -101,6 +101,8 @@ Optional properties:
- qcom,sde-dsc-size:		A u32 value indicates the address range for each dsc.
- qcom,sde-cdm-size:		A u32 value indicates the address range for each cdm.
- qcom,sde-pp-size:		A u32 value indicates the address range for each pingpong.
- qcom,sde-te-source:		Array of GPIO sources indicating which pingpong TE is
				sourced to which panel TE gpio.
- qcom,sde-wb-size:		A u32 value indicates the address range for each writeback.
- qcom,sde-len:			A u32 entry for SDE address range.
- qcom,sde-intf-max-prefetch-lines:	Array of u32 values for max prefetch lines on
@@ -535,6 +537,7 @@ Example:
    qcom,sde-pp-off = <0x00071000 0x00071800
			  0x00072000 0x00072800>;
    qcom,sde-pp-slave = <0x0 0x0 0x0 0x0>;
    qcom,sde-te-source = <0x0 0x1 0x0 0x0>;
    qcom,sde-cdm-off = <0x0007a200>;
    qcom,sde-dsc-off = <0x00081000 0x00081400>;
    qcom,sde-intf-max-prefetch-lines = <0x15 0x15 0x15 0x15>;
+3 −1
Original line number Diff line number Diff line
@@ -1658,12 +1658,14 @@ static void _sde_encoder_update_vsync_source(struct sde_encoder_virt *sde_enc,
	}

	if (disp_info->capabilities & MSM_DISPLAY_CAP_CMD_MODE) {

		if (is_dummy)
			vsync_source = SDE_VSYNC_SOURCE_WD_TIMER_1;
		else if (disp_info->is_te_using_watchdog_timer)
			vsync_source = SDE_VSYNC_SOURCE_WD_TIMER_0;
		else
			vsync_source = SDE_VSYNC0_SOURCE_GPIO;
			vsync_source =
				sde_enc->cur_master->hw_pp->caps->te_source;

		for (i = 0; i < sde_enc->num_phys_encs; i++) {
			phys = sde_enc->phys_encs[i];
+6 −0
Original line number Diff line number Diff line
@@ -271,6 +271,7 @@ enum {
	DITHER_LEN,
	DITHER_VER,
	PP_MERGE_3D_ID,
	TE_SOURCE,
	PP_PROP_MAX,
};

@@ -634,6 +635,7 @@ static struct sde_prop_type pp_prop[] = {
	{DITHER_LEN, "qcom,sde-dither-size", false, PROP_TYPE_U32},
	{DITHER_VER, "qcom,sde-dither-version", false, PROP_TYPE_U32},
	{PP_MERGE_3D_ID, "qcom,sde-pp-merge-3d-id", false, PROP_TYPE_U32_ARRAY},
	{TE_SOURCE, "qcom,sde-te-source", false, PROP_TYPE_U32_ARRAY},
};

static struct sde_prop_type dsc_prop[] = {
@@ -2819,6 +2821,10 @@ static int sde_pp_parse_dt(struct device_node *np, struct sde_mdss_cfg *sde_cfg)
		snprintf(pp->name, SDE_HW_BLK_NAME_LEN, "pingpong_%u",
				pp->id - PINGPONG_0);
		pp->len = PROP_VALUE_ACCESS(prop_value, PP_LEN, 0);
		pp->te_source = PROP_VALUE_ACCESS(prop_value, TE_SOURCE, i);
		if (!prop_exists[TE_SOURCE] ||
			pp->te_source > SDE_VSYNC_SOURCE_WD_TIMER_0)
			pp->te_source = SDE_VSYNC0_SOURCE_GPIO;

		sblk->te.base = PROP_VALUE_ACCESS(prop_value, TE_OFF, i);
		sblk->te.id = SDE_PINGPONG_TE;
+1 −0
Original line number Diff line number Diff line
@@ -747,6 +747,7 @@ struct sde_ds_cfg {
 */
struct sde_pingpong_cfg  {
	SDE_HW_BLK_INFO;
	u32 te_source;
	const struct sde_pingpong_sub_blks *sblk;
	int merge_3d_id;
};