r300.c (0aa73ba1c4e1ad1d51a29e0df95ccd9f746918b6) r300.c (ca6ffc64cba0cdd0a2b3fcad0e1d19edcf277ccc)
1/*
2 * Copyright 2008 Advanced Micro Devices, Inc.
3 * Copyright 2008 Red Hat Inc.
4 * Copyright 2009 Jerome Glisse.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation

--- 19 unchanged lines hidden (view full) ---

28#include <linux/seq_file.h>
29#include "drmP.h"
30#include "drm.h"
31#include "radeon_reg.h"
32#include "radeon.h"
33#include "radeon_drm.h"
34#include "r100_track.h"
35#include "r300d.h"
1/*
2 * Copyright 2008 Advanced Micro Devices, Inc.
3 * Copyright 2008 Red Hat Inc.
4 * Copyright 2009 Jerome Glisse.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation

--- 19 unchanged lines hidden (view full) ---

28#include <linux/seq_file.h>
29#include "drmP.h"
30#include "drm.h"
31#include "radeon_reg.h"
32#include "radeon.h"
33#include "radeon_drm.h"
34#include "r100_track.h"
35#include "r300d.h"
36#include "rv350d.h"
36
37#include "r300_reg_safe.h"
38
39/* r300,r350,rv350,rv370,rv380 depends on : */
40void r100_hdp_reset(struct radeon_device *rdev);
41int r100_cp_reset(struct radeon_device *rdev);
42int r100_rb2d_reset(struct radeon_device *rdev);
43int r100_cp_init(struct radeon_device *rdev, unsigned ring_size);

--- 14 unchanged lines hidden (view full) ---

58 struct radeon_object *robj);
59
60/* This files gather functions specifics to:
61 * r300,r350,rv350,rv370,rv380
62 *
63 * Some of these functions might be used by newer ASICs.
64 */
65void r300_gpu_init(struct radeon_device *rdev);
37
38#include "r300_reg_safe.h"
39
40/* r300,r350,rv350,rv370,rv380 depends on : */
41void r100_hdp_reset(struct radeon_device *rdev);
42int r100_cp_reset(struct radeon_device *rdev);
43int r100_rb2d_reset(struct radeon_device *rdev);
44int r100_cp_init(struct radeon_device *rdev, unsigned ring_size);

--- 14 unchanged lines hidden (view full) ---

59 struct radeon_object *robj);
60
61/* This files gather functions specifics to:
62 * r300,r350,rv350,rv370,rv380
63 *
64 * Some of these functions might be used by newer ASICs.
65 */
66void r300_gpu_init(struct radeon_device *rdev);
66int r300_mc_wait_for_idle(struct radeon_device *rdev);
67int rv370_debugfs_pcie_gart_info_init(struct radeon_device *rdev);
68
69
70/*
71 * rv370,rv380 PCIE GART
72 */
73void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev)
74{

--- 1185 unchanged lines hidden (view full) ---

1260 if (r300_mc_wait_for_idle(rdev))
1261 DRM_INFO("Failed to wait MC idle before programming MC.\n");
1262 /* Program MC, should be a 32bits limited address space */
1263 WREG32(R_000148_MC_FB_LOCATION,
1264 S_000148_MC_FB_START(rdev->mc.vram_start >> 16) |
1265 S_000148_MC_FB_TOP(rdev->mc.vram_end >> 16));
1266 r100_mc_resume(rdev, &save);
1267}
67int rv370_debugfs_pcie_gart_info_init(struct radeon_device *rdev);
68
69
70/*
71 * rv370,rv380 PCIE GART
72 */
73void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev)
74{

--- 1185 unchanged lines hidden (view full) ---

1260 if (r300_mc_wait_for_idle(rdev))
1261 DRM_INFO("Failed to wait MC idle before programming MC.\n");
1262 /* Program MC, should be a 32bits limited address space */
1263 WREG32(R_000148_MC_FB_LOCATION,
1264 S_000148_MC_FB_START(rdev->mc.vram_start >> 16) |
1265 S_000148_MC_FB_TOP(rdev->mc.vram_end >> 16));
1266 r100_mc_resume(rdev, &save);
1267}
1268
1269void r300_clock_startup(struct radeon_device *rdev)
1270{
1271 u32 tmp;
1272
1273 if (radeon_dynclks != -1 && radeon_dynclks)
1274 radeon_legacy_set_clock_gating(rdev, 1);
1275 /* We need to force on some of the block */
1276 tmp = RREG32_PLL(R_00000D_SCLK_CNTL);
1277 tmp |= S_00000D_FORCE_CP(1) | S_00000D_FORCE_VIP(1);
1278 if ((rdev->family == CHIP_RV350) || (rdev->family == CHIP_RV380))
1279 tmp |= S_00000D_FORCE_VAP(1);
1280 WREG32_PLL(R_00000D_SCLK_CNTL, tmp);
1281}