diff options
author | Deepak Rawat <drawat@vmware.com> | 2018-10-16 23:46:08 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-10-17 10:38:04 +0300 |
commit | 920532991aca4314cfd494301d9a5b9c8b26c374 (patch) | |
tree | 34b2e99b827cd1e482fe3f1a1dcae72024d11d0e /drivers/gpu/drm/selftests/test-drm_modeset_common.h | |
parent | a37805098900a6e73a55b3a43b7d3bcd987bb3f4 (diff) | |
download | linux-920532991aca4314cfd494301d9a5b9c8b26c374.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm/selftests/test-drm_modeset_common.h')
-rw-r--r-- | drivers/gpu/drm/selftests/test-drm_modeset_common.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/selftests/test-drm_modeset_common.h b/drivers/gpu/drm/selftests/test-drm_modeset_common.h new file mode 100644 index 000000000000..bdeba264661f --- /dev/null +++ b/drivers/gpu/drm/selftests/test-drm_modeset_common.h @@ -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 |