[PATCH] etnaviv: force vertex buffers through the MMU

Lucas Stach l.stach at pengutronix.de
Mon Jan 30 11:42:27 UTC 2017


Am Montag, den 30.01.2017, 12:39 +0100 schrieb Christian Gmeiner:
> 2017-01-30 11:14 GMT+01:00 Philipp Zabel <p.zabel at pengutronix.de>:
> > On Mon, 2017-01-30 at 11:01 +0100, Lucas Stach wrote:
> >> 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>
> >
> > Without this patch I see the two triangles of a simple white QML
> > Rectangle background sometimes rendered in solid bright colors, as if
> > randomly one or two of the color components were set to zero for all
> > vertices. The test case that made this easy to reproduce had two chained
> > ShaderEffect items in the foreground.
> > With the patch applied, the aforementioned problems disappear.
> >
> > Tested-by: Philipp Zabel <p.zabel at pengutronix.de>
> >
> 
> Acked-by: Christian Gmeiner <christian.gmeiner at gmail.com>

Thanks, pushed.

> 
> >> ---
> >>  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;
> >
> 
> greets
> --
> Christian Gmeiner, MSc
> 
> https://www.youtube.com/user/AloryOFFICIAL
> https://soundcloud.com/christian-gmeiner




More information about the etnaviv mailing list