linux/drivers/gpu/drm/vboxvideo/vbox_drv.h

/* SPDX-License-Identifier: MIT */
/*
 * Copyright (C) 2013-2017 Oracle Corporation
 * This file is based on ast_drv.h
 * Copyright 2012 Red Hat Inc.
 * Authors: Dave Airlie <[email protected]>
 *          Michael Thayer <[email protected],
 *          Hans de Goede <[email protected]>
 */
#ifndef __VBOX_DRV_H__
#define __VBOX_DRV_H__

#include <linux/genalloc.h>
#include <linux/io.h>
#include <linux/irqreturn.h>
#include <linux/string.h>

#include <drm/drm_encoder.h>
#include <drm/drm_gem.h>
#include <drm/drm_gem_vram_helper.h>

#include "vboxvideo_guest.h"
#include "vboxvideo_vbe.h"
#include "hgsmi_ch_setup.h"

#define DRIVER_NAME
#define DRIVER_DESC
#define DRIVER_DATE

#define DRIVER_MAJOR
#define DRIVER_MINOR
#define DRIVER_PATCHLEVEL

#define VBOX_MAX_CURSOR_WIDTH
#define VBOX_MAX_CURSOR_HEIGHT
#define CURSOR_PIXEL_COUNT
#define CURSOR_DATA_SIZE

#define VBOX_MAX_SCREENS

#define GUEST_HEAP_OFFSET(vbox)
#define GUEST_HEAP_SIZE
#define GUEST_HEAP_USABLE_SIZE
#define HOST_FLAGS_OFFSET

struct vbox_private {};

#undef CURSOR_PIXEL_COUNT
#undef CURSOR_DATA_SIZE

struct vbox_connector {};

struct vbox_crtc {};

struct vbox_encoder {};

#define to_vbox_crtc(x)
#define to_vbox_connector(x)
#define to_vbox_encoder(x)
#define to_vbox_dev(x)

bool vbox_check_supported(u16 id);
int vbox_hw_init(struct vbox_private *vbox);
void vbox_hw_fini(struct vbox_private *vbox);

int vbox_mode_init(struct vbox_private *vbox);
void vbox_mode_fini(struct vbox_private *vbox);

void vbox_report_caps(struct vbox_private *vbox);

int vbox_mm_init(struct vbox_private *vbox);

/* vbox_irq.c */
int vbox_irq_init(struct vbox_private *vbox);
void vbox_irq_fini(struct vbox_private *vbox);
void vbox_report_hotplug(struct vbox_private *vbox);

/* vbox_hgsmi.c */
void *hgsmi_buffer_alloc(struct gen_pool *guest_pool, size_t size,
			 u8 channel, u16 channel_info);
void hgsmi_buffer_free(struct gen_pool *guest_pool, void *buf);
int hgsmi_buffer_submit(struct gen_pool *guest_pool, void *buf);

static inline void vbox_write_ioport(u16 index, u16 data)
{}

#endif