summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2008-08-18 11:13:20 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-08-18 11:13:20 +0800
commit76b5a7ff5c943cfaa254d2fd94b6397c91d1f8e6 (patch)
treef24e55ca570affb7c2b1509bd2d3d49534ed6099
parent6eb3e0f2f4e43e436029fc82e458ac8de1f94745 (diff)
[PATCH] avoid duplicate mode set in lvds
xf86SetDesiredModes() already sets lvds to full mode. later when xf86CrtcScreenInit() initialized randr12, i830_lvds_set_property will recall xf86CrtcSetMode and set mode to full. This patch is to remove the duplication. In my test, this can save about 0.2 - 0.4s x startup time.
-rw-r--r--src/i830_lvds.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 96e9f003..e5feab09 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -1115,6 +1115,9 @@ i830_lvds_set_property(xf86OutputPtr output, Atom property,
if (ret < 0)
return FALSE;
+ if (dev_priv->fitting_mode == ret)
+ return TRUE;
+
dev_priv->fitting_mode = ret;
if (output->crtc) {