summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-12-06 11:46:54 +1000
committerDave Airlie <airlied@redhat.com>2007-12-06 11:46:54 +1000
commit8020724615eb6f334d5f90b1e83e6a46d4a126ac (patch)
tree197d188bc55f5cd94decde346e7186d7b63f0dde /linux-core
parent1ba2bb3a7e77576333b09f296abac4c01c895c48 (diff)
check previous mode first
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/intel_fb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux-core/intel_fb.c b/linux-core/intel_fb.c
index 0a3a00b5..c81e4408 100644
--- a/linux-core/intel_fb.c
+++ b/linux-core/intel_fb.c
@@ -320,9 +320,11 @@ static int intelfb_set_par(struct fb_info *info)
drm_mode_attachmode_crtc(dev, par->crtc, par->fb_mode);
}
- if (!drm_crtc_set_mode(par->crtc, drm_mode, 0, 0))
+ if (par->crtc->enabled) {
+ if (!drm_mode_equal(&par->crtc->mode, drm_mode))
+ if (!drm_crtc_set_mode(par->crtc, drm_mode, 0, 0))
return -EINVAL;
-
+ }
return 0;
}