dri-devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/7] radeon_asic header cleanup, part 2
@ 2010-11-28 18:06 Daniel Vetter
  2010-11-28 18:06 ` [PATCH 1/7] radeon: consolidate asic-specific function decls for pre-r600 Daniel Vetter
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Daniel Vetter @ 2010-11-28 18:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Hi all,

This is the second part of the header cleanup I've done a few months back
(already merged way back then). Somehow my wish-fairy let me down and this
didn't happen on it's own ;)

I've tacked two let's-kill-some-indirection patches on top of it.

As usual, tested on my agp rv570. Comments highly welcome.

Please review and consider merging for -next - I'm hoping this is a
convenient for cleanups like this after most in-flight stuff has landed in
-next.

Cheers, Daniel

Daniel Vetter (7):
  radeon: consolidate asic-specific function decls for pre-r600
  radeon: consolidate asic-specific function decls for r600 & later
  radeon: drop extern from function decls
  radeon: kill decls for inline functions
  radeon: move blit functions to radeon_asic.h
  radeon: kill r100_io_(r|w)reg
  radeon: kill rdev->pciep_(r|w)reg

 drivers/gpu/drm/radeon/r300.c          |    3 +-
 drivers/gpu/drm/radeon/r600.c          |    8 -
 drivers/gpu/drm/radeon/r600_audio.c    |    1 +
 drivers/gpu/drm/radeon/r600_hdmi.c     |    1 +
 drivers/gpu/drm/radeon/radeon.h        |  165 +---------------------
 drivers/gpu/drm/radeon/radeon_asic.c   |    6 -
 drivers/gpu/drm/radeon/radeon_asic.h   |  243 ++++++++++++++++++++++----------
 drivers/gpu/drm/radeon/radeon_device.c |   16 ++-
 8 files changed, 193 insertions(+), 250 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/7] radeon: consolidate asic-specific function decls for pre-r600
  2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
@ 2010-11-28 18:06 ` Daniel Vetter
  2010-11-29 15:29   ` Alex Deucher
  2010-11-28 18:06 ` [PATCH 2/7] radeon: consolidate asic-specific function decls for r600 & later Daniel Vetter
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2010-11-28 18:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Move them to radeon_asic.h together with the other asic
specific stuff.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/radeon/radeon.h      |   59 ----------------------------------
 drivers/gpu/drm/radeon/radeon_asic.h |   53 ++++++++++++++++++++++++++++--
 2 files changed, 50 insertions(+), 62 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 32d6396..75b9585 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1433,65 +1433,6 @@ extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc
 extern int radeon_resume_kms(struct drm_device *dev);
 extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state);
 
-/* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */
-extern void r100_gpu_lockup_update(struct r100_gpu_lockup *lockup, struct radeon_cp *cp);
-extern bool r100_gpu_cp_is_lockup(struct radeon_device *rdev, struct r100_gpu_lockup *lockup, struct radeon_cp *cp);
-
-/* rv200,rv250,rv280 */
-extern void r200_set_safe_registers(struct radeon_device *rdev);
-
-/* r300,r350,rv350,rv370,rv380 */
-extern void r300_set_reg_safe(struct radeon_device *rdev);
-extern void r300_mc_program(struct radeon_device *rdev);
-extern void r300_mc_init(struct radeon_device *rdev);
-extern void r300_clock_startup(struct radeon_device *rdev);
-extern int r300_mc_wait_for_idle(struct radeon_device *rdev);
-extern int rv370_pcie_gart_init(struct radeon_device *rdev);
-extern void rv370_pcie_gart_fini(struct radeon_device *rdev);
-extern int rv370_pcie_gart_enable(struct radeon_device *rdev);
-extern void rv370_pcie_gart_disable(struct radeon_device *rdev);
-
-/* r420,r423,rv410 */
-extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
-extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
-extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
-extern void r420_pipes_init(struct radeon_device *rdev);
-
-/* rv515 */
-struct rv515_mc_save {
-	u32 d1vga_control;
-	u32 d2vga_control;
-	u32 vga_render_control;
-	u32 vga_hdp_control;
-	u32 d1crtc_control;
-	u32 d2crtc_control;
-};
-extern void rv515_bandwidth_avivo_update(struct radeon_device *rdev);
-extern void rv515_vga_render_disable(struct radeon_device *rdev);
-extern void rv515_set_safe_registers(struct radeon_device *rdev);
-extern void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save);
-extern void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save);
-extern void rv515_clock_startup(struct radeon_device *rdev);
-extern void rv515_debugfs(struct radeon_device *rdev);
-extern int rv515_suspend(struct radeon_device *rdev);
-
-/* rs400 */
-extern int rs400_gart_init(struct radeon_device *rdev);
-extern int rs400_gart_enable(struct radeon_device *rdev);
-extern void rs400_gart_adjust_size(struct radeon_device *rdev);
-extern void rs400_gart_disable(struct radeon_device *rdev);
-extern void rs400_gart_fini(struct radeon_device *rdev);
-
-/* rs600 */
-extern void rs600_set_safe_registers(struct radeon_device *rdev);
-extern int rs600_irq_set(struct radeon_device *rdev);
-extern void rs600_irq_disable(struct radeon_device *rdev);
-
-/* rs690, rs740 */
-extern void rs690_line_buffer_adjust(struct radeon_device *rdev,
-					struct drm_display_mode *mode1,
-					struct drm_display_mode *mode2);
-
 /* r600, rv610, rv630, rv620, rv635, rv670, rs780, rs880 */
 extern bool r600_card_posted(struct radeon_device *rdev);
 extern void r600_cp_stop(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index 4970eda..a5fddcd 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -102,6 +102,11 @@ int r100_pci_gart_enable(struct radeon_device *rdev);
 void r100_pci_gart_disable(struct radeon_device *rdev);
 int r100_debugfs_mc_info_init(struct radeon_device *rdev);
 int r100_gui_wait_for_idle(struct radeon_device *rdev);
+void r100_gpu_lockup_update(struct r100_gpu_lockup *lockup,
+			    struct radeon_cp *cp);
+bool r100_gpu_cp_is_lockup(struct radeon_device *rdev,
+			   struct r100_gpu_lockup *lockup,
+			   struct radeon_cp *cp);
 void r100_ib_fini(struct radeon_device *rdev);
 int r100_ib_init(struct radeon_device *rdev);
 void r100_irq_disable(struct radeon_device *rdev);
@@ -138,10 +143,11 @@ extern void r100_post_page_flip(struct radeon_device *rdev, int crtc);
  * r200,rv250,rs300,rv280
  */
 extern int r200_copy_dma(struct radeon_device *rdev,
-			uint64_t src_offset,
-			uint64_t dst_offset,
-			unsigned num_pages,
+			 uint64_t src_offset,
+			 uint64_t dst_offset,
+			 unsigned num_pages,
 			 struct radeon_fence *fence);
+void r200_set_safe_registers(struct radeon_device *rdev);
 
 /*
  * r300,r350,rv350,rv380
@@ -162,6 +168,15 @@ extern uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
 extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
 extern int rv370_get_pcie_lanes(struct radeon_device *rdev);
+extern void r300_set_reg_safe(struct radeon_device *rdev);
+extern void r300_mc_program(struct radeon_device *rdev);
+extern void r300_mc_init(struct radeon_device *rdev);
+extern void r300_clock_startup(struct radeon_device *rdev);
+extern int r300_mc_wait_for_idle(struct radeon_device *rdev);
+extern int rv370_pcie_gart_init(struct radeon_device *rdev);
+extern void rv370_pcie_gart_fini(struct radeon_device *rdev);
+extern int rv370_pcie_gart_enable(struct radeon_device *rdev);
+extern void rv370_pcie_gart_disable(struct radeon_device *rdev);
 
 /*
  * r420,r423,rv410
@@ -171,6 +186,10 @@ extern void r420_fini(struct radeon_device *rdev);
 extern int r420_suspend(struct radeon_device *rdev);
 extern int r420_resume(struct radeon_device *rdev);
 extern void r420_pm_init_profile(struct radeon_device *rdev);
+extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
+extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
+extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
+extern void r420_pipes_init(struct radeon_device *rdev);
 
 /*
  * rs400,rs480
@@ -183,6 +202,12 @@ void rs400_gart_tlb_flush(struct radeon_device *rdev);
 int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
 uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg);
 void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
+int rs400_gart_init(struct radeon_device *rdev);
+int rs400_gart_enable(struct radeon_device *rdev);
+void rs400_gart_adjust_size(struct radeon_device *rdev);
+void rs400_gart_disable(struct radeon_device *rdev);
+void rs400_gart_fini(struct radeon_device *rdev);
+
 
 /*
  * rs600.
@@ -194,6 +219,7 @@ extern int rs600_suspend(struct radeon_device *rdev);
 extern int rs600_resume(struct radeon_device *rdev);
 int rs600_irq_set(struct radeon_device *rdev);
 int rs600_irq_process(struct radeon_device *rdev);
+void rs600_irq_disable(struct radeon_device *rdev);
 u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc);
 void rs600_gart_tlb_flush(struct radeon_device *rdev);
 int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
@@ -211,6 +237,8 @@ extern void rs600_pm_finish(struct radeon_device *rdev);
 extern void rs600_pre_page_flip(struct radeon_device *rdev, int crtc);
 extern u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
 extern void rs600_post_page_flip(struct radeon_device *rdev, int crtc);
+void rs600_set_safe_registers(struct radeon_device *rdev);
+
 
 /*
  * rs690,rs740
@@ -222,10 +250,21 @@ int rs690_suspend(struct radeon_device *rdev);
 uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg);
 void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 void rs690_bandwidth_update(struct radeon_device *rdev);
+void rs690_line_buffer_adjust(struct radeon_device *rdev,
+					struct drm_display_mode *mode1,
+					struct drm_display_mode *mode2);
 
 /*
  * rv515
  */
+struct rv515_mc_save {
+	u32 d1vga_control;
+	u32 d2vga_control;
+	u32 vga_render_control;
+	u32 vga_hdp_control;
+	u32 d1crtc_control;
+	u32 d2crtc_control;
+};
 int rv515_init(struct radeon_device *rdev);
 void rv515_fini(struct radeon_device *rdev);
 uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg);
@@ -236,6 +275,14 @@ void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 void rv515_bandwidth_update(struct radeon_device *rdev);
 int rv515_resume(struct radeon_device *rdev);
 int rv515_suspend(struct radeon_device *rdev);
