summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2007-05-01 17:08:42 -0600
committerJordan Crouse <jordan.crouse@amd.com>2007-05-01 17:09:18 -0600
commitdc5db7c4d68268377cd99f7c8e4bc54556923ed1 (patch)
tree3d4c403b388067fc089643080105de0b2b42cb55
parent59eac173349afa24c126ec670bedb68643dd5a84 (diff)
Fix video and VGA bugs
Fix two small bugs: The VGA dection code wasn't working, and the video engine was not using color keying.
-rw-r--r--src/amd_lx_driver.c5
-rw-r--r--src/amd_lx_video.c17
2 files changed, 10 insertions, 12 deletions
diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c
index d757eb0..3756add 100644
--- a/src/amd_lx_driver.c
+++ b/src/amd_lx_driver.c
@@ -505,8 +505,6 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
}
}
- pGeode->useVGA = TRUE;
-
if (pGeode->useVGA)
pGeode->vesa = xcalloc(sizeof(VESARec), 1);
@@ -652,6 +650,9 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
xf86DrvMsg(pScrni->scrnIndex, X_INFO, " PANEL: %s\n",
pGeode->Output & OUTPUT_PANEL ? "YES" : "NO");
+ xf86DrvMsg(pScrni->scrnIndex, X_INFO, " VGA: %s\n",
+ pGeode->useVGA ? "YES" : "NO");
+
/* Set up VGA */
if (pGeode->useVGA) {
xf86LoaderReqSymLists(amdVgahwSymbols, NULL);
diff --git a/src/amd_lx_video.c b/src/amd_lx_video.c
index 0b06069..414b5e4 100644
--- a/src/amd_lx_video.c
+++ b/src/amd_lx_video.c
@@ -152,18 +152,18 @@ LXAllocateVidMem(ScrnInfoPtr pScrni, void **memp, int size)
}
static void
-LXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv)
+LXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv)
{
int red, green, blue;
unsigned long key;
-
+
switch (pScrni->depth) {
case 8:
vg_get_display_palette_entry(pPriv->colorKey & 0xFF, &key);
red = ((key >> 16) & 0xFF);
green = ((key >> 8) & 0xFF);
blue = (key & 0xFF);
- break;
+ break;
case 16:
red = (pPriv->colorKey & pScrni->mask.red) >>
pScrni->offset.red << (8 - pScrni->weight.red);
@@ -177,7 +177,7 @@ LXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv)
* function is providing the offset by 1 more. So we take
* this as a special case and subtract 1 for > 16
*/
-
+
red = (pPriv->colorKey & pScrni->mask.red) >>
(pScrni->offset.red - 1) << (8 - pScrni->weight.red);
green = (pPriv->colorKey & pScrni->mask.green) >>
@@ -187,12 +187,9 @@ LXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv)
break;
}
- if (pPriv->colorKeyMode != 0)
- df_set_video_color_key((blue | (green << 8) | (red << 16)),
- 0xFFFFFF, 1);
- else
- df_set_video_color_key(0, 0, 1);
-
+ df_set_video_color_key((blue | (green << 8) | (red << 16)),
+ 0xFFFFFF, (pPriv->colorKeyMode == 0));
+
REGION_EMPTY(pScrni->pScreen, &pPriv->clip);
}