Skip to content
  • Rob Clark's avatar
    freedreno: import libdrm_freedreno + redesign submit · f3cc0d27
    Rob Clark authored
    In the pursuit of lowering driver overhead, it became clear that some
    amount of redesign of how libdrm_freedreno constructs the submit ioctl
    would be needed.  In particular, as the gallium driver is starting to
    make heavier use of CP_SET_DRAW_STATE state groups/objects, the over-
    head of tracking cmd buffers and relocs becomes too much.  And for
    "streaming" state, which isn't ever reused (like uniform uploads) the
    overhead of allocating/freeing ringbuffer[1] objects is too high.
    
    This redesign makes two main changes:
    
     1) Introduces a fd_submit object for tracking bos and cmds table
        for the submit ioctl, making ringbuffer objects more light-
        weight.  This was previously done in the ringbuffer.  But we
        have many ringbuffer instances involved in a submit (gmem +
        draw + potentially 1000's of state-group rbs), and only need
        a single bos and cmds table.  (Reloc table is still per-rb)
    
        The submit is also a convenient place for a slab a...
    f3cc0d27