drm: Not mark crtc state as connectors_changed when a writeback connector attatch to a crtc

The drm core will disable than enable a crtc when is marked as
connectors_changed.

But when we attach a writeback connector to a running
crtc, we really don't need this disable/enable, which
will black a running screen.

Change-Id: I636615f27424bc60496ffc487c218f60fb95d719
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2020-12-22 17:03:04 +08:00
committed by Tao Huang
parent 356f8cb365
commit ae488c03ab
+6 -3
View File
@@ -296,12 +296,14 @@ update_connector_routing(struct drm_atomic_state *state,
if (old_connector_state->crtc != new_connector_state->crtc) {
if (old_connector_state->crtc) {
crtc_state = drm_atomic_get_new_crtc_state(state, old_connector_state->crtc);
crtc_state->connectors_changed = true;
if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
crtc_state->connectors_changed = true;
}
if (new_connector_state->crtc) {
crtc_state = drm_atomic_get_new_crtc_state(state, new_connector_state->crtc);
crtc_state->connectors_changed = true;
if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
crtc_state->connectors_changed = true;
}
}
@@ -386,7 +388,8 @@ update_connector_routing(struct drm_atomic_state *state,
set_best_encoder(state, new_connector_state, new_encoder);
crtc_state->connectors_changed = true;
if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
crtc_state->connectors_changed = true;
DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on [CRTC:%d:%s]\n",
connector->base.id,