diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-02-18 11:59:19 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-02-22 19:35:20 -0500 |
commit | 3574dda4851d2058841ae9e6b583e54cf52c71fa (patch) | |
tree | f94c760cda00223ace0ae45a2c8225b6eecbc79c /drivers | |
parent | 31c3603d83a774df4acdfe3a89ce64719d0db0d8 (diff) |
radeon: consolidate asic-specific function decls for r600 & later
Now all the asic specific stuff ist mostly hid in radeon_asic.*
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_audio.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_hdmi.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 61 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.h | 58 |
4 files changed, 58 insertions, 63 deletions
diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index b5443fe1c1d1..846fae576399 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "drmP.h" | 26 | #include "drmP.h" |
27 | #include "radeon.h" | 27 | #include "radeon.h" |
28 | #include "radeon_reg.h" | 28 | #include "radeon_reg.h" |
29 | #include "radeon_asic.h" | ||
29 | #include "atom.h" | 30 | #include "atom.h" |
30 | 31 | ||
31 | #define AUDIO_TIMER_INTERVALL 100 /* 1/10 sekund should be enough */ | 32 | #define AUDIO_TIMER_INTERVALL 100 /* 1/10 sekund should be enough */ |
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index e6a58ed48dcf..50db6d62eec2 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "drmP.h" | 26 | #include "drmP.h" |
27 | #include "radeon_drm.h" | 27 | #include "radeon_drm.h" |
28 | #include "radeon.h" | 28 | #include "radeon.h" |
29 | #include "radeon_asic.h" | ||
29 | #include "atom.h" | 30 | #include "atom.h" |
30 | 31 | ||
31 | /* | 32 | /* |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 975f4a10cfaf..9070f556fc9d 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -1459,59 +1459,12 @@ extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc | |||
1459 | extern int radeon_resume_kms(struct drm_device *dev); | 1459 | extern int radeon_resume_kms(struct drm_device *dev); |
1460 | extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state); | 1460 | extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state); |
1461 | 1461 | ||
1462 | /* r600, rv610, rv630, rv620, rv635, rv670, rs780, rs880 */ | 1462 | /* |
1463 | extern bool r600_card_posted(struct radeon_device *rdev); | 1463 | * r600 functions used by radeon_encoder.c |
1464 | extern void r600_cp_stop(struct radeon_device *rdev); | 1464 | */ |
1465 | extern int r600_cp_start(struct radeon_device *rdev); | ||
1466 | extern void r600_ring_init(struct radeon_device *rdev, unsigned ring_size); | ||
1467 | extern int r600_cp_resume(struct radeon_device *rdev); | ||
1468 | extern void r600_cp_fini(struct radeon_device *rdev); | ||
1469 | extern int r600_count_pipe_bits(uint32_t val); | ||
1470 | extern int r600_mc_wait_for_idle(struct radeon_device *rdev); | ||
1471 | extern int r600_pcie_gart_init(struct radeon_device *rdev); | ||
1472 | extern void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); | ||
1473 | extern int r600_ib_test(struct radeon_device *rdev); | ||
1474 | extern int r600_ring_test(struct radeon_device *rdev); | ||
1475 | extern void r600_scratch_init(struct radeon_device *rdev); | ||
1476 | extern int r600_blit_init(struct radeon_device *rdev); | ||
1477 | extern void r600_blit_fini(struct radeon_device *rdev); | ||
1478 | extern int r600_init_microcode(struct radeon_device *rdev); | ||
1479 | extern int r600_asic_reset(struct radeon_device *rdev); | ||
1480 | /* r600 irq */ | ||
1481 | extern int r600_irq_init(struct radeon_device *rdev); | ||
1482 | extern void r600_irq_fini(struct radeon_device *rdev); | ||
1483 | extern void r600_ih_ring_init(struct radeon_device *rdev, unsigned ring_size); | ||
1484 | extern int r600_irq_set(struct radeon_device *rdev); | ||
1485 | extern void r600_irq_suspend(struct radeon_device *rdev); | ||
1486 | extern void r600_disable_interrupts(struct radeon_device *rdev); | ||
1487 | extern void r600_rlc_stop(struct radeon_device *rdev); | ||
1488 | /* r600 audio */ | ||
1489 | extern int r600_audio_init(struct radeon_device *rdev); | ||
1490 | extern int r600_audio_tmds_index(struct drm_encoder *encoder); | ||
1491 | extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock); | ||
1492 | extern int r600_audio_channels(struct radeon_device *rdev); | ||
1493 | extern int r600_audio_bits_per_sample(struct radeon_device *rdev); | ||
1494 | extern int r600_audio_rate(struct radeon_device *rdev); | ||
1495 | extern uint8_t r600_audio_status_bits(struct radeon_device *rdev); | ||
1496 | extern uint8_t r600_audio_category_code(struct radeon_device *rdev); | ||
1497 | extern void r600_audio_schedule_polling(struct radeon_device *rdev); | ||
1498 | extern void r600_audio_enable_polling(struct drm_encoder *encoder); | ||
1499 | extern void r600_audio_disable_polling(struct drm_encoder *encoder); | ||
1500 | extern void r600_audio_fini(struct radeon_device *rdev); | ||
1501 | extern void r600_hdmi_init(struct drm_encoder *encoder); | ||
1502 | extern void r600_hdmi_enable(struct drm_encoder *encoder); | 1465 | extern void r600_hdmi_enable(struct drm_encoder *encoder); |
1503 | extern void r600_hdmi_disable(struct drm_encoder *encoder); | 1466 | extern void r600_hdmi_disable(struct drm_encoder *encoder); |
1504 | extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); | 1467 | extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); |
1505 | extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); | ||
1506 | extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder); | ||
1507 | |||
1508 | extern void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc); | ||
1509 | extern void r700_cp_stop(struct radeon_device *rdev); | ||
1510 | extern void r700_cp_fini(struct radeon_device *rdev); | ||
1511 | extern void evergreen_disable_interrupt_state(struct radeon_device *rdev); | ||
1512 | extern int evergreen_irq_set(struct radeon_device *rdev); | ||
1513 | extern int evergreen_blit_init(struct radeon_device *rdev); | ||
1514 | extern void evergreen_blit_fini(struct radeon_device *rdev); | ||
1515 | 1468 | ||
1516 | extern int ni_init_microcode(struct radeon_device *rdev); | 1469 | extern int ni_init_microcode(struct radeon_device *rdev); |
1517 | extern int btc_mc_load_microcode(struct radeon_device *rdev); | 1470 | extern int btc_mc_load_microcode(struct radeon_device *rdev); |
@@ -1523,14 +1476,6 @@ extern int radeon_acpi_init(struct radeon_device *rdev); | |||
1523 | static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; } | 1476 | static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; } |
1524 | #endif | 1477 | #endif |
1525 | 1478 | ||
1526 | /* evergreen */ | ||
1527 | struct evergreen_mc_save { | ||
1528 | u32 vga_control[6]; | ||
1529 | u32 vga_render_control; | ||
1530 | u32 vga_hdp_control; | ||
1531 | u32 crtc_control[6]; | ||
1532 | }; | ||
1533 | |||
1534 | #include "radeon_object.h" | 1479 | #include "radeon_object.h" |
1535 | 1480 | ||
1536 | #endif | 1481 | #endif |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index c59bd98a2029..24c4772ab988 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -208,7 +208,6 @@ void rs400_gart_adjust_size(struct radeon_device *rdev); | |||
208 | void rs400_gart_disable(struct radeon_device *rdev); | 208 | void rs400_gart_disable(struct radeon_device *rdev); |
209 | void rs400_gart_fini(struct radeon_device *rdev); | 209 | void rs400_gart_fini(struct radeon_device *rdev); |
210 | 210 | ||
211 | |||
212 | /* | 211 | /* |
213 | * rs600. | 212 | * rs600. |
214 | */ | 213 | */ |
@@ -307,14 +306,13 @@ void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | |||
307 | int r600_cs_parse(struct radeon_cs_parser *p); | 306 | int r600_cs_parse(struct radeon_cs_parser *p); |
308 | void r600_fence_ring_emit(struct radeon_device *rdev, | 307 | void r600_fence_ring_emit(struct radeon_device *rdev, |
309 | struct radeon_fence *fence); | 308 | struct radeon_fence *fence); |
310 | int r600_irq_process(struct radeon_device *rdev); | ||
311 | int r600_irq_set(struct radeon_device *rdev); | ||
312 | bool r600_gpu_is_lockup(struct radeon_device *rdev); | 309 | bool r600_gpu_is_lockup(struct radeon_device *rdev); |
313 | int r600_asic_reset(struct radeon_device *rdev); | 310 | int r600_asic_reset(struct radeon_device *rdev); |
314 | int r600_set_surface_reg(struct radeon_device *rdev, int reg, | 311 | int r600_set_surface_reg(struct radeon_device *rdev, int reg, |
315 | uint32_t tiling_flags, uint32_t pitch, | 312 | uint32_t tiling_flags, uint32_t pitch, |
316 | uint32_t offset, uint32_t obj_size); | 313 | uint32_t offset, uint32_t obj_size); |
317 | void r600_clear_surface_reg(struct radeon_device *rdev, int reg); | 314 | void r600_clear_surface_reg(struct radeon_device *rdev, int reg); |
315 | int r600_ib_test(struct radeon_device *rdev); | ||
318 | void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); | 316 | void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); |
319 | int r600_ring_test(struct radeon_device *rdev); | 317 | int r600_ring_test(struct radeon_device *rdev); |
320 | int r600_copy_blit(struct radeon_device *rdev, | 318 | int r600_copy_blit(struct radeon_device *rdev, |
@@ -333,6 +331,44 @@ extern void rs780_pm_init_profile(struct radeon_device *rdev); | |||
333 | extern void r600_pm_get_dynpm_state(struct radeon_device *rdev); | 331 | extern void r600_pm_get_dynpm_state(struct radeon_device *rdev); |
334 | extern void r600_set_pcie_lanes(struct radeon_device *rdev, int lanes); | 332 | extern void r600_set_pcie_lanes(struct radeon_device *rdev, int lanes); |
335 | extern int r600_get_pcie_lanes(struct radeon_device *rdev); | 333 | extern int r600_get_pcie_lanes(struct radeon_device *rdev); |
334 | bool r600_card_posted(struct radeon_device *rdev); | ||
335 | void r600_cp_stop(struct radeon_device *rdev); | ||
336 | int r600_cp_start(struct radeon_device *rdev); | ||
337 | void r600_ring_init(struct radeon_device *rdev, unsigned ring_size); | ||
338 | int r600_cp_resume(struct radeon_device *rdev); | ||
339 | void r600_cp_fini(struct radeon_device *rdev); | ||
340 | int r600_count_pipe_bits(uint32_t val); | ||
341 | int r600_mc_wait_for_idle(struct radeon_device *rdev); | ||
342 | int r600_pcie_gart_init(struct radeon_device *rdev); | ||
343 | void r600_scratch_init(struct radeon_device *rdev); | ||
344 | int r600_blit_init(struct radeon_device *rdev); | ||
345 | void r600_blit_fini(struct radeon_device *rdev); | ||
346 | int r600_init_microcode(struct radeon_device *rdev); | ||
347 | /* r600 irq */ | ||
348 | int r600_irq_process(struct radeon_device *rdev); | ||
349 | int r600_irq_init(struct radeon_device *rdev); | ||
350 | void r600_irq_fini(struct radeon_device *rdev); | ||
351 | void r600_ih_ring_init(struct radeon_device *rdev, unsigned ring_size); | ||
352 | int r600_irq_set(struct radeon_device *rdev); | ||
353 | void r600_irq_suspend(struct radeon_device *rdev); | ||
354 | void r600_disable_interrupts(struct radeon_device *rdev); | ||
355 | void r600_rlc_stop(struct radeon_device *rdev); | ||
356 | /* r600 audio */ | ||
357 | int r600_audio_init(struct radeon_device *rdev); | ||
358 | int r600_audio_tmds_index(struct drm_encoder *encoder); | ||
359 | void r600_audio_set_clock(struct drm_encoder *encoder, int clock); | ||
360 | int r600_audio_channels(struct radeon_device *rdev); | ||
361 | int r600_audio_bits_per_sample(struct radeon_device *rdev); | ||
362 | int r600_audio_rate(struct radeon_device *rdev); | ||
363 | uint8_t r600_audio_status_bits(struct radeon_device *rdev); | ||
364 | uint8_t r600_audio_category_code(struct radeon_device *rdev); | ||
365 | void r600_audio_schedule_polling(struct radeon_device *rdev); | ||
366 | void r600_audio_enable_polling(struct drm_encoder *encoder); | ||
367 | void r600_audio_disable_polling(struct drm_encoder *encoder); | ||
368 | void r600_audio_fini(struct radeon_device *rdev); | ||
369 | void r600_hdmi_init(struct drm_encoder *encoder); | ||
370 | int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); | ||
371 | void r600_hdmi_update_audio_settings(struct drm_encoder *encoder); | ||
336 | 372 | ||
337 | /* | 373 | /* |
338 | * rv770,rv730,rv710,rv740 | 374 | * rv770,rv730,rv710,rv740 |
@@ -341,12 +377,21 @@ int rv770_init(struct radeon_device *rdev); | |||
341 | void rv770_fini(struct radeon_device *rdev); | 377 | void rv770_fini(struct radeon_device *rdev); |
342 | int rv770_suspend(struct radeon_device *rdev); | 378 | int rv770_suspend(struct radeon_device *rdev); |
343 | int rv770_resume(struct radeon_device *rdev); | 379 | int rv770_resume(struct radeon_device *rdev); |
344 | extern void rv770_pm_misc(struct radeon_device *rdev); | 380 | void rv770_pm_misc(struct radeon_device *rdev); |
345 | extern u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); | 381 | u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); |
382 | void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc); | ||
383 | void r700_cp_stop(struct radeon_device *rdev); | ||
384 | void r700_cp_fini(struct radeon_device *rdev); | ||
346 | 385 | ||
347 | /* | 386 | /* |
348 | * evergreen | 387 | * evergreen |
349 | */ | 388 | */ |
389 | struct evergreen_mc_save { | ||
390 | u32 vga_control[6]; | ||
391 | u32 vga_render_control; | ||
392 | u32 vga_hdp_control; | ||
393 | u32 crtc_control[6]; | ||
394 | }; | ||
350 | void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev); | 395 | void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev); |
351 | int evergreen_init(struct radeon_device *rdev); | 396 | int evergreen_init(struct radeon_device *rdev); |
352 | void evergreen_fini(struct radeon_device *rdev); | 397 | void evergreen_fini(struct radeon_device *rdev); |
@@ -374,5 +419,8 @@ extern void evergreen_pm_finish(struct radeon_device *rdev); | |||
374 | extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc); | 419 | extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc); |
375 | extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); | 420 | extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); |
376 | extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc); | 421 | extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc); |
422 | void evergreen_disable_interrupt_state(struct radeon_device *rdev); | ||
423 | int evergreen_blit_init(struct radeon_device *rdev); | ||
424 | void evergreen_blit_fini(struct radeon_device *rdev); | ||
377 | 425 | ||
378 | #endif | 426 | #endif |