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

Commit b3943c11 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents c82bee2d fa809df2
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
@@ -478,6 +478,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);

@@ -511,10 +512,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: