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

Commit 6f6f50a2 authored by Krishna Chaitanya Devarakonda's avatar Krishna Chaitanya Devarakonda Committed by Abhijith Desai
Browse files

msm: mdss: Fix panel orientation handling for split displays



For split display panels, when panel has 180 flip or HFLIP,
the source layers needs to be swapped instead of the mixers.
SDM will take care of the source swap and rectangle
recalculations.
This change is to remove the mixer swap, and to expose the panel
flip property through sysfs, so that SDM can flip the source
layers to maintain pipe priority.

Change-Id: I47a7dd38dc1e45dd3f7edbd189c9403900b74eea
Signed-off-by: default avatarKrishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
parent c061ae43
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -597,7 +597,8 @@ static ssize_t mdss_fb_get_panel_info(struct device *dev,
			"white_chromaticity_x=%d\nwhite_chromaticity_y=%d\n"
			"red_chromaticity_x=%d\nred_chromaticity_y=%d\n"
			"green_chromaticity_x=%d\ngreen_chromaticity_y=%d\n"
			"blue_chromaticity_x=%d\nblue_chromaticity_y=%d\n",
			"blue_chromaticity_x=%d\nblue_chromaticity_y=%d\n"
			"panel_orientation=%d\n",
			pinfo->partial_update_enabled,
			pinfo->roi_alignment.xstart_pix_align,
			pinfo->roi_alignment.width_pix_align,
@@ -620,7 +621,8 @@ static ssize_t mdss_fb_get_panel_info(struct device *dev,
			pinfo->hdr_properties.display_primaries[4],
			pinfo->hdr_properties.display_primaries[5],
			pinfo->hdr_properties.display_primaries[6],
			pinfo->hdr_properties.display_primaries[7]);
			pinfo->hdr_properties.display_primaries[7],
			pinfo->panel_orientation);

	return ret;
}
+0 −10
Original line number Diff line number Diff line
@@ -490,9 +490,6 @@ static int __configure_pipe_params(struct msm_fb_data_type *mfd,

	pipe->comp_ratio = layer->buffer.comp_ratio;

	if (mfd->panel_orientation)
		layer->flags ^= mfd->panel_orientation;

	pipe->mixer_left = mixer;
	pipe->mfd = mfd;
	pipe->play_cnt = 0;
@@ -631,13 +628,6 @@ static int __configure_pipe_params(struct msm_fb_data_type *mfd,
	pipe->multirect.mode = vinfo->multirect.mode;
	pipe->mixer_stage = layer->z_order;

	if (mfd->panel_orientation & MDP_FLIP_LR)
		pipe->dst.x = pipe->mixer_left->width - pipe->dst.x -
			pipe->dst.w;
	if (mfd->panel_orientation & MDP_FLIP_UD)
		pipe->dst.y = pipe->mixer_left->height - pipe->dst.y -
			pipe->dst.h;

	memcpy(&pipe->layer, layer, sizeof(struct mdp_input_layer));

	mdss_mdp_overlay_set_chroma_sample(pipe);
+0 −4
Original line number Diff line number Diff line
@@ -6649,10 +6649,6 @@ int mdss_mdp_overlay_init(struct msm_fb_data_type *mfd)

	mfd->panel_orientation = mfd->panel_info->panel_orientation;

	if ((mfd->panel_info->panel_orientation & MDP_FLIP_LR) &&
	    (mfd->split_mode == MDP_DUAL_LM_DUAL_DISPLAY))
		mdp5_data->mixer_swap = true;

	rc = sysfs_create_group(&dev->kobj, &mdp_overlay_sysfs_group);
	if (rc) {
		pr_err("vsync sysfs group creation failed, ret=%d\n", rc);