summaryrefslogtreecommitdiff
path: root/src/smi_output.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-13 19:44:14 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-13 19:44:14 -0200
commit6b6da04d566ec5b9d723c9f28791c604f76526dd (patch)
tree132ae0934bf8474eba4dab40934f7ab559af258b /src/smi_output.c
parentd2709b1af22a06b24606ec8c01f39f1ca27ca8d3 (diff)
Changed to use panel plane tl and tr to center modes smaller then panel size.
The code is under "<hash>ifdef USE_PANEL_CENTER", as it is buggy, and regardless of value set to right and bottom, it will crop from 0 to mode-width/mode-height, and then display a lot of screen artifacts, due to improper programming. Either way, the CRT in clone mode will display correctly.
Diffstat (limited to 'src/smi_output.c')
-rw-r--r--src/smi_output.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/smi_output.c b/src/smi_output.c
index b26530c..f07f64e 100644
--- a/src/smi_output.c
+++ b/src/smi_output.c
@@ -51,11 +51,16 @@ SMI_OutputModeValid(xf86OutputPtr output, DisplayModePtr mode)
ENTER();
- /* FIXME LVDS currently have fixed height. But allow external crtc to
- * have a smaller or larger size, even if only one monitor section
- * exists in xorg.conf. */
+ /* FIXME May also need to test for IS_MSOC(pSmi) here.
+ * Only accept modes matching the panel size because the panel cannot
+ * be centered neither shrinked/expanded due to hardware bugs.
+ * Note that as long as plane tr/br and plane window x/y are set to 0
+ * and the mode height matches the panel height, it will work and
+ * set the mode, but at offset 0, and properly program the crt.
+ * But use panel dimensions so that "full screen" programs will do
+ * their own centering. */
if (output->name && strcmp(output->name, "LVDS") == 0 &&
- (mode->HDisplay > pSmi->lcdWidth || mode->VDisplay != pSmi->lcdHeight))
+ (mode->HDisplay != pSmi->lcdWidth || mode->VDisplay != pSmi->lcdHeight))
RETURN(MODE_PANEL);
if (!(((mode->HDisplay == 1280) && (mode->VDisplay == 1024)) ||