OSDN Git Service

libdrm: speed up connector & mode fetching
authorJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 30 Mar 2009 21:35:30 +0000 (14:35 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 30 Mar 2009 21:37:04 +0000 (14:37 -0700)
commitcd5c66c659168cbe2e3229ebf8be79f764ed0ee1
treeaad537d3d0fcba6ab5ee0806587db84dea2081b3
parent93e65271601e6a1c7c90453f2f13157ae24b35c2
libdrm: speed up connector & mode fetching

This patch speeds up drmModeGetConnector by pre-allocating mode &
property info space before calling into the kernel.  In many cases this
pre-allocation will be sufficient to hold the returned values (it's easy
enough to tweak if the common case becomes larger), which means we don't
have to make the second call, which saves a lot of time.

Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
libdrm/xf86drmMode.c