linux/drivers/gpu/drm/hyperv/hyperv_drm_proto.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright 2021 Microsoft
 *
 * Portions of this code is derived from hyperv_fb.c
 */

#include <linux/hyperv.h>

#include <drm/drm_print.h>
#include <drm/drm_simple_kms_helper.h>

#include "hyperv_drm.h"

#define VMBUS_RING_BUFSIZE
#define VMBUS_VSP_TIMEOUT

#define SYNTHVID_VERSION(major, minor)
#define SYNTHVID_VER_GET_MAJOR(ver)
#define SYNTHVID_VER_GET_MINOR(ver)

/* Support for VERSION_WIN7 is removed. #define is retained for reference. */
#define SYNTHVID_VERSION_WIN7
#define SYNTHVID_VERSION_WIN8
#define SYNTHVID_VERSION_WIN10

#define SYNTHVID_DEPTH_WIN8
#define SYNTHVID_WIDTH_WIN8
#define SYNTHVID_HEIGHT_WIN8
#define SYNTHVID_FB_SIZE_WIN8

enum pipe_msg_type {};

enum synthvid_msg_type {};

struct pipe_msg_hdr {} __packed;

struct hvd_screen_info {} __packed;

struct synthvid_msg_hdr {} __packed;

struct synthvid_version_req {} __packed;

struct synthvid_version_resp {} __packed;

struct synthvid_vram_location {} __packed;

struct synthvid_vram_location_ack {} __packed;

struct video_output_situation {} __packed;

struct synthvid_situation_update {} __packed;

struct synthvid_situation_update_ack {} __packed;

struct synthvid_pointer_position {} __packed;

#define SYNTHVID_CURSOR_MAX_X
#define SYNTHVID_CURSOR_MAX_Y
#define SYNTHVID_CURSOR_ARGB_PIXEL_SIZE
#define SYNTHVID_CURSOR_MAX_SIZE
#define SYNTHVID_CURSOR_COMPLETE

struct synthvid_pointer_shape {} __packed;

struct synthvid_feature_change {} __packed;

struct rect {} __packed;

struct synthvid_dirt {} __packed;

#define SYNTHVID_EDID_BLOCK_SIZE
#define SYNTHVID_MAX_RESOLUTION_COUNT

struct synthvid_supported_resolution_req {} __packed;

struct synthvid_supported_resolution_resp {} __packed;

struct synthvid_msg {} __packed;

static inline bool hyperv_version_ge(u32 ver1, u32 ver2)
{}

static inline int hyperv_sendpacket(struct hv_device *hdev, struct synthvid_msg *msg)
{}

static int hyperv_negotiate_version(struct hv_device *hdev, u32 ver)
{}

int hyperv_update_vram_location(struct hv_device *hdev, phys_addr_t vram_pp)
{}

int hyperv_update_situation(struct hv_device *hdev, u8 active, u32 bpp,
			    u32 w, u32 h, u32 pitch)
{}

/*
 * Hyper-V supports a hardware cursor feature. It's not used by Linux VM,
 * but the Hyper-V host still draws a point as an extra mouse pointer,
 * which is unwanted, especially when Xorg is running.
 *
 * The hyperv_fb driver uses synthvid_send_ptr() to hide the unwanted
 * pointer, by setting msg.ptr_pos.is_visible = 1 and setting the
 * msg.ptr_shape.data. Note: setting msg.ptr_pos.is_visible to 0 doesn't
 * work in tests.
 *
 * Copy synthvid_send_ptr() to hyperv_drm and rename it to
 * hyperv_hide_hw_ptr(). Note: hyperv_hide_hw_ptr() is also called in the
 * handler of the SYNTHVID_FEATURE_CHANGE event, otherwise the host still
 * draws an extra unwanted mouse pointer after the VM Connection window is
 * closed and reopened.
 */
int hyperv_hide_hw_ptr(struct hv_device *hdev)
{}

int hyperv_update_dirt(struct hv_device *hdev, struct drm_rect *rect)
{}

static int hyperv_get_supported_resolution(struct hv_device *hdev)
{}

static void hyperv_receive_sub(struct hv_device *hdev)
{}

static void hyperv_receive(void *ctx)
{}

int hyperv_connect_vsp(struct hv_device *hdev)
{}