mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 12:36:45 +07:00
6ff3d9ffdc
Add tests that verify that drm_internal_framebuffer_create creates buffers correctly by creating a dummy drm_device with a mock function for the fb_create callback. To decide if a buffer has been created or not it just checks if fb_create callback has been called for the particular drm_mode_fb_cmd2 that's being tested. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-8-alexandru-cosmin.gheorghe@arm.com
23 lines
610 B
C
23 lines
610 B
C
/* 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 igt_check_plane_state(void *ignored);
|
|
int igt_check_drm_format_block_width(void *ignored);
|
|
int igt_check_drm_format_block_height(void *ignored);
|
|
int igt_check_drm_format_min_pitch(void *ignored);
|
|
int igt_check_drm_framebuffer_create(void *ignored);
|
|
|
|
#endif
|