#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
#include "xen_drm_front.h"
#include "xen_drm_front_conn.h"
#include "xen_drm_front_kms.h"
#define FRAME_DONE_TO_MS …
static struct xen_drm_front_drm_pipeline *
to_xen_drm_pipeline(struct drm_simple_display_pipe *pipe)
{ … }
static void fb_destroy(struct drm_framebuffer *fb)
{ … }
static const struct drm_framebuffer_funcs fb_funcs = …;
static struct drm_framebuffer *
fb_create(struct drm_device *dev, struct drm_file *filp,
const struct drm_mode_fb_cmd2 *mode_cmd)
{ … }
static const struct drm_mode_config_funcs mode_config_funcs = …;
static void send_pending_event(struct xen_drm_front_drm_pipeline *pipeline)
{ … }
static void display_enable(struct drm_simple_display_pipe *pipe,
struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{ … }
static void display_disable(struct drm_simple_display_pipe *pipe)
{ … }
void xen_drm_front_kms_on_frame_done(struct xen_drm_front_drm_pipeline *pipeline,
u64 fb_cookie)
{ … }
static void pflip_to_worker(struct work_struct *work)
{ … }
static bool display_send_page_flip(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *old_plane_state)
{ … }
static int display_check(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state,
struct drm_crtc_state *crtc_state)
{ … }
static void display_update(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *old_plane_state)
{ … }
static enum drm_mode_status
display_mode_valid(struct drm_simple_display_pipe *pipe,
const struct drm_display_mode *mode)
{ … }
static const struct drm_simple_display_pipe_funcs display_funcs = …;
static int display_pipe_init(struct xen_drm_front_drm_info *drm_info,
int index, struct xen_drm_front_cfg_connector *cfg,
struct xen_drm_front_drm_pipeline *pipeline)
{ … }
int xen_drm_front_kms_init(struct xen_drm_front_drm_info *drm_info)
{ … }
void xen_drm_front_kms_fini(struct xen_drm_front_drm_info *drm_info)
{ … }