-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/selftest: Refactor drm mode setting selftests
With this patch split the kernel module specific code from actual selftest code. This is done to allow adding more selftests as separate file. Also added kernel module exit stub with this patch. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: alexandru-cosmin.gheorghe@arm.com Signed-off-by: Deepak Rawat <drawat@vmware.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20181016204609.1555-1-drawat@vmware.com
- Loading branch information
Deepak Rawat
authored and
Daniel Vetter
committed
Oct 17, 2018
1 parent
a378050
commit 9205329
Showing
5 changed files
with
54 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
obj-$(CONFIG_DRM_DEBUG_SELFTEST) += test-drm_mm.o test-drm-helper.o | ||
test-drm_modeset-y := test-drm_modeset_common.o test-drm_plane_helper.o | ||
|
||
obj-$(CONFIG_DRM_DEBUG_SELFTEST) += test-drm_mm.o test-drm_modeset.o |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Common file for modeset selftests. | ||
*/ | ||
|
||
#include <linux/module.h> | ||
|
||
#include "test-drm_modeset_common.h" | ||
|
||
static int __init test_drm_modeset_init(void) | ||
{ | ||
return test_drm_plane_helper(); | ||
} | ||
|
||
static void __exit test_drm_modeset_exit(void) | ||
{ | ||
} | ||
|
||
module_init(test_drm_modeset_init); | ||
module_exit(test_drm_modeset_exit); | ||
|
||
MODULE_AUTHOR("Intel Corporation"); | ||
MODULE_LICENSE("GPL"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
|
||
#ifndef __TEST_DRM_MODESET_COMMON_H__ | ||
#define __TEST_DRM_MODESET_COMMON_H__ | ||
|
||
#define FAIL(test, msg, ...) \ | ||
do { \ | ||
if (test) { \ | ||
pr_err("%s/%u: " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ | ||
return -EINVAL; \ | ||
} \ | ||
} while (0) | ||
|
||
#define FAIL_ON(x) FAIL((x), "%s", "FAIL_ON(" __stringify(x) ")\n") | ||
|
||
int test_drm_plane_helper(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters