linux/drivers/gpu/drm/radeon/r300.c

/*
 * Copyright 2008 Advanced Micro Devices, Inc.
 * Copyright 2008 Red Hat Inc.
 * Copyright 2009 Jerome Glisse.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Dave Airlie
 *          Alex Deucher
 *          Jerome Glisse
 */

#include <linux/debugfs.h>
#include <linux/pci.h>
#include <linux/seq_file.h>
#include <linux/slab.h>

#include <drm/drm.h>
#include <drm/drm_device.h>
#include <drm/drm_file.h>
#include <drm/radeon_drm.h>

#include "r100_track.h"
#include "r300_reg_safe.h"
#include "r300d.h"
#include "radeon.h"
#include "radeon_asic.h"
#include "radeon_reg.h"
#include "rv350d.h"

/* This files gather functions specifics to: r300,r350,rv350,rv370,rv380
 *
 * GPU Errata:
 * - HOST_PATH_CNTL: r300 family seems to dislike write to HOST_PATH_CNTL
 *   using MMIO to flush host path read cache, this lead to HARDLOCKUP.
 *   However, scheduling such write to the ring seems harmless, i suspect
 *   the CP read collide with the flush somehow, or maybe the MC, hard to
 *   tell. (Jerome Glisse)
 */

/*
 * Indirect registers accessor
 */
uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg)
{}

void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
{}

/*
 * rv370,rv380 PCIE GART
 */
static void rv370_debugfs_pcie_gart_info_init(struct radeon_device *rdev);

void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev)
{}

#define R300_PTE_UNSNOOPED
#define R300_PTE_WRITEABLE
#define R300_PTE_READABLE

uint64_t rv370_pcie_gart_get_page_entry(uint64_t addr, uint32_t flags)
{}

void rv370_pcie_gart_set_page(struct radeon_device *rdev, unsigned i,
			      uint64_t entry)
{}

int rv370_pcie_gart_init(struct radeon_device *rdev)
{}

int rv370_pcie_gart_enable(struct radeon_device *rdev)
{}

void rv370_pcie_gart_disable(struct radeon_device *rdev)
{}

void rv370_pcie_gart_fini(struct radeon_device *rdev)
{}

void r300_fence_ring_emit(struct radeon_device *rdev,
			  struct radeon_fence *fence)
{}

void r300_ring_start(struct radeon_device *rdev, struct radeon_ring *ring)
{}

static void r300_errata(struct radeon_device *rdev)
{}

int r300_mc_wait_for_idle(struct radeon_device *rdev)
{}

static void r300_gpu_init(struct radeon_device *rdev)
{}

int r300_asic_reset(struct radeon_device *rdev, bool hard)
{}

/*
 * r300,r350,rv350,rv380 VRAM info
 */
void r300_mc_init(struct radeon_device *rdev)
{}

void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes)
{}

int rv370_get_pcie_lanes(struct radeon_device *rdev)
{}

#if defined(CONFIG_DEBUG_FS)
static int rv370_debugfs_pcie_gart_info_show(struct seq_file *m, void *unused)
{}

DEFINE_SHOW_ATTRIBUTE();
#endif

static void rv370_debugfs_pcie_gart_info_init(struct radeon_device *rdev)
{}

static int r300_packet0_check(struct radeon_cs_parser *p,
		struct radeon_cs_packet *pkt,
		unsigned idx, unsigned reg)
{}

static int r300_packet3_check(struct radeon_cs_parser *p,
			      struct radeon_cs_packet *pkt)
{}

int r300_cs_parse(struct radeon_cs_parser *p)
{}

void r300_set_reg_safe(struct radeon_device *rdev)
{}

void r300_mc_program(struct radeon_device *rdev)
{}

void r300_clock_startup(struct radeon_device *rdev)
{}

static int r300_startup(struct radeon_device *rdev)
{}

int r300_resume(struct radeon_device *rdev)
{}

int r300_suspend(struct radeon_device *rdev)
{}

void r300_fini(struct radeon_device *rdev)
{}

int r300_init(struct radeon_device *rdev)
{}