vboxvideo_drm.c revision 28023d61db8b6bb393f447d41e639a246dbae010
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync/** @file $Id$
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * VirtualBox Additions Linux kernel driver, DRM support
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync * Copyright (C) 2006-2007 Oracle Corporation
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * available from http://www.virtualbox.org. This file is free software;
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * you can redistribute it and/or modify it under the terms of the GNU
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * General Public License (GPL) as published by the Free Software
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * --------------------------------------------------------------------
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * This code is based on:
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * tdfx_drv.c -- tdfx driver -*- linux-c -*-
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Created: Thu Oct 7 10:38:32 1999 by faith@precisioninsight.com
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * All Rights Reserved.
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Permission is hereby granted, free of charge, to any person obtaining a
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * copy of this software and associated documentation files (the "Software"),
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * to deal in the Software without restriction, including without limitation
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * and/or sell copies of the Software, and to permit persons to whom the
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Software is furnished to do so, subject to the following conditions:
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * The above copyright notice and this permission notice (including the next
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * paragraph) shall be included in all copies or substantial portions of the
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Software.
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * DEALINGS IN THE SOFTWARE.
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Rickard E. (Rik) Faith <faith@valinux.com>
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Daryll Strauss <daryll@valinux.com>
90848209baf53a74f547fcf4254dc56d9b167ecavboxsync * Gareth Hughes <gareth@valinux.com>
11f9b573aa91144e8a077e34864c9df96ec3d64cvboxsyncint vboxvideo_driver_load(struct drm_device * dev, unsigned long flags)
11f9b573aa91144e8a077e34864c9df96ec3d64cvboxsync# if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 28)
28023d61db8b6bb393f447d41e639a246dbae010vboxsync /* .driver_features = DRIVER_USE_MTRR, */
28023d61db8b6bb393f447d41e639a246dbae010vboxsync /* As of Linux 2.65.37, always the internal functions are used. */
28023d61db8b6bb393f447d41e639a246dbae010vboxsync /* This was changed with Linux 2.6.33 but Fedora backported this
28023d61db8b6bb393f447d41e639a246dbae010vboxsync * change to their 2.6.32 kernel. */
6a608eb4f69e5bc1838d17fb9132acbbc6575e7cvboxsync#if defined(DRM_UNLOCKED) || LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 33)
e4d40e67c9cbfecb0b2ed48eec081648ba3a14bavboxsync#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) */