[Intel-gfx] [PATCH 3/3] render: tell the kernel explicitly when fences are needed
Daniel Vetter
daniel at ffwll.ch
Sun Apr 11 19:42:17 CEST 2010
On Sun, Apr 11, 2010 at 04:45:56PM +0100, Chris Wilson wrote:
> On Sun, 11 Apr 2010 15:38:24 +0200, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> > diff --git a/src/i830_uxa.c b/src/i830_uxa.c
> > index 589e16d..09c2ef3 100644
> > --- a/src/i830_uxa.c
> > +++ b/src/i830_uxa.c
> > @@ -295,8 +295,8 @@ static void i830_uxa_solid(PixmapPtr pixmap, int x1, int y1, int x2, int y2)
> > OUT_BATCH(intel->BR[13] | pitch);
> > OUT_BATCH((y1 << 16) | (x1 & 0xffff));
> > OUT_BATCH((y2 << 16) | (x2 & 0xffff));
> > - OUT_RELOC_PIXMAP(pixmap, I915_GEM_DOMAIN_RENDER,
> > - I915_GEM_DOMAIN_RENDER, 0);
> > + OUT_RELOC_PIXMAP_FENCED(pixmap, I915_GEM_DOMAIN_RENDER,
> > + I915_GEM_DOMAIN_RENDER, 0);
> > OUT_BATCH(intel->BR[16]);
> > ADVANCE_BATCH();
> > }
>
> if (!IS_I965(intel)) {
> OUT_RELOC_PIXMAP_FENCED(pixmap,
> I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
> 0);
> } else {
> OUT_RELOC_PIXMAP(pixmap,
> I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
> 0);
> }
Unnecessary complication. libdrm checks for gen >=4 and drops the fence
register request.
-Daniel
btw mesa does the blits in the exact same way. I've simply copied the code
from there without even checking ;)
--
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48
More information about the Intel-gfx
mailing list