rs400.c (9e9fd65d1fa51d919d54d731be0e66492b5b6c5a) | rs400.c (2898c348e5caa50b31b9113726dfa45b2dfc3124) |
---|---|
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 --- 412 unchanged lines hidden (view full) --- 421 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); 422 /* 1M ring buffer */ 423 r = r100_cp_init(rdev, 1024 * 1024); 424 if (r) { 425 dev_err(rdev->dev, "failed initializing CP (%d).\n", r); 426 return r; 427 } 428 | 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 --- 412 unchanged lines hidden (view full) --- 421 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); 422 /* 1M ring buffer */ 423 r = r100_cp_init(rdev, 1024 * 1024); 424 if (r) { 425 dev_err(rdev->dev, "failed initializing CP (%d).\n", r); 426 return r; 427 } 428 |
429 r = radeon_ib_pool_start(rdev); 430 if (r) | 429 r = radeon_ib_pool_init(rdev); 430 if (r) { 431 dev_err(rdev->dev, "IB initialization failed (%d).\n", r); |
431 return r; | 432 return r; |
433 } |
|
432 433 r = radeon_ib_ring_tests(rdev); 434 if (r) 435 return r; 436 437 return 0; 438} 439 --- 25 unchanged lines hidden (view full) --- 465 if (r) { 466 rdev->accel_working = false; 467 } 468 return r; 469} 470 471int rs400_suspend(struct radeon_device *rdev) 472{ | 434 435 r = radeon_ib_ring_tests(rdev); 436 if (r) 437 return r; 438 439 return 0; 440} 441 --- 25 unchanged lines hidden (view full) --- 467 if (r) { 468 rdev->accel_working = false; 469 } 470 return r; 471} 472 473int rs400_suspend(struct radeon_device *rdev) 474{ |
473 radeon_ib_pool_suspend(rdev); | |
474 r100_cp_disable(rdev); 475 radeon_wb_disable(rdev); 476 r100_irq_disable(rdev); 477 rs400_gart_disable(rdev); 478 return 0; 479} 480 481void rs400_fini(struct radeon_device *rdev) 482{ 483 r100_cp_fini(rdev); 484 radeon_wb_fini(rdev); | 475 r100_cp_disable(rdev); 476 radeon_wb_disable(rdev); 477 r100_irq_disable(rdev); 478 rs400_gart_disable(rdev); 479 return 0; 480} 481 482void rs400_fini(struct radeon_device *rdev) 483{ 484 r100_cp_fini(rdev); 485 radeon_wb_fini(rdev); |
485 r100_ib_fini(rdev); | 486 radeon_ib_pool_fini(rdev); |
486 radeon_gem_fini(rdev); 487 rs400_gart_fini(rdev); 488 radeon_irq_kms_fini(rdev); 489 radeon_fence_driver_fini(rdev); 490 radeon_bo_fini(rdev); 491 radeon_atombios_fini(rdev); 492 kfree(rdev->bios); 493 rdev->bios = NULL; --- 51 unchanged lines hidden (view full) --- 545 r = radeon_bo_init(rdev); 546 if (r) 547 return r; 548 r = rs400_gart_init(rdev); 549 if (r) 550 return r; 551 r300_set_reg_safe(rdev); 552 | 487 radeon_gem_fini(rdev); 488 rs400_gart_fini(rdev); 489 radeon_irq_kms_fini(rdev); 490 radeon_fence_driver_fini(rdev); 491 radeon_bo_fini(rdev); 492 radeon_atombios_fini(rdev); 493 kfree(rdev->bios); 494 rdev->bios = NULL; --- 51 unchanged lines hidden (view full) --- 546 r = radeon_bo_init(rdev); 547 if (r) 548 return r; 549 r = rs400_gart_init(rdev); 550 if (r) 551 return r; 552 r300_set_reg_safe(rdev); 553 |
553 r = radeon_ib_pool_init(rdev); | |
554 rdev->accel_working = true; | 554 rdev->accel_working = true; |
555 if (r) { 556 dev_err(rdev->dev, "IB initialization failed (%d).\n", r); 557 rdev->accel_working = false; 558 } 559 | |
560 r = rs400_startup(rdev); 561 if (r) { 562 /* Somethings want wront with the accel init stop accel */ 563 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 564 r100_cp_fini(rdev); 565 radeon_wb_fini(rdev); | 555 r = rs400_startup(rdev); 556 if (r) { 557 /* Somethings want wront with the accel init stop accel */ 558 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 559 r100_cp_fini(rdev); 560 radeon_wb_fini(rdev); |
566 r100_ib_fini(rdev); | 561 radeon_ib_pool_fini(rdev); |
567 rs400_gart_fini(rdev); 568 radeon_irq_kms_fini(rdev); 569 rdev->accel_working = false; 570 } 571 return 0; 572} | 562 rs400_gart_fini(rdev); 563 radeon_irq_kms_fini(rdev); 564 rdev->accel_working = false; 565 } 566 return 0; 567} |