This is to remove to open the DRM device unnecessarily as call drmAvailable() when name is NULL or drm_server_info is NULL in drmOpenWithType function. Signed-off-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx> --- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xf86drm.c b/xf86drm.c index b5a174b..900e4b1 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -725,7 +725,7 @@ int drmOpen(const char *name, const char *busid) */ int drmOpenWithType(const char *name, const char *busid, int type) { - if (!drmAvailable() && name != NULL && drm_server_info) { + if (name != NULL && drm_server_info && !drmAvailable()) { /* try to load the kernel module */ if (!drm_server_info->load_module(name)) { drmMsg("[drm] failed to load kernel module \"%s\"\n", name); -- 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel