• Eric Anholt's avatar
    drm/vc4: Add T-format scanout support. · 98830d91
    Eric Anholt authored
    The T tiling format is what V3D uses for textures, with no raster
    support at all until later revisions of the hardware (and always at a
    large 3D performance penalty).  If we can't scan out V3D's format,
    then we often need to do a relayout at some stage of the pipeline,
    either right before texturing from the scanout buffer (common in X11
    without a compositor) or between a tiled screen buffer right before
    scanout (an option I've considered in trying to resolve this
    inconsistency, but which means needing to use the dirty fb ioctl and
    having some update policy).
    
    T-format scanout lets us avoid either of those shadow copies, for a
    massive, obvious performance improvement to X11 window dragging
    without a compositor.  Unfortunately, enabling a compositor to work
    around the discrepancy has turned out to be too costly in memory
    consumption for the Raspbian distribution.
    
    Because the HVS operates a scanline at a time, compositing from T does
    increase the memory bandwidth cost of scanout.  On my 1920x1080@32bpp
    display on a RPi3, we go from about 15% of system memory bandwidth
    with linear to about 20% with tiled.  However, for X11 this still ends
    up being a huge performance win in active usage.
    
    This patch doesn't yet handle src_x/src_y offsetting within the tiled
    buffer.  However, we fail to do so for untiled buffers already.
    Signed-off-by: default avatarEric Anholt <eric@anholt.net>
    Link: http://patchwork.freedesktop.org/patch/msgid/20170608001336.12842-1-eric@anholt.netReviewed-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
    98830d91
vc4_regs.h 30.6 KB