diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2007-01-10 14:21:43 -0700 |
---|---|---|
committer | Jordan Crouse <jordan.crouse@amd.com> | 2007-01-10 14:23:56 -0700 |
commit | 888dab329bb66c8e4317d0b6a9736fa70c9686a6 (patch) | |
tree | 0b38b43970ee3bb042534b5d3855887770d0d621 | |
parent | cb69ce0f54569c68c79173e144c3c90e46e64f8b (diff) |
I missed a few updates of the new driver structure in the video code
-rw-r--r-- | src/amd_gx_video.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/amd_gx_video.c b/src/amd_gx_video.c index 5ec27ae..869fbee 100644 --- a/src/amd_gx_video.c +++ b/src/amd_gx_video.c @@ -729,20 +729,21 @@ GXAllocateMemory(ScrnInfoPtr pScrni, void **memp, int numlines) { ScreenPtr pScrn = screenInfo.screens[pScrni->scrnIndex]; GeodeRec *pGeode = GEODEPTR(pScrni); - long displayWidth = pGeode->AccelPitch / ((pScrni->bitsPerPixel + 7) / 8); + //long displayWidth = pGeode->Pitch / ((pScrni->bitsPerPixel + 7) / 8); + int size = numlines * pGeode->displayWidth; #if XF86EXA if (pGeode->useEXA) { ExaOffscreenArea *area = *memp; if (area != NULL) { - if (area->size >= (numlines * displayWidth)) + if (area->size >= size) return area->offset; exaOffscreenFree(pScrni->pScreen, area); } - area = exaOffscreenAlloc(pScrni->pScreen, numlines * displayWidth, 16, + area = exaOffscreenAlloc(pScrni->pScreen, size, 16, TRUE, GXVideoSave, NULL); *memp = area; @@ -759,13 +760,13 @@ GXAllocateMemory(ScrnInfoPtr pScrni, void **memp, int numlines) return (area->box.y1 * pGeode->Pitch); - if (xf86ResizeOffscreenArea(area, displayWidth, numlines)) + if (xf86ResizeOffscreenArea(area, pGeode->displayWidth, numlines)) return (area->box.y1 * pGeode->Pitch); xf86FreeOffscreenArea(area); } - new_area = xf86AllocateOffscreenArea(pScrn, displayWidth, + new_area = xf86AllocateOffscreenArea(pScrn, pGeode->displayWidth, numlines, 0, NULL, NULL, NULL); if (!new_area) { @@ -774,13 +775,13 @@ GXAllocateMemory(ScrnInfoPtr pScrni, void **memp, int numlines) xf86QueryLargestOffscreenArea(pScrn, &max_w, &max_h, 0, FAVOR_WIDTH_THEN_AREA, PRIORITY_EXTREME); - if ((max_w < displayWidth) || (max_h < numlines)) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No room - how sad %x, %x, %x, %x\n", max_w, displayWidth, max_h, numlines); + if ((max_w < pGeode->displayWidth) || (max_h < numlines)) { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No room - how sad %x, %x, %x, %x\n", max_w, pGeode->displayWidth, max_h, numlines); return 0; } xf86PurgeUnlockedOffscreenAreas(pScrn); - new_area = xf86AllocateOffscreenArea(pScrn, displayWidth, + new_area = xf86AllocateOffscreenArea(pScrn, pGeode->displayWidth, numlines, 0, NULL, NULL, NULL); } |