linux/drivers/gpu/drm/qxl/qxl_display.c

/*
 * Copyright 2013 Red Hat Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Dave Airlie
 *          Alon Levy
 */

#include <linux/crc32.h>
#include <linux/delay.h>
#include <linux/iosys-map.h>

#include <drm/drm_drv.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include <drm/drm_gem_atomic_helper.h>

#include "qxl_drv.h"
#include "qxl_object.h"

static bool qxl_head_enabled(struct qxl_head *head)
{}

static int qxl_alloc_client_monitors_config(struct qxl_device *qdev,
		unsigned int count)
{}

enum {};

static int qxl_display_copy_rom_client_monitors_config(struct qxl_device *qdev)
{}

static void qxl_update_offset_props(struct qxl_device *qdev)
{}

void qxl_display_read_client_monitors_config(struct qxl_device *qdev)
{}

static int qxl_check_mode(struct qxl_device *qdev,
			  unsigned int width,
			  unsigned int height)
{}

static int qxl_check_framebuffer(struct qxl_device *qdev,
				 struct qxl_bo *bo)
{}

static int qxl_add_mode(struct drm_connector *connector,
			unsigned int width,
			unsigned int height,
			bool preferred)
{}

static int qxl_add_monitors_config_modes(struct drm_connector *connector)
{}

static struct mode_size {} extra_modes[] =;

static int qxl_add_extra_modes(struct drm_connector *connector)
{}

static void qxl_send_monitors_config(struct qxl_device *qdev)
{}

static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
					    const char *reason)
{}

static void qxl_crtc_atomic_flush(struct drm_crtc *crtc,
				  struct drm_atomic_state *state)
{}

static void qxl_crtc_destroy(struct drm_crtc *crtc)
{}

static const struct drm_crtc_funcs qxl_crtc_funcs =;

static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
					 struct drm_file *file_priv,
					 unsigned int flags, unsigned int color,
					 struct drm_clip_rect *clips,
					 unsigned int num_clips)
{}

static const struct drm_framebuffer_funcs qxl_fb_funcs =;

static void qxl_crtc_atomic_enable(struct drm_crtc *crtc,
				   struct drm_atomic_state *state)
{}

static void qxl_crtc_atomic_disable(struct drm_crtc *crtc,
				    struct drm_atomic_state *state)
{}

static const struct drm_crtc_helper_funcs qxl_crtc_helper_funcs =;

static int qxl_primary_atomic_check(struct drm_plane *plane,
				    struct drm_atomic_state *state)
{}

static int qxl_primary_apply_cursor(struct qxl_device *qdev,
				    struct drm_plane_state *plane_state)
{}

static int qxl_primary_move_cursor(struct qxl_device *qdev,
				   struct drm_plane_state *plane_state)
{}

static struct qxl_bo *qxl_create_cursor(struct qxl_device *qdev,
					struct qxl_bo *user_bo,
					int hot_x, int hot_y)
{}

static void qxl_free_cursor(struct qxl_bo *cursor_bo)
{}

static void qxl_primary_atomic_update(struct drm_plane *plane,
				      struct drm_atomic_state *state)
{}

static void qxl_primary_atomic_disable(struct drm_plane *plane,
				       struct drm_atomic_state *state)
{}

static void qxl_cursor_atomic_update(struct drm_plane *plane,
				     struct drm_atomic_state *state)
{}

static void qxl_cursor_atomic_disable(struct drm_plane *plane,
				      struct drm_atomic_state *state)
{}

static void qxl_update_dumb_head(struct qxl_device *qdev,
				 int index, struct qxl_bo *bo)
{}

static void qxl_calc_dumb_shadow(struct qxl_device *qdev,
				 struct qxl_surface *surf)
{}

static void qxl_prepare_shadow(struct qxl_device *qdev, struct qxl_bo *user_bo,
			       int crtc_index)
{}

static int qxl_plane_prepare_fb(struct drm_plane *plane,
				struct drm_plane_state *new_state)
{}

static void qxl_plane_cleanup_fb(struct drm_plane *plane,
				 struct drm_plane_state *old_state)
{}

static const uint32_t qxl_cursor_plane_formats[] =;

static const struct drm_plane_helper_funcs qxl_cursor_helper_funcs =;

static const struct drm_plane_funcs qxl_cursor_plane_funcs =;

static const uint32_t qxl_primary_plane_formats[] =;

static const struct drm_plane_helper_funcs primary_helper_funcs =;

static const struct drm_plane_funcs qxl_primary_plane_funcs =;

static struct drm_plane *qxl_create_plane(struct qxl_device *qdev,
					  unsigned int possible_crtcs,
					  enum drm_plane_type type)
{}

static int qdev_crtc_init(struct drm_device *dev, int crtc_id)
{}

static int qxl_conn_get_modes(struct drm_connector *connector)
{}

static enum drm_mode_status qxl_conn_mode_valid(struct drm_connector *connector,
			       struct drm_display_mode *mode)
{}

static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)
{}

static const struct drm_connector_helper_funcs qxl_connector_helper_funcs =;

static enum drm_connector_status qxl_conn_detect(
			struct drm_connector *connector,
			bool force)
{}

static void qxl_conn_destroy(struct drm_connector *connector)
{}

static const struct drm_connector_funcs qxl_connector_funcs =;

static int qxl_mode_create_hotplug_mode_update_property(struct qxl_device *qdev)
{}

static int qdev_output_init(struct drm_device *dev, int num_output)
{}

static struct drm_framebuffer *
qxl_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 qxl_mode_funcs =;

int qxl_create_monitors_object(struct qxl_device *qdev)
{}

int qxl_destroy_monitors_object(struct qxl_device *qdev)
{}

int qxl_modeset_init(struct qxl_device *qdev)
{}

void qxl_modeset_fini(struct qxl_device *qdev)
{}