+void rv515_bandwidth_avivo_update(struct radeon_device *rdev);
+void rv515_vga_render_disable(struct radeon_device *rdev);
+void rv515_set_safe_registers(struct radeon_device *rdev);
+void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save);
+void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save);
+void rv515_clock_startup(struct radeon_device *rdev);
+void rv515_debugfs(struct radeon_device *rdev);
+
 
 /*
  * r520,rv530,rv560,rv570,r580
-- 
1.7.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 2/7] radeon: consolidate asic-specific function decls for r600 & later
  2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
  2010-11-28 18:06 ` [PATCH 1/7] radeon: consolidate asic-specific function decls for pre-r600 Daniel Vetter
@ 2010-11-28 18:06 ` Daniel Vetter
  2010-11-29 15:34   ` Alex Deucher
  2010-11-28 18:06 ` [PATCH 3/7] radeon: drop extern from function decls Daniel Vetter
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2010-11-28 18:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Now all the asic specific stuff ist mostly hid in radeon_asic.*

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/radeon/r600_audio.c  |    1 +
 drivers/gpu/drm/radeon/r600_hdmi.c   |    1 +
 drivers/gpu/drm/radeon/radeon.h      |   61 ++--------------------------------
 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 b5443fe..846fae5 100644
--- a/drivers/gpu/drm/radeon/r600_audio.c
+++ b/drivers/gpu/drm/radeon/r600_audio.c
@@ -26,6 +26,7 @@
 #include "drmP.h"
 #include "radeon.h"
 #include "radeon_reg.h"
+#include "radeon_asic.h"
 #include "atom.h"
 
 #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 e6a58ed..50db6d6 100644
--- a/drivers/gpu/drm/radeon/r600_hdmi.c
+++ b/drivers/gpu/drm/radeon/r600_hdmi.c
@@ -26,6 +26,7 @@
 #include "drmP.h"
 #include "radeon_drm.h"
 #include "radeon.h"
+#include "radeon_asic.h"
 #include "atom.h"
 
 /*
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 75b9585..2257a01 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1433,59 +1433,12 @@ extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc
 extern int radeon_resume_kms(struct drm_device *dev);
 extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state);
 
-/* r600, rv610, rv630, rv620, rv635, rv670, rs780, rs880 */
-extern bool r600_card_posted(struct radeon_device *rdev);
-extern void r600_cp_stop(struct radeon_device *rdev);
-extern int r600_cp_start(struct radeon_device *rdev);
-extern void r600_ring_init(struct radeon_device *rdev, unsigned ring_size);
-extern int r600_cp_resume(struct radeon_device *rdev);
-extern void r600_cp_fini(struct radeon_device *rdev);
-extern int r600_count_pipe_bits(uint32_t val);
-extern int r600_mc_wait_for_idle(struct radeon_device *rdev);
-extern int r600_pcie_gart_init(struct radeon_device *rdev);
-extern void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
-extern int r600_ib_test(struct radeon_device *rdev);
-extern int r600_ring_test(struct radeon_device *rdev);
-extern void r600_scratch_init(struct radeon_device *rdev);
-extern int r600_blit_init(struct radeon_device *rdev);
-extern void r600_blit_fini(struct radeon_device *rdev);
-extern int r600_init_microcode(struct radeon_device *rdev);
-extern int r600_asic_reset(struct radeon_device *rdev);
-/* r600 irq */
-extern int r600_irq_init(struct radeon_device *rdev);
-extern void r600_irq_fini(struct radeon_device *rdev);
-extern void r600_ih_ring_init(struct radeon_device *rdev, unsigned ring_size);
-extern int r600_irq_set(struct radeon_device *rdev);
-extern void r600_irq_suspend(struct radeon_device *rdev);
-extern void r600_disable_interrupts(struct radeon_device *rdev);
-extern void r600_rlc_stop(struct radeon_device *rdev);
-/* r600 audio */
-extern int r600_audio_init(struct radeon_device *rdev);
-extern int r600_audio_tmds_index(struct drm_encoder *encoder);
-extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock);
-extern int r600_audio_channels(struct radeon_device *rdev);
-extern int r600_audio_bits_per_sample(struct radeon_device *rdev);
-extern int r600_audio_rate(struct radeon_device *rdev);
-extern uint8_t r600_audio_status_bits(struct radeon_device *rdev);
-extern uint8_t r600_audio_category_code(struct radeon_device *rdev);
-extern void r600_audio_schedule_polling(struct radeon_device *rdev);
-extern void r600_audio_enable_polling(struct drm_encoder *encoder);
-extern void r600_audio_disable_polling(struct drm_encoder *encoder);
-extern void r600_audio_fini(struct radeon_device *rdev);
-extern void r600_hdmi_init(struct drm_encoder *encoder);
+/*
+ * r600 functions used by radeon_encoder.c
+ */
 extern void r600_hdmi_enable(struct drm_encoder *encoder);
 extern void r600_hdmi_disable(struct drm_encoder *encoder);
 extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode);
-extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder);
-extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder);
-
-extern void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
-extern void r700_cp_stop(struct radeon_device *rdev);
-extern void r700_cp_fini(struct radeon_device *rdev);
-extern void evergreen_disable_interrupt_state(struct radeon_device *rdev);
-extern int evergreen_irq_set(struct radeon_device *rdev);
-extern int evergreen_blit_init(struct radeon_device *rdev);
-extern void evergreen_blit_fini(struct radeon_device *rdev);
 
 /* radeon_acpi.c */ 
 #if defined(CONFIG_ACPI) 
@@ -1494,14 +1447,6 @@ extern int radeon_acpi_init(struct radeon_device *rdev);
 static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; } 
 #endif 
 
-/* evergreen */
-struct evergreen_mc_save {
-	u32 vga_control[6];
-	u32 vga_render_control;
-	u32 vga_hdp_control;
-	u32 crtc_control[6];
-};
-
 #include "radeon_object.h"
 
 #endif
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index a5fddcd..979a11e 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);
 void rs400_gart_disable(struct radeon_device *rdev);
 void rs400_gart_fini(struct radeon_device *rdev);
 
-
 /*
  * rs600.
  */
@@ -307,14 +306,13 @@ void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 int r600_cs_parse(struct radeon_cs_parser *p);
 void r600_fence_ring_emit(struct radeon_device *rdev,
 			  struct radeon_fence *fence);
-int r600_irq_process(struct radeon_device *rdev);
-int r600_irq_set(struct radeon_device *rdev);
 bool r600_gpu_is_lockup(struct radeon_device *rdev);
 int r600_asic_reset(struct radeon_device *rdev);
 int r600_set_surface_reg(struct radeon_device *rdev, int reg,
 			 uint32_t tiling_flags, uint32_t pitch,
 			 uint32_t offset, uint32_t obj_size);
 void r600_clear_surface_reg(struct radeon_device *rdev, int reg);
+int r600_ib_test(struct radeon_device *rdev);
 void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
 int r600_ring_test(struct radeon_device *rdev);
 int r600_copy_blit(struct radeon_device *rdev,
@@ -331,6 +329,44 @@ extern void r600_pm_misc(struct radeon_device *rdev);
 extern void r600_pm_init_profile(struct radeon_device *rdev);
 extern void rs780_pm_init_profile(struct radeon_device *rdev);
 extern void r600_pm_get_dynpm_state(struct radeon_device *rdev);
+bool r600_card_posted(struct radeon_device *rdev);
+void r600_cp_stop(struct radeon_device *rdev);
+int r600_cp_start(struct radeon_device *rdev);
+void r600_ring_init(struct radeon_device *rdev, unsigned ring_size);
+int r600_cp_resume(struct radeon_device *rdev);
+void r600_cp_fini(struct radeon_device *rdev);
+int r600_count_pipe_bits(uint32_t val);
+int r600_mc_wait_for_idle(struct radeon_device *rdev);
+int r600_pcie_gart_init(struct radeon_device *rdev);
+void r600_scratch_init(struct radeon_device *rdev);
+int r600_blit_init(struct radeon_device *rdev);
+void r600_blit_fini(struct radeon_device *rdev);
+int r600_init_microcode(struct radeon_device *rdev);
+/* r600 irq */
+int r600_irq_process(struct radeon_device *rdev);
+int r600_irq_init(struct radeon_device *rdev);
+void r600_irq_fini(struct radeon_device *rdev);
+void r600_ih_ring_init(struct radeon_device *rdev, unsigned ring_size);
+int r600_irq_set(struct radeon_device *rdev);
+void r600_irq_suspend(struct radeon_device *rdev);
+void r600_disable_interrupts(struct radeon_device *rdev);
+void r600_rlc_stop(struct radeon_device *rdev);
+/* r600 audio */
+int r600_audio_init(struct radeon_device *rdev);
+int r600_audio_tmds_index(struct drm_encoder *encoder);
+void r600_audio_set_clock(struct drm_encoder *encoder, int clock);
+int r600_audio_channels(struct radeon_device *rdev);
+int r600_audio_bits_per_sample(struct radeon_device *rdev);
+int r600_audio_rate(struct radeon_device *rdev);
+uint8_t r600_audio_status_bits(struct radeon_device *rdev);
+uint8_t r600_audio_category_code(struct radeon_device *rdev);
+void r600_audio_schedule_polling(struct radeon_device *rdev);
+void r600_audio_enable_polling(struct drm_encoder *encoder);
+void r600_audio_disable_polling(struct drm_encoder *encoder);
+void r600_audio_fini(struct radeon_device *rdev);
+void r600_hdmi_init(struct drm_encoder *encoder);
+int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder);
+void r600_hdmi_update_audio_settings(struct drm_encoder *encoder);
 
 /*
  * rv770,rv730,rv710,rv740
@@ -339,12 +375,21 @@ int rv770_init(struct radeon_device *rdev);
 void rv770_fini(struct radeon_device *rdev);
 int rv770_suspend(struct radeon_device *rdev);
 int rv770_resume(struct radeon_device *rdev);
-extern void rv770_pm_misc(struct radeon_device *rdev);
-extern u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
+void rv770_pm_misc(struct radeon_device *rdev);
+u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
+void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
+void r700_cp_stop(struct radeon_device *rdev);
+void r700_cp_fini(struct radeon_device *rdev);
 
 /*
  * evergreen
  */
+struct evergreen_mc_save {
+	u32 vga_control[6];
+	u32 vga_render_control;
+	u32 vga_hdp_control;
+	u32 crtc_control[6];
+};
 void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev);
 int evergreen_init(struct radeon_device *rdev);
 void evergreen_fini(struct radeon_device *rdev);
@@ -371,5 +416,8 @@ extern void evergreen_pm_finish(struct radeon_device *rdev);
 extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc);
 extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
 extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
+void evergreen_disable_interrupt_state(struct radeon_device *rdev);
+int evergreen_blit_init(struct radeon_device *rdev);
+void evergreen_blit_fini(struct radeon_device *rdev);
 
 #endif
-- 
1.7.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 3/7] radeon: drop extern from function decls
  2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
  2010-11-28 18:06 ` [PATCH 1/7] radeon: consolidate asic-specific function decls for pre-r600 Daniel Vetter
  2010-11-28 18:06 ` [PATCH 2/7] radeon: consolidate asic-specific function decls for r600 & later Daniel Vetter
