NV50: A minor change.

main
Maarten Maathuis 2008-06-27 01:29:30 +02:00
parent 701011224c
commit 01ee5eda9a
1 changed files with 12 additions and 6 deletions

View File

@ -484,6 +484,8 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
*/
if (switch_fb) {
crtc = to_nv50_crtc(set->crtc);
/* set framebuffer */
set->crtc->fb = set->fb;
@ -573,6 +575,8 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
*/
if (modeset) {
crtc = to_nv50_crtc(set->crtc);
/* disconnect unused outputs */
list_for_each_entry(output, &display->outputs, head) {
if (output->crtc) {
@ -586,6 +590,14 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
}
}
/* blank any unused crtcs */
list_for_each_entry(crtc, &display->crtcs, head) {
if (!(crtc_mask & (1 << crtc->index)))
crtc->blank(crtc, TRUE);
}
crtc = to_nv50_crtc(set->crtc);
rval = crtc->set_mode(crtc, hw_mode);
if (rval != 0) {
DRM_ERROR("crtc mode set failed\n");
@ -651,12 +663,6 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
goto out;
}
}
/* blank any unused crtcs */
list_for_each_entry(crtc, &display->crtcs, head) {
if (!(crtc_mask & (1 << crtc->index)))
crtc->blank(crtc, TRUE);
}
}
display->update(display);