|
@@ -830,7 +830,7 @@ static int _sde_crtc_set_crtc_roi(struct drm_crtc *crtc,
|
|
int i = 0;
|
|
int i = 0;
|
|
int rc;
|
|
int rc;
|
|
bool is_crtc_roi_dirty;
|
|
bool is_crtc_roi_dirty;
|
|
- bool is_any_conn_roi_dirty;
|
|
|
|
|
|
+ bool is_conn_roi_dirty;
|
|
|
|
|
|
if (!crtc || !state)
|
|
if (!crtc || !state)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -840,7 +840,6 @@ static int _sde_crtc_set_crtc_roi(struct drm_crtc *crtc,
|
|
crtc_roi = &crtc_state->crtc_roi;
|
|
crtc_roi = &crtc_state->crtc_roi;
|
|
|
|
|
|
is_crtc_roi_dirty = sde_crtc_is_crtc_roi_dirty(state);
|
|
is_crtc_roi_dirty = sde_crtc_is_crtc_roi_dirty(state);
|
|
- is_any_conn_roi_dirty = false;
|
|
|
|
|
|
|
|
for_each_new_connector_in_state(state->state, conn, conn_state, i) {
|
|
for_each_new_connector_in_state(state->state, conn, conn_state, i) {
|
|
struct sde_connector *sde_conn;
|
|
struct sde_connector *sde_conn;
|
|
@@ -859,12 +858,21 @@ static int _sde_crtc_set_crtc_roi(struct drm_crtc *crtc,
|
|
sde_conn = to_sde_connector(conn_state->connector);
|
|
sde_conn = to_sde_connector(conn_state->connector);
|
|
sde_conn_state = to_sde_connector_state(conn_state);
|
|
sde_conn_state = to_sde_connector_state(conn_state);
|
|
|
|
|
|
- is_any_conn_roi_dirty = is_any_conn_roi_dirty ||
|
|
|
|
- msm_property_is_dirty(
|
|
|
|
- &sde_conn->property_info,
|
|
|
|
|
|
+ is_conn_roi_dirty = msm_property_is_dirty(&sde_conn->property_info,
|
|
&sde_conn_state->property_state,
|
|
&sde_conn_state->property_state,
|
|
CONNECTOR_PROP_ROI_V1);
|
|
CONNECTOR_PROP_ROI_V1);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Check against CRTC ROI and Connector ROI not being updated together.
|
|
|
|
+ * This restriction should be relaxed when Connector ROI scaling is
|
|
|
|
+ * supported and while in clone mode.
|
|
|
|
+ */
|
|
|
|
+ if (!sde_encoder_in_clone_mode(sde_conn->encoder) &&
|
|
|
|
+ is_conn_roi_dirty != is_crtc_roi_dirty) {
|
|
|
|
+ SDE_ERROR("connector/crtc rois not updated together\n");
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!mode_info.roi_caps.enabled)
|
|
if (!mode_info.roi_caps.enabled)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
@@ -890,16 +898,6 @@ static int _sde_crtc_set_crtc_roi(struct drm_crtc *crtc,
|
|
conn_roi.w, conn_roi.h);
|
|
conn_roi.w, conn_roi.h);
|
|
}
|
|
}
|
|
|
|
|
|
- /*
|
|
|
|
- * Check against CRTC ROI and Connector ROI not being updated together.
|
|
|
|
- * This restriction should be relaxed when Connector ROI scaling is
|
|
|
|
- * supported.
|
|
|
|
- */
|
|
|
|
- if (is_any_conn_roi_dirty != is_crtc_roi_dirty) {
|
|
|
|
- SDE_ERROR("connector/crtc rois not updated together\n");
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
sde_kms_rect_merge_rectangles(&crtc_state->user_roi_list, crtc_roi);
|
|
sde_kms_rect_merge_rectangles(&crtc_state->user_roi_list, crtc_roi);
|
|
|
|
|
|
/* clear the ROI to null if it matches full screen anyways */
|
|
/* clear the ROI to null if it matches full screen anyways */
|