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

Commit 9dbab102 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: add csc tables for mdp5 for various color spaces"

parents 7d0b0926 2c426659
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1248,6 +1248,10 @@ void mdss_hw_init(struct mdss_data_type *mdata)
		writel_relaxed(1, offset + 16);
	}

	/* initialize csc matrix default value */
	for (i = 0; i < mdata->nvig_pipes; i++)
		vig[i].csc_coeff_set = MDSS_MDP_CSC_YUV2RGB_709L;

	mdata->nmax_concurrent_ad_hw =
		(mdata->mdp_rev < MDSS_MDP_HW_REV_103) ? 1 : 2;

+21 −3
Original line number Diff line number Diff line
@@ -128,10 +128,14 @@ enum mdss_mdp_block_type {
};

enum mdss_mdp_csc_type {
	MDSS_MDP_CSC_RGB2RGB,
	MDSS_MDP_CSC_YUV2RGB,
	MDSS_MDP_CSC_RGB2YUV,
	MDSS_MDP_CSC_YUV2RGB_601L,
	MDSS_MDP_CSC_YUV2RGB_601FR,
	MDSS_MDP_CSC_YUV2RGB_709L,
	MDSS_MDP_CSC_RGB2YUV_601L,
	MDSS_MDP_CSC_RGB2YUV_601FR,
	MDSS_MDP_CSC_RGB2YUV_709L,
	MDSS_MDP_CSC_YUV2YUV,
	MDSS_MDP_CSC_RGB2RGB,
	MDSS_MDP_MAX_CSC
};

@@ -573,6 +577,7 @@ struct mdss_mdp_pipe {

	wait_queue_head_t free_waitq;
	u32 frame_rate;
	u8 csc_coeff_set;
};

struct mdss_mdp_writeback_arg {
@@ -950,6 +955,19 @@ static inline u32 mdss_mdp_get_cursor_frame_size(struct mdss_data_type *mdata)
	return mdata->max_cursor_size *  mdata->max_cursor_size * 4;
}

static inline uint8_t pp_vig_csc_pipe_val(struct mdss_mdp_pipe *pipe)
{
	switch (pipe->csc_coeff_set) {
	case MDP_CSC_ITU_R_601:
		return MDSS_MDP_CSC_YUV2RGB_601L;
	case MDP_CSC_ITU_R_601_FR:
		return MDSS_MDP_CSC_YUV2RGB_601FR;
	case MDP_CSC_ITU_R_709:
	default:
		return  MDSS_MDP_CSC_YUV2RGB_709L;
	}
}

irqreturn_t mdss_mdp_isr(int irq, void *ptr);
void mdss_mdp_irq_clear(struct mdss_data_type *mdata,
		u32 intr_type, u32 intf_num);
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ static int mdss_mdp_cdm_csc_setup(struct mdss_mdp_cdm *cdm,
	int rc = 0;
	u32 op_mode = 0;

	if (data->csc_type == MDSS_MDP_CSC_RGB2YUV) {
	if (data->csc_type == MDSS_MDP_CSC_RGB2YUV_601L) {
		op_mode |= BIT(2);  /* DST_DATA_FORMAT = YUV */
		op_mode &= ~BIT(1); /* SRC_DATA_FORMAT = RGB */
		op_mode |= BIT(0);  /* EN = 1 */
+1 −1
Original line number Diff line number Diff line
@@ -1261,7 +1261,7 @@ static int mdss_mdp_video_cdm_setup(struct mdss_mdp_cdm *cdm,
	}
	setup.out_format = pinfo->out_format;
	if (fmt->is_yuv)
		setup.csc_type = MDSS_MDP_CSC_RGB2YUV;
		setup.csc_type = MDSS_MDP_CSC_RGB2YUV_601L;
	else
		setup.csc_type = MDSS_MDP_CSC_RGB2RGB;

+2 −2
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ static int mdss_mdp_writeback_cdm_setup(struct mdss_mdp_writeback_ctx *ctx,
	}

	if (fmt->is_yuv)
		setup.csc_type = MDSS_MDP_CSC_RGB2YUV;
		setup.csc_type = MDSS_MDP_CSC_RGB2YUV_601L;
	else
		setup.csc_type = MDSS_MDP_CSC_RGB2RGB;

@@ -258,7 +258,7 @@ static int mdss_mdp_writeback_format_setup(struct mdss_mdp_writeback_ctx *ctx,
	if (ctx->type != MDSS_MDP_WRITEBACK_TYPE_ROTATOR &&
		fmt->is_yuv && !ctl->cdm) {
		mdss_mdp_csc_setup(MDSS_MDP_BLOCK_WB, ctx->wb_num,
				   MDSS_MDP_CSC_RGB2YUV);
				   MDSS_MDP_CSC_RGB2YUV_601L);
		opmode |= (1 << 8) |	/* CSC_EN */
			  (0 << 9) |	/* SRC_DATA=RGB */
			  (1 << 10);	/* DST_DATA=YCBCR */
Loading