<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Oct 1, 2017 13:38, "Lucas Stach" <<a href="mailto:l.stach@pengutronix.de">l.stach@pengutronix.de</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">Am Sonntag, den 01.10.2017, 12:46 +0200 schrieb Christian Gmeiner:<br>
> 2017-09-26 12:29 GMT+02:00 Wladimir J. van der Laan <<a href="mailto:laanwj@gmail.com">laanwj@gmail.com</a>>:<br>
> > Set up new states that the blob started setting for GC3000 consistently.<br>
> ><br>
> > This makes sure that when another test or driver leaves the GPU in<br>
> > unpredictable state, these states are set up correctly for our<br>
> > rendering.<br>
> ><br>
><br>
> I am not sure if this counts as valid argument to set some of the unknown states<br>
> back to 0. I can not image that a normal user will run in this kind of<br>
> situation at all.<br>
> Just my opinion. If you insist in having a hand full unknown states<br>
> set back to 0<br>
> I can life with it and will push the patch in its current form.<br>
<br>
</div>I think it's actually a good idea to reset the GPU to the expected<br>
state in the context reset. No process should depend on any particular<br>
GPU state between submits, as any other process might leave the GPU<br>
totally screwed.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Agree! </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It's a good idea to initialize the state that we don't normally<br>
overwrite during state emission.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Yes! The vivante driver handles clean slate contexts in the kernel but we have to do it in userspace.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="quoted-text"><br>
> ><br>
> > Also, setting PA_VIEWPORT_UNK00A84 to fui(8192.0) is necessary<br>
> > to make point sprite rendering on GC3000 work.<br>
><br>
> I would prefer a patch that only sets PA_VIEWPORT_UNK00A84 to fix point<br>
> sprite rendering on GC3000.<br>
<br>
</div>Yeah, splitting up this patch into 2 would be good style.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Ok will split it up. Note that I'm not sure which of the two viewport unk states exactly are necessary and have no time to figure that out so I'll continue to group those two.</div><div dir="auto"><br></div><div dir="auto">Wladimir</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Lucas<br>
<div class="elided-text"><br>
> ><br>
> > Signed-off-by: Wladimir J. van der Laan <<a href="mailto:laanwj@gmail.com">laanwj@gmail.com</a>><br>
> > ---<br>
> > src/gallium/drivers/etnaviv/<wbr>etnaviv_context.c | 13 +++++++++++++<br>
> > 1 file changed, 13 insertions(+)<br>
> ><br>
> > diff --git a/src/gallium/drivers/etnaviv/<wbr>etnaviv_context.c b/src/gallium/drivers/etnaviv/<wbr>etnaviv_context.c<br>
> > index 2ca09ce..67aab6a 100644<br>
> > --- a/src/gallium/drivers/etnaviv/<wbr>etnaviv_context.c<br>
> > +++ b/src/gallium/drivers/etnaviv/<wbr>etnaviv_context.c<br>
> > @@ -317,6 +317,19 @@ etna_cmd_stream_reset_notify(<wbr>struct etna_cmd_stream *stream, void *priv)<br>
> > etna_set_state(stream, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x00000001);<br>
> > etna_set_state(stream, VIVS_RA_EARLY_DEPTH, 0x00000031);<br>
> > etna_set_state(stream, VIVS_PA_W_CLIP_LIMIT, 0x34000001);<br>
> > + etna_set_state(stream, VIVS_PA_FLAGS, 0x00000000); /* blob sets ZCONVERT_BYPASS on GC3000, this messes up z for us */<br>
> > + etna_set_state(stream, VIVS_RA_UNK00E0C, 0x00000000);<br>
> > + etna_set_state(stream, VIVS_PA_VIEWPORT_UNK00A80, 0x38a01404);<br>
> > + etna_set_state(stream, VIVS_PA_VIEWPORT_UNK00A84, fui(8192.0));<br>
> > + etna_set_state(stream, VIVS_PA_ZFARCLIPPING, 0x00000000);<br>
> > + etna_set_state(stream, VIVS_PE_ALPHA_COLOR_EXT0, 0x00000000);<br>
> > + etna_set_state(stream, VIVS_PE_ALPHA_COLOR_EXT1, 0x00000000);<br>
> > + etna_set_state(stream, VIVS_RA_HDEPTH_CONTROL, 0x00007000);<br>
> > + etna_set_state(stream, VIVS_PE_STENCIL_CONFIG_EXT2, 0x00000000);<br>
> > + etna_set_state(stream, VIVS_GL_UNK03834, 0x00000000);<br>
> > + etna_set_state(stream, VIVS_GL_UNK03838, 0x00000000);<br>
> > + etna_set_state(stream, VIVS_GL_UNK03854, 0x00000000);<br>
> > + etna_set_state(stream, VIVS_PS_CONTROL_EXT, 0x00000000);<br>
> ><br>
> > /* Enable SINGLE_BUFFER for resolve, if supported */<br>
> > etna_set_state(stream, VIVS_RS_SINGLE_BUFFER, COND(ctx->specs.single_buffer, VIVS_RS_SINGLE_BUFFER_ENABLE))<wbr>;<br>
> > --<br>
> > 2.7.4<br>
> ><br>
><br>
> greets<br>
> --<br>
> Christian Gmeiner, MSc<br>
><br>
> <a href="https://christian-gmeiner.info" rel="noreferrer" target="_blank">https://christian-gmeiner.info</a><br>
</div>> ______________________________<wbr>_________________<br>
> etnaviv mailing list<br>
> <a href="mailto:etnaviv@lists.freedesktop.org">etnaviv@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/etnaviv" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/etnaviv</a><br>
</blockquote></div><br></div></div></div>