• Keith Packard's avatar
    drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3] · 3064abfa
    Keith Packard authored
    These provide crtc-id based functions instead of pipe-number, while
    also offering higher resolution time (ns) and wider frame count (64)
    as required by the Vulkan API.
    
    v2:
    
     * Check for DRIVER_MODESET in new crtc-based vblank ioctls
    
    	Failing to check this will oops the driver.
    
     * Ensure vblank interupt is running in crtc_get_sequence ioctl
    
    	The sequence and timing values are not correct while the
    	interrupt is off, so make sure it's running before asking for
    	them.
    
     * Short-circuit get_sequence if the counter is enabled and accurate
    
    	Steal the idea from the code in wait_vblank to avoid the
    	expense of drm_vblank_get/put
    
     * Return active state of crtc in crtc_get_sequence ioctl
    
    	Might be useful for applications that aren't in charge of
    	modesetting?
    
     * Use drm_crtc_vblank_get/put in new crtc-based vblank sequence ioctls
    
    	Daniel Vetter prefers these over the old drm_vblank_put/get
    	APIs.
    
     * Return s64 ns instead of u64 in new sequence event
    Suggested-by: default avatarDaniel Vetter <daniel@ffwll.ch>
    Suggested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    
    v3:
    
     * Removed FIRST_PIXEL_OUT_FLAG
     * Document that the timestamp in the query and event are
       that of the first pixel leaving the display engine for
       the display (using the same wording as the Vulkan spec).
    Suggested-by: default avatarMichel Dänzer <michel@daenzer.net>
    Acked-by: default avatarDave Airlie <airlied@redhat.com>
    
    [airlied: left->leaves (Michel)]
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    3064abfa
drm_internal.h 6.38 KB