Rev 5271 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5271 | Rev 6104 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | * Jerome Glisse |
26 | * Jerome Glisse |
27 | */ |
27 | */ |
28 | #include |
28 | #include |
29 | #include "radeon.h" |
29 | #include "radeon.h" |
30 | #include "radeon_asic.h" |
30 | #include "radeon_asic.h" |
- | 31 | #include "radeon_audio.h" |
|
31 | #include "atom.h" |
32 | #include "atom.h" |
32 | #include "rs690d.h" |
33 | #include "rs690d.h" |
Line 33... | Line 34... | ||
33 | 34 | ||
34 | int rs690_mc_wait_for_idle(struct radeon_device *rdev) |
35 | int rs690_mc_wait_for_idle(struct radeon_device *rdev) |
Line 204... | Line 205... | ||
204 | struct drm_display_mode *mode1, |
205 | struct drm_display_mode *mode1, |
205 | struct drm_display_mode *mode2) |
206 | struct drm_display_mode *mode2) |
206 | { |
207 | { |
207 | u32 tmp; |
208 | u32 tmp; |
Line -... | Line 209... | ||
- | 209 | ||
- | 210 | /* Guess line buffer size to be 8192 pixels */ |
|
- | 211 | u32 lb_size = 8192; |
|
208 | 212 | ||
209 | /* |
213 | /* |
210 | * Line Buffer Setup |
214 | * Line Buffer Setup |
211 | * There is a single line buffer shared by both display controllers. |
215 | * There is a single line buffer shared by both display controllers. |
212 | * R_006520_DC_LB_MEMORY_SPLIT controls how that line buffer is shared between |
216 | * R_006520_DC_LB_MEMORY_SPLIT controls how that line buffer is shared between |
Line 240... | Line 244... | ||
240 | tmp |= V_006520_DC_LB_MEMORY_SPLIT_D1_ONLY; |
244 | tmp |= V_006520_DC_LB_MEMORY_SPLIT_D1_ONLY; |
241 | } else if (mode2) { |
245 | } else if (mode2) { |
242 | tmp |= V_006520_DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q; |
246 | tmp |= V_006520_DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q; |
243 | } |
247 | } |
244 | WREG32(R_006520_DC_LB_MEMORY_SPLIT, tmp); |
248 | WREG32(R_006520_DC_LB_MEMORY_SPLIT, tmp); |
- | 249 | ||
- | 250 | /* Save number of lines the linebuffer leads before the scanout */ |
|
- | 251 | if (mode1) |
|
- | 252 | rdev->mode_info.crtcs[0]->lb_vblank_lead_lines = DIV_ROUND_UP(lb_size, mode1->crtc_hdisplay); |
|
- | 253 | ||
- | 254 | if (mode2) |
|
- | 255 | rdev->mode_info.crtcs[1]->lb_vblank_lead_lines = DIV_ROUND_UP(lb_size, mode2->crtc_hdisplay); |
|
245 | } |
256 | } |
Line 246... | Line 257... | ||
246 | 257 | ||
247 | struct rs690_watermark { |
258 | struct rs690_watermark { |
248 | u32 lb_request_fifo_depth; |
259 | u32 lb_request_fifo_depth; |
Line 727... | Line 738... | ||
727 | if (r) { |
738 | if (r) { |
728 | dev_err(rdev->dev, "IB initialization failed (%d).\n", r); |
739 | dev_err(rdev->dev, "IB initialization failed (%d).\n", r); |
729 | return r; |
740 | return r; |
730 | } |
741 | } |
Line 731... | Line 742... | ||
731 | 742 | ||
732 | r = r600_audio_init(rdev); |
743 | r = radeon_audio_init(rdev); |
733 | if (r) { |
744 | if (r) { |
734 | dev_err(rdev->dev, "failed initializing audio\n"); |
745 | dev_err(rdev->dev, "failed initializing audio\n"); |
735 | return r; |
746 | return r; |
Line 736... | Line 747... | ||
736 | } |
747 | } |
737 | 748 | ||
Line -... | Line 749... | ||
- | 749 | return 0; |
|
- | 750 | } |
|
- | 751 | ||
- | 752 | ||
- | 753 | ||
- | 754 | void rs690_fini(struct radeon_device *rdev) |
|
- | 755 | { |
|
- | 756 | radeon_pm_fini(rdev); |
|
- | 757 | radeon_audio_fini(rdev); |
|
- | 758 | r100_cp_fini(rdev); |
|
- | 759 | radeon_wb_fini(rdev); |
|
- | 760 | radeon_ib_pool_fini(rdev); |
|
- | 761 | radeon_gem_fini(rdev); |
|
- | 762 | rs400_gart_fini(rdev); |
|
- | 763 | radeon_irq_kms_fini(rdev); |
|
- | 764 | radeon_fence_driver_fini(rdev); |
|
Line 738... | Line 765... | ||
738 | return 0; |
765 | radeon_bo_fini(rdev); |
739 | } |
766 | radeon_atombios_fini(rdev); |
740 | 767 | kfree(rdev->bios); |
|
Line 802... | Line 829... | ||
802 | rdev->accel_working = true; |
829 | rdev->accel_working = true; |
803 | r = rs690_startup(rdev); |
830 | r = rs690_startup(rdev); |
804 | if (r) { |
831 | if (r) { |
805 | /* Somethings want wront with the accel init stop accel */ |
832 | /* Somethings want wront with the accel init stop accel */ |
806 | dev_err(rdev->dev, "Disabling GPU acceleration\n"); |
833 | dev_err(rdev->dev, "Disabling GPU acceleration\n"); |
807 | // r100_cp_fini(rdev); |
834 | r100_cp_fini(rdev); |
808 | // r100_wb_fini(rdev); |
835 | radeon_wb_fini(rdev); |
809 | // r100_ib_fini(rdev); |
836 | radeon_ib_pool_fini(rdev); |
810 | rs400_gart_fini(rdev); |
837 | rs400_gart_fini(rdev); |
811 | // radeon_irq_kms_fini(rdev); |
838 | radeon_irq_kms_fini(rdev); |
812 | rdev->accel_working = false; |
839 | rdev->accel_working = false; |
813 | } |
840 | } |
814 | return 0; |
841 | return 0; |
815 | }><>>>><>><>>> |
842 | }><>>>><>><>>> |