aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-02-22 21:07:27 -0500
committerDave Airlie <airlied@redhat.com>2011-02-22 21:07:27 -0500
commit63871f89d158e3f3e469dde00dd15763d474cb3c (patch)
tree0872202dbe52d6a8160215487ae0386c8e475a44 /drivers/gpu/drm/radeon/radeon.h
parentde1e7cd63a8ec26a3bd3740708cfd72dd76509e2 (diff)
parent4546b2c1d6e256c716e5240f5d6198a078fd7a22 (diff)
Merge branch 'drm-mm-cleanup' into drm-next
* drm-mm-cleanup: radeon: move blit functions to radeon_asic.h radeon: kill decls for inline functions radeon: consolidate asic-specific function decls for r600 & later drm/radeon: kill radeon_bo->gobj pointer drm/radeon: introduce gem_to_radeon_bo helper drm/radeon: embed struct drm_gem_object drm: mm: add helper to unwind scan state drm: mm: add api for embedding struct drm_mm_node drm: mm: extract node insert helper functions drm: mm: track free areas implicitly drm/nouveau: don't munge in drm_mm internals
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon.h77
1 files changed, 5 insertions, 72 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 82aa59941aa1..55fefe763965 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -258,8 +258,9 @@ struct radeon_bo {
258 int surface_reg; 258 int surface_reg;
259 /* Constant after initialization */ 259 /* Constant after initialization */
260 struct radeon_device *rdev; 260 struct radeon_device *rdev;
261 struct drm_gem_object *gobj; 261 struct drm_gem_object gem_base;
262}; 262};
263#define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, gem_base)
263 264
264struct radeon_bo_list { 265struct radeon_bo_list {
265 struct ttm_validate_buffer tv; 266 struct ttm_validate_buffer tv;
@@ -1197,19 +1198,6 @@ int radeon_device_init(struct radeon_device *rdev,
1197void radeon_device_fini(struct radeon_device *rdev); 1198void radeon_device_fini(struct radeon_device *rdev);
1198int radeon_gpu_wait_for_idle(struct radeon_device *rdev); 1199int radeon_gpu_wait_for_idle(struct radeon_device *rdev);
1199 1200
1200/* r600 blit */
1201int r600_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
1202void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
1203void r600_kms_blit_copy(struct radeon_device *rdev,
1204 u64 src_gpu_addr, u64 dst_gpu_addr,
1205 int size_bytes);
1206/* evergreen blit */
1207int evergreen_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
1208void evergreen_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
1209void evergreen_kms_blit_copy(struct radeon_device *rdev,
1210 u64 src_gpu_addr, u64 dst_gpu_addr,
1211 int size_bytes);
1212
1213static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg) 1201static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
1214{ 1202{
1215 if (reg < rdev->rmmio_size) 1203 if (reg < rdev->rmmio_size)
@@ -1460,59 +1448,12 @@ extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc
1460extern int radeon_resume_kms(struct drm_device *dev); 1448extern int radeon_resume_kms(struct drm_device *dev);
1461extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state); 1449extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state);
1462 1450
1463/* r600, rv610, rv630, rv620, rv635, rv670, rs780, rs880 */ 1451/*
1464extern bool r600_card_posted(struct radeon_device *rdev); 1452 * r600 functions used by radeon_encoder.c
1465extern void r600_cp_stop(struct radeon_device *rdev); 1453 */
1466extern int r600_cp_start(struct radeon_device *rdev);
1467extern void r600_ring_init(struct radeon_device *rdev, unsigned ring_size);
1468extern int r600_cp_resume(struct radeon_device *rdev);
1469extern void r600_cp_fini(struct radeon_device *rdev);
1470extern int r600_count_pipe_bits(uint32_t val);
1471extern int r600_mc_wait_for_idle(struct radeon_device *rdev);
1472extern int r600_pcie_gart_init(struct radeon_device *rdev);
1473extern void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
1474extern int r600_ib_test(struct radeon_device *rdev);
1475extern int r600_ring_test(struct radeon_device *rdev);
1476extern void r600_scratch_init(struct radeon_device *rdev);
1477extern int r600_blit_init(struct radeon_device *rdev);
1478extern void r600_blit_fini(struct radeon_device *rdev);
1479extern int r600_init_microcode(struct radeon_device *rdev);
1480extern int r600_asic_reset(struct radeon_device *rdev);
1481/* r600 irq */
1482extern int r600_irq_init(struct radeon_device *rdev);
1483extern void r600_irq_fini(struct radeon_device *rdev);
1484extern void r600_ih_ring_init(struct radeon_device *rdev, unsigned ring_size);
1485extern int r600_irq_set(struct radeon_device *rdev);
1486extern void r600_irq_suspend(struct radeon_device *rdev);
1487extern void r600_disable_interrupts(struct radeon_device *rdev);
1488extern void r600_rlc_stop(struct radeon_device *rdev);
1489/* r600 audio */
1490extern int r600_audio_init(struct radeon_device *rdev);
1491extern int r600_audio_tmds_index(struct drm_encoder *encoder);
1492extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock);
1493extern int r600_audio_channels(struct radeon_device *rdev);
1494extern int r600_audio_bits_per_sample(struct radeon_device *rdev);
1495extern int r600_audio_rate(struct radeon_device *rdev);
1496extern uint8_t r600_audio_status_bits(struct radeon_device *rdev);
1497extern uint8_t r600_audio_category_code(struct radeon_device *rdev);
1498extern void r600_audio_schedule_polling(struct radeon_device *rdev);
1499extern void r600_audio_enable_polling(struct drm_encoder *encoder);
1500extern void r600_audio_disable_polling(struct drm_encoder *encoder);
1501extern void r600_audio_fini(struct radeon_device *rdev);
1502extern void r600_hdmi_init(struct drm_encoder *encoder);
1503extern void r600_hdmi_enable(struct drm_encoder *encoder); 1454extern void r600_hdmi_enable(struct drm_encoder *encoder);
1504extern void r600_hdmi_disable(struct drm_encoder *encoder); 1455extern void r600_hdmi_disable(struct drm_encoder *encoder);
1505extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); 1456extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode);
1506extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder);
1507extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder);
1508
1509extern void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
1510extern void r700_cp_stop(struct radeon_device *rdev);
1511extern void r700_cp_fini(struct radeon_device *rdev);
1512extern void evergreen_disable_interrupt_state(struct radeon_device *rdev);
1513extern int evergreen_irq_set(struct radeon_device *rdev);
1514extern int evergreen_blit_init(struct radeon_device *rdev);
1515extern void evergreen_blit_fini(struct radeon_device *rdev);
1516 1457
1517extern int ni_init_microcode(struct radeon_device *rdev); 1458extern int ni_init_microcode(struct radeon_device *rdev);
1518extern int btc_mc_load_microcode(struct radeon_device *rdev); 1459extern int btc_mc_load_microcode(struct radeon_device *rdev);
@@ -1524,14 +1465,6 @@ extern int radeon_acpi_init(struct radeon_device *rdev);
1524static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; } 1465static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; }
1525#endif 1466#endif
1526 1467
1527/* evergreen */
1528struct evergreen_mc_save {
1529 u32 vga_control[6];
1530 u32 vga_render_control;
1531 u32 vga_hdp_control;
1532 u32 crtc_control[6];
1533};
1534
1535#include "radeon_object.h" 1468#include "radeon_object.h"
1536 1469
1537#endif 1470#endif