]> asedeno.scripts.mit.edu Git - linux.git/blob - drivers/gpu/drm/selftests/test-drm_modeset_common.h
bdeba264661f1616ff2fdd9e2d7556a77228dcac
[linux.git] / drivers / gpu / drm / selftests / test-drm_modeset_common.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2
3 #ifndef __TEST_DRM_MODESET_COMMON_H__
4 #define __TEST_DRM_MODESET_COMMON_H__
5
6 #define FAIL(test, msg, ...) \
7         do { \
8                 if (test) { \
9                         pr_err("%s/%u: " msg, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
10                         return -EINVAL; \
11                 } \
12         } while (0)
13
14 #define FAIL_ON(x) FAIL((x), "%s", "FAIL_ON(" __stringify(x) ")\n")
15
16 int test_drm_plane_helper(void);
17
18 #endif