rs690.c (9e9fd65d1fa51d919d54d731be0e66492b5b6c5a) | rs690.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 --- 623 unchanged lines hidden (view full) --- 632 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); 633 /* 1M ring buffer */ 634 r = r100_cp_init(rdev, 1024 * 1024); 635 if (r) { 636 dev_err(rdev->dev, "failed initializing CP (%d).\n", r); 637 return r; 638 } 639 | 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 --- 623 unchanged lines hidden (view full) --- 632 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); 633 /* 1M ring buffer */ 634 r = r100_cp_init(rdev, 1024 * 1024); 635 if (r) { 636 dev_err(rdev->dev, "failed initializing CP (%d).\n", r); 637 return r; 638 } 639 |
640 r = radeon_ib_pool_start(rdev); 641 if (r) | 640 r = radeon_ib_pool_init(rdev); 641 if (r) { 642 dev_err(rdev->dev, "IB initialization failed (%d).\n", r); |
642 return r; | 643 return r; |
644 } |
|
643 644 r = radeon_ib_ring_tests(rdev); 645 if (r) 646 return r; 647 648 r = r600_audio_init(rdev); 649 if (r) { 650 dev_err(rdev->dev, "failed initializing audio\n"); --- 29 unchanged lines hidden (view full) --- 680 if (r) { 681 rdev->accel_working = false; 682 } 683 return r; 684} 685 686int rs690_suspend(struct radeon_device *rdev) 687{ | 645 646 r = radeon_ib_ring_tests(rdev); 647 if (r) 648 return r; 649 650 r = r600_audio_init(rdev); 651 if (r) { 652 dev_err(rdev->dev, "failed initializing audio\n"); --- 29 unchanged lines hidden (view full) --- 682 if (r) { 683 rdev->accel_working = false; 684 } 685 return r; 686} 687 688int rs690_suspend(struct radeon_device *rdev) 689{ |
688 radeon_ib_pool_suspend(rdev); | |
689 r600_audio_fini(rdev); 690 r100_cp_disable(rdev); 691 radeon_wb_disable(rdev); 692 rs600_irq_disable(rdev); 693 rs400_gart_disable(rdev); 694 return 0; 695} 696 697void rs690_fini(struct radeon_device *rdev) 698{ 699 r600_audio_fini(rdev); 700 r100_cp_fini(rdev); 701 radeon_wb_fini(rdev); | 690 r600_audio_fini(rdev); 691 r100_cp_disable(rdev); 692 radeon_wb_disable(rdev); 693 rs600_irq_disable(rdev); 694 rs400_gart_disable(rdev); 695 return 0; 696} 697 698void rs690_fini(struct radeon_device *rdev) 699{ 700 r600_audio_fini(rdev); 701 r100_cp_fini(rdev); 702 radeon_wb_fini(rdev); |
702 r100_ib_fini(rdev); | 703 radeon_ib_pool_fini(rdev); |
703 radeon_gem_fini(rdev); 704 rs400_gart_fini(rdev); 705 radeon_irq_kms_fini(rdev); 706 radeon_fence_driver_fini(rdev); 707 radeon_bo_fini(rdev); 708 radeon_atombios_fini(rdev); 709 kfree(rdev->bios); 710 rdev->bios = NULL; --- 52 unchanged lines hidden (view full) --- 763 r = radeon_bo_init(rdev); 764 if (r) 765 return r; 766 r = rs400_gart_init(rdev); 767 if (r) 768 return r; 769 rs600_set_safe_registers(rdev); 770 | 704 radeon_gem_fini(rdev); 705 rs400_gart_fini(rdev); 706 radeon_irq_kms_fini(rdev); 707 radeon_fence_driver_fini(rdev); 708 radeon_bo_fini(rdev); 709 radeon_atombios_fini(rdev); 710 kfree(rdev->bios); 711 rdev->bios = NULL; --- 52 unchanged lines hidden (view full) --- 764 r = radeon_bo_init(rdev); 765 if (r) 766 return r; 767 r = rs400_gart_init(rdev); 768 if (r) 769 return r; 770 rs600_set_safe_registers(rdev); 771 |
771 r = radeon_ib_pool_init(rdev); | |
772 rdev->accel_working = true; | 772 rdev->accel_working = true; |
773 if (r) { 774 dev_err(rdev->dev, "IB initialization failed (%d).\n", r); 775 rdev->accel_working = false; 776 } 777 | |
778 r = rs690_startup(rdev); 779 if (r) { 780 /* Somethings want wront with the accel init stop accel */ 781 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 782 r100_cp_fini(rdev); 783 radeon_wb_fini(rdev); | 773 r = rs690_startup(rdev); 774 if (r) { 775 /* Somethings want wront with the accel init stop accel */ 776 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 777 r100_cp_fini(rdev); 778 radeon_wb_fini(rdev); |
784 r100_ib_fini(rdev); | 779 radeon_ib_pool_fini(rdev); |
785 rs400_gart_fini(rdev); 786 radeon_irq_kms_fini(rdev); 787 rdev->accel_working = false; 788 } 789 return 0; 790} | 780 rs400_gart_fini(rdev); 781 radeon_irq_kms_fini(rdev); 782 rdev->accel_working = false; 783 } 784 return 0; 785} |