All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xf86drm: remove to open the DRM device unnecessarily
@ 2015-05-28  0:57 Joonyoung Shim
  2015-05-28  9:00 ` Zhou, Jammy
  2015-05-28 13:13 ` Emil Velikov
  0 siblings, 2 replies; 8+ messages in thread
From: Joonyoung Shim @ 2015-05-28  0:57 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

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@samsung.com>
---
 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-06-01  2:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28  0:57 [PATCH] xf86drm: remove to open the DRM device unnecessarily Joonyoung Shim
2015-05-28  9:00 ` Zhou, Jammy
2015-05-28 13:13 ` Emil Velikov
2015-05-28 14:15   ` Daniel Kurtz
2015-05-28 15:51     ` Emil Velikov
2015-05-29  6:50       ` Joonyoung Shim
2015-05-30 13:20         ` Emil Velikov
2015-06-01  2:53           ` Joonyoung Shim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.