[patch xf86-video-intel] sna: fix --enable-debug=full
Chris Wilson
chris at chris-wilson.co.uk
Fri Apr 17 13:26:06 UTC 2020
Quoting Chris Wilson (2020-04-17 14:12:00)
> Quoting Alexei Podtelezhnikov (2020-04-17 03:44:02)
> > First a typo prevents linking
> > src/sna/sna_render.h:164: multiple definition of `tightly_packed'
> >
> > Then spurious assertion failure happens
> > sna_accel_flush:17413 assertion '!ret || priv->gpu_bo == NULL' failed
> >
> > Both are fixed below.
> >
> > Signed-off-by: Alexei Podtelezhnikov <apodtele at gmail.com>
> > ---
> > src/sna/compiler.h | 2 +-
> > src/sna/sna_accel.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/sna/compiler.h b/src/sna/compiler.h
> > index 2e579b15..c3d98797 100644
> > --- a/src/sna/compiler.h
> > +++ b/src/sna/compiler.h
> > @@ -50,7 +50,7 @@
> > #define must_check
> > #define constant
> > #define pure
> > -#define tighly_packed
> > +#define tightly_packed
> > #define flatten
> > #define nonnull
> > #define page_aligned
> > diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
> > index ee857a14..bf1edec8 100644
> > --- a/src/sna/sna_accel.c
> > +++ b/src/sna/sna_accel.c
> > @@ -17410,7 +17410,7 @@ void sna_accel_flush(struct sna *sna)
> > assert(!priv->flush);
> > ret = sna_pixmap_move_to_cpu(priv->pixmap,
> > MOVE_READ | MOVE_WRITE);
> > - assert(!ret || priv->gpu_bo == NULL);
> > + assert(ret || priv->gpu_bo == NULL);
>
> That's not spurious. It says "we must succeed in moving the GPU pixmap
> to the CPU, or have a good reason like there being no GPU pixmap".
Wait... It says almost the same.
It says "we expect this to fail if it doesn't have a GPU pixmap, but if
it does, it has to succeed."
commit 71fa350325bb06a6141f89ef14431d96f0c4956a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Sep 17 13:40:24 2012 +0100
sna: Check that we do not keep a GPU bo around after flushing a ShmPixmap
Hmm. And you know what ShmPixmap have? kgem_buffers, which leads to the
original bug you were hitting. I think this is the start of the problem
you saw. So grab the debug log!
-Chris
More information about the intel-gfx-bugs
mailing list