All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: emil.l.velikov@gmail.com
Subject: [PATCH 05/18] libkms: build the intel backend only when needed
Date: Sun,  7 Sep 2014 22:30:00 +0100	[thread overview]
Message-ID: <1410125413-19465-6-git-send-email-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <1410125413-19465-1-git-send-email-emil.l.velikov@gmail.com>

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 configure.ac       |  3 +++
 libkms/Makefile.am |  5 ++++-
 libkms/linux.c     | 16 +++++++++++-----
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 484084f..f1d3451 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,6 +270,9 @@ fi
 AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes])
 
 AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes])
+if test "x$INTEL" = xyes; then
+	AC_DEFINE(HAVE_INTEL, 1, [Have intel support])
+fi
 
 AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes])
 if test "x$VMWGFX" = xyes; then
diff --git a/libkms/Makefile.am b/libkms/Makefile.am
index 449a73b..dae44e9 100644
--- a/libkms/Makefile.am
+++ b/libkms/Makefile.am
@@ -15,7 +15,6 @@ libkms_la_LIBADD = ../libdrm.la
 libkms_la_SOURCES = \
 	internal.h \
 	linux.c \
-	intel.c \
 	dumb.c \
 	api.c
 
@@ -23,6 +22,10 @@ if HAVE_VMWGFX
 libkms_la_SOURCES += vmwgfx.c
 endif
 
+if HAVE_INTEL
+libkms_la_SOURCES += intel.c
+endif
+
 if HAVE_NOUVEAU
 libkms_la_SOURCES += nouveau.c
 endif
diff --git a/libkms/linux.c b/libkms/linux.c
index 17e1d58..77a0bbe 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -103,25 +103,31 @@ linux_from_sysfs(int fd, struct kms_driver **out)
 	if (ret)
 		return ret;
 
+#ifdef HAVE_INTEL
 	if (!strcmp(name, "intel"))
 		ret = intel_create(fd, out);
+	else
+#endif
 #ifdef HAVE_VMWGFX
-	else if (!strcmp(name, "vmwgfx"))
+	if (!strcmp(name, "vmwgfx"))
 		ret = vmwgfx_create(fd, out);
+	else
 #endif
 #ifdef HAVE_NOUVEAU
-	else if (!strcmp(name, "nouveau"))
+	if (!strcmp(name, "nouveau"))
 		ret = nouveau_create(fd, out);
+	else
 #endif
 #ifdef HAVE_RADEON
-	else if (!strcmp(name, "radeon"))
+	if (!strcmp(name, "radeon"))
 		ret = radeon_create(fd, out);
+	else
 #endif
 #ifdef HAVE_EXYNOS
-	else if (!strcmp(name, "exynos"))
+	if (!strcmp(name, "exynos"))
 		ret = exynos_create(fd, out);
-#endif
 	else
+#endif
 		ret = -ENOSYS;
 
 	free(name);
-- 
2.0.2

  parent reply	other threads:[~2014-09-07 21:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 21:29 [PATCH 00/18] Final batch of Android related fixes Emil Velikov
2014-09-07 21:29 ` [PATCH 01/18] automake: remove obsolete makefiles Emil Velikov
2014-09-07 21:29 ` [PATCH 02/18] Remove i810_drm.h and i830_drm.h from the distribution tarball Emil Velikov
2014-09-07 21:29 ` [PATCH 03/18] automake: fix 'make commit-headers' Emil Velikov
2014-09-07 21:29 ` [PATCH 04/18] configure: unconditionally check for atomic ops/primitives Emil Velikov
2014-09-07 21:30 ` Emil Velikov [this message]
2014-09-08 10:11   ` [PATCH 05/18] libkms: build the intel backend only when needed Jakob Bornecrantz
2014-09-07 21:30 ` [PATCH 06/18] libkms: move sources lists to makefile.sources Emil Velikov
2014-09-07 21:30 ` [PATCH 07/18] libkms: add Android build Emil Velikov
2014-09-08 10:10   ` Jakob Bornecrantz
2014-09-07 21:30 ` [PATCH 08/18] modetest: move sources lists to makefiles.sources Emil Velikov
2014-09-07 21:30 ` [PATCH 09/18] modetest: add Android build Emil Velikov
2014-09-16 13:30   ` [PATCHv2 " Emil Velikov
2014-09-07 21:30 ` [PATCH 10/18] modetest: Add support of STI driver Emil Velikov
2014-09-07 21:30 ` [PATCH 11/18] automake: pick up all files for distribution Emil Velikov
2014-09-07 21:30 ` [PATCH 12/18] Add private mmap/munmap wrappers Emil Velikov
2014-09-16 13:31   ` [PATCHv2 " Emil Velikov
2014-09-07 21:30 ` [PATCH 13/18] drm: use drm_mmap/drm_munmap wrappers Emil Velikov
2014-09-07 21:30 ` [PATCH 14/18] libkms: " Emil Velikov
2014-09-07 21:30 ` [PATCH 15/18] nouveau: " Emil Velikov
2014-09-07 21:30 ` [PATCH 16/18] radeon: " Emil Velikov
2014-09-07 21:30 ` [PATCH 17/18] freedreno: " Emil Velikov
2014-09-07 21:30 ` [PATCH 18/18] intel: " Emil Velikov
2014-09-08 11:10 ` [PATCH 00/18] Final batch of Android related fixes Jakob Bornecrantz
2014-09-08 12:14   ` Daniel Vetter
2014-09-16 13:34 ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410125413-19465-6-git-send-email-emil.l.velikov@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.