summaryrefslogtreecommitdiff
path: root/src/amd_gx_driver.c
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2006-12-15 16:37:35 -0700
committerJordan Crouse <jordan.crouse@amd.com>2006-12-15 16:37:55 -0700
commit2e558b7cf6c508a1f745d922d911d612eba7d2c4 (patch)
tree30c2423507f898fd4666c8a2505d71ef94c972d3 /src/amd_gx_driver.c
parent243edb93e131734f23d9c5f39f1cd614ecc6a1f8 (diff)
A few fixes for the panel - the mode should be set correctly now, and
segfaults have gone away.
Diffstat (limited to 'src/amd_gx_driver.c')
-rw-r--r--src/amd_gx_driver.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c
index 4321134..de44f98 100644
--- a/src/amd_gx_driver.c
+++ b/src/amd_gx_driver.c
@@ -887,18 +887,21 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
if (pMode->Flags & V_NVSYNC)
flags |= 2;
- /* XXX Fixme - for now, we'll use the fixed settings for panel - but I would
- * like to see these go away too
- */
-
/* XXX Question - why even use set_display_mode at all - shouldn't the
* mode timings be the same that we advertise? */
- if (pGeode->Panel) {
+ /* Only use the panel mode for built in modes */
+
+ if ((pMode->type && pMode->type != M_T_USERDEF) && pGeode->Panel) {
GFX(set_fixed_timings(pGeode->FPBX, pGeode->FPBY,
pMode->CrtcHDisplay, pMode->CrtcVDisplay,
pScrni->bitsPerPixel));
} else {
+ if (pGeode->Panel)
+ GFX(set_panel_present(pGeode->FPBX, pGeode->FPBY,
+ pMode->CrtcHDisplay, pMode->CrtcVDisplay,
+ pScrni->bitsPerPixel));
+
GFX(set_display_timings(pScrni->bitsPerPixel, flags,
pMode->CrtcHDisplay, pMode->CrtcHBlankStart,
pMode->CrtcHSyncStart, pMode->CrtcHSyncEnd,
@@ -1489,7 +1492,10 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
GeodeRec *pGeode = GEODEPTR(pScrni);
int p, ret;
- if (pMode->type != M_T_USERDEF) {
+ /* Not sure if this is an X bug or not - but on my current build,
+ * user defined modes pass a type of 0 */
+
+ if (pMode->type && pMode->type != M_T_USERDEF) {
if (pGeode->Panel) {
if (pMode->CrtcHDisplay > pGeode->FPBX ||
@@ -1547,6 +1553,8 @@ GXFreeScreen(int scrnIndex, int flags)
{
GeodeRec *pGeode = GEODEPTR(xf86Screens[scrnIndex]);
+ /* XXX FIXME - Something segfaults here when no good modes are found */
+
if (pGeode->useVGA) {
if (xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
vgaHWFreeHWRec(xf86Screens[scrnIndex]);