@ 2010-11-28 18:06 ` Daniel Vetter
  2010-11-29 15:36   ` Alex Deucher
  2010-11-28 18:06 ` [PATCH 4/7] radeon: kill decls for inline functions Daniel Vetter
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2010-11-28 18:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Only adds noise.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/radeon/radeon.h      |    6 +-
 drivers/gpu/drm/radeon/radeon_asic.h |  150 +++++++++++++++++-----------------
 2 files changed, 77 insertions(+), 79 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 2257a01..5fff6bf 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1436,9 +1436,9 @@ extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state);
 /*
  * r600 functions used by radeon_encoder.c
  */
-extern void r600_hdmi_enable(struct drm_encoder *encoder);
-extern void r600_hdmi_disable(struct drm_encoder *encoder);
-extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode);
+void r600_hdmi_enable(struct drm_encoder *encoder);
+void r600_hdmi_disable(struct drm_encoder *encoder);
+void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode);
 
 /* radeon_acpi.c */ 
 #if defined(CONFIG_ACPI) 
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index 979a11e..cf7a8f6 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -129,75 +129,73 @@ int r100_cs_packet_parse(struct radeon_cs_parser *p,
 void r100_enable_bm(struct radeon_device *rdev);
 void r100_set_common_regs(struct radeon_device *rdev);
 void r100_bm_disable(struct radeon_device *rdev);
-extern bool r100_gui_idle(struct radeon_device *rdev);
-extern void r100_pm_misc(struct radeon_device *rdev);
-extern void r100_pm_prepare(struct radeon_device *rdev);
-extern void r100_pm_finish(struct radeon_device *rdev);
-extern void r100_pm_init_profile(struct radeon_device *rdev);
-extern void r100_pm_get_dynpm_state(struct radeon_device *rdev);
-extern void r100_pre_page_flip(struct radeon_device *rdev, int crtc);
-extern u32 r100_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
-extern void r100_post_page_flip(struct radeon_device *rdev, int crtc);
+bool r100_gui_idle(struct radeon_device *rdev);
+void r100_pm_misc(struct radeon_device *rdev);
+void r100_pm_prepare(struct radeon_device *rdev);
+void r100_pm_finish(struct radeon_device *rdev);
+void r100_pm_init_profile(struct radeon_device *rdev);
+void r100_pm_get_dynpm_state(struct radeon_device *rdev);
+void r100_pre_page_flip(struct radeon_device *rdev, int crtc);
+u32 r100_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
+void r100_post_page_flip(struct radeon_device *rdev, int crtc);
 
 /*
  * r200,rv250,rs300,rv280
  */
-extern int r200_copy_dma(struct radeon_device *rdev,
-			 uint64_t src_offset,
-			 uint64_t dst_offset,
-			 unsigned num_pages,
-			 struct radeon_fence *fence);
+int r200_copy_dma(struct radeon_device *rdev,
+		  uint64_t src_offset, uint64_t dst_offset,
+		  unsigned num_pages, struct radeon_fence *fence);
 void r200_set_safe_registers(struct radeon_device *rdev);
 
 /*
  * r300,r350,rv350,rv380
  */
-extern int r300_init(struct radeon_device *rdev);
-extern void r300_fini(struct radeon_device *rdev);
-extern int r300_suspend(struct radeon_device *rdev);
-extern int r300_resume(struct radeon_device *rdev);
-extern bool r300_gpu_is_lockup(struct radeon_device *rdev);
-extern int r300_asic_reset(struct radeon_device *rdev);
-extern void r300_ring_start(struct radeon_device *rdev);
-extern void r300_fence_ring_emit(struct radeon_device *rdev,
-				struct radeon_fence *fence);
-extern int r300_cs_parse(struct radeon_cs_parser *p);
-extern void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev);
-extern int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
-extern uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
-extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
-extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
-extern int rv370_get_pcie_lanes(struct radeon_device *rdev);
-extern void r300_set_reg_safe(struct radeon_device *rdev);
-extern void r300_mc_program(struct radeon_device *rdev);
-extern void r300_mc_init(struct radeon_device *rdev);
-extern void r300_clock_startup(struct radeon_device *rdev);
-extern int r300_mc_wait_for_idle(struct radeon_device *rdev);
-extern int rv370_pcie_gart_init(struct radeon_device *rdev);
-extern void rv370_pcie_gart_fini(struct radeon_device *rdev);
-extern int rv370_pcie_gart_enable(struct radeon_device *rdev);
-extern void rv370_pcie_gart_disable(struct radeon_device *rdev);
+int r300_init(struct radeon_device *rdev);
+void r300_fini(struct radeon_device *rdev);
+int r300_suspend(struct radeon_device *rdev);
+int r300_resume(struct radeon_device *rdev);
+bool r300_gpu_is_lockup(struct radeon_device *rdev);
+int r300_asic_reset(struct radeon_device *rdev);
+void r300_ring_start(struct radeon_device *rdev);
+void r300_fence_ring_emit(struct radeon_device *rdev,
+			  struct radeon_fence *fence);
+int r300_cs_parse(struct radeon_cs_parser *p);
+void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev);
+int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
+uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
+void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
+void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
+int rv370_get_pcie_lanes(struct radeon_device *rdev);
+void r300_set_reg_safe(struct radeon_device *rdev);
+void r300_mc_program(struct radeon_device *rdev);
+void r300_mc_init(struct radeon_device *rdev);
+void r300_clock_startup(struct radeon_device *rdev);
+int r300_mc_wait_for_idle(struct radeon_device *rdev);
+int rv370_pcie_gart_init(struct radeon_device *rdev);
+void rv370_pcie_gart_fini(struct radeon_device *rdev);
+int rv370_pcie_gart_enable(struct radeon_device *rdev);
+void rv370_pcie_gart_disable(struct radeon_device *rdev);
 
 /*
  * r420,r423,rv410
  */
-extern int r420_init(struct radeon_device *rdev);
-extern void r420_fini(struct radeon_device *rdev);
-extern int r420_suspend(struct radeon_device *rdev);
-extern int r420_resume(struct radeon_device *rdev);
-extern void r420_pm_init_profile(struct radeon_device *rdev);
-extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
-extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
-extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
-extern void r420_pipes_init(struct radeon_device *rdev);
+int r420_init(struct radeon_device *rdev);
+void r420_fini(struct radeon_device *rdev);
+int r420_suspend(struct radeon_device *rdev);
+int r420_resume(struct radeon_device *rdev);
+void r420_pm_init_profile(struct radeon_device *rdev);
+u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
+void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
+int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
+void r420_pipes_init(struct radeon_device *rdev);
 
 /*
  * rs400,rs480
  */
-extern int rs400_init(struct radeon_device *rdev);
-extern void rs400_fini(struct radeon_device *rdev);
-extern int rs400_suspend(struct radeon_device *rdev);
-extern int rs400_resume(struct radeon_device *rdev);
+int rs400_init(struct radeon_device *rdev);
+void rs400_fini(struct radeon_device *rdev);
+int rs400_suspend(struct radeon_device *rdev);
+int rs400_resume(struct radeon_device *rdev);
 void rs400_gart_tlb_flush(struct radeon_device *rdev);
 int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
 uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg);
@@ -211,11 +209,11 @@ void rs400_gart_fini(struct radeon_device *rdev);
 /*
  * rs600.
  */
-extern int rs600_asic_reset(struct radeon_device *rdev);
-extern int rs600_init(struct radeon_device *rdev);
-extern void rs600_fini(struct radeon_device *rdev);
-extern int rs600_suspend(struct radeon_device *rdev);
-extern int rs600_resume(struct radeon_device *rdev);
+int rs600_asic_reset(struct radeon_device *rdev);
+int rs600_init(struct radeon_device *rdev);
+void rs600_fini(struct radeon_device *rdev);
+int rs600_suspend(struct radeon_device *rdev);
+int rs600_resume(struct radeon_device *rdev);
 int rs600_irq_set(struct radeon_device *rdev);
 int rs600_irq_process(struct radeon_device *rdev);
 void rs600_irq_disable(struct radeon_device *rdev);
@@ -230,12 +228,12 @@ void rs600_hpd_fini(struct radeon_device *rdev);
 bool rs600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd);
 void rs600_hpd_set_polarity(struct radeon_device *rdev,
 			    enum radeon_hpd_id hpd);
-extern void rs600_pm_misc(struct radeon_device *rdev);
-extern void rs600_pm_prepare(struct radeon_device *rdev);
-extern void rs600_pm_finish(struct radeon_device *rdev);
-extern void rs600_pre_page_flip(struct radeon_device *rdev, int crtc);
-extern u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
-extern void rs600_post_page_flip(struct radeon_device *rdev, int crtc);
+void rs600_pm_misc(struct radeon_device *rdev);
+void rs600_pm_prepare(struct radeon_device *rdev);
+void rs600_pm_finish(struct radeon_device *rdev);
+void rs600_pre_page_flip(struct radeon_device *rdev, int crtc);
+u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
+void rs600_post_page_flip(struct radeon_device *rdev, int crtc);
 void rs600_set_safe_registers(struct radeon_device *rdev);
 
 
@@ -323,12 +321,12 @@ void r600_hpd_fini(struct radeon_device *rdev);
 bool r600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd);
 void r600_hpd_set_polarity(struct radeon_device *rdev,
 			   enum radeon_hpd_id hpd);
-extern void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo);
-extern bool r600_gui_idle(struct radeon_device *rdev);
-extern void r600_pm_misc(struct radeon_device *rdev);
-extern void r600_pm_init_profile(struct radeon_device *rdev);
-extern void rs780_pm_init_profile(struct radeon_device *rdev);
-extern void r600_pm_get_dynpm_state(struct radeon_device *rdev);
+void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo);
+bool r600_gui_idle(struct radeon_device *rdev);
+void r600_pm_misc(struct radeon_device *rdev);
+void r600_pm_init_profile(struct radeon_device *rdev);
+void rs780_pm_init_profile(struct radeon_device *rdev);
+void r600_pm_get_dynpm_state(struct radeon_device *rdev);
 bool r600_card_posted(struct radeon_device *rdev);
 void r600_cp_stop(struct radeon_device *rdev);
 int r600_cp_start(struct radeon_device *rdev);
@@ -409,13 +407,13 @@ void evergreen_hpd_set_polarity(struct radeon_device *rdev,
 u32 evergreen_get_vblank_counter(struct radeon_device *rdev, int crtc);
 int evergreen_irq_set(struct radeon_device *rdev);
 int evergreen_irq_process(struct radeon_device *rdev);
-extern int evergreen_cs_parse(struct radeon_cs_parser *p);
-extern void evergreen_pm_misc(struct radeon_device *rdev);
-extern void evergreen_pm_prepare(struct radeon_device *rdev);
-extern void evergreen_pm_finish(struct radeon_device *rdev);
-extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc);
-extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
-extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
+int evergreen_cs_parse(struct radeon_cs_parser *p);
+void evergreen_pm_misc(struct radeon_device *rdev);
+void evergreen_pm_prepare(struct radeon_device *rdev);
+void evergreen_pm_finish(struct radeon_device *rdev);
+void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc);
+u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
+void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
 void evergreen_disable_interrupt_state(struct radeon_device *rdev);
 int evergreen_blit_init(struct radeon_device *rdev);
 void evergreen_blit_fini(struct radeon_device *rdev);
-- 
1.7.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 4/7] radeon: kill decls for inline functions
  2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
                   ` (2 preceding siblings ...)
  2010-11-28 18:06 ` [PATCH 3/7] radeon: drop extern from function decls Daniel Vetter
@ 2010-11-28 18:06 ` Daniel Vetter
  2010-11-29 15:37   ` Alex Deucher
  2010-11-28 18:06 ` [PATCH 5/7] radeon: move blit functions to radeon_asic.h Daniel Vetter
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2010-11-28 18:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/radeon/radeon_asic.h |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index cf7a8f6..c7cbba3 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -57,8 +57,6 @@ int r100_init(struct radeon_device *rdev);
 void r100_fini(struct radeon_device *rdev);
 int r100_suspend(struct radeon_device *rdev);
 int r100_resume(struct radeon_device *rdev);
-uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg);
-void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 void r100_vga_set_state(struct radeon_device *rdev, bool state);
 bool r100_gpu_is_lockup(struct radeon_device *rdev);
 int r100_asic_reset(struct radeon_device *rdev);
@@ -162,8 +160,6 @@ void r300_fence_ring_emit(struct radeon_device *rdev,
 int r300_cs_parse(struct radeon_cs_parser *p);
 void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev);
 int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
-uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
-void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
 int rv370_get_pcie_lanes(struct radeon_device *rdev);
 void r300_set_reg_safe(struct radeon_device *rdev);
