#ifndef DRM_KUNIT_HELPERS_H_
#define DRM_KUNIT_HELPERS_H_
#include <drm/drm_drv.h>
#include <linux/device.h>
#include <kunit/test.h>
struct drm_crtc_funcs;
struct drm_crtc_helper_funcs;
struct drm_device;
struct drm_plane_funcs;
struct drm_plane_helper_funcs;
struct kunit;
struct device *drm_kunit_helper_alloc_device(struct kunit *test);
void drm_kunit_helper_free_device(struct kunit *test, struct device *dev);
struct drm_device *
__drm_kunit_helper_alloc_drm_device_with_driver(struct kunit *test,
struct device *dev,
size_t size, size_t offset,
const struct drm_driver *driver);
#define drm_kunit_helper_alloc_drm_device_with_driver(_test, _dev, _type, _member, _drv) …
static inline struct drm_device *
__drm_kunit_helper_alloc_drm_device(struct kunit *test,
struct device *dev,
size_t size, size_t offset,
u32 features)
{ … }
#define drm_kunit_helper_alloc_drm_device(_test, _dev, _type, _member, _feat) …
struct drm_modeset_acquire_ctx *
drm_kunit_helper_acquire_ctx_alloc(struct kunit *test);
struct drm_atomic_state *
drm_kunit_helper_atomic_state_alloc(struct kunit *test,
struct drm_device *drm,
struct drm_modeset_acquire_ctx *ctx);
struct drm_plane *
drm_kunit_helper_create_primary_plane(struct kunit *test,
struct drm_device *drm,
const struct drm_plane_funcs *funcs,
const struct drm_plane_helper_funcs *helper_funcs,
const uint32_t *formats,
unsigned int num_formats,
const uint64_t *modifiers);
struct drm_crtc *
drm_kunit_helper_create_crtc(struct kunit *test,
struct drm_device *drm,
struct drm_plane *primary,
struct drm_plane *cursor,
const struct drm_crtc_funcs *funcs,
const struct drm_crtc_helper_funcs *helper_funcs);
#endif