summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/nv50_kms_wrapper.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/linux-core/nv50_kms_wrapper.c b/linux-core/nv50_kms_wrapper.c
index 79eb2964..900dfccd 100644
--- a/linux-core/nv50_kms_wrapper.c
+++ b/linux-core/nv50_kms_wrapper.c
@@ -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);