vboxvideo_drm.c revision 96d07b623c1e6d9c97cb54f50494331e19d766ad
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * VirtualBox Guest Additions - vboxvideo DRM module.
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * FreeBSD kernel OpenGL module.
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Sun Microsystems, Inc. confidential
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * All rights reserved
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * --------------------------------------------------------------------
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * This code is based on:
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * tdfx_drv.c -- tdfx driver -*- linux-c -*-
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Created: Thu Oct 7 10:38:32 1999 by faith@precisioninsight.com
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * All Rights Reserved.
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Permission is hereby granted, free of charge, to any person obtaining a
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * copy of this software and associated documentation files (the "Software"),
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * to deal in the Software without restriction, including without limitation
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * and/or sell copies of the Software, and to permit persons to whom the
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Software is furnished to do so, subject to the following conditions:
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * The above copyright notice and this permission notice (including the next
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * paragraph) shall be included in all copies or substantial portions of the
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Software.
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * DEALINGS IN THE SOFTWARE.
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Rickard E. (Rik) Faith <faith@valinux.com>
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Daryll Strauss <daryll@valinux.com>
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * Gareth Hughes <gareth@valinux.com>
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync/** @todo Take PCI IDs from VBox/param.h; VBOX_VESA_VENDORID,
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync * VBOX_VESA_DEVICEID. */
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync#define vboxvideo_PCI_IDS { 0x80ee, 0xbeef, 0, "VirtualBox Video" }, \
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync { 0, 0, 0, NULL }
96d07b623c1e6d9c97cb54f50494331e19d766advboxsyncstatic void vboxvideo_configure(struct drm_device *dev)
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync bzero(&dev->driver, sizeof(struct drm_driver_info));
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync /* Device interface */
96d07b623c1e6d9c97cb54f50494331e19d766advboxsync sizeof(struct drm_device)
96d07b623c1e6d9c97cb54f50494331e19d766advboxsyncDRIVER_MODULE(vboxvideo, vgapci, vboxvideo_driver, drm_devclass, 0, 0);