#include <linux/iosys-map.h>
#include <linux/export.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#include "hgsmi_channels.h"
#include "vbox_drv.h"
#include "vboxvideo.h"
static void vbox_do_modeset(struct drm_crtc *crtc)
{ … }
static int vbox_set_view(struct drm_crtc *crtc)
{ … }
static bool vbox_set_up_input_mapping(struct vbox_private *vbox)
{ … }
static void vbox_crtc_set_base_and_mode(struct drm_crtc *crtc,
struct drm_framebuffer *fb,
int x, int y)
{ … }
static void vbox_crtc_atomic_enable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void vbox_crtc_atomic_disable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void vbox_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static const struct drm_crtc_helper_funcs vbox_crtc_helper_funcs = …;
static void vbox_crtc_destroy(struct drm_crtc *crtc)
{ … }
static const struct drm_crtc_funcs vbox_crtc_funcs = …;
static int vbox_primary_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void vbox_primary_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void vbox_primary_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static int vbox_cursor_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void copy_cursor_image(u8 *src, u8 *dst, u32 width, u32 height,
size_t mask_size)
{ … }
static void vbox_cursor_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void vbox_cursor_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static const u32 vbox_cursor_plane_formats[] = …;
static const struct drm_plane_helper_funcs vbox_cursor_helper_funcs = …;
static const struct drm_plane_funcs vbox_cursor_plane_funcs = …;
static const u32 vbox_primary_plane_formats[] = …;
static const struct drm_plane_helper_funcs vbox_primary_helper_funcs = …;
static const struct drm_plane_funcs vbox_primary_plane_funcs = …;
static struct drm_plane *vbox_create_plane(struct vbox_private *vbox,
unsigned int possible_crtcs,
enum drm_plane_type type)
{ … }
static struct vbox_crtc *vbox_crtc_init(struct drm_device *dev, unsigned int i)
{ … }
static void vbox_encoder_destroy(struct drm_encoder *encoder)
{ … }
static const struct drm_encoder_funcs vbox_enc_funcs = …;
static struct drm_encoder *vbox_encoder_init(struct drm_device *dev,
unsigned int i)
{ … }
static void vbox_set_edid(struct drm_connector *connector, int width,
int height)
{ … }
static int vbox_get_modes(struct drm_connector *connector)
{ … }
static void vbox_connector_destroy(struct drm_connector *connector)
{ … }
static enum drm_connector_status
vbox_connector_detect(struct drm_connector *connector, bool force)
{ … }
static int vbox_fill_modes(struct drm_connector *connector, u32 max_x,
u32 max_y)
{ … }
static const struct drm_connector_helper_funcs vbox_connector_helper_funcs = …;
static const struct drm_connector_funcs vbox_connector_funcs = …;
static int vbox_connector_init(struct drm_device *dev,
struct vbox_crtc *vbox_crtc,
struct drm_encoder *encoder)
{ … }
static const struct drm_mode_config_funcs vbox_mode_funcs = …;
int vbox_mode_init(struct vbox_private *vbox)
{ … }
void vbox_mode_fini(struct vbox_private *vbox)
{ … }