History

drm: Add macro to export functions only when CONFIG_DRM_DEBUG_SELFTEST is enabled

If we want to be able to write drmselftests for non-static core functions that are not intended to be used by drivers we need this functions to be exported. This adds a macro that is tied of CONFIG_DRM_DEBUG_SELFTEST, and uses that to export drm_internal_framebuffer_create, in order for subsequent patches to be able to test it.

Alexandru Gheorghe committed 8 years ago

Commit 9aefed11 parent 0d1c7d02 files · +7 −0Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/drm_framebuffer.c +1 −0
  2. include/drm/drmP.h +6 −0
drivers/gpu/drm/drm_framebuffer.c+1−0
@@ -323,6 +323,7 @@ drm_internal_framebuffer_create(struct drm_device *dev, · 322 unmodified lines
323 323
324 return fb;324 return fb;
325}325}
326EXPORT_SYMBOL_FOR_TESTS_ONLY(drm_internal_framebuffer_create);
326 327
327/**328/**
328 * drm_mode_addfb2 - add an FB to the graphics configuration329 * drm_mode_addfb2 - add an FB to the graphics configuration
include/drm/drmP.h+6−0
@@ -110,4 +110,10 @@ static inline bool drm_can_sleep(void) · 109 unmodified lines
110 return true;110 return true;
111}111}
112 112
113#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE)
114#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x)
115#else
116#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)
117#endif
118
113#endif119#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t