drm/i915: Add new GET_PIPE_FROM_CRTC_ID ioctl.
authorCarl Worth <cworth@cworth.org>
Wed, 29 Apr 2009 21:43:54 +0000 (14:43 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 14 May 2009 23:00:32 +0000 (16:00 -0700)
commit08d7b3d1edff84bd673d9e9ab36b5aa62e1ba903
tree0dcbb40ceb39aafab750bb06e2cd165dd906f8d3
parent9d2949a4cdb77b9b5c243c79be6489d34d770c7c
drm/i915: Add new GET_PIPE_FROM_CRTC_ID ioctl.

This allows userlevel code to discover the pipe number corresponding
to a given CRTC ID. This is necessary for doing pipe-specific
operations such as waiting for vblank on a given CRTC.  Failure to use
the right pipe mapping can result in GPU hangs, or at least failure
to actually sync to vblank.

Signed-off-by: Carl Worth <cworth@cworth.org>
[anholt: Style touchups from review]
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
include/drm/i915_drm.h