|
|
@@ -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,
|
|
|
|
0 comments on commit
317db5f