Skip to content

Commit

Permalink
msm: mdss: Revert changes for separating out PP flushes from commits
Browse files Browse the repository at this point in the history
MDP flush behavior on MSM8974 needs to have single flush in given vsync
cycle, more than one flushes in same vsync cycle can cause unexpected
behavior such as blank screens, incorrect frame updates on LCD or some
visual artifacts. Currently post processing and frame updates have
independent flush mechanisms which in certain cases can cause visual
artifacts or blank screen. So revert changes to independently flush
MDP registers so that post processing piggybacks on flushes for frame
updates.

Signed-off-by: Ping Li <[email protected]>
Signed-off-by: Pranav Vashi <[email protected]>
Signed-off-by: flar2 <[email protected]>
  • Loading branch information
Ping Li authored and airend committed Jan 25, 2016
1 parent 8c26710 commit 4367b09
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 148 deletions.
39 changes: 12 additions & 27 deletions drivers/video/msm/mdss/mdss_mdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,33 +506,18 @@ int mdss_mdp_smp_setup(struct mdss_data_type *mdata, u32 cnt, u32 size);

int mdss_hw_init(struct mdss_data_type *mdata);

int mdss_mdp_pa_config(struct mdss_mdp_ctl *ctl,
struct mdp_pa_cfg_data *config,
u32 *copyback);
int mdss_mdp_pcc_config(struct mdss_mdp_ctl *ctl,
struct mdp_pcc_cfg_data *cfg_ptr,
u32 *copyback);
int mdss_mdp_igc_lut_config(struct mdss_mdp_ctl *ctl,
struct mdp_igc_lut_data *config,
u32 *copyback, u32 copy_from_kernel);
int mdss_mdp_argc_config(struct mdss_mdp_ctl *ctl,
struct mdp_pgc_lut_data *config,
u32 *copyback);
int mdss_mdp_hist_lut_config(struct mdss_mdp_ctl *ctl,
struct mdp_hist_lut_data *config,
u32 *copyback);
int mdss_mdp_dither_config(struct mdss_mdp_ctl *ctl,
struct mdp_dither_cfg_data *config,
u32 *copyback);
int mdss_mdp_gamut_config(struct mdss_mdp_ctl *ctl,
struct mdp_gamut_cfg_data *config,
u32 *copyback);

int mdss_mdp_histogram_start(struct mdss_mdp_ctl *ctl,
struct mdp_histogram_start_req *req);
int mdss_mdp_histogram_stop(struct mdss_mdp_ctl *ctl, u32 block);
int mdss_mdp_hist_collect(struct mdss_mdp_ctl *ctl,
struct mdp_histogram_data *hist);
int mdss_mdp_pa_config(struct mdp_pa_cfg_data *config, u32 *copyback);
int mdss_mdp_pcc_config(struct mdp_pcc_cfg_data *cfg_ptr, u32 *copyback);
int mdss_mdp_igc_lut_config(struct mdp_igc_lut_data *config, u32 *copyback,
u32 copy_from_kernel);
int mdss_mdp_argc_config(struct mdp_pgc_lut_data *config, u32 *copyback);
int mdss_mdp_hist_lut_config(struct mdp_hist_lut_data *config, u32 *copyback);
int mdss_mdp_dither_config(struct mdp_dither_cfg_data *config, u32 *copyback);
int mdss_mdp_gamut_config(struct mdp_gamut_cfg_data *config, u32 *copyback);

int mdss_mdp_histogram_start(struct mdp_histogram_start_req *req);
int mdss_mdp_histogram_stop(u32 block);
int mdss_mdp_hist_collect(struct mdp_histogram_data *hist);
void mdss_mdp_hist_intr_done(u32 isr);

int mdss_mdp_ad_config(struct msm_fb_data_type *mfd,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/msm/mdss/mdss_mdp_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ struct mdss_mdp_ctl *mdss_mdp_ctl_init(struct mdss_panel_data *pdata,
ctl->dst_format = MDSS_MDP_PANEL_FORMAT_RGB888;
break;
}
mdss_mdp_dither_config(ctl, &dither, NULL);
mdss_mdp_dither_config(&dither, NULL);
}

