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

Commit fa809df2 authored by Sree Sesha Aravind Vadrevu's avatar Sree Sesha Aravind Vadrevu
Browse files

msm: mdss: synchronize formats across rotator output and pipe setup



The rules applied to switch formats must be the same across
rotator output and the following pipe setup. Also, yuv rotator
output format should always be set to pseudo planar for MDP
hardware optimality.

Change-Id: I3f5f09bcc599627e47495fab253ec0d9d8d5fa1c
Signed-off-by: default avatarSree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
parent 792ce78d
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -313,14 +313,11 @@ static int mdss_mdp_writeback_prepare_rot(struct mdss_mdp_ctl *ctl, void *arg)
		return -EINVAL;
	}

	if (ctx->bwc_mode || (ctx->rot90 &&
			((mdata->mdp_rev < MDSS_MDP_HW_REV_102)
			|| !fmt->is_yuv)))
		format = mdss_mdp_get_rotator_dst_format(rot->format, 1,
			ctx->bwc_mode);
	if (ctx->bwc_mode || ctx->rot90)
		format = mdss_mdp_get_rotator_dst_format(rot->format,
				ctx->rot90, ctx->bwc_mode);
	else
		format = mdss_mdp_get_rotator_dst_format(rot->format, 0,
			ctx->bwc_mode);
		format = rot->format;

	if (ctx->rot90) {
		ctx->opmode |= BIT(5); /* ROT 90 */
+8 −3
Original line number Diff line number Diff line
@@ -462,6 +462,7 @@ static int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
	struct mdp_histogram_start_req hist;
	int ret;
	u32 bwc_enabled;
	u32 rot90;
	bool is_vig_needed = false;
	u32 left_lm_w = left_lm_w_from_mfd(mfd);

@@ -495,10 +496,14 @@ static int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
	}

	bwc_enabled = req->flags & MDP_BWC_EN;
	if (bwc_enabled || ((req->flags & MDP_SOURCE_ROTATED_90)
		&& ((mdata->mdp_rev < MDSS_MDP_HW_REV_102) || !fmt->is_yuv))) {
	rot90 = req->flags & MDP_SOURCE_ROTATED_90;

	/*
	 * Always set yuv rotator output to pseudo planar.
	 */
	if (bwc_enabled || rot90) {
		req->src.format =
			mdss_mdp_get_rotator_dst_format(req->src.format, 1,
			mdss_mdp_get_rotator_dst_format(req->src.format, rot90,
				bwc_enabled);
		fmt = mdss_mdp_get_format_params(req->src.format);
		if (!fmt) {
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -51,8 +51,8 @@ struct mdss_mdp_rotator_session {
	struct work_struct commit_work;
};

static inline u32 mdss_mdp_get_rotator_dst_format(u32 in_format, u8 in_rot90,
	u8 bwc)
static inline u32 mdss_mdp_get_rotator_dst_format(u32 in_format, u32 in_rot90,
	u32 bwc)
{
	switch (in_format) {
	case MDP_RGB_565: