Skip to content
  • Alex Goins's avatar
    xf86: Add PRIME flipping functions to Screen · b601f96a
    Alex Goins authored and Adam Jackson's avatar Adam Jackson committed
    
    
    Adds typedefs for (*RRStartFlippingPixmapTrackingProcPtr),
    (*RREnableSharedPixmapFlippingProcPtr),
    and (*RRDisableSharedPixmapFlippingProcPtr) in randrstr.h.
    
    Adds typedefs for (*PresentSharedPixmapProcPtr),
    (*SharedPixmapNotifyDamageProcPtr),
    (*RequestSharedPixmapNotifyDamageProcPtr), and
    (*StopFlippingPixmapTrackingProcPtr) in scrnintstr.h.
    
    Adds RR(Enable/Disable)SharedPixmapFlipping, and
    RRStartFlippingPixmapTracking to rrScrnPrivRec.
    
    Adds StopFlippingPixmapTracking, PresentSharedPixmap,
    SharedPixmapNotifyDamage, and RequestSharedPixmapNotifyDamage to ScreenRec.
    
    rrScrnPrivRec used for functions that use RandR-private data types, and
    ScreenRec used for the rest.
    
    RREnableSharedPixmapFlipping will allow the sink driver to setup for
    flipping between two shared pixmaps.
    
    RRDisableSharedPixmapFlipping will allow the sink driver to do teardown
    associated with flipping between two shared pixmaps.
    
    (RRStart/Stop)FlippingPixmapTracking are merely the double-buffered
    equivalents of (Start/Stop)PixmapTracking, allowing the source driver to do
    whatever setup and teardown necessary for presenting on the two shared
    pixmaps.
    
    PresentSharedPixmap is a function exposed by the source driver for the X
    server or sink driver to call to request a present on a given shared
    pixmap.  This way, presents can be driven by the sink's vblank instead of a
    timer or similar mechanism.
    
    SharedPixmapNotifyDamage and RequestSharedPixmapNotifyDamage are OPTIONAL
    (even for double-buffered PRIME) functions exposed by the sink driver and
    the source driver, respectively. By calling
    master->RequestSharedPixmapNotifyDamage(ppix), the sink driver can request
    for the source driver to call slave->SharedPixmapNotifyDamage(ppix) in
    response to damage on the master screen pixmap tracked by ppix.
    
    v1: Initial commit
    v2: Rename PresentTrackedFlippingPixmap to PresentSharedPixmap
        Add SharedPixmapNotifyDamage / RequestSharedPixmapNotifyDamage
    v3: Add RRCrtcPtr as a parameter to StartFlippingPixmapTracking
        Move functions that use RandR-private data types to rrScrnPrivRec.
    v4: Unchanged
    v5: Add front and back parameters to RREnableSharedPixmapFlippingProcPtr
    v6: Rebase onto ToT
    v7: Unchanged
    
    Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
    Signed-off-by: default avatarAlex Goins <agoins@nvidia.com>
    b601f96a