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

Commit 14253ff1 authored by Ujwal Patel's avatar Ujwal Patel
Browse files

msm: mdss: fix source split issues with base layer



When source split is enabled, all the layers residing on right
layer mixer (LM) have their dst_x offset relative to left LM's left top
co-ordinate except base layer. Base layer is a special case where it
doesn't abide by this HW rule and to make it work when source split is
enabled, either dst_x of base layer on right LM needs to be relative to
right LM's left top or base layer needs to be staged on both LMs. Since
later approach doesn't fit well with other use-cases, use the first
approach.

Change-Id: Ifa36cdf26f6baf68723d0e0ccad6cad089e8bedb
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 3511ae2a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -693,6 +693,12 @@ static inline bool mdss_mdp_ctl_is_power_on_lp(struct mdss_mdp_ctl *ctl)
	return mdss_panel_is_power_on_lp(ctl->power_state);
}

static inline u32 left_lm_w_from_mfd(struct msm_fb_data_type *mfd)
{
	struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd);
	return (ctl && ctl->mixer_left) ? ctl->mixer_left->width : 0;
}

irqreturn_t mdss_mdp_isr(int irq, void *ptr);
int mdss_iommu_attach(struct mdss_data_type *mdata);
int mdss_iommu_dettach(struct mdss_data_type *mdata);
+0 −6
Original line number Diff line number Diff line
@@ -61,12 +61,6 @@ static inline bool is_ov_right_blend(struct mdp_rect *left_blend,
		(left_blend->h == right_blend->h));
}

static inline u32 left_lm_w_from_mfd(struct msm_fb_data_type *mfd)
{
	struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd);
	return (ctl && ctl->mixer_left) ? ctl->mixer_left->width : 0;
}

/**
 * __is_more_decimation_doable() -
 * @pipe: pointer to pipe data structure
+11 −0
Original line number Diff line number Diff line
@@ -1360,6 +1360,17 @@ static int mdss_mdp_image_setup(struct mdss_mdp_pipe *pipe,
	src_size = (src.h << 16) | src.w;
	src_xy = (src.y << 16) | src.x;
	dst_size = (dst.h << 16) | dst.w;

	/*
	 * Bbase layer requirements are different compared to other layers
	 * located at different stages. If source split is enabled and base
	 * layer is used, base layer on the right LM's x offset is relative
	 * to right LM's co-ordinate system unlike other layers which are
	 * relative to left LM's top-left.
	 */
	if (pipe->mixer_stage == MDSS_MDP_STAGE_BASE && mdata->has_src_split &&
	    dst.x >= left_lm_w_from_mfd(pipe->mfd))
		dst.x -= left_lm_w_from_mfd(pipe->mfd);
	dst_xy = (dst.y << 16) | dst.x;

	ystride0 =  (pipe->src_planes.ystride[0]) |