summaryrefslogtreecommitdiff
path: root/linux-core/intel_display.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-12 12:41:56 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-12 12:41:56 -0700
commit6b229c1e59e8d070e1822030f8f0c1d61140508d (patch)
tree8fd86e699ec7e2974984e602a63924fc17c400bc /linux-core/intel_display.c
parent9e5d61d5b8c052b4dc126b155dca1f0d2e4e5ad9 (diff)
Add new function for getting a CRTC pointer given a pipe number.
Diffstat (limited to 'linux-core/intel_display.c')
-rw-r--r--linux-core/intel_display.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/linux-core/intel_display.c b/linux-core/intel_display.c
index aed86231..e58b31b0 100644
--- a/linux-core/intel_display.c
+++ b/linux-core/intel_display.c
@@ -1101,6 +1101,18 @@ void intel_crtc_init(drm_device_t *dev, int pipe)
crtc->driver_private = intel_crtc;
}
+struct drm_crtc *intel_get_crtc_from_pipe(drm_device_t *dev, int pipe)
+{
+ struct drm_crtc *crtc = NULL;
+
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+ struct intel_crtc *intel_crtc = crtc->driver_private;
+ if (intel_crtc->pipe == pipe)
+ break;
+ }
+ return crtc;
+}
+
int intel_output_clones(drm_device_t *dev, int type_mask)
{
int index_mask = 0;