[Intel-gfx] [PATCH] Remove the extra memory allocation for 965 video state now that it's all in BOs.
Eric Anholt
eric at anholt.net
Fri Dec 5 00:23:42 CET 2008
---
src/i830_video.c | 11 +----------
src/i830_video.h | 6 ------
2 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/src/i830_video.c b/src/i830_video.c
index a483031..87fa020 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2223,7 +2223,7 @@ I830PutImage(ScrnInfoPtr pScrn,
int top, left, npixels, nlines, size;
BoxRec dstBox;
int pitchAlignMask;
- int alloc_size, extraLinear;
+ int alloc_size;
xf86CrtcPtr crtc;
if (pPriv->textured)
@@ -2370,15 +2370,9 @@ I830PutImage(ScrnInfoPtr pScrn,
ErrorF("srcPitch: %d, dstPitch: %d, size: %d\n", srcPitch, dstPitch, size);
#endif
- if (IS_I965G(pI830))
- extraLinear = BRW_LINEAR_EXTRA;
- else
- extraLinear = 0;
-
alloc_size = size;
if (pPriv->doubleBuffer)
alloc_size *= 2;
- alloc_size += extraLinear;
if (pPriv->buf) {
/* Wait for any previous acceleration to the buffer to have completed.
@@ -2402,9 +2396,6 @@ I830PutImage(ScrnInfoPtr pScrn,
if (pPriv->buf == NULL)
return BadAlloc;
- pPriv->extra_offset = pPriv->buf->offset +
- (pPriv->doubleBuffer ? size * 2 : size);
-
/* fixup pointers */
#ifdef INTEL_XVMC
if (id == FOURCC_XVMC && IS_I915(pI830)) {
diff --git a/src/i830_video.h b/src/i830_video.h
index 8545fb8..3c2fa4c 100644
--- a/src/i830_video.h
+++ b/src/i830_video.h
@@ -59,7 +59,6 @@ typedef struct {
Time offTime;
Time freeTime;
i830_memory *buf; /** YUV data buffer */
- unsigned int extra_offset;
Bool overlayOK;
int oneLineMode;
@@ -71,11 +70,6 @@ typedef struct {
#define GET_PORT_PRIVATE(pScrn) \
(I830PortPrivPtr)((I830PTR(pScrn))->adaptor->pPortPrivates[0].ptr)
-/*
- * Broadwater requires a bit of extra video memory for state information
- */
-#define BRW_LINEAR_EXTRA (36*1024)
-
void I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
int id, RegionPtr dstRegion, short width,
short height, int video_pitch, int video_pitch2,
--
1.5.6.5
More information about the Intel-gfx
mailing list