linux/drivers/gpu/drm/vboxvideo/vbox_mode.c

// SPDX-License-Identifier: MIT
/*
 * Copyright (C) 2013-2017 Oracle Corporation
 * This file is based on ast_mode.c
 * Copyright 2012 Red Hat Inc.
 * Parts based on xf86-video-ast
 * Copyright (c) 2005 ASPEED Technology Inc.
 * Authors: Dave Airlie <[email protected]>
 *          Michael Thayer <[email protected],
 *          Hans de Goede <[email protected]>
 */

#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"

/*
 * Set a graphics mode.  Poke any required values into registers, do an HGSMI
 * mode set and tell the host we support advanced graphics functions.
 */
static void vbox_do_modeset(struct drm_crtc *crtc)
{}

static int vbox_set_view(struct drm_crtc *crtc)
{}

/*
 * Try to map the layout of virtual screens to the range of the input device.
 * Return true if we need to re-set the crtc modes due to screen offset
 * changes.
 */
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)
{}

/*
 * Copy the ARGB image and generate the mask, which is needed in case the host
 * does not support ARGB cursors.  The mask is a 1BPP bitmap with the bit set
 * if the corresponding alpha value in the ARGB image is greater than 0xF0.
 */
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)
{}

/*
 * Generate EDID data with a mode-unique serial number for the virtual
 * monitor to try to persuade Unity that different modes correspond to
 * different monitors and it should not try to force the same resolution on
 * them.
 */
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)
{}