Loading drivers/video/msm/mdss/mdss_mdp.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -377,6 +377,7 @@ struct mdss_mdp_ctl { /* used for WFD */ /* used for WFD */ u32 dst_format; u32 dst_format; enum mdss_mdp_csc_type csc_type; struct mult_factor dst_comp_ratio; struct mult_factor dst_comp_ratio; u32 clk_rate; u32 clk_rate; Loading drivers/video/msm/mdss/mdss_mdp_cdm.c +4 −2 Original line number Original line Diff line number Diff line /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. * * * This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -110,7 +110,9 @@ static int mdss_mdp_cdm_csc_setup(struct mdss_mdp_cdm *cdm, mdss_mdp_csc_setup(MDSS_MDP_BLOCK_CDM, cdm->num, data->csc_type); mdss_mdp_csc_setup(MDSS_MDP_BLOCK_CDM, cdm->num, data->csc_type); if (data->csc_type == MDSS_MDP_CSC_RGB2YUV_601L) { if ((data->csc_type == MDSS_MDP_CSC_RGB2YUV_601L) || (data->csc_type == MDSS_MDP_CSC_RGB2YUV_601FR) || (data->csc_type == MDSS_MDP_CSC_RGB2YUV_709L)) { op_mode |= BIT(2); /* DST_DATA_FORMAT = YUV */ op_mode |= BIT(2); /* DST_DATA_FORMAT = YUV */ op_mode &= ~BIT(1); /* SRC_DATA_FORMAT = RGB */ op_mode &= ~BIT(1); /* SRC_DATA_FORMAT = RGB */ op_mode |= BIT(0); /* EN = 1 */ op_mode |= BIT(0); /* EN = 1 */ Loading drivers/video/msm/mdss/mdss_mdp_intf_video.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1709,7 +1709,7 @@ static int mdss_mdp_video_cdm_setup(struct mdss_mdp_cdm *cdm, } } setup.out_format = pinfo->out_format; setup.out_format = pinfo->out_format; if (fmt->is_yuv) if (fmt->is_yuv) setup.csc_type = MDSS_MDP_CSC_RGB2YUV_601L; setup.csc_type = MDSS_MDP_CSC_RGB2YUV_601FR; else else setup.csc_type = MDSS_MDP_CSC_RGB2RGB; setup.csc_type = MDSS_MDP_CSC_RGB2RGB; Loading drivers/video/msm/mdss/mdss_mdp_intf_writeback.c +3 −5 Original line number Original line Diff line number Diff line Loading @@ -55,6 +55,7 @@ struct mdss_mdp_writeback_ctx { u16 width; u16 width; u16 height; u16 height; u16 frame_rate; u16 frame_rate; enum mdss_mdp_csc_type csc_type; struct mdss_rect dst_rect; struct mdss_rect dst_rect; u32 dnsc_factor_w; u32 dnsc_factor_w; Loading Loading @@ -165,11 +166,6 @@ static int mdss_mdp_writeback_cdm_setup(struct mdss_mdp_writeback_ctx *ctx, return -EINVAL; return -EINVAL; } } if (fmt->is_yuv) setup.csc_type = MDSS_MDP_CSC_RGB2YUV_601L; else setup.csc_type = MDSS_MDP_CSC_RGB2RGB; switch (fmt->chroma_sample) { switch (fmt->chroma_sample) { case MDSS_MDP_CHROMA_RGB: case MDSS_MDP_CHROMA_RGB: setup.horz_downsampling_type = MDP_CDM_CDWN_DISABLE; setup.horz_downsampling_type = MDP_CDM_CDWN_DISABLE; Loading @@ -193,6 +189,7 @@ static int mdss_mdp_writeback_cdm_setup(struct mdss_mdp_writeback_ctx *ctx, setup.mdp_csc_bit_depth = MDP_CDM_CSC_8BIT; setup.mdp_csc_bit_depth = MDP_CDM_CSC_8BIT; setup.output_width = ctx->width; setup.output_width = ctx->width; setup.output_height = ctx->height; setup.output_height = ctx->height; setup.csc_type = ctx->csc_type; return mdss_mdp_cdm_setup(cdm, &setup); return mdss_mdp_cdm_setup(cdm, &setup); } } Loading Loading @@ -375,6 +372,7 @@ static int mdss_mdp_writeback_prepare_wfd(struct mdss_mdp_ctl *ctl, void *arg) ctx->width = ctl->width; ctx->width = ctl->width; ctx->height = ctl->height; ctx->height = ctl->height; ctx->frame_rate = ctl->frame_rate; ctx->frame_rate = ctl->frame_rate; ctx->csc_type = ctl->csc_type; ctx->dst_rect.x = 0; ctx->dst_rect.x = 0; ctx->dst_rect.y = 0; ctx->dst_rect.y = 0; ctx->dst_rect.w = ctx->width; ctx->dst_rect.w = ctx->width; Loading drivers/video/msm/mdss/mdss_mdp_wfd.c +21 −0 Original line number Original line Diff line number Diff line Loading @@ -131,6 +131,7 @@ int mdss_mdp_wfd_setup(struct mdss_mdp_wfd *wfd, u32 wb_idx = layer->writeback_ndx; u32 wb_idx = layer->writeback_ndx; struct mdss_mdp_ctl *ctl = wfd->ctl; struct mdss_mdp_ctl *ctl = wfd->ctl; struct mdss_mdp_writeback *wb = NULL; struct mdss_mdp_writeback *wb = NULL; struct mdss_mdp_format_params *fmt = NULL; int ret = 0; int ret = 0; u32 width, height, max_mixer_width; u32 width, height, max_mixer_width; Loading Loading @@ -171,6 +172,26 @@ int mdss_mdp_wfd_setup(struct mdss_mdp_wfd *wfd, ctl->roi = (struct mdss_rect) {0, 0, width, height}; ctl->roi = (struct mdss_rect) {0, 0, width, height}; ctl->is_secure = (layer->flags & MDP_LAYER_SECURE_SESSION); ctl->is_secure = (layer->flags & MDP_LAYER_SECURE_SESSION); fmt = mdss_mdp_get_format_params(layer->buffer.format); /* only 3 csc type supported */ if (fmt->is_yuv) { switch (layer->color_space) { case MDP_CSC_ITU_R_601: ctl->csc_type = MDSS_MDP_CSC_RGB2YUV_601L; break; case MDP_CSC_ITU_R_709: ctl->csc_type = MDSS_MDP_CSC_RGB2YUV_709L; break; case MDP_CSC_ITU_R_601_FR: default: ctl->csc_type = MDSS_MDP_CSC_RGB2YUV_601FR; break; } } else { ctl->csc_type = MDSS_MDP_CSC_RGB2RGB; } if (ctl->mdata->wfd_mode == MDSS_MDP_WFD_INTERFACE) { if (ctl->mdata->wfd_mode == MDSS_MDP_WFD_INTERFACE) { ctl->mixer_left = mdss_mdp_mixer_alloc(ctl, ctl->mixer_left = mdss_mdp_mixer_alloc(ctl, MDSS_MDP_MIXER_TYPE_INTF, (width > max_mixer_width), 0); MDSS_MDP_MIXER_TYPE_INTF, (width > max_mixer_width), 0); Loading Loading
drivers/video/msm/mdss/mdss_mdp.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -377,6 +377,7 @@ struct mdss_mdp_ctl { /* used for WFD */ /* used for WFD */ u32 dst_format; u32 dst_format; enum mdss_mdp_csc_type csc_type; struct mult_factor dst_comp_ratio; struct mult_factor dst_comp_ratio; u32 clk_rate; u32 clk_rate; Loading
drivers/video/msm/mdss/mdss_mdp_cdm.c +4 −2 Original line number Original line Diff line number Diff line /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. * * * This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -110,7 +110,9 @@ static int mdss_mdp_cdm_csc_setup(struct mdss_mdp_cdm *cdm, mdss_mdp_csc_setup(MDSS_MDP_BLOCK_CDM, cdm->num, data->csc_type); mdss_mdp_csc_setup(MDSS_MDP_BLOCK_CDM, cdm->num, data->csc_type); if (data->csc_type == MDSS_MDP_CSC_RGB2YUV_601L) { if ((data->csc_type == MDSS_MDP_CSC_RGB2YUV_601L) || (data->csc_type == MDSS_MDP_CSC_RGB2YUV_601FR) || (data->csc_type == MDSS_MDP_CSC_RGB2YUV_709L)) { op_mode |= BIT(2); /* DST_DATA_FORMAT = YUV */ op_mode |= BIT(2); /* DST_DATA_FORMAT = YUV */ op_mode &= ~BIT(1); /* SRC_DATA_FORMAT = RGB */ op_mode &= ~BIT(1); /* SRC_DATA_FORMAT = RGB */ op_mode |= BIT(0); /* EN = 1 */ op_mode |= BIT(0); /* EN = 1 */ Loading
drivers/video/msm/mdss/mdss_mdp_intf_video.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1709,7 +1709,7 @@ static int mdss_mdp_video_cdm_setup(struct mdss_mdp_cdm *cdm, } } setup.out_format = pinfo->out_format; setup.out_format = pinfo->out_format; if (fmt->is_yuv) if (fmt->is_yuv) setup.csc_type = MDSS_MDP_CSC_RGB2YUV_601L; setup.csc_type = MDSS_MDP_CSC_RGB2YUV_601FR; else else setup.csc_type = MDSS_MDP_CSC_RGB2RGB; setup.csc_type = MDSS_MDP_CSC_RGB2RGB; Loading
drivers/video/msm/mdss/mdss_mdp_intf_writeback.c +3 −5 Original line number Original line Diff line number Diff line Loading @@ -55,6 +55,7 @@ struct mdss_mdp_writeback_ctx { u16 width; u16 width; u16 height; u16 height; u16 frame_rate; u16 frame_rate; enum mdss_mdp_csc_type csc_type; struct mdss_rect dst_rect; struct mdss_rect dst_rect; u32 dnsc_factor_w; u32 dnsc_factor_w; Loading Loading @@ -165,11 +166,6 @@ static int mdss_mdp_writeback_cdm_setup(struct mdss_mdp_writeback_ctx *ctx, return -EINVAL; return -EINVAL; } } if (fmt->is_yuv) setup.csc_type = MDSS_MDP_CSC_RGB2YUV_601L; else setup.csc_type = MDSS_MDP_CSC_RGB2RGB; switch (fmt->chroma_sample) { switch (fmt->chroma_sample) { case MDSS_MDP_CHROMA_RGB: case MDSS_MDP_CHROMA_RGB: setup.horz_downsampling_type = MDP_CDM_CDWN_DISABLE; setup.horz_downsampling_type = MDP_CDM_CDWN_DISABLE; Loading @@ -193,6 +189,7 @@ static int mdss_mdp_writeback_cdm_setup(struct mdss_mdp_writeback_ctx *ctx, setup.mdp_csc_bit_depth = MDP_CDM_CSC_8BIT; setup.mdp_csc_bit_depth = MDP_CDM_CSC_8BIT; setup.output_width = ctx->width; setup.output_width = ctx->width; setup.output_height = ctx->height; setup.output_height = ctx->height; setup.csc_type = ctx->csc_type; return mdss_mdp_cdm_setup(cdm, &setup); return mdss_mdp_cdm_setup(cdm, &setup); } } Loading Loading @@ -375,6 +372,7 @@ static int mdss_mdp_writeback_prepare_wfd(struct mdss_mdp_ctl *ctl, void *arg) ctx->width = ctl->width; ctx->width = ctl->width; ctx->height = ctl->height; ctx->height = ctl->height; ctx->frame_rate = ctl->frame_rate; ctx->frame_rate = ctl->frame_rate; ctx->csc_type = ctl->csc_type; ctx->dst_rect.x = 0; ctx->dst_rect.x = 0; ctx->dst_rect.y = 0; ctx->dst_rect.y = 0; ctx->dst_rect.w = ctx->width; ctx->dst_rect.w = ctx->width; Loading
drivers/video/msm/mdss/mdss_mdp_wfd.c +21 −0 Original line number Original line Diff line number Diff line Loading @@ -131,6 +131,7 @@ int mdss_mdp_wfd_setup(struct mdss_mdp_wfd *wfd, u32 wb_idx = layer->writeback_ndx; u32 wb_idx = layer->writeback_ndx; struct mdss_mdp_ctl *ctl = wfd->ctl; struct mdss_mdp_ctl *ctl = wfd->ctl; struct mdss_mdp_writeback *wb = NULL; struct mdss_mdp_writeback *wb = NULL; struct mdss_mdp_format_params *fmt = NULL; int ret = 0; int ret = 0; u32 width, height, max_mixer_width; u32 width, height, max_mixer_width; Loading Loading @@ -171,6 +172,26 @@ int mdss_mdp_wfd_setup(struct mdss_mdp_wfd *wfd, ctl->roi = (struct mdss_rect) {0, 0, width, height}; ctl->roi = (struct mdss_rect) {0, 0, width, height}; ctl->is_secure = (layer->flags & MDP_LAYER_SECURE_SESSION); ctl->is_secure = (layer->flags & MDP_LAYER_SECURE_SESSION); fmt = mdss_mdp_get_format_params(layer->buffer.format); /* only 3 csc type supported */ if (fmt->is_yuv) { switch (layer->color_space) { case MDP_CSC_ITU_R_601: ctl->csc_type = MDSS_MDP_CSC_RGB2YUV_601L; break; case MDP_CSC_ITU_R_709: ctl->csc_type = MDSS_MDP_CSC_RGB2YUV_709L; break; case MDP_CSC_ITU_R_601_FR: default: ctl->csc_type = MDSS_MDP_CSC_RGB2YUV_601FR; break; } } else { ctl->csc_type = MDSS_MDP_CSC_RGB2RGB; } if (ctl->mdata->wfd_mode == MDSS_MDP_WFD_INTERFACE) { if (ctl->mdata->wfd_mode == MDSS_MDP_WFD_INTERFACE) { ctl->mixer_left = mdss_mdp_mixer_alloc(ctl, ctl->mixer_left = mdss_mdp_mixer_alloc(ctl, MDSS_MDP_MIXER_TYPE_INTF, (width > max_mixer_width), 0); MDSS_MDP_MIXER_TYPE_INTF, (width > max_mixer_width), 0); Loading