d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Use is subject to license terms.
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * ati_pcigart.h -- ATI PCI GART support -*- linux-c -*-
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * All Rights Reserved.
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Permission is hereby granted, free of charge, to any person obtaining a
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * copy of this software and associated documentation files (the "Software"),
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * to deal in the Software without restriction, including without limitation
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * and/or sell copies of the Software, and to permit persons to whom the
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Software is furnished to do so, subject to the following conditions:
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * The above copyright notice and this permission notice (including the next
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * paragraph) shall be included in all copies or substantial portions of the
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Software.
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * DEALINGS IN THE SOFTWARE.
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Authors:
d0538f66491267879b7418b21ad78e3dcc2dcc83cg * Gareth Hughes <gareth@valinux.com>
d0538f66491267879b7418b21ad78e3dcc2dcc83cg#define ATI_PCIGART_PAGE_SIZE 4096 /* PCI GART page size */
d0538f66491267879b7418b21ad78e3dcc2dcc83cg#define ATI_MAX_PCIGART_PAGES 8192 /* 32 MB aperture, 4K pages */
d0538f66491267879b7418b21ad78e3dcc2dcc83cgdrm_ati_pcigart_init(drm_device_t *dev, drm_ati_pcigart_info *gart_info)
d0538f66491267879b7418b21ad78e3dcc2dcc83cg int i, j, k;
d0538f66491267879b7418b21ad78e3dcc2dcc83cg return (0);
d0538f66491267879b7418b21ad78e3dcc2dcc83cg if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) {
d0538f66491267879b7418b21ad78e3dcc2dcc83cg /* GART table in system memory */
d0538f66491267879b7418b21ad78e3dcc2dcc83cg entry->dmah_gart = drm_pci_alloc(dev, ATI_PCIGART_TABLE_SIZE, 0,
d0538f66491267879b7418b21ad78e3dcc2dcc83cg return (0);
d0538f66491267879b7418b21ad78e3dcc2dcc83cg /* GART table in framebuffer memory */
8793b36b40d14ad0a0fecc97738dc118a928f46cNick Todd /*CONSTCOND*/
d0538f66491267879b7418b21ad78e3dcc2dcc83cg if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) {
d0538f66491267879b7418b21ad78e3dcc2dcc83cg return (1);
d0538f66491267879b7418b21ad78e3dcc2dcc83cg/*ARGSUSED*/
d0538f66491267879b7418b21ad78e3dcc2dcc83cgdrm_ati_pcigart_cleanup(drm_device_t *dev, drm_ati_pcigart_info *gart_info)
d0538f66491267879b7418b21ad78e3dcc2dcc83cg return (0);
d0538f66491267879b7418b21ad78e3dcc2dcc83cg return (1);