summaryrefslogtreecommitdiff
path: root/src/smi_driver.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-24 18:58:35 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-24 18:58:35 -0300
commitbdba7c1397186cd15d519db55c2345db44990be4 (patch)
tree2de96c04aa4d32cbbc9cc82cf2f6cf783288f843 /src/smi_driver.c
parente64b3d63be2a4148c4d10ac160e2bd2f3e8c7fd3 (diff)
Fix incorrect understanding of the pixel clock from specs.
The clock that should be programmed is the bandwidth, and not the pixel clock itself. Based on analysis of register contents, after "importing" a slightly modified version of xf86ModeBandwidth() and properly converting values, now it properly programs both, the LCD and a "clone" CRT or just a secondary panel. Modes generated by either gtf or cvt correctly works. A (hopefully temporary) fallback was also added, and if the option "UseFBDev" is used, the driver will not attempt to set/modify the current video mode. TODO: Generate a modeline "on the fly", based on monitor configured specs, or some set of defaults, so that it should not be required to specify a modeline in xorg.conf.
Diffstat (limited to 'src/smi_driver.c')
-rw-r--r--src/smi_driver.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c
index fe48c8a..507e6c7 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -179,6 +179,7 @@ typedef enum
OPTION_ACCELMETHOD,
OPTION_RANDRROTATION,
OPTION_PANEL_SIZE,
+ OPTION_USE_FBDEV,
NUMBER_OF_OPTIONS
} SMIOpts;
@@ -206,7 +207,8 @@ static const OptionInfoRec SMIOptions[] =
{ OPTION_DUALHEAD, "Dualhead", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE },
{ OPTION_RANDRROTATION, "RandRRotation", OPTV_BOOLEAN, {0}, FALSE },
- { OPTION_PANEL_SIZE, "PanelSize", OPTV_ANYSTR, {0}, FALSE },
+ { OPTION_PANEL_SIZE, "PanelSize", OPTV_ANYSTR, {0}, FALSE },
+ { OPTION_USE_FBDEV, "UseFBDev", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -728,6 +730,14 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags)
pSmi->randrRotation ? "enabled" : "disabled");
}
+ if (IS_MSOC(pSmi)) {
+ from = X_DEFAULT;
+ if (xf86GetOptValBool(pSmi->Options, OPTION_USE_FBDEV, &pSmi->UseFBDev))
+ from = X_CONFIG;
+ xf86DrvMsg(pScrn->scrnIndex, from, "UseFBDev %s.\n",
+ pSmi->UseFBDev ? "enabled" : "disabled");
+ }
+
from = X_CONFIG;
pSmi->HwCursor = TRUE;
/* SWCursor overrides HWCusor if both specified */