1. 21 10月, 2017 2 次提交
    • K
      drm: Reorganize drm_pending_event to support future event types [v2] · bd386e51
      Keith Packard 提交于
      Place drm_event_vblank in a new union that includes that and a bare
      drm_event structure. This will allow new members of that union to be
      added in the future without changing code related to the existing vbl
      event type.
      
      Assignments to the crtc_id field are now done when the event is
      allocated, rather than when delievered. This way, delivery doesn't
      need to have the crtc ID available.
      
      v2:
       * Remove 'dev' argument from create_vblank_event
      
      	It wasn't being used anyways, and if we need it in the future,
      	we can always get it from crtc->dev.
      
       * Check for MODESETTING before looking for crtc in queue_vblank_event
      
      	UMS drivers will oops if we try to get a crtc, so make sure
      	we're modesetting before we try to find a crtc_id to fill into
      	the event.
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      (cherry picked from commit dc695b85fde88eca3ef3b03fcd82f15b6bc6e462)
      bd386e51
    • K
      drm: Widen vblank count to 64-bits [v3] · 570e8696
      Keith Packard 提交于
      This modifies the datatypes used by the vblank code to provide 64 bits
      of vblank count.
      
      The driver interfaces have been left using 32 bits of vblank count;
      all of the code necessary to widen that value for the user API was
      already included to handle devices returning fewer than 32-bits.
      
      This will provide the necessary datatypes for the Vulkan API.
      
      v2:
      
       * Re-write wait_vblank ioctl to ABSOLUTE sequence
      
          When an application uses the WAIT_VBLANK ioctl with RELATIVE
          or NEXTONMISS bits set, the target vblank interval is updated
          within the kernel. We need to write that target back to the
          ioctl buffer and update the flags bits so that if the wait is
          interrupted by a signal, when it is re-started, it will target
          precisely the same vblank count as before.
      
       * Leave driver API with 32-bit vblank count
      
      v3:
      
       * Rebase on top of Arnd Bergmann's patch which had
         the switch to ktime_t parts.
      
      [airlied: fix conflict with Ville vblank change].
      Suggested-by: NMichel Dänzer <michel@daenzer.net>
      Suggested-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      (cherry picked from commit 2affbc16983e4fc90960bc7f70e7615f4228199b)
      570e8696
  2. 20 10月, 2017 38 次提交