From: Dave Airlie <[email protected]> This API should be used going forward instead of drmModeGetConnector.
Signed-off-by: Dave Airlie <[email protected]> --- libdrm/xf86drmMode.c | 9 +++++++-- libdrm/xf86drmMode.h | 9 +++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c index 88b4fe3..4d7fef6 100644 --- a/libdrm/xf86drmMode.c +++ b/libdrm/xf86drmMode.c @@ -356,13 +356,13 @@ drmModeEncoderPtr drmModeGetEncoder(int fd, uint32_t encoder_id) * Connector manipulation */ -drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connector_id) +drmModeConnectorPtr drmModeGetConnectorWithDepth(int fd, uint32_t connector_id, uint32_t depth) { struct drm_mode_get_connector conn; drmModeConnectorPtr r = NULL; conn.connector_id = connector_id; - conn.connector_type_id = 0; + conn.connector_type_id = depth; conn.connector_type = 0; conn.count_modes = 0; conn.modes_ptr = 0; @@ -423,6 +423,11 @@ err_allocs: return r; } +drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connector_id) +{ + return drmModeGetConnectorWithDepth(fd, connector_id, 0); +} + int drmModeAttachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_info) { struct drm_mode_mode_cmd res; diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h index 62304bb..d74901c 100644 --- a/libdrm/xf86drmMode.h +++ b/libdrm/xf86drmMode.h @@ -339,6 +339,15 @@ extern drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connectorId); /** + * same as get connector except it passes in the depth + * proposed to set a mode so mode bw calcs can be done by + * kms driver + */ +extern drmModeConnectorPtr drmModeGetConnectorWithDepth(int fd, + uint32_t connectorId, + uint32_t proposed_depth); + +/** * Attaches the given mode to an connector. */ extern int drmModeAttachMode(int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info); -- 1.6.5.rc2 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
