rs690.c (30eb77f4e6ba20f797af4ff79807fae7cb67429e) | rs690.c (b15ba51207e54245409d6f46e20dab36f906eed1) |
---|---|
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 --- 622 unchanged lines hidden (view full) --- 631 rs600_irq_set(rdev); 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 } | 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 --- 622 unchanged lines hidden (view full) --- 631 rs600_irq_set(rdev); 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 r = r100_ib_init(rdev); | 639 640 r = r600_audio_init(rdev); |
640 if (r) { | 641 if (r) { |
641 dev_err(rdev->dev, "failed initializing IB (%d).\n", r); | 642 dev_err(rdev->dev, "failed initializing audio\n"); |
642 return r; 643 } 644 | 643 return r; 644 } 645 |
645 r = r600_audio_init(rdev); | 646 r = radeon_ib_pool_start(rdev); 647 if (r) 648 return r; 649 650 r = r100_ib_test(rdev); |
646 if (r) { | 651 if (r) { |
647 dev_err(rdev->dev, "failed initializing audio\n"); | 652 dev_err(rdev->dev, "failed testing IB (%d).\n", r); 653 rdev->accel_working = false; |
648 return r; 649 } 650 651 return 0; 652} 653 654int rs690_resume(struct radeon_device *rdev) 655{ --- 8 unchanged lines hidden (view full) --- 664 RREG32(R_0007C0_CP_STAT)); 665 } 666 /* post */ 667 atom_asic_init(rdev->mode_info.atom_context); 668 /* Resume clock after posting */ 669 rv515_clock_startup(rdev); 670 /* Initialize surface registers */ 671 radeon_surface_init(rdev); | 654 return r; 655 } 656 657 return 0; 658} 659 660int rs690_resume(struct radeon_device *rdev) 661{ --- 8 unchanged lines hidden (view full) --- 670 RREG32(R_0007C0_CP_STAT)); 671 } 672 /* post */ 673 atom_asic_init(rdev->mode_info.atom_context); 674 /* Resume clock after posting */ 675 rv515_clock_startup(rdev); 676 /* Initialize surface registers */ 677 radeon_surface_init(rdev); |
678 679 rdev->accel_working = true; |
|
672 return rs690_startup(rdev); 673} 674 675int rs690_suspend(struct radeon_device *rdev) 676{ | 680 return rs690_startup(rdev); 681} 682 683int rs690_suspend(struct radeon_device *rdev) 684{ |
685 radeon_ib_pool_suspend(rdev); |
|
677 r600_audio_fini(rdev); 678 r100_cp_disable(rdev); 679 radeon_wb_disable(rdev); 680 rs600_irq_disable(rdev); 681 rs400_gart_disable(rdev); 682 return 0; 683} 684 --- 65 unchanged lines hidden (view full) --- 750 /* Memory manager */ 751 r = radeon_bo_init(rdev); 752 if (r) 753 return r; 754 r = rs400_gart_init(rdev); 755 if (r) 756 return r; 757 rs600_set_safe_registers(rdev); | 686 r600_audio_fini(rdev); 687 r100_cp_disable(rdev); 688 radeon_wb_disable(rdev); 689 rs600_irq_disable(rdev); 690 rs400_gart_disable(rdev); 691 return 0; 692} 693 --- 65 unchanged lines hidden (view full) --- 759 /* Memory manager */ 760 r = radeon_bo_init(rdev); 761 if (r) 762 return r; 763 r = rs400_gart_init(rdev); 764 if (r) 765 return r; 766 rs600_set_safe_registers(rdev); |
767 768 r = radeon_ib_pool_init(rdev); |
|
758 rdev->accel_working = true; | 769 rdev->accel_working = true; |
770 if (r) { 771 dev_err(rdev->dev, "IB initialization failed (%d).\n", r); 772 rdev->accel_working = false; 773 } 774 |
|
759 r = rs690_startup(rdev); 760 if (r) { 761 /* Somethings want wront with the accel init stop accel */ 762 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 763 r100_cp_fini(rdev); 764 radeon_wb_fini(rdev); 765 r100_ib_fini(rdev); 766 rs400_gart_fini(rdev); 767 radeon_irq_kms_fini(rdev); 768 rdev->accel_working = false; 769 } 770 return 0; 771} | 775 r = rs690_startup(rdev); 776 if (r) { 777 /* Somethings want wront with the accel init stop accel */ 778 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 779 r100_cp_fini(rdev); 780 radeon_wb_fini(rdev); 781 r100_ib_fini(rdev); 782 rs400_gart_fini(rdev); 783 radeon_irq_kms_fini(rdev); 784 rdev->accel_working = false; 785 } 786 return 0; 787} |