]> git.baikalelectronics.ru Git - kernel.git/commit
drm: omapdrm: new vblank and event handling
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 29 May 2015 13:01:18 +0000 (16:01 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 12 Jun 2015 20:30:47 +0000 (23:30 +0300)
commit0a3b4724a0982204c71e8a1e4e09a845fd26c8de
treee0ba2b0b2f0b4a301b7c23c1439ee80fc0e33237
parentb994f7d4ebf85f97d457a063961028ae5d804875
drm: omapdrm: new vblank and event handling

Rework the crtc event/flip_wait system as follows:

- If we enable a crtc (full modeset), we set omap_crtc->pending and
  register vblank irq.

- If we need to set GO bit (page flip), we do the same but also set the
  GO bit.

- On vblank we unregister the irq, clear the 'pending' flag, send vblank
  event to userspace if crtc->state->event != NULL, and wake up
  'pending_wait' wq.

- In omap_atomic_complete() we wait for the 'pending' flag to get reset
  for all enabled crtcs  using 'pending_wait' wq.

The above ensures that we send the events to userspace in vblank, and
that after the wait in omap_atomic_complete() everything for the
affected crtcs has been completed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/omapdrm/omap_crtc.c
drivers/gpu/drm/omapdrm/omap_drv.c
drivers/gpu/drm/omapdrm/omap_drv.h