On 17/08/16 15:09, Matthijs van Duin wrote:
and fix individual clients rather than handling this in kernel. It doesn't help that omap_bo_new(), unlike the dumb buffer equivalent, simply doesn't give the kernel enough information to force allocation into tiled memory.
Because omap_bo_new() doesn't contain the dimensions of the buffer? Yeah, I think generally the OMAP API in libdrm is bad. I've been wondering if it'd be possible to just write a new one.
I'm not sure if this goes more onto pure hacking side, but... What if omap_bo_new/omap_bo_new_tiled/dumb alloc didn't actually allocate much at all. They would just create a DRM "placeholder" object so to say. Then, when the DRM FB is created, and the BOs are passed along, would the BOs be allocated. At that point we have all the info (I think).
Oh, but that doesn't work as you must be able to mmap the BOs etc. even before there's an FB...
Tomi