diff options
| -rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 4231d6db72ec..aba79c494587 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
| @@ -216,7 +216,7 @@ bool drm_helper_crtc_in_use(struct drm_crtc *crtc) | |||
| 216 | EXPORT_SYMBOL(drm_helper_crtc_in_use); | 216 | EXPORT_SYMBOL(drm_helper_crtc_in_use); |
| 217 | 217 | ||
| 218 | /** | 218 | /** |
| 219 | * drm_disable_unused_functions - disable unused objects | 219 | * drm_helper_disable_unused_functions - disable unused objects |
| 220 | * @dev: DRM device | 220 | * @dev: DRM device |
| 221 | * | 221 | * |
| 222 | * LOCKING: | 222 | * LOCKING: |
| @@ -1162,6 +1162,9 @@ EXPORT_SYMBOL(drm_helper_mode_fill_fb_struct); | |||
| 1162 | int drm_helper_resume_force_mode(struct drm_device *dev) | 1162 | int drm_helper_resume_force_mode(struct drm_device *dev) |
| 1163 | { | 1163 | { |
| 1164 | struct drm_crtc *crtc; | 1164 | struct drm_crtc *crtc; |
| 1165 | struct drm_encoder *encoder; | ||
| 1166 | struct drm_encoder_helper_funcs *encoder_funcs; | ||
| 1167 | struct drm_crtc_helper_funcs *crtc_funcs; | ||
| 1165 | int ret; | 1168 | int ret; |
| 1166 | 1169 | ||
| 1167 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 1170 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
| @@ -1174,6 +1177,25 @@ int drm_helper_resume_force_mode(struct drm_device *dev) | |||
| 1174 | 1177 | ||
| 1175 | if (ret == false) | 1178 | if (ret == false) |
| 1176 | DRM_ERROR("failed to set mode on crtc %p\n", crtc); | 1179 | DRM_ERROR("failed to set mode on crtc %p\n", crtc); |
| 1180 | |||
| 1181 | /* Turn off outputs that were already powered off */ | ||
| 1182 | if (drm_helper_choose_crtc_dpms(crtc)) { | ||
| 1183 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { | ||
| 1184 | |||
| 1185 | if(encoder->crtc != crtc) | ||
| 1186 | continue; | ||
| 1187 | |||
| 1188 | encoder_funcs = encoder->helper_private; | ||
| 1189 | if (encoder_funcs->dpms) | ||
| 1190 | (*encoder_funcs->dpms) (encoder, | ||
| 1191 | drm_helper_choose_encoder_dpms(encoder)); | ||
| 1192 | |||
| 1193 | crtc_funcs = crtc->helper_private; | ||
| 1194 | if (crtc_funcs->dpms) | ||
| 1195 | (*crtc_funcs->dpms) (crtc, | ||
| 1196 | drm_helper_choose_crtc_dpms(crtc)); | ||
| 1197 | } | ||
| 1198 | } | ||
| 1177 | } | 1199 | } |
| 1178 | /* disable the unused connectors while restoring the modesetting */ | 1200 | /* disable the unused connectors while restoring the modesetting */ |
| 1179 | drm_helper_disable_unused_functions(dev); | 1201 | drm_helper_disable_unused_functions(dev); |
