diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-15 16:22:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-15 16:22:11 -0400 |
commit | 40f293ff833f4054de880d105bda0dbb5e2468db (patch) | |
tree | 8ee903bd20476dd2a38e42b1e611f3c8d1142bb6 /drivers/gpu/drm/i915/intel_display.c | |
parent | 8c21f34126222239450717b78dda0c4962d9ebfa (diff) | |
parent | 08d7b3d1edff84bd673d9e9ab36b5aa62e1ba903 (diff) |
Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel
* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
drm/i915: Add new GET_PIPE_FROM_CRTC_ID ioctl.
drm/i915: Set HDMI hot plug interrupt enable for only the output in question.
drm/i915: Include 965GME pci ID in IS_I965GM(dev) to match UMS.
drm/i915: Use the GM45 VGA hotplug workaround on G45 as well.
drm/i915: ignore LVDS on intel graphics systems that lie about having it
drm/i915: sanity check IER at wait_request time
drm/i915: workaround IGD i2c bus issue in kernel side (v2)
drm/i915: Don't allow binding objects into the last page of the aperture.
drm/i915: save/restore fence registers across suspend/resume
drm/i915: x86 always has writeq. Add I915_READ64 for symmetry.
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bdcda36953b0..3387cf32f385 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -1804,6 +1804,37 @@ static void intel_crtc_init(struct drm_device *dev, int pipe) | |||
1804 | } | 1804 | } |
1805 | } | 1805 | } |
1806 | 1806 | ||
1807 | int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data, | ||
1808 | struct drm_file *file_priv) | ||
1809 | { | ||
1810 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
1811 | struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data; | ||
1812 | struct drm_crtc *crtc = NULL; | ||
1813 | int pipe = -1; | ||
1814 | |||
1815 | if (!dev_priv) { | ||
1816 | DRM_ERROR("called with no initialization\n"); | ||
1817 | return -EINVAL; | ||
1818 | } | ||
1819 | |||
1820 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | ||
1821 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | ||
1822 | if (crtc->base.id == pipe_from_crtc_id->crtc_id) { | ||
1823 | pipe = intel_crtc->pipe; | ||
1824 | break; | ||
1825 | } | ||
1826 | } | ||
1827 | |||
1828 | if (pipe == -1) { | ||
1829 | DRM_ERROR("no such CRTC id\n"); | ||
1830 | return -EINVAL; | ||
1831 | } | ||
1832 | |||
1833 | pipe_from_crtc_id->pipe = pipe; | ||
1834 | |||
1835 | return 0; | ||
1836 | } | ||
1837 | |||
1807 | struct drm_crtc *intel_get_crtc_from_pipe(struct drm_device *dev, int pipe) | 1838 | struct drm_crtc *intel_get_crtc_from_pipe(struct drm_device *dev, int pipe) |
1808 | { | 1839 | { |
1809 | struct drm_crtc *crtc = NULL; | 1840 | struct drm_crtc *crtc = NULL; |