#include <kunit/test.h>
#include <drm/drm_device.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_format_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_kunit_helpers.h>
#include <drm/drm_mode.h>
#include <drm/drm_print.h>
#include <drm/drm_rect.h>
#include "../drm_crtc_internal.h"
#define TEST_BUF_SIZE …
#define TEST_USE_DEFAULT_PITCH …
static unsigned char fmtcnv_state_mem[PAGE_SIZE];
static struct drm_format_conv_state fmtcnv_state = …;
struct convert_to_gray8_result { … };
struct convert_to_rgb332_result { … };
struct convert_to_rgb565_result { … };
struct convert_to_xrgb1555_result { … };
struct convert_to_argb1555_result { … };
struct convert_to_rgba5551_result { … };
struct convert_to_rgb888_result { … };
struct convert_to_argb8888_result { … };
struct convert_to_xrgb2101010_result { … };
struct convert_to_argb2101010_result { … };
struct convert_to_mono_result { … };
struct fb_swab_result { … };
struct convert_to_xbgr8888_result { … };
struct convert_to_abgr8888_result { … };
struct convert_xrgb8888_case { … };
static struct convert_xrgb8888_case convert_xrgb8888_cases[] = …;
static size_t conversion_buf_size(u32 dst_format, unsigned int dst_pitch,
const struct drm_rect *clip, int plane)
{ … }
static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_size)
{ … }
static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_size)
{ … }
static __le32 *cpubuf_to_le32(struct kunit *test, const u32 *buf, size_t buf_size)
{ … }
static void convert_xrgb8888_case_desc(struct convert_xrgb8888_case *t,
char *desc)
{ … }
KUNIT_ARRAY_PARAM(convert_xrgb8888, convert_xrgb8888_cases,
convert_xrgb8888_case_desc);
static void drm_test_fb_xrgb8888_to_gray8(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_rgb332(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_rgb565(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_mono(struct kunit *test)
{ … }
static void drm_test_fb_swab(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_abgr8888(struct kunit *test)
{ … }
static void drm_test_fb_xrgb8888_to_xbgr8888(struct kunit *test)
{ … }
struct clip_offset_case { … };
static struct clip_offset_case clip_offset_cases[] = …;
static void clip_offset_case_desc(struct clip_offset_case *t, char *desc)
{ … }
KUNIT_ARRAY_PARAM(clip_offset, clip_offset_cases, clip_offset_case_desc);
static void drm_test_fb_clip_offset(struct kunit *test)
{ … }
struct fb_build_fourcc_list_case { … };
static struct fb_build_fourcc_list_case fb_build_fourcc_list_cases[] = …;
static void fb_build_fourcc_list_case_desc(struct fb_build_fourcc_list_case *t, char *desc)
{ … }
KUNIT_ARRAY_PARAM(fb_build_fourcc_list, fb_build_fourcc_list_cases, fb_build_fourcc_list_case_desc);
static void drm_test_fb_build_fourcc_list(struct kunit *test)
{ … }
struct fb_memcpy_case { … };
static struct fb_memcpy_case fb_memcpy_cases[] = …;
static void fb_memcpy_case_desc(struct fb_memcpy_case *t, char *desc)
{ … }
KUNIT_ARRAY_PARAM(fb_memcpy, fb_memcpy_cases, fb_memcpy_case_desc);
static void drm_test_fb_memcpy(struct kunit *test)
{ … }
static struct kunit_case drm_format_helper_test_cases[] = …;
static struct kunit_suite drm_format_helper_test_suite = …;
kunit_test_suite(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;