mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-12-25 21:59:11 +01:00
e03edeffba
By default, drmModeGetFB2() behaves as-if the kernel didn't support the IOCTL. That way we don't need to update all tests to set sensible FB info. If a test is specifically interested in testing drmModeGetFB2() behavior, it can call liftoff_mock_drm_set_fb_info().
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
#ifndef LIFTOFF_LIBDRM_MOCK_H
|
|
#define LIFTOFF_LIBDRM_MOCK_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <xf86drmMode.h>
|
|
|
|
extern uint32_t liftoff_mock_drm_crtc_id;
|
|
extern size_t liftoff_mock_commit_count;
|
|
|
|
/**
|
|
* Some drivers require the primary plane to be enabled in order to light up a
|
|
* CRTC (e.g. i915). If this variable is set to true, this behavior is mimicked.
|
|
*/
|
|
extern bool liftoff_mock_require_primary_plane;
|
|
|
|
struct liftoff_layer;
|
|
|
|
int
|
|
liftoff_mock_drm_open(void);
|
|
|
|
uint32_t
|
|
liftoff_mock_drm_create_fb(struct liftoff_layer *layer);
|
|
|
|
void
|
|
liftoff_mock_drm_set_fb_info(const drmModeFB2 *fb_info);
|
|
|
|
struct liftoff_mock_plane *
|
|
liftoff_mock_drm_create_plane(int type);
|
|
|
|
struct liftoff_mock_plane *
|
|
liftoff_mock_drm_get_plane(uint32_t id);
|
|
|
|
void
|
|
liftoff_mock_plane_add_compatible_layer(struct liftoff_mock_plane *plane,
|
|
struct liftoff_layer *layer);
|
|
struct liftoff_layer *
|
|
liftoff_mock_plane_get_layer(struct liftoff_mock_plane *plane);
|
|
|
|
uint32_t
|
|
liftoff_mock_plane_add_property(struct liftoff_mock_plane *plane,
|
|
const drmModePropertyRes *prop);
|
|
|
|
#endif
|