#include <drm/drm_atomic_helper.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include "virtgpu_drv.h"
#define XRES_MIN …
#define YRES_MIN …
#define XRES_DEF …
#define YRES_DEF …
#define XRES_MAX …
#define YRES_MAX …
#define drm_connector_to_virtio_gpu_output(x) …
static const struct drm_crtc_funcs virtio_gpu_crtc_funcs = …;
static const struct drm_framebuffer_funcs virtio_gpu_fb_funcs = …;
static int
virtio_gpu_framebuffer_init(struct drm_device *dev,
struct virtio_gpu_framebuffer *vgfb,
const struct drm_mode_fb_cmd2 *mode_cmd,
struct drm_gem_object *obj)
{ … }
static void virtio_gpu_crtc_mode_set_nofb(struct drm_crtc *crtc)
{ … }
static void virtio_gpu_crtc_atomic_enable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void virtio_gpu_crtc_atomic_disable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static int virtio_gpu_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void virtio_gpu_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = …;
static void virtio_gpu_enc_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{ … }
static void virtio_gpu_enc_enable(struct drm_encoder *encoder)
{ … }
static void virtio_gpu_enc_disable(struct drm_encoder *encoder)
{ … }
static int virtio_gpu_conn_get_modes(struct drm_connector *connector)
{ … }
static enum drm_mode_status virtio_gpu_conn_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{ … }
static const struct drm_encoder_helper_funcs virtio_gpu_enc_helper_funcs = …;
static const struct drm_connector_helper_funcs virtio_gpu_conn_helper_funcs = …;
static enum drm_connector_status virtio_gpu_conn_detect(
struct drm_connector *connector,
bool force)
{ … }
static void virtio_gpu_conn_destroy(struct drm_connector *connector)
{ … }
static const struct drm_connector_funcs virtio_gpu_connector_funcs = …;
static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
{ … }
static struct drm_framebuffer *
virtio_gpu_user_framebuffer_create(struct drm_device *dev,
struct drm_file *file_priv,
const struct drm_mode_fb_cmd2 *mode_cmd)
{ … }
static const struct drm_mode_config_funcs virtio_gpu_mode_funcs = …;
int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev)
{ … }
void virtio_gpu_modeset_fini(struct virtio_gpu_device *vgdev)
{ … }