@@ -267,8 +263,6 @@ void rv515_fini(struct radeon_device *rdev);
 uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg);
 void rv515_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 void rv515_ring_start(struct radeon_device *rdev);
-uint32_t rv515_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
-void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 void rv515_bandwidth_update(struct radeon_device *rdev);
 int rv515_resume(struct radeon_device *rdev);
 int rv515_suspend(struct radeon_device *rdev);
-- 
1.7.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 5/7] radeon: move blit functions to radeon_asic.h
  2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
                   ` (3 preceding siblings ...)
  2010-11-28 18:06 ` [PATCH 4/7] radeon: kill decls for inline functions Daniel Vetter
@ 2010-11-28 18:06 ` Daniel Vetter
  2010-11-29 15:37   ` Alex Deucher
  2010-11-28 18:06 ` [PATCH 6/7] radeon: kill r100_io_(r|w)reg Daniel Vetter
  2010-11-28 18:06 ` [PATCH 7/7] radeon: kill rdev->pciep_(r|w)reg Daniel Vetter
  6 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2010-11-28 18:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/radeon/radeon.h      |   13 -------------
 drivers/gpu/drm/radeon/radeon_asic.h |   13 +++++++++++++
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 5fff6bf..942f5f2 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1182,19 +1182,6 @@ int radeon_device_init(struct radeon_device *rdev,
 void radeon_device_fini(struct radeon_device *rdev);
 int radeon_gpu_wait_for_idle(struct radeon_device *rdev);
 
-/* r600 blit */
-int r600_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
-void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
-void r600_kms_blit_copy(struct radeon_device *rdev,
-			u64 src_gpu_addr, u64 dst_gpu_addr,
-			int size_bytes);
-/* evergreen blit */
-int evergreen_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
-void evergreen_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
-void evergreen_kms_blit_copy(struct radeon_device *rdev,
-			     u64 src_gpu_addr, u64 dst_gpu_addr,
-			     int size_bytes);
-
 static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
 {
 	if (reg < rdev->rmmio_size)
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index c7cbba3..8e75be1 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -359,6 +359,12 @@ void r600_audio_fini(struct radeon_device *rdev);
 void r600_hdmi_init(struct drm_encoder *encoder);
 int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder);
 void r600_hdmi_update_audio_settings(struct drm_encoder *encoder);
+/* r600 blit */
+int r600_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
+void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
+void r600_kms_blit_copy(struct radeon_device *rdev,
+			u64 src_gpu_addr, u64 dst_gpu_addr,
+			int size_bytes);
 
 /*
  * rv770,rv730,rv710,rv740
@@ -411,5 +417,12 @@ void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
 void evergreen_disable_interrupt_state(struct radeon_device *rdev);
 int evergreen_blit_init(struct radeon_device *rdev);
 void evergreen_blit_fini(struct radeon_device *rdev);
+/* evergreen blit */
+int evergreen_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
+void evergreen_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
+void evergreen_kms_blit_copy(struct radeon_device *rdev,
+			     u64 src_gpu_addr, u64 dst_gpu_addr,
+			     int size_bytes);
+
 
 #endif
-- 
1.7.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 6/7] radeon: kill r100_io_(r|w)reg
  2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
                   ` (4 preceding siblings ...)
  2010-11-28 18:06 ` [PATCH 5/7] radeon: move blit functions to radeon_asic.h Daniel Vetter
@ 2010-11-28 18:06 ` Daniel Vetter
  2010-11-29 15:40   ` Alex Deucher
  2010-11-28 18:06 ` [PATCH 7/7] radeon: kill rdev->pciep_(r|w)reg Daniel Vetter
  6 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2010-11-28 18:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Used in a macro with only a single call-site for each.
IHMO that's a bit too much indirection. Fold them in.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/radeon/radeon.h        |   22 ----------------------
 drivers/gpu/drm/radeon/radeon_device.c |   16 ++++++++++++----
 2 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 942f5f2..7afb08e 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1202,26 +1202,6 @@ static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32
 	}
 }
 
-static inline u32 r100_io_rreg(struct radeon_device *rdev, u32 reg)
-{
-	if (reg < rdev->rio_mem_size)
-		return ioread32(rdev->rio_mem + reg);
-	else {
-		iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX);
-		return ioread32(rdev->rio_mem + RADEON_MM_DATA);
-	}
-}
-
-static inline void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v)
-{
-	if (reg < rdev->rio_mem_size)
-		iowrite32(v, rdev->rio_mem + reg);
-	else {
-		iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX);
-		iowrite32(v, rdev->rio_mem + RADEON_MM_DATA);
-	}
-}
-
 /*
  * Cast helper
  */
@@ -1260,8 +1240,6 @@ static inline void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v)
 		WREG32_PLL(reg, tmp_);				\
 	} while (0)
 #define DREG32_SYS(sqf, rdev, reg) seq_printf((sqf), #reg " : 0x%08X\n", r100_mm_rreg((rdev), (reg)))
-#define RREG32_IO(reg) r100_io_rreg(rdev, (reg))
-#define WREG32_IO(reg, v) r100_io_wreg(rdev, (reg), (v))
 
 /*
  * Indirect registers accessor
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 1f752ef..14c935c 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -496,16 +496,24 @@ static void cail_ioreg_write(struct card_info *info, uint32_t reg, uint32_t val)
 {
 	struct radeon_device *rdev = info->dev->dev_private;
 
-	WREG32_IO(reg*4, val);
+	if (reg < rdev->rio_mem_size)
+		iowrite32(val, rdev->rio_mem + reg);
+	else {
+		iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX);
+		iowrite32(val, rdev->rio_mem + RADEON_MM_DATA);
+	}
 }
 
 static uint32_t cail_ioreg_read(struct card_info *info, uint32_t reg)
 {
 	struct radeon_device *rdev = info->dev->dev_private;
-	uint32_t r;
 
-	r = RREG32_IO(reg*4);
-	return r;
+	if (reg < rdev->rio_mem_size)
+		return ioread32(rdev->rio_mem + reg);
+	else {
+		iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX);
+		return ioread32(rdev->rio_mem + RADEON_MM_DATA);
+	}
 }
 
 int radeon_atombios_init(struct radeon_device *rdev)
-- 
1.7.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 7/7] radeon: kill rdev->pciep_(r|w)reg
  2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
                   ` (5 preceding siblings ...)
  2010-11-28 18:06 ` [PATCH 6/7] radeon: kill r100_io_(r|w)reg Daniel Vetter
@ 2010-11-28 18:06 ` Daniel Vetter
  2010-11-29 15:43   ` Alex Deucher
  6 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2010-11-28 18:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

pciep_wreg is totally unused, rreg has only one caller and
already checks whether it's an r600 or later chip.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/radeon/r300.c        |    3 ++-
 drivers/gpu/drm/radeon/r600.c        |    8 --------
 drivers/gpu/drm/radeon/radeon.h      |    4 ----
 drivers/gpu/drm/radeon/radeon_asic.c |    6 ------
 drivers/gpu/drm/radeon/radeon_asic.h |    1 -
 5 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index cde1d34..6def8d7 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -561,7 +561,8 @@ int rv370_get_pcie_lanes(struct radeon_device *rdev)
 	if (rdev->family < CHIP_R600)
 		link_width_cntl = RREG32_PCIE(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
 	else
-		link_width_cntl = RREG32_PCIE_P(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
+		link_width_cntl = r600_pciep_rreg(rdev,
+						  RADEON_PCIE_LC_LINK_WIDTH_CNTL);
 
 	switch ((link_width_cntl & RADEON_PCIE_LC_LINK_WIDTH_RD_MASK) >> RADEON_PCIE_LC_LINK_WIDTH_RD_SHIFT) {
 	case RADEON_PCIE_LC_LINK_WIDTH_X0:
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index b55ee28..a5114ff 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1905,14 +1905,6 @@ u32 r600_pciep_rreg(struct radeon_device *rdev, u32 reg)
 	return r;
 }
 
-void r600_pciep_wreg(struct radeon_device *rdev, u32 reg, u32 v)
-{
-	WREG32(PCIE_PORT_INDEX, ((reg) & 0xff));
-	(void)RREG32(PCIE_PORT_INDEX);
-	WREG32(PCIE_PORT_DATA, (v));
-	(void)RREG32(PCIE_PORT_DATA);
-}
-
 /*
  * CP & Ring
  */
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 7afb08e..5fec64c 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1117,8 +1117,6 @@ struct radeon_device {
 	radeon_rreg_t			pll_rreg;
 	radeon_wreg_t			pll_wreg;
 	uint32_t                        pcie_reg_mask;
-	radeon_rreg_t			pciep_rreg;
-	radeon_wreg_t			pciep_wreg;
 	/* io port */
 	void __iomem                    *rio_mem;
 	resource_size_t			rio_mem_size;
@@ -1223,8 +1221,6 @@ static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32
 #define WREG32_MC(reg, v) rdev->mc_wreg(rdev, (reg), (v))
 #define RREG32_PCIE(reg) rv370_pcie_rreg(rdev, (reg))
 #define WREG32_PCIE(reg, v) rv370_pcie_wreg(rdev, (reg), (v))
-#define RREG32_PCIE_P(reg) rdev->pciep_rreg(rdev, (reg))
-#define WREG32_PCIE_P(reg, v) rdev->pciep_wreg(rdev, (reg), (v))
 #define WREG32_P(reg, val, mask)				\
 	do {							\
 		uint32_t tmp_ = RREG32(reg);			\
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index 3d73fe4..668351c 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -60,8 +60,6 @@ static void radeon_register_accessor_init(struct radeon_device *rdev)
 	rdev->mc_wreg = &radeon_invalid_wreg;
 	rdev->pll_rreg = &radeon_invalid_rreg;
 	rdev->pll_wreg = &radeon_invalid_wreg;
-	rdev->pciep_rreg = &radeon_invalid_rreg;
-	rdev->pciep_wreg = &radeon_invalid_wreg;
 
 	/* Don't change order as we are overridding accessor. */
 	if (rdev->family < CHIP_RV515) {
@@ -94,10 +92,6 @@ static void radeon_register_accessor_init(struct radeon_device *rdev)
 		rdev->mc_rreg = &rs600_mc_rreg;
 		rdev->mc_wreg = &rs600_mc_wreg;
 	}
-	if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_RV740)) {
-		rdev->pciep_rreg = &r600_pciep_rreg;
-		rdev->pciep_wreg = &r600_pciep_wreg;
-	}
 }
 
 
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index 8e75be1..bad4b88 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -294,7 +294,6 @@ void r600_wb_fini(struct radeon_device *rdev);
 void r600_cp_commit(struct radeon_device *rdev);
 void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
 uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg);
-void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 int r600_cs_parse(struct radeon_cs_parser *p);
 void r600_fence_ring_emit(struct radeon_device *rdev,
 			  struct radeon_fence *fence);
-- 
1.7.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/7] radeon: consolidate asic-specific function decls for pre-r600
  2010-11-28 18:06 ` [PATCH 1/7] radeon: consolidate asic-specific function decls for pre-r600 Daniel Vetter
@ 2010-11-29 15:29   ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2010-11-29 15:29 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel

On Sun, Nov 28, 2010 at 1:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Move them to radeon_asic.h together with the other asic
> specific stuff.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Looks good to me.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>

