216,7 → 216,7 |
EXPORT_SYMBOL(drm_helper_crtc_in_use); |
|
/** |
* drm_disable_unused_functions - disable unused objects |
* drm_helper_disable_unused_functions - disable unused objects |
* @dev: DRM device |
* |
* LOCKING: |
572,7 → 572,7 |
struct drm_crtc *tmp; |
int crtc_mask = 1; |
|
// WARN(!crtc, "checking null crtc?"); |
WARN(!crtc, "checking null crtc?"); |
|
dev = crtc->dev; |
|
702,7 → 702,7 |
if (encoder->crtc != crtc) |
continue; |
|
DRM_INFO("%s: set mode %s %x\n", drm_get_encoder_name(encoder), |
DRM_DEBUG("%s: set mode %s %x\n", drm_get_encoder_name(encoder), |
mode->name, mode->base.id); |
encoder_funcs = encoder->helper_private; |
encoder_funcs->mode_set(encoder, mode, adjusted_mode); |
1021,9 → 1021,9 |
int count = 0; |
|
/* disable all the possible outputs/crtcs before entering KMS mode */ |
drm_helper_disable_unused_functions(dev); |
// drm_helper_disable_unused_functions(dev); |
|
drm_fb_helper_parse_command_line(dev); |
// drm_fb_helper_parse_command_line(dev); |
|
count = drm_helper_probe_connector_modes(dev, |
dev->mode_config.max_width, |
1032,7 → 1032,8 |
/* |
* we shouldn't end up with no modes here. |
*/ |
// WARN(!count, "Connected connector with 0 modes\n"); |
if (count == 0) |
printk(KERN_INFO "No connectors reported connected with modes\n"); |
|
drm_setup_crtcs(dev); |
|
1162,6 → 1163,9 |
int drm_helper_resume_force_mode(struct drm_device *dev) |
{ |
struct drm_crtc *crtc; |
struct drm_encoder *encoder; |
struct drm_encoder_helper_funcs *encoder_funcs; |
struct drm_crtc_helper_funcs *crtc_funcs; |
int ret; |
|
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
1174,7 → 1178,26 |
|
if (ret == false) |
DRM_ERROR("failed to set mode on crtc %p\n", crtc); |
|
/* Turn off outputs that were already powered off */ |
if (drm_helper_choose_crtc_dpms(crtc)) { |
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { |
|
if(encoder->crtc != crtc) |
continue; |
|
encoder_funcs = encoder->helper_private; |
if (encoder_funcs->dpms) |
(*encoder_funcs->dpms) (encoder, |
drm_helper_choose_encoder_dpms(encoder)); |
|
crtc_funcs = crtc->helper_private; |
if (crtc_funcs->dpms) |
(*crtc_funcs->dpms) (crtc, |
drm_helper_choose_crtc_dpms(crtc)); |
} |
} |
} |
/* disable the unused connectors while restoring the modesetting */ |
drm_helper_disable_unused_functions(dev); |
return 0; |