All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: [PATCH v3 1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig
Date: Wed,  6 Nov 2019 14:24:28 +0000	[thread overview]
Message-ID: <20191106142432.14022-2-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20191106142432.14022-1-chris@chris-wilson.co.uk>

Currently, we only export symbols for drm-selftests which are either
compiled as modules or into the main drm builtin. However, if we want to
export symbols from drm.ko for the drivers' selftests, we require a
means of controlling that export separately. So we add a new Kconfig to
determine whether or not the EXPORT_SYMBOL_FOR_TESTS_ONLY() takes
effect.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/Kconfig | 4 ++++
 include/drm/drm_util.h  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 617d9c3a86c3..d3560afe34d3 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -54,6 +54,9 @@ config DRM_DEBUG_MM
 
 	  If in doubt, say "N".
 
+config DRM_EXPORT_FOR_TESTS
+	bool
+
 config DRM_DEBUG_SELFTEST
 	tristate "kselftests for DRM"
 	depends on DRM
@@ -61,6 +64,7 @@ config DRM_DEBUG_SELFTEST
 	select PRIME_NUMBERS
 	select DRM_LIB_RANDOM
 	select DRM_KMS_HELPER
+	select DRM_EXPORT_FOR_TESTS if m
 	default n
 	help
 	  This option provides kernel modules that can be used to run
diff --git a/include/drm/drm_util.h b/include/drm/drm_util.h
index 07b8e9f04599..79952d8c4bba 100644
--- a/include/drm/drm_util.h
+++ b/include/drm/drm_util.h
@@ -41,7 +41,7 @@
  * Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall
  * only be visible for drmselftests.
  */
-#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE)
+#if defined(CONFIG_DRM_EXPORT_FOR_TESTS)
 #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x)
 #else
 #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: [PATCH v3 1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig
Date: Wed,  6 Nov 2019 14:24:28 +0000	[thread overview]
Message-ID: <20191106142432.14022-2-chris@chris-wilson.co.uk> (raw)
Message-ID: <20191106142428.Vt5gMDjxOfJGd01clQIRtL75eCoN5easkBEkDigFyS8@z> (raw)
In-Reply-To: <20191106142432.14022-1-chris@chris-wilson.co.uk>

Currently, we only export symbols for drm-selftests which are either
compiled as modules or into the main drm builtin. However, if we want to
export symbols from drm.ko for the drivers' selftests, we require a
means of controlling that export separately. So we add a new Kconfig to
determine whether or not the EXPORT_SYMBOL_FOR_TESTS_ONLY() takes
effect.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/Kconfig | 4 ++++
 include/drm/drm_util.h  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 617d9c3a86c3..d3560afe34d3 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -54,6 +54,9 @@ config DRM_DEBUG_MM
 
 	  If in doubt, say "N".
 
+config DRM_EXPORT_FOR_TESTS
+	bool
+
 config DRM_DEBUG_SELFTEST
 	tristate "kselftests for DRM"
 	depends on DRM
@@ -61,6 +64,7 @@ config DRM_DEBUG_SELFTEST
 	select PRIME_NUMBERS
 	select DRM_LIB_RANDOM
 	select DRM_KMS_HELPER
+	select DRM_EXPORT_FOR_TESTS if m
 	default n
 	help
 	  This option provides kernel modules that can be used to run
diff --git a/include/drm/drm_util.h b/include/drm/drm_util.h
index 07b8e9f04599..79952d8c4bba 100644
--- a/include/drm/drm_util.h
+++ b/include/drm/drm_util.h
@@ -41,7 +41,7 @@
  * Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall
  * only be visible for drmselftests.
  */
-#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE)
+#if defined(CONFIG_DRM_EXPORT_FOR_TESTS)
 #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x)
 #else
 #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)
-- 
2.24.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v3 1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig
Date: Wed,  6 Nov 2019 14:24:28 +0000	[thread overview]
Message-ID: <20191106142432.14022-2-chris@chris-wilson.co.uk> (raw)
Message-ID: <20191106142428.WglwXKIfzCQFOBuaiexHgO2Y6uAJ52j7bvhm75Y-vzc@z> (raw)
In-Reply-To: <20191106142432.14022-1-chris@chris-wilson.co.uk>

Currently, we only export symbols for drm-selftests which are either
compiled as modules or into the main drm builtin. However, if we want to
export symbols from drm.ko for the drivers' selftests, we require a
means of controlling that export separately. So we add a new Kconfig to
determine whether or not the EXPORT_SYMBOL_FOR_TESTS_ONLY() takes
effect.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/Kconfig | 4 ++++
 include/drm/drm_util.h  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 617d9c3a86c3..d3560afe34d3 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -54,6 +54,9 @@ config DRM_DEBUG_MM
 
 	  If in doubt, say "N".
 
+config DRM_EXPORT_FOR_TESTS
+	bool
+
 config DRM_DEBUG_SELFTEST
 	tristate "kselftests for DRM"
 	depends on DRM
@@ -61,6 +64,7 @@ config DRM_DEBUG_SELFTEST
 	select PRIME_NUMBERS
 	select DRM_LIB_RANDOM
 	select DRM_KMS_HELPER
+	select DRM_EXPORT_FOR_TESTS if m
 	default n
 	help
 	  This option provides kernel modules that can be used to run
diff --git a/include/drm/drm_util.h b/include/drm/drm_util.h
index 07b8e9f04599..79952d8c4bba 100644
--- a/include/drm/drm_util.h
+++ b/include/drm/drm_util.h
@@ -41,7 +41,7 @@
  * Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall
  * only be visible for drmselftests.
  */
-#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE)
+#if defined(CONFIG_DRM_EXPORT_FOR_TESTS)
 #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x)
 #else
 #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-11-06 14:24 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 14:24 mock_drm_getfile(), take three Chris Wilson
2019-11-06 14:24 ` [Intel-gfx] " Chris Wilson
2019-11-06 14:24 ` Chris Wilson [this message]
2019-11-06 14:24   ` [Intel-gfx] [PATCH v3 1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig Chris Wilson
2019-11-06 14:24   ` Chris Wilson
2019-11-07  8:35   ` Daniel Vetter
2019-11-07  8:35     ` [Intel-gfx] " Daniel Vetter
2019-11-06 14:24 ` [PATCH v3 2/5] drm: Expose a method for creating anonymous struct file around drm_minor Chris Wilson
2019-11-06 14:24   ` [Intel-gfx] " Chris Wilson
2019-11-06 14:24   ` Chris Wilson
2019-11-07  8:36   ` Daniel Vetter
2019-11-07  8:36     ` [Intel-gfx] " Daniel Vetter
2019-11-06 14:24 ` [PATCH v3 3/5] drm/i915/selftests: Replace mock_file hackery with drm's true fake Chris Wilson
2019-11-06 14:24   ` [Intel-gfx] " Chris Wilson
2019-11-06 14:24   ` Chris Wilson
2019-11-07  8:39   ` [Intel-gfx] " Daniel Vetter
2019-11-07  8:39     ` Daniel Vetter
2019-11-07 17:17     ` Chris Wilson
2019-11-07 17:17       ` Chris Wilson
2019-11-07 17:33       ` Daniel Vetter
2019-11-07 17:33         ` [Intel-gfx] " Daniel Vetter
2019-11-07 17:33         ` Daniel Vetter
2019-11-07 17:28   ` Matthew Auld
2019-11-07 17:28     ` [Intel-gfx] " Matthew Auld
2019-11-07 17:28     ` Matthew Auld
2019-11-06 14:24 ` [PATCH v3 4/5] drm/i915/selftests: Wrap vm_mmap() around GEM objects Chris Wilson
2019-11-06 14:24   ` [Intel-gfx] " Chris Wilson
2019-11-06 14:24   ` Chris Wilson
2019-11-06 14:24 ` [PATCH v3 5/5] drm/i915/selftests: Verify mmap_gtt revocation on unbinding Chris Wilson
2019-11-06 14:24   ` [Intel-gfx] " Chris Wilson
2019-11-06 18:35 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v3,1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig Patchwork
2019-11-06 18:35   ` [Intel-gfx] " Patchwork
2019-11-06 18:57 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-11-06 18:57   ` [Intel-gfx] " Patchwork

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=20191106142432.14022-2-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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.