> ---
>  drivers/gpu/drm/radeon/radeon.h      |   59 ----------------------------------
>  drivers/gpu/drm/radeon/radeon_asic.h |   53 ++++++++++++++++++++++++++++--
>  2 files changed, 50 insertions(+), 62 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 32d6396..75b9585 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1433,65 +1433,6 @@ extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc
>  extern int radeon_resume_kms(struct drm_device *dev);
>  extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state);
>
> -/* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */
> -extern void r100_gpu_lockup_update(struct r100_gpu_lockup *lockup, struct radeon_cp *cp);
> -extern bool r100_gpu_cp_is_lockup(struct radeon_device *rdev, struct r100_gpu_lockup *lockup, struct radeon_cp *cp);
> -
> -/* rv200,rv250,rv280 */
> -extern void r200_set_safe_registers(struct radeon_device *rdev);
> -
> -/* r300,r350,rv350,rv370,rv380 */
> -extern void r300_set_reg_safe(struct radeon_device *rdev);
> -extern void r300_mc_program(struct radeon_device *rdev);
> -extern void r300_mc_init(struct radeon_device *rdev);
> -extern void r300_clock_startup(struct radeon_device *rdev);
> -extern int r300_mc_wait_for_idle(struct radeon_device *rdev);
> -extern int rv370_pcie_gart_init(struct radeon_device *rdev);
> -extern void rv370_pcie_gart_fini(struct radeon_device *rdev);
> -extern int rv370_pcie_gart_enable(struct radeon_device *rdev);
> -extern void rv370_pcie_gart_disable(struct radeon_device *rdev);
> -
> -/* r420,r423,rv410 */
> -extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
> -extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
> -extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
> -extern void r420_pipes_init(struct radeon_device *rdev);
> -
> -/* rv515 */
> -struct rv515_mc_save {
> -       u32 d1vga_control;
> -       u32 d2vga_control;
> -       u32 vga_render_control;
> -       u32 vga_hdp_control;
> -       u32 d1crtc_control;
> -       u32 d2crtc_control;
> -};
> -extern void rv515_bandwidth_avivo_update(struct radeon_device *rdev);
> -extern void rv515_vga_render_disable(struct radeon_device *rdev);
> -extern void rv515_set_safe_registers(struct radeon_device *rdev);
> -extern void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save);
> -extern void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save);
> -extern void rv515_clock_startup(struct radeon_device *rdev);
> -extern void rv515_debugfs(struct radeon_device *rdev);
> -extern int rv515_suspend(struct radeon_device *rdev);
> -
> -/* rs400 */
> -extern int rs400_gart_init(struct radeon_device *rdev);
> -extern int rs400_gart_enable(struct radeon_device *rdev);
> -extern void rs400_gart_adjust_size(struct radeon_device *rdev);
> -extern void rs400_gart_disable(struct radeon_device *rdev);
> -extern void rs400_gart_fini(struct radeon_device *rdev);
> -
> -/* rs600 */
> -extern void rs600_set_safe_registers(struct radeon_device *rdev);
> -extern int rs600_irq_set(struct radeon_device *rdev);
> -extern void rs600_irq_disable(struct radeon_device *rdev);
> -
> -/* rs690, rs740 */
> -extern void rs690_line_buffer_adjust(struct radeon_device *rdev,
> -                                       struct drm_display_mode *mode1,
> -                                       struct drm_display_mode *mode2);
> -
>  /* r600, rv610, rv630, rv620, rv635, rv670, rs780, rs880 */
>  extern bool r600_card_posted(struct radeon_device *rdev);
>  extern void r600_cp_stop(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
> index 4970eda..a5fddcd 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.h
> +++ b/drivers/gpu/drm/radeon/radeon_asic.h
> @@ -102,6 +102,11 @@ int r100_pci_gart_enable(struct radeon_device *rdev);
>  void r100_pci_gart_disable(struct radeon_device *rdev);
>  int r100_debugfs_mc_info_init(struct radeon_device *rdev);
>  int r100_gui_wait_for_idle(struct radeon_device *rdev);
> +void r100_gpu_lockup_update(struct r100_gpu_lockup *lockup,
> +                           struct radeon_cp *cp);
> +bool r100_gpu_cp_is_lockup(struct radeon_device *rdev,
> +                          struct r100_gpu_lockup *lockup,
> +                          struct radeon_cp *cp);
>  void r100_ib_fini(struct radeon_device *rdev);
>  int r100_ib_init(struct radeon_device *rdev);
>  void r100_irq_disable(struct radeon_device *rdev);
> @@ -138,10 +143,11 @@ extern void r100_post_page_flip(struct radeon_device *rdev, int crtc);
>  * r200,rv250,rs300,rv280
>  */
>  extern int r200_copy_dma(struct radeon_device *rdev,
> -                       uint64_t src_offset,
> -                       uint64_t dst_offset,
> -                       unsigned num_pages,
> +                        uint64_t src_offset,
> +                        uint64_t dst_offset,
> +                        unsigned num_pages,
>                         struct radeon_fence *fence);
> +void r200_set_safe_registers(struct radeon_device *rdev);
>
>  /*
>  * r300,r350,rv350,rv380
> @@ -162,6 +168,15 @@ extern uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
>  extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
>  extern int rv370_get_pcie_lanes(struct radeon_device *rdev);
> +extern void r300_set_reg_safe(struct radeon_device *rdev);
> +extern void r300_mc_program(struct radeon_device *rdev);
> +extern void r300_mc_init(struct radeon_device *rdev);
> +extern void r300_clock_startup(struct radeon_device *rdev);
> +extern int r300_mc_wait_for_idle(struct radeon_device *rdev);
> +extern int rv370_pcie_gart_init(struct radeon_device *rdev);
> +extern void rv370_pcie_gart_fini(struct radeon_device *rdev);
> +extern int rv370_pcie_gart_enable(struct radeon_device *rdev);
> +extern void rv370_pcie_gart_disable(struct radeon_device *rdev);
>
>  /*
>  * r420,r423,rv410
> @@ -171,6 +186,10 @@ extern void r420_fini(struct radeon_device *rdev);
>  extern int r420_suspend(struct radeon_device *rdev);
>  extern int r420_resume(struct radeon_device *rdev);
>  extern void r420_pm_init_profile(struct radeon_device *rdev);
> +extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
> +extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
> +extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
> +extern void r420_pipes_init(struct radeon_device *rdev);
>
>  /*
>  * rs400,rs480
> @@ -183,6 +202,12 @@ void rs400_gart_tlb_flush(struct radeon_device *rdev);
>  int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
>  uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg);
>  void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
> +int rs400_gart_init(struct radeon_device *rdev);
> +int rs400_gart_enable(struct radeon_device *rdev);
> +void rs400_gart_adjust_size(struct radeon_device *rdev);
> +void rs400_gart_disable(struct radeon_device *rdev);
> +void rs400_gart_fini(struct radeon_device *rdev);
> +
>
>  /*
>  * rs600.
> @@ -194,6 +219,7 @@ extern int rs600_suspend(struct radeon_device *rdev);
>  extern int rs600_resume(struct radeon_device *rdev);
>  int rs600_irq_set(struct radeon_device *rdev);
>  int rs600_irq_process(struct radeon_device *rdev);
> +void rs600_irq_disable(struct radeon_device *rdev);
>  u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc);
>  void rs600_gart_tlb_flush(struct radeon_device *rdev);
>  int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
> @@ -211,6 +237,8 @@ extern void rs600_pm_finish(struct radeon_device *rdev);
>  extern void rs600_pre_page_flip(struct radeon_device *rdev, int crtc);
>  extern u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
>  extern void rs600_post_page_flip(struct radeon_device *rdev, int crtc);
> +void rs600_set_safe_registers(struct radeon_device *rdev);
> +
>
>  /*
>  * rs690,rs740
> @@ -222,10 +250,21 @@ int rs690_suspend(struct radeon_device *rdev);
>  uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg);
>  void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  void rs690_bandwidth_update(struct radeon_device *rdev);
> +void rs690_line_buffer_adjust(struct radeon_device *rdev,
> +                                       struct drm_display_mode *mode1,
> +                                       struct drm_display_mode *mode2);
>
>  /*
>  * rv515
>  */
> +struct rv515_mc_save {
> +       u32 d1vga_control;
> +       u32 d2vga_control;
> +       u32 vga_render_control;
> +       u32 vga_hdp_control;
> +       u32 d1crtc_control;
> +       u32 d2crtc_control;
> +};
>  int rv515_init(struct radeon_device *rdev);
>  void rv515_fini(struct radeon_device *rdev);
>  uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg);
> @@ -236,6 +275,14 @@ void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  void rv515_bandwidth_update(struct radeon_device *rdev);
>  int rv515_resume(struct radeon_device *rdev);
>  int rv515_suspend(struct radeon_device *rdev);
> +void rv515_bandwidth_avivo_update(struct radeon_device *rdev);
> +void rv515_vga_render_disable(struct radeon_device *rdev);
> +void rv515_set_safe_registers(struct radeon_device *rdev);
> +void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save);
> +void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save);
> +void rv515_clock_startup(struct radeon_device *rdev);
> +void rv515_debugfs(struct radeon_device *rdev);
> +
>
>  /*
>  * r520,rv530,rv560,rv570,r580
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/7] radeon: consolidate asic-specific function decls for r600 & later
  2010-11-28 18:06 ` [PATCH 2/7] radeon: consolidate asic-specific function decls for r600 & later Daniel Vetter
@ 2010-11-29 15:34   ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2010-11-29 15:34 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel

On Sun, Nov 28, 2010 at 1:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Now all the asic specific stuff ist mostly hid in radeon_asic.*
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>

> ---
>  drivers/gpu/drm/radeon/r600_audio.c  |    1 +
>  drivers/gpu/drm/radeon/r600_hdmi.c   |    1 +
>  drivers/gpu/drm/radeon/radeon.h      |   61 ++--------------------------------
>  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 b5443fe..846fae5 100644
> --- a/drivers/gpu/drm/radeon/r600_audio.c
> +++ b/drivers/gpu/drm/radeon/r600_audio.c
> @@ -26,6 +26,7 @@
>  #include "drmP.h"
>  #include "radeon.h"
>  #include "radeon_reg.h"
> +#include "radeon_asic.h"
>  #include "atom.h"
>
>  #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 e6a58ed..50db6d6 100644
> --- a/drivers/gpu/drm/radeon/r600_hdmi.c
> +++ b/drivers/gpu/drm/radeon/r600_hdmi.c
> @@ -26,6 +26,7 @@
>  #include "drmP.h"
>  #include "radeon_drm.h"
>  #include "radeon.h"
> +#include "radeon_asic.h"
>  #include "atom.h"
>
>  /*
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 75b9585..2257a01 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1433,59 +1433,12 @@ extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc
>  extern int radeon_resume_kms(struct drm_device *dev);
>  extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state);
>
> -/* r600, rv610, rv630, rv620, rv635, rv670, rs780, rs880 */
> -extern bool r600_card_posted(struct radeon_device *rdev);
> -extern void r600_cp_stop(struct radeon_device *rdev);
> -extern int r600_cp_start(struct radeon_device *rdev);
> -extern void r600_ring_init(struct radeon_device *rdev, unsigned ring_size);
> -extern int r600_cp_resume(struct radeon_device *rdev);
> -extern void r600_cp_fini(struct radeon_device *rdev);
> -extern int r600_count_pipe_bits(uint32_t val);
> -extern int r600_mc_wait_for_idle(struct radeon_device *rdev);
> -extern int r600_pcie_gart_init(struct radeon_device *rdev);
> -extern void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
> -extern int r600_ib_test(struct radeon_device *rdev);
> -extern int r600_ring_test(struct radeon_device *rdev);
> -extern void r600_scratch_init(struct radeon_device *rdev);
> -extern int r600_blit_init(struct radeon_device *rdev);
> -extern void r600_blit_fini(struct radeon_device *rdev);
> -extern int r600_init_microcode(struct radeon_device *rdev);
> -extern int r600_asic_reset(struct radeon_device *rdev);
> -/* r600 irq */
> -extern int r600_irq_init(struct radeon_device *rdev);
> -extern void r600_irq_fini(struct radeon_device *rdev);
> -extern void r600_ih_ring_init(struct radeon_device *rdev, unsigned ring_size);
> -extern int r600_irq_set(struct radeon_device *rdev);
> -extern void r600_irq_suspend(struct radeon_device *rdev);
> -extern void r600_disable_interrupts(struct radeon_device *rdev);
> -extern void r600_rlc_stop(struct radeon_device *rdev);
> -/* r600 audio */
> -extern int r600_audio_init(struct radeon_device *rdev);
> -extern int r600_audio_tmds_index(struct drm_encoder *encoder);
> -extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock);
> -extern int r600_audio_channels(struct radeon_device *rdev);
> -extern int r600_audio_bits_per_sample(struct radeon_device *rdev);
> -extern int r600_audio_rate(struct radeon_device *rdev);
> -extern uint8_t r600_audio_status_bits(struct radeon_device *rdev);
> -extern uint8_t r600_audio_category_code(struct radeon_device *rdev);
> -extern void r600_audio_schedule_polling(struct radeon_device *rdev);
> -extern void r600_audio_enable_polling(struct drm_encoder *encoder);
> -extern void r600_audio_disable_polling(struct drm_encoder *encoder);
> -extern void r600_audio_fini(struct radeon_device *rdev);
> -extern void r600_hdmi_init(struct drm_encoder *encoder);
> +/*
> + * r600 functions used by radeon_encoder.c
> + */
>  extern void r600_hdmi_enable(struct drm_encoder *encoder);
>  extern void r600_hdmi_disable(struct drm_encoder *encoder);
>  extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode);
> -extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder);
> -extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder);
> -
> -extern void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
> -extern void r700_cp_stop(struct radeon_device *rdev);
> -extern void r700_cp_fini(struct radeon_device *rdev);
> -extern void evergreen_disable_interrupt_state(struct radeon_device *rdev);
> -extern int evergreen_irq_set(struct radeon_device *rdev);
> -extern int evergreen_blit_init(struct radeon_device *rdev);
> -extern void evergreen_blit_fini(struct radeon_device *rdev);
>
>  /* radeon_acpi.c */
>  #if defined(CONFIG_ACPI)
> @@ -1494,14 +1447,6 @@ extern int radeon_acpi_init(struct radeon_device *rdev);
>  static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; }
>  #endif
>
> -/* evergreen */
> -struct evergreen_mc_save {
> -       u32 vga_control[6];
> -       u32 vga_render_control;
> -       u32 vga_hdp_control;
> -       u32 crtc_control[6];
> -};
> -
>  #include "radeon_object.h"
>
>  #endif
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
> index a5fddcd..979a11e 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);
>  void rs400_gart_disable(struct radeon_device *rdev);
>  void rs400_gart_fini(struct radeon_device *rdev);
>
> -
>  /*
>  * rs600.
>  */
> @@ -307,14 +306,13 @@ void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  int r600_cs_parse(struct radeon_cs_parser *p);
>  void r600_fence_ring_emit(struct radeon_device *rdev,
>                          struct radeon_fence *fence);
> -int r600_irq_process(struct radeon_device *rdev);
> -int r600_irq_set(struct radeon_device *rdev);
>  bool r600_gpu_is_lockup(struct radeon_device *rdev);
>  int r600_asic_reset(struct radeon_device *rdev);
>  int r600_set_surface_reg(struct radeon_device *rdev, int reg,
>                         uint32_t tiling_flags, uint32_t pitch,
>                         uint32_t offset, uint32_t obj_size);
>  void r600_clear_surface_reg(struct radeon_device *rdev, int reg);
> +int r600_ib_test(struct radeon_device *rdev);
>  void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
>  int r600_ring_test(struct radeon_device *rdev);
>  int r600_copy_blit(struct radeon_device *rdev,
> @@ -331,6 +329,44 @@ extern void r600_pm_misc(struct radeon_device *rdev);
>  extern void r600_pm_init_profile(struct radeon_device *rdev);
>  extern void rs780_pm_init_profile(struct radeon_device *rdev);
>  extern void r600_pm_get_dynpm_state(struct radeon_device *rdev);
> +bool r600_card_posted(struct radeon_device *rdev);
> +void r600_cp_stop(struct radeon_device *rdev);
> +int r600_cp_start(struct radeon_device *rdev);
> +void r600_ring_init(struct radeon_device *rdev, unsigned ring_size);
> +int r600_cp_resume(struct radeon_device *rdev);
> +void r600_cp_fini(struct radeon_device *rdev);
> +int r600_count_pipe_bits(uint32_t val);
> +int r600_mc_wait_for_idle(struct radeon_device *rdev);
> +int r600_pcie_gart_init(struct radeon_device *rdev);
> +void r600_scratch_init(struct radeon_device *rdev);
> +int r600_blit_init(struct radeon_device *rdev);
> +void r600_blit_fini(struct radeon_device *rdev);
> +int r600_init_microcode(struct radeon_device *rdev);
> +/* r600 irq */
> +int r600_irq_process(struct radeon_device *rdev);
> +int r600_irq_init(struct radeon_device *rdev);
> +void r600_irq_fini(struct radeon_device *rdev);
> +void r600_ih_ring_init(struct radeon_device *rdev, unsigned ring_size);
> +int r600_irq_set(struct radeon_device *rdev);
> +void r600_irq_suspend(struct radeon_device *rdev);
> +void r600_disable_interrupts(struct radeon_device *rdev);
> +void r600_rlc_stop(struct radeon_device *rdev);
> +/* r600 audio */
> +int r600_audio_init(struct radeon_device *rdev);
> +int r600_audio_tmds_index(struct drm_encoder *encoder);
> +void r600_audio_set_clock(struct drm_encoder *encoder, int clock);
> +int r600_audio_channels(struct radeon_device *rdev);
> +int r600_audio_bits_per_sample(struct radeon_device *rdev);
> +int r600_audio_rate(struct radeon_device *rdev);
> +uint8_t r600_audio_status_bits(struct radeon_device *rdev);
> +uint8_t r600_audio_category_code(struct radeon_device *rdev);
> +void r600_audio_schedule_polling(struct radeon_device *rdev);
> +void r600_audio_enable_polling(struct drm_encoder *encoder);
> +void r600_audio_disable_polling(struct drm_encoder *encoder);
> +void r600_audio_fini(struct radeon_device *rdev);
> +void r600_hdmi_init(struct drm_encoder *encoder);
> +int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder);
> +void r600_hdmi_update_audio_settings(struct drm_encoder *encoder);
>
>  /*
>  * rv770,rv730,rv710,rv740
> @@ -339,12 +375,21 @@ int rv770_init(struct radeon_device *rdev);
>  void rv770_fini(struct radeon_device *rdev);
>  int rv770_suspend(struct radeon_device *rdev);
>  int rv770_resume(struct radeon_device *rdev);
> -extern void rv770_pm_misc(struct radeon_device *rdev);
> -extern u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
> +void rv770_pm_misc(struct radeon_device *rdev);
> +u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
> +void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
> +void r700_cp_stop(struct radeon_device *rdev);
> +void r700_cp_fini(struct radeon_device *rdev);
>
>  /*
>  * evergreen
>  */
> +struct evergreen_mc_save {
> +       u32 vga_control[6];
> +       u32 vga_render_control;
> +       u32 vga_hdp_control;
> +       u32 crtc_control[6];
> +};
>  void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev);
>  int evergreen_init(struct radeon_device *rdev);
>  void evergreen_fini(struct radeon_device *rdev);
> @@ -371,5 +416,8 @@ extern void evergreen_pm_finish(struct radeon_device *rdev);
>  extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc);
>  extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
>  extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
> +void evergreen_disable_interrupt_state(struct radeon_device *rdev);
> +int evergreen_blit_init(struct radeon_device *rdev);
> +void evergreen_blit_fini(struct radeon_device *rdev);
>
>  #endif
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/7] radeon: drop extern from function decls
  2010-11-28 18:06 ` [PATCH 3/7] radeon: drop extern from function decls Daniel Vetter
@ 2010-11-29 15:36   ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2010-11-29 15:36 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel

On Sun, Nov 28, 2010 at 1:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Only adds noise.
>

Seems like more of a style preference.  I prefer the externs, but it's
not a big deal either way.

Alex

> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/radeon/radeon.h      |    6 +-
>  drivers/gpu/drm/radeon/radeon_asic.h |  150 +++++++++++++++++-----------------
>  2 files changed, 77 insertions(+), 79 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 2257a01..5fff6bf 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1436,9 +1436,9 @@ extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state);
>  /*
>  * r600 functions used by radeon_encoder.c
>  */
> -extern void r600_hdmi_enable(struct drm_encoder *encoder);
> -extern void r600_hdmi_disable(struct drm_encoder *encoder);
> -extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode);
> +void r600_hdmi_enable(struct drm_encoder *encoder);
> +void r600_hdmi_disable(struct drm_encoder *encoder);
> +void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode);
>
>  /* radeon_acpi.c */
>  #if defined(CONFIG_ACPI)
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
> index 979a11e..cf7a8f6 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.h
> +++ b/drivers/gpu/drm/radeon/radeon_asic.h
> @@ -129,75 +129,73 @@ int r100_cs_packet_parse(struct radeon_cs_parser *p,
>  void r100_enable_bm(struct radeon_device *rdev);
>  void r100_set_common_regs(struct radeon_device *rdev);
>  void r100_bm_disable(struct radeon_device *rdev);
> -extern bool r100_gui_idle(struct radeon_device *rdev);
> -extern void r100_pm_misc(struct radeon_device *rdev);
> -extern void r100_pm_prepare(struct radeon_device *rdev);
> -extern void r100_pm_finish(struct radeon_device *rdev);
> -extern void r100_pm_init_profile(struct radeon_device *rdev);
> -extern void r100_pm_get_dynpm_state(struct radeon_device *rdev);
> -extern void r100_pre_page_flip(struct radeon_device *rdev, int crtc);
> -extern u32 r100_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
> -extern void r100_post_page_flip(struct radeon_device *rdev, int crtc);
> +bool r100_gui_idle(struct radeon_device *rdev);
> +void r100_pm_misc(struct radeon_device *rdev);
> +void r100_pm_prepare(struct radeon_device *rdev);
> +void r100_pm_finish(struct radeon_device *rdev);
> +void r100_pm_init_profile(struct radeon_device *rdev);
> +void r100_pm_get_dynpm_state(struct radeon_device *rdev);
> +void r100_pre_page_flip(struct radeon_device *rdev, int crtc);
> +u32 r100_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
> +void r100_post_page_flip(struct radeon_device *rdev, int crtc);
>
>  /*
>  * r200,rv250,rs300,rv280
>  */
> -extern int r200_copy_dma(struct radeon_device *rdev,
> -                        uint64_t src_offset,
> -                        uint64_t dst_offset,
> -                        unsigned num_pages,
> -                        struct radeon_fence *fence);
> +int r200_copy_dma(struct radeon_device *rdev,
> +                 uint64_t src_offset, uint64_t dst_offset,
> +                 unsigned num_pages, struct radeon_fence *fence);
>  void r200_set_safe_registers(struct radeon_device *rdev);
>
>  /*
>  * r300,r350,rv350,rv380
>  */
> -extern int r300_init(struct radeon_device *rdev);
> -extern void r300_fini(struct radeon_device *rdev);
> -extern int r300_suspend(struct radeon_device *rdev);
> -extern int r300_resume(struct radeon_device *rdev);
> -extern bool r300_gpu_is_lockup(struct radeon_device *rdev);
> -extern int r300_asic_reset(struct radeon_device *rdev);
> -extern void r300_ring_start(struct radeon_device *rdev);
> -extern void r300_fence_ring_emit(struct radeon_device *rdev,
> -                               struct radeon_fence *fence);
> -extern int r300_cs_parse(struct radeon_cs_parser *p);
> -extern void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev);
> -extern int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
> -extern uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
> -extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
> -extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
> -extern int rv370_get_pcie_lanes(struct radeon_device *rdev);
> -extern void r300_set_reg_safe(struct radeon_device *rdev);
> -extern void r300_mc_program(struct radeon_device *rdev);
> -extern void r300_mc_init(struct radeon_device *rdev);
> -extern void r300_clock_startup(struct radeon_device *rdev);
> -extern int r300_mc_wait_for_idle(struct radeon_device *rdev);
> -extern int rv370_pcie_gart_init(struct radeon_device *rdev);
> -extern void rv370_pcie_gart_fini(struct radeon_device *rdev);
> -extern int rv370_pcie_gart_enable(struct radeon_device *rdev);
> -extern void rv370_pcie_gart_disable(struct radeon_device *rdev);
> +int r300_init(struct radeon_device *rdev);
> +void r300_fini(struct radeon_device *rdev);
> +int r300_suspend(struct radeon_device *rdev);
> +int r300_resume(struct radeon_device *rdev);
> +bool r300_gpu_is_lockup(struct radeon_device *rdev);
> +int r300_asic_reset(struct radeon_device *rdev);
> +void r300_ring_start(struct radeon_device *rdev);
> +void r300_fence_ring_emit(struct radeon_device *rdev,
> +                         struct radeon_fence *fence);
> +int r300_cs_parse(struct radeon_cs_parser *p);
> +void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev);
> +int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
> +uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
> +void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
> +void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
> +int rv370_get_pcie_lanes(struct radeon_device *rdev);
> +void r300_set_reg_safe(struct radeon_device *rdev);
> +void r300_mc_program(struct radeon_device *rdev);
> +void r300_mc_init(struct radeon_device *rdev);
> +void r300_clock_startup(struct radeon_device *rdev);
> +int r300_mc_wait_for_idle(struct radeon_device *rdev);
> +int rv370_pcie_gart_init(struct radeon_device *rdev);
> +void rv370_pcie_gart_fini(struct radeon_device *rdev);
> +int rv370_pcie_gart_enable(struct radeon_device *rdev);
> +void rv370_pcie_gart_disable(struct radeon_device *rdev);
>
>  /*
>  * r420,r423,rv410
>  */
> -extern int r420_init(struct radeon_device *rdev);
> -extern void r420_fini(struct radeon_device *rdev);
> -extern int r420_suspend(struct radeon_device *rdev);
> -extern int r420_resume(struct radeon_device *rdev);
> -extern void r420_pm_init_profile(struct radeon_device *rdev);
> -extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
> -extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
> -extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
> -extern void r420_pipes_init(struct radeon_device *rdev);
> +int r420_init(struct radeon_device *rdev);
> +void r420_fini(struct radeon_device *rdev);
> +int r420_suspend(struct radeon_device *rdev);
> +int r420_resume(struct radeon_device *rdev);
> +void r420_pm_init_profile(struct radeon_device *rdev);
> +u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
> +void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
> +int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
> +void r420_pipes_init(struct radeon_device *rdev);
>
>  /*
>  * rs400,rs480
>  */
> -extern int rs400_init(struct radeon_device *rdev);
> -extern void rs400_fini(struct radeon_device *rdev);
> -extern int rs400_suspend(struct radeon_device *rdev);
> -extern int rs400_resume(struct radeon_device *rdev);
> +int rs400_init(struct radeon_device *rdev);
> +void rs400_fini(struct radeon_device *rdev);
> +int rs400_suspend(struct radeon_device *rdev);
> +int rs400_resume(struct radeon_device *rdev);
>  void rs400_gart_tlb_flush(struct radeon_device *rdev);
>  int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
>  uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg);
> @@ -211,11 +209,11 @@ void rs400_gart_fini(struct radeon_device *rdev);
>  /*
>  * rs600.
>  */
> -extern int rs600_asic_reset(struct radeon_device *rdev);
> -extern int rs600_init(struct radeon_device *rdev);
> -extern void rs600_fini(struct radeon_device *rdev);
> -extern int rs600_suspend(struct radeon_device *rdev);
> -extern int rs600_resume(struct radeon_device *rdev);
> +int rs600_asic_reset(struct radeon_device *rdev);
> +int rs600_init(struct radeon_device *rdev);
> +void rs600_fini(struct radeon_device *rdev);
> +int rs600_suspend(struct radeon_device *rdev);
> +int rs600_resume(struct radeon_device *rdev);
>  int rs600_irq_set(struct radeon_device *rdev);
>  int rs600_irq_process(struct radeon_device *rdev);
>  void rs600_irq_disable(struct radeon_device *rdev);
> @@ -230,12 +228,12 @@ void rs600_hpd_fini(struct radeon_device *rdev);
>  bool rs600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd);
>  void rs600_hpd_set_polarity(struct radeon_device *rdev,
>                            enum radeon_hpd_id hpd);
> -extern void rs600_pm_misc(struct radeon_device *rdev);
> -extern void rs600_pm_prepare(struct radeon_device *rdev);
> -extern void rs600_pm_finish(struct radeon_device *rdev);
> -extern void rs600_pre_page_flip(struct radeon_device *rdev, int crtc);
> -extern u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
> -extern void rs600_post_page_flip(struct radeon_device *rdev, int crtc);
> +void rs600_pm_misc(struct radeon_device *rdev);
> +void rs600_pm_prepare(struct radeon_device *rdev);
> +void rs600_pm_finish(struct radeon_device *rdev);
> +void rs600_pre_page_flip(struct radeon_device *rdev, int crtc);
> +u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
> +void rs600_post_page_flip(struct radeon_device *rdev, int crtc);
>  void rs600_set_safe_registers(struct radeon_device *rdev);
>
>
> @@ -323,12 +321,12 @@ void r600_hpd_fini(struct radeon_device *rdev);
>  bool r600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd);
>  void r600_hpd_set_polarity(struct radeon_device *rdev,
>                           enum radeon_hpd_id hpd);
> -extern void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo);
> -extern bool r600_gui_idle(struct radeon_device *rdev);
> -extern void r600_pm_misc(struct radeon_device *rdev);
> -extern void r600_pm_init_profile(struct radeon_device *rdev);
> -extern void rs780_pm_init_profile(struct radeon_device *rdev);
> -extern void r600_pm_get_dynpm_state(struct radeon_device *rdev);
> +void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo);
> +bool r600_gui_idle(struct radeon_device *rdev);
> +void r600_pm_misc(struct radeon_device *rdev);
> +void r600_pm_init_profile(struct radeon_device *rdev);
> +void rs780_pm_init_profile(struct radeon_device *rdev);
> +void r600_pm_get_dynpm_state(struct radeon_device *rdev);
>  bool r600_card_posted(struct radeon_device *rdev);
>  void r600_cp_stop(struct radeon_device *rdev);
>  int r600_cp_start(struct radeon_device *rdev);
> @@ -409,13 +407,13 @@ void evergreen_hpd_set_polarity(struct radeon_device *rdev,
>  u32 evergreen_get_vblank_counter(struct radeon_device *rdev, int crtc);
>  int evergreen_irq_set(struct radeon_device *rdev);
>  int evergreen_irq_process(struct radeon_device *rdev);
> -extern int evergreen_cs_parse(struct radeon_cs_parser *p);
> -extern void evergreen_pm_misc(struct radeon_device *rdev);
> -extern void evergreen_pm_prepare(struct radeon_device *rdev);
> -extern void evergreen_pm_finish(struct radeon_device *rdev);
> -extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc);
> -extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
> -extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
> +int evergreen_cs_parse(struct radeon_cs_parser *p);
> +void evergreen_pm_misc(struct radeon_device *rdev);
> +void evergreen_pm_prepare(struct radeon_device *rdev);
> +void evergreen_pm_finish(struct radeon_device *rdev);
> +void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc);
> +u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
> +void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
>  void evergreen_disable_interrupt_state(struct radeon_device *rdev);
>  int evergreen_blit_init(struct radeon_device *rdev);
>  void evergreen_blit_fini(struct radeon_device *rdev);
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/7] radeon: kill decls for inline functions
  2010-11-28 18:06 ` [PATCH 4/7] radeon: kill decls for inline functions Daniel Vetter
