Permalink
Browse files

temp display fix

  • Loading branch information...
1 parent c80820f commit 317db5f3fcf0582991aaf593d0475023e4ca089d @mariogrip mariogrip committed Jul 1, 2016
Showing with 38 additions and 34 deletions.
  1. +34 −28 drivers/video/msm/mdss/mdss_mdp_ctl.c
  2. +3 −4 drivers/video/msm/mdss/mdss_mdp_overlay.c
  3. +1 −2 include/linux/msm_mdp.h
@@ -2046,37 +2046,43 @@ void mdss_mdp_set_mixer_roi(struct mdss_mdp_ctl *ctl, struct mdss_rect *roi)
void mdss_mdp_set_roi(struct mdss_mdp_ctl *ctl,
struct mdp_display_commit *data)
{
- struct mdss_rect l_roi, r_roi;
-
- l_roi.x = data->l_roi.x;
- l_roi.y = data->l_roi.y;
- l_roi.w = data->l_roi.w;
- l_roi.h = data->l_roi.h;
-
- r_roi.x = data->r_roi.x;
- r_roi.y = data->r_roi.y;
- r_roi.w = data->r_roi.w;
- r_roi.h = data->r_roi.h;
-
- /* Reset ROI when we have (1) invalid ROI (2) feature disabled */
- if ((!l_roi.w && l_roi.h) || (l_roi.w && !l_roi.h) ||
- (!r_roi.w && r_roi.h) || (r_roi.w && !r_roi.h) ||
- (!l_roi.w && !l_roi.h && !r_roi.w && !r_roi.h) ||
- !ctl->panel_data->panel_info.partial_update_enabled) {
- l_roi = (struct mdss_rect)
- {0, 0, ctl->mixer_left->width, ctl->mixer_left->height};
-
- if (ctl->mixer_right) {
- r_roi = (struct mdss_rect)
- {0, 0, ctl->mixer_right->width,
- ctl->mixer_right->height};
- }
+ struct mdss_rect temp_roi, mixer_roi;
+
+ temp_roi.x = data->roi.x;
+ temp_roi.y = data->roi.y;
+ temp_roi.w = data->roi.w;
+ temp_roi.h = data->roi.h;
+
+ /*
+ * No Partial Update for:
+ * 1) dual DSI panels
+ * 2) non-cmd mode panels
+ */
+ if (!temp_roi.w || !temp_roi.h || ctl->mixer_right ||
+ (ctl->panel_data->panel_info.type != MIPI_CMD_PANEL) ||
+ !ctl->panel_data->panel_info.partial_update_enabled) {
+ temp_roi = (struct mdss_rect)
+ {0, 0, ctl->mixer_left->width,
+ ctl->mixer_left->height};
}
- mdss_mdp_set_mixer_roi(ctl, &l_roi);
+ ctl->roi_changed = 0;
+ if (((temp_roi.x != ctl->roi.x) ||
+ (temp_roi.y != ctl->roi.y)) ||
+ ((temp_roi.w != ctl->roi.w) ||
+ (temp_roi.h != ctl->roi.h))) {
+ ctl->roi = temp_roi;
+ ctl->roi_changed++;
- if (ctl->mixer_right)
- mdss_mdp_set_mixer_roi(ctl->mixer_right->ctl, &r_roi);
+ mixer_roi = ctl->mixer_left->roi;
+ if ((mixer_roi.w != temp_roi.w) ||
+ (mixer_roi.h != temp_roi.h)) {
+ ctl->mixer_left->roi = temp_roi;
+ ctl->mixer_left->params_changed++;
+ }
+ }
+ pr_debug("ROI requested: [%d, %d, %d, %d]\n",
+ ctl->roi.x, ctl->roi.y, ctl->roi.w, ctl->roi.h);
}
static int mdss_mdp_mixer_setup(struct mdss_mdp_ctl *ctl,
@@ -1509,8 +1509,7 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
skip_partial_update = false;
list_for_each_entry(pipe, &mdp5_data->pipes_used, list) {
- in_roi = ctl->mixer_right ?
- &data->r_roi : &data->l_roi;
+ in_roi = &data->roi;
ctl_roi.x = in_roi->x;
ctl_roi.y = in_roi->y;
@@ -1529,10 +1528,10 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
if (!skip_partial_update) {
mdss_mdp_set_roi(ctl, data);
} else {
- temp_data.l_roi = (struct mdp_rect){0, 0,
+ temp_data.roi = (struct mdp_rect){0, 0,
ctl->mixer_left->width, ctl->mixer_left->height};
if (ctl->mixer_right) {
- temp_data.r_roi = (struct mdp_rect) {0, 0,
+ temp_data.roi = (struct mdp_rect) {0, 0,
ctl->mixer_right->width, ctl->mixer_right->height};
}
mdss_mdp_set_roi(ctl, &temp_data);
View
@@ -1076,8 +1076,7 @@ struct mdp_display_commit {
uint32_t flags;
uint32_t wait_for_finish;
struct fb_var_screeninfo var;
- struct mdp_rect l_roi;
- struct mdp_rect r_roi;
+ struct mdp_rect roi;
};
/**

0 comments on commit 317db5f

Please sign in to comment.