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_priv.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libdrm/intel/intel_bufmgr_priv.h') diff --git a/libdrm/intel/intel_bufmgr_priv.h b/libdrm/intel/intel_bufmgr_priv.h index 3484dee8..0098076e 100644 --- a/libdrm/intel/intel_bufmgr_priv.h +++ b/libdrm/intel/intel_bufmgr_priv.h @@ -188,6 +188,19 @@ struct _drm_intel_bufmgr { */ int (*bo_disable_reuse)(drm_intel_bo *bo); + /** + * + * Return the pipe associated with a crtc_id so that vblank + * synchronization can use the correct data in the request. + * This is only supported for KMS and gem at this point, when + * unsupported, this function returns -1 and leaves the decision + * of what to do in that case to the caller + * + * \param bufmgr the associated buffer manager + * \param crtc_id the crtc identifier + */ + int (*get_pipe_from_crtc_id)(drm_intel_bufmgr *bufmgr, int crtc_id); + int debug; /**< Enables verbose debugging printouts */ }; -- cgit v1.2.3