@ 2010-11-29 15:37   ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2010-11-29 15:37 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel

On Sun, Nov 28, 2010 at 1:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>

> ---
>  drivers/gpu/drm/radeon/radeon_asic.h |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
> index cf7a8f6..c7cbba3 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.h
> +++ b/drivers/gpu/drm/radeon/radeon_asic.h
> @@ -57,8 +57,6 @@ int r100_init(struct radeon_device *rdev);
>  void r100_fini(struct radeon_device *rdev);
>  int r100_suspend(struct radeon_device *rdev);
>  int r100_resume(struct radeon_device *rdev);
> -uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg);
> -void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  void r100_vga_set_state(struct radeon_device *rdev, bool state);
>  bool r100_gpu_is_lockup(struct radeon_device *rdev);
>  int r100_asic_reset(struct radeon_device *rdev);
> @@ -162,8 +160,6 @@ void r300_fence_ring_emit(struct radeon_device *rdev,
>  int r300_cs_parse(struct radeon_cs_parser *p);
>  void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev);
>  int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
> -uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
> -void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
>  int rv370_get_pcie_lanes(struct radeon_device *rdev);
>  void r300_set_reg_safe(struct radeon_device *rdev);
> @@ -267,8 +263,6 @@ void rv515_fini(struct radeon_device *rdev);
>  uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg);
>  void rv515_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  void rv515_ring_start(struct radeon_device *rdev);
> -uint32_t rv515_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
> -void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  void rv515_bandwidth_update(struct radeon_device *rdev);
>  int rv515_resume(struct radeon_device *rdev);
>  int rv515_suspend(struct radeon_device *rdev);
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 5/7] radeon: move blit functions to radeon_asic.h
  2010-11-28 18:06 ` [PATCH 5/7] radeon: move blit functions to radeon_asic.h Daniel Vetter
@ 2010-11-29 15:37   ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2010-11-29 15:37 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel

On Sun, Nov 28, 2010 at 1:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>

> ---
>  drivers/gpu/drm/radeon/radeon.h      |   13 -------------
>  drivers/gpu/drm/radeon/radeon_asic.h |   13 +++++++++++++
>  2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 5fff6bf..942f5f2 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1182,19 +1182,6 @@ int radeon_device_init(struct radeon_device *rdev,
>  void radeon_device_fini(struct radeon_device *rdev);
>  int radeon_gpu_wait_for_idle(struct radeon_device *rdev);
>
> -/* r600 blit */
> -int r600_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
> -void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
> -void r600_kms_blit_copy(struct radeon_device *rdev,
> -                       u64 src_gpu_addr, u64 dst_gpu_addr,
> -                       int size_bytes);
> -/* evergreen blit */
> -int evergreen_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
> -void evergreen_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
> -void evergreen_kms_blit_copy(struct radeon_device *rdev,
> -                            u64 src_gpu_addr, u64 dst_gpu_addr,
> -                            int size_bytes);
> -
>  static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
>  {
>        if (reg < rdev->rmmio_size)
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
> index c7cbba3..8e75be1 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.h
> +++ b/drivers/gpu/drm/radeon/radeon_asic.h
> @@ -359,6 +359,12 @@ void r600_audio_fini(struct radeon_device *rdev);
>  void r600_hdmi_init(struct drm_encoder *encoder);
>  int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder);
>  void r600_hdmi_update_audio_settings(struct drm_encoder *encoder);
> +/* r600 blit */
> +int r600_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
> +void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
> +void r600_kms_blit_copy(struct radeon_device *rdev,
> +                       u64 src_gpu_addr, u64 dst_gpu_addr,
> +                       int size_bytes);
>
>  /*
>  * rv770,rv730,rv710,rv740
> @@ -411,5 +417,12 @@ void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
>  void evergreen_disable_interrupt_state(struct radeon_device *rdev);
>  int evergreen_blit_init(struct radeon_device *rdev);
>  void evergreen_blit_fini(struct radeon_device *rdev);
> +/* evergreen blit */
> +int evergreen_blit_prepare_copy(struct radeon_device *rdev, int size_bytes);
> +void evergreen_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence);
> +void evergreen_kms_blit_copy(struct radeon_device *rdev,
> +                            u64 src_gpu_addr, u64 dst_gpu_addr,
> +                            int size_bytes);
> +
>
>  #endif
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 6/7] radeon: kill r100_io_(r|w)reg
  2010-11-28 18:06 ` [PATCH 6/7] radeon: kill r100_io_(r|w)reg Daniel Vetter