return ctl;
Expand Down
26 changes: 8 additions & 18 deletions drivers/video/msm/mdss/mdss_mdp_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,11 @@ static int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
pipe->pp_cfg.hist_cfg.frame_cnt;
hist.bit_mask = pipe->pp_cfg.hist_cfg.bit_mask;
hist.num_bins = pipe->pp_cfg.hist_cfg.num_bins;
mdss_mdp_histogram_start(pipe->mixer->ctl,
&hist);
mdss_mdp_histogram_start(&hist);
} else if (pipe->pp_cfg.hist_cfg.ops &
MDP_PP_OPS_DISABLE) {
mdss_mdp_histogram_stop(pipe->mixer->ctl,
pipe->pp_cfg.hist_cfg.block);
mdss_mdp_histogram_stop(
pipe->pp_cfg.hist_cfg.block);
}
}
len = pipe->pp_cfg.hist_lut_cfg.len;
Expand Down Expand Up @@ -1638,7 +1637,6 @@ static int mdss_mdp_pp_ioctl(struct msm_fb_data_type *mfd,
struct msmfb_mdp_pp mdp_pp;
u32 copyback = 0;
u32 copy_from_kernel = 0;
struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd);

ret = copy_from_user(&mdp_pp, argp, sizeof(mdp_pp));
if (ret)
Expand All @@ -1653,37 +1651,32 @@ static int mdss_mdp_pp_ioctl(struct msm_fb_data_type *mfd,

switch (mdp_pp.op) {
case mdp_op_pa_cfg:
ret = mdss_mdp_pa_config(mdp5_data->ctl,
&mdp_pp.data.pa_cfg_data,
ret = mdss_mdp_pa_config(&mdp_pp.data.pa_cfg_data,
&copyback);
break;

case mdp_op_pcc_cfg:
ret = mdss_mdp_pcc_config(mdp5_data->ctl,
&mdp_pp.data.pcc_cfg_data,
ret = mdss_mdp_pcc_config(&mdp_pp.data.pcc_cfg_data,
&copyback);
break;

case mdp_op_lut_cfg:
switch (mdp_pp.data.lut_cfg_data.lut_type) {
case mdp_lut_igc:
ret = mdss_mdp_igc_lut_config(
mdp5_data->ctl,
(struct mdp_igc_lut_data *)
&mdp_pp.data.lut_cfg_data.data,
&copyback, copy_from_kernel);
break;

case mdp_lut_pgc:
ret = mdss_mdp_argc_config(
mdp5_data->ctl,
&mdp_pp.data.lut_cfg_data.data.pgc_lut_data,
&copyback);
break;

case mdp_lut_hist:
ret = mdss_mdp_hist_lut_config(
mdp5_data->ctl,
(struct mdp_hist_lut_data *)
&mdp_pp.data.lut_cfg_data.data, &copyback);
break;
Expand All @@ -1695,13 +1688,11 @@ static int mdss_mdp_pp_ioctl(struct msm_fb_data_type *mfd,
break;
case mdp_op_dither_cfg:
ret = mdss_mdp_dither_config(
mdp5_data->ctl,
&mdp_pp.data.dither_cfg_data,
&copyback);
break;
case mdp_op_gamut_cfg:
ret = mdss_mdp_gamut_config(
mdp5_data->ctl,
&mdp_pp.data.gamut_cfg_data,
&copyback);
break;
Expand Down Expand Up @@ -1752,7 +1743,6 @@ static int mdss_mdp_histo_ioctl(struct msm_fb_data_type *mfd, u32 cmd,
struct mdp_histogram_data hist;
struct mdp_histogram_start_req hist_req;
u32 block;
struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd);

switch (cmd) {
case MSMFB_HISTOGRAM_START:
Expand All @@ -1763,15 +1753,15 @@ static int mdss_mdp_histo_ioctl(struct msm_fb_data_type *mfd, u32 cmd,
if (ret)
return ret;

ret = mdss_mdp_histogram_start(mdp5_data->ctl, &hist_req);
ret = mdss_mdp_histogram_start(&hist_req);
break;

case MSMFB_HISTOGRAM_STOP:
ret = copy_from_user(&block, argp, sizeof(int));
if (ret)
return ret;

ret = mdss_mdp_histogram_stop(mdp5_data->ctl, block);
ret = mdss_mdp_histogram_stop(block);
break;

case MSMFB_HISTOGRAM:
Expand All @@ -1782,7 +1772,7 @@ static int mdss_mdp_histo_ioctl(struct msm_fb_data_type *mfd, u32 cmd,
if (ret)
return ret;

ret = mdss_mdp_hist_collect(mdp5_data->ctl, &hist);
ret = mdss_mdp_hist_collect(&hist);
if (!ret)
ret = copy_to_user(argp, &hist, sizeof(hist));
break;
Expand Down
Loading

0 comments on commit 4367b09

Please sign in to comment.