r300.c (f26e8817b235d8764363bffcc9cbfc61867371f2) r300.c (7ca85295d8cc280ea79cf6250c47363b7fd92f92)
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

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

382 default:
383 case 1:
384 gb_tile_config |= R300_PIPE_COUNT_RV350;
385 break;
386 }
387 WREG32(R300_GB_TILE_CONFIG, gb_tile_config);
388
389 if (r100_gui_wait_for_idle(rdev)) {
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

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

382 default:
383 case 1:
384 gb_tile_config |= R300_PIPE_COUNT_RV350;
385 break;
386 }
387 WREG32(R300_GB_TILE_CONFIG, gb_tile_config);
388
389 if (r100_gui_wait_for_idle(rdev)) {
390 printk(KERN_WARNING "Failed to wait GUI idle while "
391 "programming pipes. Bad things might happen.\n");
390 pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
392 }
393
394 tmp = RREG32(R300_DST_PIPE_CONFIG);
395 WREG32(R300_DST_PIPE_CONFIG, tmp | R300_PIPE_AUTO_CONFIG);
396
397 WREG32(R300_RB2D_DSTCACHE_MODE,
398 R300_DC_AUTOFLUSH_ENABLE |
399 R300_DC_DC_DISABLE_IGNORE_PE);
400
401 if (r100_gui_wait_for_idle(rdev)) {
391 }
392
393 tmp = RREG32(R300_DST_PIPE_CONFIG);
394 WREG32(R300_DST_PIPE_CONFIG, tmp | R300_PIPE_AUTO_CONFIG);
395
396 WREG32(R300_RB2D_DSTCACHE_MODE,
397 R300_DC_AUTOFLUSH_ENABLE |
398 R300_DC_DC_DISABLE_IGNORE_PE);
399
400 if (r100_gui_wait_for_idle(rdev)) {
402 printk(KERN_WARNING "Failed to wait GUI idle while "
403 "programming pipes. Bad things might happen.\n");
401 pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
404 }
405 if (r300_mc_wait_for_idle(rdev)) {
402 }
403 if (r300_mc_wait_for_idle(rdev)) {
406 printk(KERN_WARNING "Failed to wait MC idle while "
407 "programming pipes. Bad things might happen.\n");
404 pr_warn("Failed to wait MC idle while programming pipes. Bad things might happen.\n");
408 }
405 }
409 DRM_INFO("radeon: %d quad pipes, %d Z pipes initialized.\n",
406 DRM_INFO("radeon: %d quad pipes, %d Z pipes initialized\n",
410 rdev->num_gb_pipes, rdev->num_z_pipes);
411}
412
413int r300_asic_reset(struct radeon_device *rdev, bool hard)
414{
415 struct r100_mc_save save;
416 u32 status, tmp;
417 int ret = 0;

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

1160 if (p->rdev->family == CHIP_RV530)
1161 break;
1162 /* fallthrough do not move */
1163 default:
1164 goto fail;
1165 }
1166 return 0;
1167fail:
407 rdev->num_gb_pipes, rdev->num_z_pipes);
408}
409
410int r300_asic_reset(struct radeon_device *rdev, bool hard)
411{
412 struct r100_mc_save save;
413 u32 status, tmp;
414 int ret = 0;

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

1157 if (p->rdev->family == CHIP_RV530)
1158 break;
1159 /* fallthrough do not move */
1160 default:
1161 goto fail;
1162 }
1163 return 0;
1164fail:
1168 printk(KERN_ERR "Forbidden register 0x%04X in cs at %d (val=%08x)\n",
1165 pr_err("Forbidden register 0x%04X in cs at %d (val=%08x)\n",
1169 reg, idx, idx_value);
1170 return -EINVAL;
1171}
1172
1173static int r300_packet3_check(struct radeon_cs_parser *p,
1174 struct radeon_cs_packet *pkt)
1175{
1176 struct radeon_bo_list *reloc;

--- 420 unchanged lines hidden ---
1166 reg, idx, idx_value);
1167 return -EINVAL;
1168}
1169
1170static int r300_packet3_check(struct radeon_cs_parser *p,
1171 struct radeon_cs_packet *pkt)
1172{
1173 struct radeon_bo_list *reloc;

--- 420 unchanged lines hidden ---