@ 2010-11-29 15:40   ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2010-11-29 15:40 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel

On Sun, Nov 28, 2010 at 1:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Used in a macro with only a single call-site for each.
> IHMO that's a bit too much indirection. Fold them in.
>

I'd rather keep them separate in case we need to use them directly in
some other cases.  Plus it's more consistent with the other register
access routines.

Alex

> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/radeon/radeon.h        |   22 ----------------------
>  drivers/gpu/drm/radeon/radeon_device.c |   16 ++++++++++++----
>  2 files changed, 12 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 942f5f2..7afb08e 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1202,26 +1202,6 @@ static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32
>        }
>  }
>
> -static inline u32 r100_io_rreg(struct radeon_device *rdev, u32 reg)
> -{
> -       if (reg < rdev->rio_mem_size)
> -               return ioread32(rdev->rio_mem + reg);
> -       else {
> -               iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX);
> -               return ioread32(rdev->rio_mem + RADEON_MM_DATA);
> -       }
> -}
> -
> -static inline void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v)
> -{
> -       if (reg < rdev->rio_mem_size)
> -               iowrite32(v, rdev->rio_mem + reg);
> -       else {
> -               iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX);
> -               iowrite32(v, rdev->rio_mem + RADEON_MM_DATA);
> -       }
> -}
> -
>  /*
>  * Cast helper
>  */
> @@ -1260,8 +1240,6 @@ static inline void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v)
>                WREG32_PLL(reg, tmp_);                          \
>        } while (0)
>  #define DREG32_SYS(sqf, rdev, reg) seq_printf((sqf), #reg " : 0x%08X\n", r100_mm_rreg((rdev), (reg)))
> -#define RREG32_IO(reg) r100_io_rreg(rdev, (reg))
> -#define WREG32_IO(reg, v) r100_io_wreg(rdev, (reg), (v))
>
>  /*
>  * Indirect registers accessor
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 1f752ef..14c935c 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -496,16 +496,24 @@ static void cail_ioreg_write(struct card_info *info, uint32_t reg, uint32_t val)
>  {
>        struct radeon_device *rdev = info->dev->dev_private;
>
> -       WREG32_IO(reg*4, val);
> +       if (reg < rdev->rio_mem_size)
> +               iowrite32(val, rdev->rio_mem + reg);
> +       else {
> +               iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX);
> +               iowrite32(val, rdev->rio_mem + RADEON_MM_DATA);
> +       }
>  }
>
>  static uint32_t cail_ioreg_read(struct card_info *info, uint32_t reg)
>  {
>        struct radeon_device *rdev = info->dev->dev_private;
> -       uint32_t r;
>
> -       r = RREG32_IO(reg*4);
> -       return r;
> +       if (reg < rdev->rio_mem_size)
> +               return ioread32(rdev->rio_mem + reg);
> +       else {
> +               iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX);
> +               return ioread32(rdev->rio_mem + RADEON_MM_DATA);
> +       }
>  }
>
>  int radeon_atombios_init(struct radeon_device *rdev)
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 7/7] radeon: kill rdev->pciep_(r|w)reg
  2010-11-28 18:06 ` [PATCH 7/7] radeon: kill rdev->pciep_(r|w)reg Daniel Vetter
@ 2010-11-29 15:43   ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2010-11-29 15:43 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel

On Sun, Nov 28, 2010 at 1:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> pciep_wreg is totally unused, rreg has only one caller and
> already checks whether it's an r600 or later chip.
>

I'd rather keep this like it is for consistency with the other
register access routines and I have some patches in the pipeline that
use both the read and write methods.

Alex

> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/radeon/r300.c        |    3 ++-
>  drivers/gpu/drm/radeon/r600.c        |    8 --------
>  drivers/gpu/drm/radeon/radeon.h      |    4 ----
>  drivers/gpu/drm/radeon/radeon_asic.c |    6 ------
>  drivers/gpu/drm/radeon/radeon_asic.h |    1 -
>  5 files changed, 2 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
> index cde1d34..6def8d7 100644
> --- a/drivers/gpu/drm/radeon/r300.c
> +++ b/drivers/gpu/drm/radeon/r300.c
> @@ -561,7 +561,8 @@ int rv370_get_pcie_lanes(struct radeon_device *rdev)
>        if (rdev->family < CHIP_R600)
>                link_width_cntl = RREG32_PCIE(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
>        else
> -               link_width_cntl = RREG32_PCIE_P(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
> +               link_width_cntl = r600_pciep_rreg(rdev,
> +                                                 RADEON_PCIE_LC_LINK_WIDTH_CNTL);
>
>        switch ((link_width_cntl & RADEON_PCIE_LC_LINK_WIDTH_RD_MASK) >> RADEON_PCIE_LC_LINK_WIDTH_RD_SHIFT) {
>        case RADEON_PCIE_LC_LINK_WIDTH_X0:
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index b55ee28..a5114ff 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -1905,14 +1905,6 @@ u32 r600_pciep_rreg(struct radeon_device *rdev, u32 reg)
>        return r;
>  }
>
> -void r600_pciep_wreg(struct radeon_device *rdev, u32 reg, u32 v)
> -{
> -       WREG32(PCIE_PORT_INDEX, ((reg) & 0xff));
> -       (void)RREG32(PCIE_PORT_INDEX);
> -       WREG32(PCIE_PORT_DATA, (v));
> -       (void)RREG32(PCIE_PORT_DATA);
> -}
> -
>  /*
>  * CP & Ring
>  */
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 7afb08e..5fec64c 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1117,8 +1117,6 @@ struct radeon_device {
>        radeon_rreg_t                   pll_rreg;
>        radeon_wreg_t                   pll_wreg;
>        uint32_t                        pcie_reg_mask;
> -       radeon_rreg_t                   pciep_rreg;
> -       radeon_wreg_t                   pciep_wreg;
>        /* io port */
>        void __iomem                    *rio_mem;
>        resource_size_t                 rio_mem_size;
> @@ -1223,8 +1221,6 @@ static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32
>  #define WREG32_MC(reg, v) rdev->mc_wreg(rdev, (reg), (v))
>  #define RREG32_PCIE(reg) rv370_pcie_rreg(rdev, (reg))
>  #define WREG32_PCIE(reg, v) rv370_pcie_wreg(rdev, (reg), (v))
> -#define RREG32_PCIE_P(reg) rdev->pciep_rreg(rdev, (reg))
> -#define WREG32_PCIE_P(reg, v) rdev->pciep_wreg(rdev, (reg), (v))
>  #define WREG32_P(reg, val, mask)                               \
>        do {                                                    \
>                uint32_t tmp_ = RREG32(reg);                    \
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
> index 3d73fe4..668351c 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.c
> +++ b/drivers/gpu/drm/radeon/radeon_asic.c
> @@ -60,8 +60,6 @@ static void radeon_register_accessor_init(struct radeon_device *rdev)
>        rdev->mc_wreg = &radeon_invalid_wreg;
>        rdev->pll_rreg = &radeon_invalid_rreg;
>        rdev->pll_wreg = &radeon_invalid_wreg;
> -       rdev->pciep_rreg = &radeon_invalid_rreg;
> -       rdev->pciep_wreg = &radeon_invalid_wreg;
>
>        /* Don't change order as we are overridding accessor. */
>        if (rdev->family < CHIP_RV515) {
> @@ -94,10 +92,6 @@ static void radeon_register_accessor_init(struct radeon_device *rdev)
>                rdev->mc_rreg = &rs600_mc_rreg;
>                rdev->mc_wreg = &rs600_mc_wreg;
>        }
> -       if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_RV740)) {
> -               rdev->pciep_rreg = &r600_pciep_rreg;
> -               rdev->pciep_wreg = &r600_pciep_wreg;
> -       }
>  }
>
>
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
> index 8e75be1..bad4b88 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.h
> +++ b/drivers/gpu/drm/radeon/radeon_asic.h
> @@ -294,7 +294,6 @@ void r600_wb_fini(struct radeon_device *rdev);
>  void r600_cp_commit(struct radeon_device *rdev);
>  void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
>  uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg);
> -void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  int r600_cs_parse(struct radeon_cs_parser *p);
>  void r600_fence_ring_emit(struct radeon_device *rdev,
>                          struct radeon_fence *fence);
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, back to index

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
2010-11-28 18:06 ` [PATCH 1/7] radeon: consolidate asic-specific function decls for pre-r600 Daniel Vetter
2010-11-29 15:29   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 2/7] radeon: consolidate asic-specific function decls for r600 & later Daniel Vetter
2010-11-29 15:34   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 3/7] radeon: drop extern from function decls Daniel Vetter
2010-11-29 15:36   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 4/7] radeon: kill decls for inline functions Daniel Vetter
2010-11-29 15:37   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 5/7] radeon: move blit functions to radeon_asic.h Daniel Vetter
2010-11-29 15:37   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 6/7] radeon: kill r100_io_(r|w)reg Daniel Vetter
2010-11-29 15:40   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 7/7] radeon: kill rdev->pciep_(r|w)reg Daniel Vetter
2010-11-29 15:43   ` Alex Deucher

dri-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dri-devel/0 dri-devel/git/0.git
	git clone --mirror https://lore.kernel.org/dri-devel/1 dri-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dri-devel dri-devel/ https://lore.kernel.org/dri-devel \
		dri-devel@lists.freedesktop.org
	public-inbox-index dri-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.dri-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git