xf86-video-intel: 7 commits - man/intel.man src/drmmode_display.c src/i830_display.c src/i830_dri.c src/i830_driver.c src/i830.h src/i830_memory.c src/i830_video.c
Eric Anholt
anholt at kemper.freedesktop.org
Fri Mar 6 16:48:16 PST 2009
man/intel.man | 7 +++++--
src/drmmode_display.c | 4 +---
src/i830.h | 4 +---
src/i830_display.c | 5 +++++
src/i830_dri.c | 11 +++++++----
src/i830_driver.c | 3 +--
src/i830_memory.c | 37 ++++++++++++++-----------------------
src/i830_video.c | 35 +----------------------------------
8 files changed, 35 insertions(+), 71 deletions(-)
New commits:
commit 73aa23d9150121a4e4b70a78cab910acd164abf5
Author: Eric Anholt <eric at anholt.net>
Date: Fri Dec 5 13:06:05 2008 -0800
DRI1: Update sarea (and other information) when CRTC configuration changes.
Bug #14423.
Signed-off-by: Eric Anholt <eric at anholt.net>
diff --git a/src/i830_display.c b/src/i830_display.c
index 3139d40..ca55906 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1085,6 +1085,11 @@ i830_crtc_commit (xf86CrtcPtr crtc)
/* Reenable FB compression if possible */
if (i830_use_fb_compression(crtc))
i830_enable_fb_compression(crtc);
+
+#ifdef XF86DRI
+ /* Tell DRI1 the news about new output config */
+ i830_update_dri_buffers(crtc->scrn);
+#endif
}
void
diff --git a/src/i830_dri.c b/src/i830_dri.c
index b7ebd92..f61c564 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1387,9 +1387,6 @@ i830_update_dri_mappings(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
{
I830Ptr pI830 = I830PTR(pScrn);
- if (pI830->directRenderingType == DRI_DRI2)
- return TRUE;
-
if (!i830_do_addmap(pScrn, pI830->front_buffer, &sarea->front_handle,
&sarea->front_size, &sarea->front_offset)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disabling DRI.\n");
@@ -1447,9 +1444,15 @@ Bool
i830_update_dri_buffers(ScrnInfoPtr pScrn)
{
ScreenPtr pScreen = pScrn->pScreen;
- drmI830Sarea *sarea = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
+ I830Ptr pI830 = I830PTR(pScrn);
+ drmI830Sarea *sarea;
Bool success;
+ if (pI830->directRenderingType == DRI_DRI2)
+ return TRUE;
+
+ sarea = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
+
success = i830_update_dri_mappings(pScrn, sarea);
if (!success)
return FALSE;
commit abb213d933ac0d808fc10d4f8d88d7b8cef76346
Author: Eric Anholt <eric at anholt.net>
Date: Fri Mar 6 14:33:46 2009 -0800
Document the UXA AccelMethod.
Signed-off-by: Eric Anholt <eric at anholt.net>
diff --git a/man/intel.man b/man/intel.man
index 413f63a..cf1cf40 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -156,9 +156,12 @@ Default for i830 and newer: Enabled.
.IP
Default for i810: this option is not used.
.BI "Option \*qAccelMethod\*q \*q" string \*q
-Choose acceleration architecture, either "XAA" or "EXA". XAA is the old
-XFree86 based acceleration architecture. EXA is a newer and simpler
+Choose acceleration architecture, either "XAA", "EXA", or "UXA". XAA is the old
+XFree86 based acceleration architecture. EXA is a simpler
acceleration architecture designed to better accelerate the X Render extension.
+UXA is a newer acceleration architecture built from the EXA acceleration
+code but taking advantage of kernel memory management to provide simpler,
+faster code.
.IP
Default: "EXA".
.TP
commit 568297d327cc321f1186afc54b38d08db3f2914d
Author: Eric Anholt <eric at anholt.net>
Date: Thu Jan 22 17:08:19 2009 -0800
Don't allocate the render power saving context in KMS mode.
That would be the kernel's job if it chooses to do it.
Signed-off-by: Eric Anholt <eric at anholt.net>
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 3fa6a7c..361fff7 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1688,6 +1688,9 @@ i830_allocate_pwrctx(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
+ if (pI830->use_drm_mode)
+ return TRUE;
+
pI830->power_context = i830_allocate_memory(pScrn, "power context",
PWRCTX_SIZE, PITCH_NONE,
GTT_PAGE_SIZE,
commit 4e1144108424a4525bbd97c3d5a56de06760bdd9
Author: Eric Anholt <eric at anholt.net>
Date: Fri Mar 6 14:30:05 2009 -0800
unused variable warning fix.
Signed-off-by: Eric Anholt <eric at anholt.net>
diff --git a/src/i830_video.c b/src/i830_video.c
index f22fe85..daa2411 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2138,7 +2138,6 @@ i830_clip_video_helper (ScrnInfoPtr pScrn,
*/
if (crtc_ret)
{
- I830Ptr pI830 = I830PTR(pScrn);
BoxRec crtc_box;
xf86CrtcPtr crtc = i830_covering_crtc (pScrn, dst,
pPriv->desired_crtc,
commit 043a76a040d4576b7a8397dca805466a99bfcdd6
Author: Eric Anholt <eric at anholt.net>
Date: Fri Mar 6 14:29:22 2009 -0800
clean up arguments to i830_allocate_framebuffer since zaphod removal.
Signed-off-by: Eric Anholt <eric at anholt.net>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d9ca16c..141c027 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -632,7 +632,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
drmmode_ptr drmmode = drmmode_crtc->drmmode;
I830Ptr pI830 = I830PTR(scrn);
i830_memory *old_front = NULL;
- BoxRec mem_box;
Bool tiled, ret;
ScreenPtr screen = screenInfo.screens[scrn->scrnIndex];
uint32_t old_fb_id;
@@ -659,8 +658,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
scrn->virtualX = width;
scrn->virtualY = height;
scrn->displayWidth = pitch;
- pI830->front_buffer =
- i830_allocate_framebuffer(scrn, pI830, &mem_box, FALSE);
+ pI830->front_buffer = i830_allocate_framebuffer(scrn);
if (!pI830->front_buffer)
goto fail;
diff --git a/src/i830.h b/src/i830.h
index 2408ea9..f933917 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -372,7 +372,6 @@ typedef struct _I830Rec {
unsigned int bufferOffset; /* for I830SelectBuffer */
BoxRec FbMemBox;
- BoxRec FbMemBox2;
int CacheLines;
/* These are set in PreInit and never changed. */
@@ -900,8 +899,7 @@ Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
i830_memory *
-i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
- Bool secondary);
+i830_allocate_framebuffer(ScrnInfoPtr pScrn);
/* i830_modes.c */
DisplayModePtr i830_ddc_get_modes(xf86OutputPtr output);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 16f68dc..6ec1a48 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1132,7 +1132,6 @@ i830_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
if (i830->can_resize && i830->front_buffer)
{
i830_memory *new_front, *old_front;
- BoxRec mem_box;
Bool tiled;
ScreenPtr screen = screenInfo.screens[scrn->scrnIndex];
@@ -1142,7 +1141,7 @@ i830_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
width, height, scrn->displayWidth);
I830Sync(scrn);
i830WaitForVblank(scrn);
- new_front = i830_allocate_framebuffer(scrn, i830, &mem_box, FALSE);
+ new_front = i830_allocate_framebuffer(scrn);
if (!new_front) {
scrn->virtualX = old_x;
scrn->virtualY = old_y;
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 84262af..3fa6a7c 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1159,30 +1159,22 @@ IsTileable(ScrnInfoPtr pScrn, int pitch)
*
* Used once for each X screen, so once with RandR 1.2 and twice with classic
* dualhead.
- *
- * \param pScrn ScrnInfoPtr for the screen being allocated
- * \param pI830 I830Ptr for the screen being allocated.
- * \param FbMemBox
*/
i830_memory *
-i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
- Bool secondary)
+i830_allocate_framebuffer(ScrnInfoPtr pScrn)
{
+ I830Ptr pI830 = I830PTR(pScrn);
unsigned int pitch = pScrn->displayWidth * pI830->cpp;
unsigned long minspace, avail;
int cacheLines, maxCacheLines;
int align;
long size, fb_height;
- char *name;
int flags;
i830_memory *front_buffer = NULL;
enum tile_format tile_format = TILE_NONE;
flags = ALLOW_SHARING;
- /* Clear everything first. */
- memset(FbMemBox, 0, sizeof(*FbMemBox));
-
/* We'll allocate the fb such that the root window will fit regardless of
* rotation.
*/
@@ -1195,10 +1187,10 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
fb_height = pScrn->virtualY;
}
- FbMemBox->x1 = 0;
- FbMemBox->x2 = pScrn->displayWidth;
- FbMemBox->y1 = 0;
- FbMemBox->y2 = fb_height;
+ pI830->FbMemBox.x1 = 0;
+ pI830->FbMemBox.x2 = pScrn->displayWidth;
+ pI830->FbMemBox.y1 = 0;
+ pI830->FbMemBox.y2 = fb_height;
/* Calculate how much framebuffer memory to allocate. For the
* initial allocation, calculate a reasonable minimum. This is
@@ -1233,7 +1225,7 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
if (cacheLines > maxCacheLines)
cacheLines = maxCacheLines;
- FbMemBox->y2 += cacheLines;
+ pI830->FbMemBox.y2 += cacheLines;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Allocating %d scanlines for pixmap cache\n",
@@ -1248,8 +1240,6 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
size = pitch * (fb_height + cacheLines);
size = ROUND_TO_PAGE(size);
- name = secondary ? "secondary front buffer" : "front buffer";
-
/* Front buffer tiling has to be disabled with G965 XAA because some of the
* acceleration operations (non-XY COLOR_BLT) can't be done to tiled
* buffers.
@@ -1279,14 +1269,13 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
align = KB(512);
} else
align = KB(64);
- front_buffer = i830_allocate_memory(pScrn, name, size,
+ front_buffer = i830_allocate_memory(pScrn, "front buffer", size,
pitch, align, flags,
tile_format);
if (front_buffer == NULL) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate "
- "%sframebuffer. Is your VideoRAM set too low?\n",
- secondary ? "secondary " : "");
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to allocate framebuffer.\n");
return NULL;
}
@@ -1473,8 +1462,7 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
i830_allocate_overlay(pScrn);
#endif
- pI830->front_buffer =
- i830_allocate_framebuffer(pScrn, pI830, &pI830->FbMemBox, FALSE);
+ pI830->front_buffer = i830_allocate_framebuffer(pScrn);
if (pI830->front_buffer == NULL)
return FALSE;
commit b23f57b310b693f56af273526383221a4f8b96f5
Author: Eric Anholt <eric at anholt.net>
Date: Thu Jan 22 17:17:09 2009 -0800
Use REGION_EQUAL in place of a local implementation.
Signed-off-by: Eric Anholt <eric at anholt.net>
diff --git a/src/i830_video.c b/src/i830_video.c
index 9826e14..f22fe85 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1032,34 +1032,6 @@ I830SetupImageVideoTextured(ScreenPtr pScreen)
return adapt;
}
-static Bool
-RegionsEqual(RegionPtr A, RegionPtr B)
-{
- int *dataA, *dataB;
- int num;
-
- num = REGION_NUM_RECTS(A);
- if (num != REGION_NUM_RECTS(B))
- return FALSE;
-
- if ((A->extents.x1 != B->extents.x1) ||
- (A->extents.x2 != B->extents.x2) ||
- (A->extents.y1 != B->extents.y1) || (A->extents.y2 != B->extents.y2))
- return FALSE;
-
- dataA = (int *)REGION_RECTS(A);
- dataB = (int *)REGION_RECTS(B);
-
- while (num--) {
- if ((dataA[0] != dataB[0]) || (dataA[1] != dataB[1]))
- return FALSE;
- dataA += 2;
- dataB += 2;
- }
-
- return TRUE;
-}
-
static void
I830StopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
{
@@ -2528,7 +2500,7 @@ I830PutImage(ScrnInfoPtr pScrn,
drw_w, drw_h);
/* update cliplist */
- if (!RegionsEqual(&pPriv->clip, clipBoxes)) {
+ if (!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) {
REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);
i830_fill_colorkey (pScreen, pPriv->colorKey, clipBoxes);
}
commit 6b61f9945f54df7469f2b2d702b621d4d6064c3f
Author: Eric Anholt <eric at anholt.net>
Date: Thu Jan 22 17:19:04 2009 -0800
nuke unused define.
Signed-off-by: Eric Anholt <eric at anholt.net>
diff --git a/src/i830_video.c b/src/i830_video.c
index b4f8890..9826e14 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -81,10 +81,6 @@
#include "i915_hwmc.h"
#endif
-#ifndef USE_USLEEP_FOR_VIDEO
-#define USE_USLEEP_FOR_VIDEO 0
-#endif
-
#define OFF_DELAY 250 /* milliseconds */
#define FREE_DELAY 15000
More information about the xorg-commit
mailing list