Am Monday 25 May 2009 21:55:05 schrieb Owen Taylor:
> On Mon, 2009-05-25 at 18:19 +0100, Dave Airlie wrote:
> > > > I'd like to fix this at some point, but I never got to understand wtf
> > > > the blackbars were coming from, apart from it being something to do
> > > > with evicted buffers.
> > >
> > > Aha!
> > >
> > > So, two characteristics of the black bars I remember:
> > >
> > >  - They were 16-pixel (64-byte) horizontal stripes, 64-byte aligned.
> > >    That is, cache lines.
> > >  - They were black.
> > >    That is, the cache-line contents for a newly zeroed page
> > >
> > > Note also that the function to add pages to the page free lists -
> > > drm_add_pages_locked() - calls set_memory_wc(), but it doesn't do the
> > > other thing that drm_ttm_set_caching() does: call drm_clflush_pages()
> >
> > Ah that could have been it. care to give it a hack, I'm on hols for
> > another week or so.
>
> Backing out the referenced change and adding a call to clflush_pages()
> seems to work in some quick testing, I'll see if any problems pop up in
> the next few days.
>
> If not, I'll throw it on my (modest sized) pile of mesa and kernel
> patches that I'm accumulating vs. the current F11 tree.
>
> Enjoy the rest of your vacation.
>
> - Owen
>
> [ Even with the change, there still is a noticeable performance win from
> dropping the size of the DMA buffer in mesa - binding the 1M buffers
> into AGP space takes a measurable amount of time. ]

Forgive me if you've mentioned it before, but what is your testcase?

If I recall the discussions correctly (and admittedly I've been somewhat away 
for a while), the idea was to have big buffers so that games can just keep 
scheduling drawing commands virtually indefinitely (maybe even up to a full 
frame worth of draw calls). Obviously, if your testcase is in fact not one of 
those eyecandy-crazy shooters, then that's a bad idea for you.

Wouldn't the right approach to this problem then be to dynamically scale the 
buffer size based on what the application actually does?

cu,
Nicolai

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to