diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-17 00:57:01 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-08 19:46:36 +0000 |
commit | 03248a798409ca4dd1caf5e25a3d5f5a80173260 (patch) | |
tree | 77e169e2bde6135e3e89747ff65c8b13865cc833 /src/intel_display.c | |
parent | 00a2aee38dc5cbbd4907a593fa8d617f5a20292e (diff) |
Cache the fixed crtc<->pipe relationship
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_display.c')
-rw-r--r-- | src/intel_display.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/intel_display.c b/src/intel_display.c index 11980135..e3d783c0 100644 --- a/src/intel_display.c +++ b/src/intel_display.c @@ -70,6 +70,7 @@ struct intel_crtc { struct intel_mode *mode; drmModeModeInfo kmode; drmModeCrtcPtr mode_crtc; + int pipe; dri_bo *cursor; dri_bo *rotate_bo; uint32_t rotate_pitch; @@ -678,6 +679,9 @@ intel_crtc_init(ScrnInfoPtr scrn, struct intel_mode *mode, int num) intel_crtc->mode = mode; crtc->driver_private = intel_crtc; + intel_crtc->pipe = drm_intel_get_pipe_from_crtc_id(intel->bufmgr, + crtc_id(intel_crtc)); + intel_crtc->cursor = drm_intel_bo_alloc(intel->bufmgr, "ARGB cursor", HWCURSOR_SIZE_ARGB, GTT_PAGE_SIZE); @@ -1671,16 +1675,15 @@ intel_mode_fini(intel_screen_private *intel) intel->modes = NULL; } -int -intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, xf86CrtcPtr crtc) -{ - return drm_intel_get_pipe_from_crtc_id(bufmgr, - crtc_id(crtc->driver_private)); -} - /* for the mode overlay */ int intel_crtc_id(xf86CrtcPtr crtc) { return crtc_id(crtc->driver_private); } + +int intel_crtc_to_pipe(xf86CrtcPtr crtc) +{ + struct intel_crtc *intel_crtc = crtc->driver_private; + return intel_crtc->pipe; +} |