On Thu, Feb 21, 2019 at 5:11 PM Connor Abbott <[email protected]> wrote:
>
> On Thu, Feb 21, 2019 at 5:07 PM Alyssa Rosenzweig <[email protected]> 
> 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..

BR,
-R
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to