#include <drm/drm_atomic_helper.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_fourcc.h>
#include "virtgpu_drv.h"
static const uint32_t virtio_gpu_formats[] = …;
static const uint32_t virtio_gpu_cursor_formats[] = …;
uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc)
{ … }
static const struct drm_plane_funcs virtio_gpu_plane_funcs = …;
static int virtio_gpu_plane_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void virtio_gpu_update_dumb_bo(struct virtio_gpu_device *vgdev,
struct drm_plane_state *state,
struct drm_rect *rect)
{ … }
static void virtio_gpu_resource_flush(struct drm_plane *plane,
uint32_t x, uint32_t y,
uint32_t width, uint32_t height)
{ … }
static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static int virtio_gpu_plane_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *new_state)
{ … }
static void virtio_gpu_plane_cleanup_fb(struct drm_plane *plane,
struct drm_plane_state *state)
{ … }
static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static const struct drm_plane_helper_funcs virtio_gpu_primary_helper_funcs = …;
static const struct drm_plane_helper_funcs virtio_gpu_cursor_helper_funcs = …;
struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
enum drm_plane_type type,
int index)
{ … }