xf86-video-intel: 2 commits - src/i830_driver.c src/i830_exa.c src/i830.h src/i830_memory.c

Eric Anholt anholt at kemper.freedesktop.org
Tue May 12 14:29:29 PDT 2009


 src/i830.h        |    3 +--
 src/i830_driver.c |    2 +-
 src/i830_exa.c    |    3 +++
 src/i830_memory.c |    6 +++---
 4 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit e54a23bff068416ccbdb75d538dc7dcd40a6c95c
Author: Keith Packard <keithp at keithp.com>
Date:   Thu May 7 16:35:19 2009 -0700

    Fallback when VT inactive
    
    While the VT is inactive, pI830->batch_bo will be NULL, so use that as a
    simple check for when to not use the accelerator. The alternative is to
    ignore VT switch and just keep drawing, which would also be fine.
    
    Bug #21468.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    [anholt: Removed extra return FALSE -- I830FALLBACK does that.]
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 0a15de8..c1f512d 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -126,6 +126,9 @@ i830_get_aperture_space(ScrnInfoPtr pScrn, drm_intel_bo **bo_table, int num_bos)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
+    if (pI830->batch_bo == NULL)
+	I830FALLBACK("VT inactive\n");
+
     bo_table[0] = pI830->batch_bo;
     if (drm_intel_bufmgr_check_aperture_space(bo_table, num_bos) != 0) {
 	intel_batch_flush(pScrn, FALSE);
commit 660bd745c21c56e330d844fe4c8eaae862a77483
Author: Wu Fengguang <fengguang.wu at intel.com>
Date:   Thu Apr 30 18:42:18 2009 +0800

    Remove the offset parameter from i830_allocator_init()
    
    offset is redundant.  i830_allocator_init() is only called
    in one place with offset=0.
    
    Acked-by: Magnus Kessler <Magnus.Kessler at gmx.net>
    Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/i830.h b/src/i830.h
index 207d4ec..0d8726c 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -692,8 +692,7 @@ extern void I830SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop,
 extern void I830SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y,
 					int w, int h);
 
-Bool i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset,
-			 unsigned long size);
+Bool i830_allocator_init(ScrnInfoPtr pScrn, unsigned long size);
 void i830_allocator_fini(ScrnInfoPtr pScrn);
 i830_memory * i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
 				   unsigned long size, unsigned long pitch,
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1887a51..0f66d63 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2319,7 +2319,7 @@ i830_memory_init(ScrnInfoPtr pScrn)
 
     tiled = i830_tiled_width(pI830, &pScrn->displayWidth, pI830->cpp);
     /* Set up our video memory allocator for the chosen videoRam */
-    if (!i830_allocator_init(pScrn, 0, pScrn->videoRam * KB(1))) {
+    if (!i830_allocator_init(pScrn, pScrn->videoRam * KB(1))) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		"Couldn't initialize video memory allocator\n");
 	PreInitCleanup(pScrn);
diff --git a/src/i830_memory.c b/src/i830_memory.c
index d5827f8..18ddff4 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -364,7 +364,7 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
  * addresses to reference.
  */
 Bool
-i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
+i830_allocator_init(ScrnInfoPtr pScrn, unsigned long size)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     i830_memory *start, *end;
@@ -395,12 +395,12 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
     }
 
     start->key = -1;
-    start->offset = offset;
+    start->offset = 0;
     start->end = start->offset;
     start->size = 0;
     start->next = end;
     end->key = -1;
-    end->offset = offset + size;
+    end->offset = size;
     end->end = end->offset;
     end->size = 0;
     end->prev = start;


More information about the xorg-commit mailing list