summaryrefslogtreecommitdiff
path: root/linux-core/drm_crtc.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-03-07 13:03:42 +1100
committerDave Airlie <airlied@redhat.com>2008-03-07 13:03:42 +1100
commit33cb42a9f7c7c4f4dd91756af55de7352944efa4 (patch)
treefcec87b8a691cdb146320d9631e1f94c53a48e16 /linux-core/drm_crtc.c
parentcf28ca4212662c3c7e4bfbe51aee307ac539fb3d (diff)
make startup of Xorg smoother if the mode doesn't change.
just flip the framebuffer in when required.
Diffstat (limited to 'linux-core/drm_crtc.c')
-rw-r--r--linux-core/drm_crtc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index be491908..e0c85cef 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -1110,13 +1110,17 @@ int drm_crtc_set_config(struct drm_crtc *crtc, struct drm_mode_crtc *crtc_info,
/* We should be able to check here if the fb has the same properties
* and then just flip_or_move it */
if (crtc->fb != fb)
- changed = true;
+ flip_or_move = true;
if (crtc_info->x != crtc->x || crtc_info->y != crtc->y)
flip_or_move = true;
- if (new_mode && !drm_mode_equal(new_mode, &crtc->mode))
+ if (new_mode && !drm_mode_equal(new_mode, &crtc->mode)) {
+ DRM_DEBUG("modes are different\n");
+ drm_mode_debug_printmodeline(dev, &crtc->mode);
+ drm_mode_debug_printmodeline(dev, new_mode);
changed = true;
+ }
list_for_each_entry(output, &dev->mode_config.output_list, head) {
save_crtcs[count++] = output->crtc;
@@ -1161,6 +1165,8 @@ int drm_crtc_set_config(struct drm_crtc *crtc, struct drm_mode_crtc *crtc_info,
}
drm_disable_unused_functions(dev);
} else if (flip_or_move) {
+ if (crtc->fb != fb)
+ crtc->fb = fb;
crtc->funcs->mode_set_base(crtc, crtc_info->x, crtc_info->y);
}