Geometry corruption is going to come back with this fix for not leaking
buffers. :/
On Wed, Aug 19, 2009 at 7:04 PM, Alex Deucher <[email protected]> wrote:
> On Wed, Aug 19, 2009 at 10:44 AM, Pauli Nieminen<[email protected]> wrote:
> > Too bad there were a bug in this patch so here is fix and a improvement
> to
> > debug output.
>
> Pushed. thanks!
>
> >
> > On Tue, Aug 18, 2009 at 8:38 PM, Alex Deucher <[email protected]>
> wrote:
> >>
> >> On Tue, Aug 18, 2009 at 1:04 PM, Pauli Nieminen<[email protected]>
> wrote:
> >> > There has been some updates to master branch again which conflict with
> >> > these
> >> > patches so here is updated versions.
> >> >
> >>
> >> These looks good and fix the geometry corruption issues on r6xx/r7xx.
> >> I've gone ahead and pushed them. As you mentioned we still seem to be
> >> leaking some bo's in the r600 driver, but things are much better and
> >> should be easier to track down. Thanks!
> >>
> >> Alex
> >
> >
>
From 63ea95283cc9b9b63a2c940e02554c20ca7e03cc Mon Sep 17 00:00:00 2001
From: Pauli Nieminen <[email protected]>
Date: Wed, 19 Aug 2009 23:11:14 +0300
Subject: [PATCH] radeon: Update regulary cs processing info from kernel.
This fixes problem that dma buffers were leaking in dri1 mode.
Signed-off-by: Pauli Nieminen <[email protected]>
---
src/mesa/drivers/dri/radeon/radeon_bo_legacy.c | 13 +++++++------
src/mesa/drivers/dri/radeon/radeon_bo_legacy.h | 1 +
src/mesa/drivers/dri/radeon/radeon_dma.c | 4 ++++
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
index 5575da6..b1cc155 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
@@ -235,8 +235,9 @@ static int legacy_wait_pending(struct radeon_bo *bo)
return 0;
}
-static void legacy_track_pending(struct bo_manager_legacy *boml, int debug)
+void legacy_track_pending(struct radeon_bo_manager *bom, int debug)
{
+ struct bo_manager_legacy *boml = (struct bo_manager_legacy*) bom;
struct bo_legacy *bo_legacy;
struct bo_legacy *next;
@@ -244,8 +245,8 @@ static void legacy_track_pending(struct bo_manager_legacy *boml, int debug)
bo_legacy = boml->pending_bos.pnext;
while (bo_legacy) {
if (debug)
- fprintf(stderr,"pending %p %d %d %d\n", bo_legacy, bo_legacy->base.size,
- boml->current_age, bo_legacy->pending);
+ fprintf(stderr,"pending %p %d %d %d\n", bo_legacy, bo_legacy->base.size,
+ boml->current_age, bo_legacy->pending);
next = bo_legacy->pnext;
if (legacy_is_pending(&(bo_legacy->base))) {
}
@@ -444,7 +445,7 @@ static struct radeon_bo *bo_open(struct radeon_bo_manager *bom,
if (bo_legacy->base.domains & RADEON_GEM_DOMAIN_GTT)
{
retry:
- legacy_track_pending(boml, 0);
+ legacy_track_pending(&boml->base, 0);
/* dma buffers */
r = bo_dma_alloc(&(bo_legacy->base));
@@ -580,7 +581,7 @@ static int bo_vram_validate(struct radeon_bo *bo,
if (r) {
pending_retry = 0;
while(boml->cpendings && pending_retry++ < 10000) {
- legacy_track_pending(boml, 0);
+ legacy_track_pending(&boml->base, 0);
retry_count++;
if (retry_count > 2) {
free(bo_legacy->tobj);
@@ -706,7 +707,7 @@ int radeon_bo_legacy_validate(struct radeon_bo *bo,
r = bo_vram_validate(bo, soffset, eoffset);
if (r) {
- legacy_track_pending(boml, 0);
+ legacy_track_pending(&boml->base, 0);
legacy_kick_all_buffers(boml);
retries++;
if (retries == 2) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.h b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.h
index 455adeb..2cf15df 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.h
+++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.h
@@ -45,5 +45,6 @@ unsigned radeon_bo_legacy_relocs_size(struct radeon_bo *bo);
struct radeon_bo *radeon_legacy_bo_alloc_fake(struct radeon_bo_manager *bom,
int size,
uint32_t offset);
+void legacy_track_pending(struct radeon_bo_manager *bom, int debug);
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c
index 23f17cf..40082d0 100644
--- a/src/mesa/drivers/dri/radeon/radeon_dma.c
+++ b/src/mesa/drivers/dri/radeon/radeon_dma.c
@@ -326,6 +326,10 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
__FUNCTION__, free, wait, reserved, rmesa->dma.minimum_size);
}
+ if (!rmesa->radeonScreen->driScreen->dri2.enabled) {
+ /* request updated cs processing information from kernel */
+ legacy_track_pending(rmesa->radeonScreen->bom, 0);
+ }
/* move waiting bos to free list.
wait list provides gpu time to handle data before reuse */
foreach_s(dma_bo, temp, &rmesa->dma.wait) {
--
1.6.3.3
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev