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

/*
 * Copyright 2010 Advanced Micro Devices, Inc.
 *
 * 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: Alex Deucher
 */

#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/slab.h>

#include <drm/radeon_drm.h>

#include "atom.h"
#include "cayman_blit_shaders.h"
#include "clearstate_cayman.h"
#include "evergreen.h"
#include "ni.h"
#include "ni_reg.h"
#include "nid.h"
#include "radeon.h"
#include "radeon_asic.h"
#include "radeon_audio.h"
#include "radeon_ucode.h"

/*
 * Indirect registers accessor
 */
u32 tn_smc_rreg(struct radeon_device *rdev, u32 reg)
{}

void tn_smc_wreg(struct radeon_device *rdev, u32 reg, u32 v)
{}

static const u32 tn_rlc_save_restore_register_list[] =;

/* Firmware Names */
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();


static const u32 cayman_golden_registers2[] =;

static const u32 cayman_golden_registers[] =;

static const u32 dvst_golden_registers2[] =;

static const u32 dvst_golden_registers[] =;

static const u32 scrapper_golden_registers[] =;

static void ni_init_golden_registers(struct radeon_device *rdev)
{}

#define BTC_IO_MC_REGS_SIZE

static const u32 barts_io_mc_regs[BTC_IO_MC_REGS_SIZE][2] =;

static const u32 turks_io_mc_regs[BTC_IO_MC_REGS_SIZE][2] =;

static const u32 caicos_io_mc_regs[BTC_IO_MC_REGS_SIZE][2] =;

static const u32 cayman_io_mc_regs[BTC_IO_MC_REGS_SIZE][2] =;

int ni_mc_load_microcode(struct radeon_device *rdev)
{}

int ni_init_microcode(struct radeon_device *rdev)
{}

/**
 * cayman_get_allowed_info_register - fetch the register for the info ioctl
 *
 * @rdev: radeon_device pointer
 * @reg: register offset in bytes
 * @val: register value
 *
 * Returns 0 for success or -EINVAL for an invalid register
 *
 */
int cayman_get_allowed_info_register(struct radeon_device *rdev,
				     u32 reg, u32 *val)
{}

int tn_get_temp(struct radeon_device *rdev)
{}

/*
 * Core functions
 */
static void cayman_gpu_init(struct radeon_device *rdev)
{}

/*
 * GART
 */
void cayman_pcie_gart_tlb_flush(struct radeon_device *rdev)
{}

static int cayman_pcie_gart_enable(struct radeon_device *rdev)
{}

static void cayman_pcie_gart_disable(struct radeon_device *rdev)
{}

static void cayman_pcie_gart_fini(struct radeon_device *rdev)
{}

void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
			      int ring, u32 cp_int_cntl)
{}

/*
 * CP.
 */
void cayman_fence_ring_emit(struct radeon_device *rdev,
			    struct radeon_fence *fence)
{}

void cayman_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
{}

static void cayman_cp_enable(struct radeon_device *rdev, bool enable)
{}

u32 cayman_gfx_get_rptr(struct radeon_device *rdev,
			struct radeon_ring *ring)
{}

u32 cayman_gfx_get_wptr(struct radeon_device *rdev,
			struct radeon_ring *ring)
{}

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

static int cayman_cp_load_microcode(struct radeon_device *rdev)
{}

static int cayman_cp_start(struct radeon_device *rdev)
{}

static void cayman_cp_fini(struct radeon_device *rdev)
{}

static int cayman_cp_resume(struct radeon_device *rdev)
{}

u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev)
{}

static void cayman_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
{}

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

/**
 * cayman_gfx_is_lockup - Check if the GFX engine is locked up
 *
 * @rdev: radeon_device pointer
 * @ring: radeon_ring structure holding ring information
 *
 * Check if the GFX engine is locked up.
 * Returns true if the engine appears to be locked up, false if not.
 */
bool cayman_gfx_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
{}

static void cayman_uvd_init(struct radeon_device *rdev)
{}

static void cayman_uvd_start(struct radeon_device *rdev)
{}

static void cayman_uvd_resume(struct radeon_device *rdev)
{}

static void cayman_vce_init(struct radeon_device *rdev)
{}

static void cayman_vce_start(struct radeon_device *rdev)
{}

static void cayman_vce_resume(struct radeon_device *rdev)
{}

static int cayman_startup(struct radeon_device *rdev)
{}

int cayman_resume(struct radeon_device *rdev)
{}

int cayman_suspend(struct radeon_device *rdev)
{}

/* Plan is to move initialization in that function and use
 * helper function so that radeon_device_init pretty much
 * do nothing more than calling asic specific function. This
 * should also allow to remove a bunch of callback function
 * like vram_info.
 */
int cayman_init(struct radeon_device *rdev)
{}

void cayman_fini(struct radeon_device *rdev)
{}

/*
 * vm
 */
int cayman_vm_init(struct radeon_device *rdev)
{}

void cayman_vm_fini(struct radeon_device *rdev)
{}

/**
 * cayman_vm_decode_fault - print human readable fault info
 *
 * @rdev: radeon_device pointer
 * @status: VM_CONTEXT1_PROTECTION_FAULT_STATUS register value
 * @addr: VM_CONTEXT1_PROTECTION_FAULT_ADDR register value
 *
 * Print human readable fault information (cayman/TN).
 */
void cayman_vm_decode_fault(struct radeon_device *rdev,
			    u32 status, u32 addr)
{}

/*
 * cayman_vm_flush - vm flush using the CP
 *
 * Update the page table base and flush the VM TLB
 * using the CP (cayman-si).
 */
void cayman_vm_flush(struct radeon_device *rdev, struct radeon_ring *ring,
		     unsigned vm_id, uint64_t pd_addr)
{}

int tn_set_vce_clocks(struct radeon_device *rdev, u32 evclk, u32 ecclk)
{}