Subversion Repositories Kolibri OS

Rev

Rev 3764 | Rev 6104 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3764 Rev 5078
Line 158... Line 158...
158
		 rdev->num_gb_pipes, rdev->num_z_pipes);
158
		 rdev->num_gb_pipes, rdev->num_z_pipes);
159
}
159
}
Line 160... Line 160...
160
 
160
 
161
u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg)
161
u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg)
-
 
162
{
162
{
163
	unsigned long flags;
Line -... Line 164...
-
 
164
	u32 r;
163
	u32 r;
165
 
164
 
166
	spin_lock_irqsave(&rdev->mc_idx_lock, flags);
-
 
167
	WREG32(R_0001F8_MC_IND_INDEX, S_0001F8_MC_IND_ADDR(reg));
165
	WREG32(R_0001F8_MC_IND_INDEX, S_0001F8_MC_IND_ADDR(reg));
168
	r = RREG32(R_0001FC_MC_IND_DATA);
166
	r = RREG32(R_0001FC_MC_IND_DATA);
169
	spin_unlock_irqrestore(&rdev->mc_idx_lock, flags);
Line 167... Line 170...
167
	return r;
170
	return r;
168
}
171
}
-
 
172
 
-
 
173
void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v)
-
 
174
{
169
 
175
	unsigned long flags;
170
void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v)
176
 
171
{
177
	spin_lock_irqsave(&rdev->mc_idx_lock, flags);
-
 
178
	WREG32(R_0001F8_MC_IND_INDEX, S_0001F8_MC_IND_ADDR(reg) |
172
	WREG32(R_0001F8_MC_IND_INDEX, S_0001F8_MC_IND_ADDR(reg) |
179
		S_0001F8_MC_IND_WR_EN(1));
Line 173... Line 180...
173
		S_0001F8_MC_IND_WR_EN(1));
180
	WREG32(R_0001FC_MC_IND_DATA, v);
174
	WREG32(R_0001FC_MC_IND_DATA, v);
181
	spin_unlock_irqrestore(&rdev->mc_idx_lock, flags);
175
}
182
}
Line 210... Line 217...
210
	radeon_scratch_get(rdev, &rdev->config.r300.resync_scratch);
217
	radeon_scratch_get(rdev, &rdev->config.r300.resync_scratch);
211
	radeon_ring_lock(rdev, ring, 8);
218
	radeon_ring_lock(rdev, ring, 8);
212
	radeon_ring_write(ring, PACKET0(R300_CP_RESYNC_ADDR, 1));
219
	radeon_ring_write(ring, PACKET0(R300_CP_RESYNC_ADDR, 1));
213
	radeon_ring_write(ring, rdev->config.r300.resync_scratch);
220
	radeon_ring_write(ring, rdev->config.r300.resync_scratch);
214
	radeon_ring_write(ring, 0xDEADBEEF);
221
	radeon_ring_write(ring, 0xDEADBEEF);
215
	radeon_ring_unlock_commit(rdev, ring);
222
	radeon_ring_unlock_commit(rdev, ring, false);
216
}
223
}
Line 217... Line 224...
217
 
224
 
218
static void r420_cp_errata_fini(struct radeon_device *rdev)
225
static void r420_cp_errata_fini(struct radeon_device *rdev)
219
{
226
{
Line 223... Line 230...
223
	 * at the very beginning of the CP init.
230
	 * at the very beginning of the CP init.
224
	 */
231
	 */
225
	radeon_ring_lock(rdev, ring, 8);
232
	radeon_ring_lock(rdev, ring, 8);
226
	radeon_ring_write(ring, PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0));
233
	radeon_ring_write(ring, PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0));
227
	radeon_ring_write(ring, R300_RB3D_DC_FINISH);
234
	radeon_ring_write(ring, R300_RB3D_DC_FINISH);
228
	radeon_ring_unlock_commit(rdev, ring);
235
	radeon_ring_unlock_commit(rdev, ring, false);
229
	radeon_scratch_free(rdev, rdev->config.r300.resync_scratch);
236
	radeon_scratch_free(rdev, rdev->config.r300.resync_scratch);
230
}
237
}
Line 231... Line 238...
231
 
238
 
232
static int r420_startup(struct radeon_device *rdev)
239
static int r420_startup(struct radeon_device *rdev)
Line 368... Line 375...
368
		if (r)
375
		if (r)
369
			return r;
376
			return r;
370
	}
377
	}
371
	r420_set_reg_safe(rdev);
378
	r420_set_reg_safe(rdev);
Line -... Line 379...
-
 
379
 
-
 
380
	/* Initialize power management */
-
 
381
	radeon_pm_init(rdev);
372
 
382
 
373
	rdev->accel_working = true;
383
	rdev->accel_working = true;
374
	r = r420_startup(rdev);
384
	r = r420_startup(rdev);
375
	if (r) {
385
	if (r) {
376
		/* Somethings want wront with the accel init stop accel */
386
		/* Somethings want wront with the accel init stop accel */