From f57d7f4b0b14972f92a83f155ae8033478aa7729 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 14 May 2009 16:58:14 -0700 Subject: libdrm/intel: Make get_pipe_from_crtc_id per-bufmgr. Return -1 on failure. The convention is that all APIs are per-bufmgr, so make this one the same. Then, have it return -1 on failure so that the application can know what's going on and do something sensible. Signed-off-by: Keith Packard --- libdrm/intel/intel_bufmgr.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libdrm/intel/intel_bufmgr.c') diff --git a/libdrm/intel/intel_bufmgr.c b/libdrm/intel/intel_bufmgr.c index 5057fe69..f170e7fc 100644 --- a/libdrm/intel/intel_bufmgr.c +++ b/libdrm/intel/intel_bufmgr.c @@ -219,3 +219,12 @@ int drm_intel_bo_disable_reuse(drm_intel_bo *bo) return bo->bufmgr->bo_disable_reuse(bo); return 0; } + +int +drm_intel_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr, int crtc_id) +{ + if (bufmgr->get_pipe_from_crtc_id) + return bufmgr->get_pipe_from_crtc_id(bufmgr, crtc_id); + return -1; +} + -- cgit v1.2.3