diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 10 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_dp_mst_topology.c | 9 |
2 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 440cfa91162a..c53ecbd9abdd 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
| @@ -332,8 +332,15 @@ update_connector_routing(struct drm_atomic_state *state, | |||
| 332 | * about is ensuring that userspace can't do anything but shut off the | 332 | * about is ensuring that userspace can't do anything but shut off the |
| 333 | * display on a connector that was destroyed after it's been notified, | 333 | * display on a connector that was destroyed after it's been notified, |
| 334 | * not before. | 334 | * not before. |
| 335 | * | ||
| 336 | * Additionally, we also want to ignore connector registration when | ||
| 337 | * we're trying to restore an atomic state during system resume since | ||
| 338 | * there's a chance the connector may have been destroyed during the | ||
| 339 | * process, but it's better to ignore that then cause | ||
| 340 | * drm_atomic_helper_resume() to fail. | ||
| 335 | */ | 341 | */ |
| 336 | if (drm_connector_is_unregistered(connector) && crtc_state->active) { | 342 | if (!state->duplicated && drm_connector_is_unregistered(connector) && |
| 343 | crtc_state->active) { | ||
| 337 | DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] is not registered\n", | 344 | DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] is not registered\n", |
| 338 | connector->base.id, connector->name); | 345 | connector->base.id, connector->name); |
| 339 | return -EINVAL; | 346 | return -EINVAL; |
| @@ -3180,6 +3187,7 @@ drm_atomic_helper_duplicate_state(struct drm_device *dev, | |||
| 3180 | return ERR_PTR(-ENOMEM); | 3187 | return ERR_PTR(-ENOMEM); |
| 3181 | 3188 | ||
| 3182 | state->acquire_ctx = ctx; | 3189 | state->acquire_ctx = ctx; |
| 3190 | state->duplicated = true; | ||
| 3183 | 3191 | ||
| 3184 | drm_for_each_crtc(crtc, dev) { | 3192 | drm_for_each_crtc(crtc, dev) { |
| 3185 | struct drm_crtc_state *crtc_state; | 3193 | struct drm_crtc_state *crtc_state; |
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index dc7ac0c60547..5a99135d39cd 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c | |||
| @@ -3097,6 +3097,10 @@ static int drm_dp_init_vcpi(struct drm_dp_mst_topology_mgr *mgr, | |||
| 3097 | * @port as needed. It is not OK however, to call this function and | 3097 | * @port as needed. It is not OK however, to call this function and |
| 3098 | * drm_dp_atomic_release_vcpi_slots() in the same atomic check phase. | 3098 | * drm_dp_atomic_release_vcpi_slots() in the same atomic check phase. |
| 3099 | * | 3099 | * |
| 3100 | * When &drm_atomic_state.duplicated is set to %true%, this function will not | ||
| 3101 | * perform any error checking and will instead simply return the previously | ||
| 3102 | * recorded VCPI allocations. | ||
| 3103 | * | ||
| 3100 | * See also: | 3104 | * See also: |
| 3101 | * drm_dp_atomic_release_vcpi_slots() | 3105 | * drm_dp_atomic_release_vcpi_slots() |
| 3102 | * drm_dp_mst_atomic_check() | 3106 | * drm_dp_mst_atomic_check() |
| @@ -3181,6 +3185,11 @@ EXPORT_SYMBOL(drm_dp_atomic_find_vcpi_slots); | |||
| 3181 | * drm_dp_atomic_find_vcpi_slots() on the same @port in a single atomic check | 3185 | * drm_dp_atomic_find_vcpi_slots() on the same @port in a single atomic check |
| 3182 | * phase. | 3186 | * phase. |
| 3183 | * | 3187 | * |
| 3188 | * When &drm_atomic_state.duplicated is set, this function will not | ||
| 3189 | * modify the VCPI allocations in &drm_dp_mst_topology_state.vcpis, so that | ||
| 3190 | * those VCPI allocations may be restored as-is from the duplicated state. In | ||
| 3191 | * this scenario, this function will always return 0. | ||
| 3192 | * | ||
| 3184 | * See also: | 3193 | * See also: |
| 3185 | * drm_dp_atomic_find_vcpi_slots() | 3194 | * drm_dp_atomic_find_vcpi_slots() |
| 3186 | * drm_dp_mst_atomic_check() | 3195 | * drm_dp_mst_atomic_check() |
