[PATCH] etnaviv: force vertex buffers through the MMU
Lucas Stach
l.stach at pengutronix.de
Wed Jan 18 16:02:24 UTC 2017
Hi Christian,
Am Mittwoch, den 18.01.2017, 16:50 +0100 schrieb Christian Gmeiner:
> Hi Lucas,
>
> is there good app you used to run your tests?
I used to hit this pretty often with simple QT5 QML apps. Some changes
in Etnaviv or QT5 made this much harder to hit, but it still happens
from time to time.
Regards,
Lucas
> 2016-11-21 11:58 GMT+01:00 Lucas Stach <l.stach at pengutronix.de>:
> > This fixes a vertex data corruption issue if some of the vertex streams
> > go through the MMU and some don't.
> >
> > Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> > ---
> > src/gallium/drivers/etnaviv/etnaviv_resource.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> > index aefe65bf0e47..94a8a73997a8 100644
> > --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
> > +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> > @@ -201,7 +201,10 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
> >
> > size = setup_miptree(rsc, paddingX, paddingY, msaa_xscale, msaa_yscale);
> >
> > - struct etna_bo *bo = etna_bo_new(screen->dev, size, DRM_ETNA_GEM_CACHE_WC);
> > + uint32_t flags = DRM_ETNA_GEM_CACHE_WC;
> > + if (templat->bind & PIPE_BIND_VERTEX_BUFFER)
> > + flags |= DRM_ETNA_GEM_FORCE_MMU;
> > + struct etna_bo *bo = etna_bo_new(screen->dev, size, flags);
> > if (unlikely(bo == NULL)) {
> > BUG("Problem allocating video memory for resource");
> > return NULL;
> > --
> > 2.10.2
>
> greets
> --
> Christian Gmeiner, MSc
>
> https://www.youtube.com/user/AloryOFFICIAL
> https://soundcloud.com/christian-gmeiner
More information about the etnaviv
mailing list