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

Commit af1ba682 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: fix the panel color distortion issue for RGB565 format"

parents 2f947357 57532fcb
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -426,10 +426,10 @@ static int mdp3_ctrl_get_source_format(u32 imgType)
	return format;
}

static int mdp3_ctrl_get_pack_pattern(struct msm_fb_data_type *mfd)
static int mdp3_ctrl_get_pack_pattern(u32 imgType)
{
	int packPattern = MDP3_DMA_OUTPUT_PACK_PATTERN_RGB;
	if (mfd->fb_imgType == MDP_RGBA_8888)
	if (imgType == MDP_RGBA_8888)
		packPattern = MDP3_DMA_OUTPUT_PACK_PATTERN_BGR;
	return packPattern;
}
@@ -530,7 +530,7 @@ static int mdp3_ctrl_dma_init(struct msm_fb_data_type *mfd,
	outputConfig.out_sel = mdp3_ctrl_get_intf_type(mfd);
	outputConfig.bit_mask_polarity = 0;
	outputConfig.color_components_flip = 0;
	outputConfig.pack_pattern = mdp3_ctrl_get_pack_pattern(mfd);
	outputConfig.pack_pattern = mdp3_ctrl_get_pack_pattern(mfd->fb_imgType);
	outputConfig.pack_align = MDP3_DMA_OUTPUT_PACK_ALIGN_LSB;
	outputConfig.color_comp_out_bits = (MDP3_DMA_OUTPUT_COMP_BITS_8 << 4) |
					(MDP3_DMA_OUTPUT_COMP_BITS_8 << 2)|
@@ -896,6 +896,8 @@ static int mdp3_overlay_set(struct msm_fb_data_type *mfd,
				dma->source_config.format != format) {
			dma->source_config.format = format;
			dma->source_config.stride = stride;
			dma->output_config.pack_pattern =
				mdp3_ctrl_get_pack_pattern(req->src.format);
			mdp3_clk_enable(1, 0);
			mdp3_session->dma->dma_config_source(dma);
			mdp3_clk_enable(0, 0);
@@ -925,6 +927,8 @@ static int mdp3_overlay_unset(struct msm_fb_data_type *mfd, int ndx)
		struct mdp3_dma *dma = mdp3_session->dma;
		dma->source_config.format = format;
		dma->source_config.stride = fix->line_length;
		dma->output_config.pack_pattern =
			mdp3_ctrl_get_pack_pattern(mfd->fb_imgType);
		mdp3_clk_enable(1, 0);
		mdp3_session->dma->dma_config_source(dma);
		mdp3_clk_enable(0, 0);
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-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
@@ -339,6 +339,8 @@ static void mdp3_dmap_config_source(struct mdp3_dma *dma)
	dma_p_cfg_reg = MDP3_REG_READ(MDP3_REG_DMA_P_CONFIG);
	dma_p_cfg_reg &= ~MDP3_DMA_IBUF_FORMAT_MASK;
	dma_p_cfg_reg |= source_config->format << 25;
	dma_p_cfg_reg &= ~MDP3_DMA_PACK_PATTERN_MASK;
	dma_p_cfg_reg |= dma->output_config.pack_pattern << 8;

	dma_p_size = source_config->width | (source_config->height << 16);

+1 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@

/*DMA MASK*/
#define MDP3_DMA_IBUF_FORMAT_MASK 0x06000000
#define MDP3_DMA_PACK_PATTERN_MASK 0x00003f00

/*MISR*/
#define MDP3_REG_MODE_CLK				0x000D0000