[Mesa-dev] [PATCH] panfrost: Use tiler fast path (performance boost)

Rob Clark robdclark at gmail.com
Thu Feb 21 23:46:12 UTC 2019

On Thu, Feb 21, 2019 at 5:11 PM Connor Abbott <cwabbott0 at gmail.com> wrote:
> On Thu, Feb 21, 2019 at 5:07 PM Alyssa Rosenzweig <alyssa at rosenzweig.io> wrote:
>> > Yes, there is a buffer for holding the results of the tiler. The way it
>> > works is that the userspace driver allocates a very large buffer with a
>> > "grow on page fault" bit, so the kernel will allocate more memory as the
>> > tiler asks for it.
>> To be clear, right now I have this magic misc_0 buffer setup that way,
>> too (allocating something enormous and setting GROW_ON_GPF). Although,
>> it's not clear to me that that is the _correct_ thing to do; IIRC, the
>> blob allocates "just enough", no GROW_ON_GPF needed, but I should
>> probably check that.
> I don't know about Midgard, but on Bifrost it definitely uses GROW_ON_GPF, telling the kernel to preallocate some small-ish initial set, presumably as an optimization. I don't think you can accurately predict how much memory you're going to need ahead of time, since it depends on how the triangles are distributed along the screen.

the GROW_ON_GPF thing is cute..  not as badly needed on adreno since
we don't actually store pos/psize/varyings from binning pass, only a
compressed visibility stream.. but if only we had proper
stall-on-fault support from iommu driver, we could use a similar trick
to dynamically grow the VSC buffers..


More information about the mesa-dev mailing list