From patchwork Thu Mar 11 13:06:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 84896 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2BDpG0W007585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 11 Mar 2010 13:51:57 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Npilq-0005D5-LG; Thu, 11 Mar 2010 13:49:50 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Npi6W-00014P-A5 for dri-devel@lists.sourceforge.net; Thu, 11 Mar 2010 13:07:08 +0000 X-ACL-Warn: Received: from cable-static-49-187.intergga.ch ([157.161.49.187] helo=mail.ffwll.ch) by sfi-mx-3.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Npi6U-0003wR-Q4 for dri-devel@lists.sourceforge.net; Thu, 11 Mar 2010 13:07:08 +0000 Received: by mail.ffwll.ch (Postfix, from userid 1000) id 4035720C208; Thu, 11 Mar 2010 14:07:01 +0100 (CET) X-Spam-ASN: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on orange.ffwll.ch X-Spam-Level: X-Spam-Hammy: 0.000-+--HTo:D*sourceforge.net, 0.000-+--HTo:D*lists.sourceforge.net, 0.000-+--struct X-Spam-Status: No, score=-4.4 required=6.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Spammy: Received: from viiv.ffwll.ch (viiv.ffwll.ch [192.168.23.128]) by mail.ffwll.ch (Postfix) with ESMTP id 6AFC520C22B; Thu, 11 Mar 2010 14:06:25 +0100 (CET) Received: from daniel by viiv.ffwll.ch with local (Exim 4.71) (envelope-from ) id 1Npi5p-000057-6b; Thu, 11 Mar 2010 14:06:25 +0100 From: Daniel Vetter To: dri-devel@lists.sourceforge.net Subject: [PATCH 14/14] drm/radeon: include radeon_asic.h in .c Date: Thu, 11 Mar 2010 14:06:16 +0100 Message-Id: <1268312776-32615-15-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1268312776-32615-1-git-send-email-daniel.vetter@ffwll.ch> References: <1268312776-32615-1-git-send-email-daniel.vetter@ffwll.ch> X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1Npi6U-0003wR-Q4 X-Mailman-Approved-At: Thu, 11 Mar 2010 13:49:48 +0000 Cc: Daniel Vetter X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 11 Mar 2010 13:51:57 +0000 (UTC) diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 618006a..a016694 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -25,15 +25,13 @@ #include #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "radeon_drm.h" #include "rv770d.h" #include "atom.h" #include "avivod.h" #include "evergreen_reg.h" -static void evergreen_gpu_init(struct radeon_device *rdev); -void evergreen_fini(struct radeon_device *rdev); - bool evergreen_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd) { bool connected = false; @@ -766,14 +764,6 @@ void evergreen_fini(struct radeon_device *rdev) radeon_dummy_page_fini(rdev); } -void r600_vga_set_state(struct radeon_device *rdev, bool state); -void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); -int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); -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); -int r600_clear_surface_reg(struct radeon_device *rdev, int reg); - struct radeon_asic evergreen_asic = { .init = &evergreen_init, .fini = &evergreen_fini, diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index facf3d8..270fbdf 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -31,6 +31,7 @@ #include "radeon_drm.h" #include "radeon_reg.h" #include "radeon.h" +#include "radeon_asic.h" #include "r100d.h" #include "rs100d.h" #include "rv200d.h" diff --git a/drivers/gpu/drm/radeon/r200.c b/drivers/gpu/drm/radeon/r200.c index 7dfeab3..990142f 100644 --- a/drivers/gpu/drm/radeon/r200.c +++ b/drivers/gpu/drm/radeon/r200.c @@ -30,6 +30,7 @@ #include "radeon_drm.h" #include "radeon_reg.h" #include "radeon.h" +#include "radeon_asic.h" #include "r100d.h" #include "r200_reg_safe.h" @@ -508,40 +509,6 @@ void r200_set_safe_registers(struct radeon_device *rdev) rdev->config.r100.reg_safe_bm_size = ARRAY_SIZE(r200_reg_safe_bm); } -extern int r100_init(struct radeon_device *rdev); -extern void r100_fini(struct radeon_device *rdev); -extern int r100_suspend(struct radeon_device *rdev); -extern int r100_resume(struct radeon_device *rdev); -void r100_vga_set_state(struct radeon_device *rdev, bool state); -int r100_gpu_reset(struct radeon_device *rdev); -void r100_pci_gart_tlb_flush(struct radeon_device *rdev); -int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); -void r100_cp_commit(struct radeon_device *rdev); -void r100_ring_start(struct radeon_device *rdev); -int r100_ring_test(struct radeon_device *rdev); -void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); -int r100_irq_set(struct radeon_device *rdev); -int r100_irq_process(struct radeon_device *rdev); -u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); -void r100_fence_ring_emit(struct radeon_device *rdev, - struct radeon_fence *fence); -int r100_cs_parse(struct radeon_cs_parser *p); -int r100_copy_blit(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -int r100_set_surface_reg(struct radeon_device *rdev, int reg, - uint32_t tiling_flags, uint32_t pitch, - uint32_t offset, uint32_t obj_size); -int r100_clear_surface_reg(struct radeon_device *rdev, int reg); -void r100_bandwidth_update(struct radeon_device *rdev); -void r100_hpd_init(struct radeon_device *rdev); -void r100_hpd_fini(struct radeon_device *rdev); -bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); -void r100_hpd_set_polarity(struct radeon_device *rdev, - enum radeon_hpd_id hpd); - struct radeon_asic r200_asic = { .init = &r100_init, .fini = &r100_fini, diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 2592ba6..1f26c60 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c @@ -30,6 +30,7 @@ #include "drm.h" #include "radeon_reg.h" #include "radeon.h" +#include "radeon_asic.h" #include "radeon_drm.h" #include "r100_track.h" #include "r300d.h" @@ -1441,36 +1442,6 @@ int r300_init(struct radeon_device *rdev) return 0; } -void r100_vga_set_state(struct radeon_device *rdev, bool state); -void r100_pci_gart_tlb_flush(struct radeon_device *rdev); -int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); -void r100_cp_commit(struct radeon_device *rdev); -int r100_ring_test(struct radeon_device *rdev); -void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); -int r100_irq_set(struct radeon_device *rdev); -int r100_irq_process(struct radeon_device *rdev); -u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); -int r100_copy_blit(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -int r100_set_surface_reg(struct radeon_device *rdev, int reg, - uint32_t tiling_flags, uint32_t pitch, - uint32_t offset, uint32_t obj_size); -int r100_clear_surface_reg(struct radeon_device *rdev, int reg); -void r100_bandwidth_update(struct radeon_device *rdev); -void r100_hpd_init(struct radeon_device *rdev); -void r100_hpd_fini(struct radeon_device *rdev); -bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); -void r100_hpd_set_polarity(struct radeon_device *rdev, - enum radeon_hpd_id hpd); -extern int r200_copy_dma(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); - struct radeon_asic r300_asic = { .init = &r300_init, .fini = &r300_fini, diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c index 2488edb..ea1db1f 100644 --- a/drivers/gpu/drm/radeon/r420.c +++ b/drivers/gpu/drm/radeon/r420.c @@ -29,6 +29,7 @@ #include "drmP.h" #include "radeon_reg.h" #include "radeon.h" +#include "radeon_asic.h" #include "atom.h" #include "r100d.h" #include "r420d.h" @@ -418,43 +419,6 @@ int r420_debugfs_pipes_info_init(struct radeon_device *rdev) #endif } -void r100_vga_set_state(struct radeon_device *rdev, bool state); -void r100_cp_commit(struct radeon_device *rdev); -int r100_ring_test(struct radeon_device *rdev); -void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); -int r100_irq_set(struct radeon_device *rdev); -int r100_irq_process(struct radeon_device *rdev); -u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); -int r100_copy_blit(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -int r100_set_surface_reg(struct radeon_device *rdev, int reg, - uint32_t tiling_flags, uint32_t pitch, - uint32_t offset, uint32_t obj_size); -int r100_clear_surface_reg(struct radeon_device *rdev, int reg); -void r100_bandwidth_update(struct radeon_device *rdev); -void r100_hpd_init(struct radeon_device *rdev); -void r100_hpd_fini(struct radeon_device *rdev); -bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); -void r100_hpd_set_polarity(struct radeon_device *rdev, - enum radeon_hpd_id hpd); -extern int r200_copy_dma(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -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 void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); -extern int rv370_get_pcie_lanes(struct radeon_device *rdev); -extern int r300_gpu_reset(struct radeon_device *rdev); - struct radeon_asic r420_asic = { .init = &r420_init, .fini = &r420_fini, diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c index 554f667..fd445fe 100644 --- a/drivers/gpu/drm/radeon/r520.c +++ b/drivers/gpu/drm/radeon/r520.c @@ -27,6 +27,7 @@ */ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "atom.h" #include "r520d.h" @@ -310,45 +311,6 @@ int r520_init(struct radeon_device *rdev) return 0; } -void r100_vga_set_state(struct radeon_device *rdev, bool state); -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); -void r100_cp_commit(struct radeon_device *rdev); -void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); -int r100_ring_test(struct radeon_device *rdev); -int rs600_irq_set(struct radeon_device *rdev); -int rs600_irq_process(struct radeon_device *rdev); -u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); -extern void r300_fence_ring_emit(struct radeon_device *rdev, - struct radeon_fence *fence); -extern int r300_cs_parse(struct radeon_cs_parser *p); -int r100_copy_blit(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -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 r100_set_surface_reg(struct radeon_device *rdev, int reg, - uint32_t tiling_flags, uint32_t pitch, - uint32_t offset, uint32_t obj_size); -int r100_clear_surface_reg(struct radeon_device *rdev, int reg); -extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); -extern int rv370_get_pcie_lanes(struct radeon_device *rdev); -void rs600_hpd_init(struct radeon_device *rdev); -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); -void rv515_fini(struct radeon_device *rdev); -int rv515_suspend(struct radeon_device *rdev); -int rv515_gpu_reset(struct radeon_device *rdev); -void rv515_ring_start(struct radeon_device *rdev); -void rv515_bandwidth_update(struct radeon_device *rdev); - struct radeon_asic r520_asic = { .init = &r520_init, .fini = &rv515_fini, diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index c45bbcc..1db27e8 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -31,6 +31,7 @@ #include "drmP.h" #include "radeon_drm.h" #include "radeon.h" +#include "radeon_asic.h" #include "radeon_mode.h" #include "r600d.h" #include "atom.h" @@ -69,10 +70,7 @@ MODULE_FIRMWARE("radeon/R700_rlc.bin"); int r600_debugfs_mc_info_init(struct radeon_device *rdev); -/* r600,rv610,rv630,rv620,rv635,rv670 */ -int r600_mc_wait_for_idle(struct radeon_device *rdev); -void r600_gpu_init(struct radeon_device *rdev); -void r600_fini(struct radeon_device *rdev); +/* This file gathers functions for r600,rv610,rv630,rv620,rv635,rv670 */ /* hpd for digital panel detect/disconnect */ bool r600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd) @@ -2951,12 +2949,6 @@ void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo) WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1); } -extern int rv370_get_pcie_lanes(struct radeon_device *rdev); -void rv515_bandwidth_update(struct radeon_device *rdev); -int r600_cs_parse(struct radeon_cs_parser *p); -u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); -int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); - struct radeon_asic r600_asic = { .init = &r600_init, .fini = &r600_fini, diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 9187fd7..79a0f66 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -862,20 +862,6 @@ union radeon_asic_config { struct rv770_asic rv770; }; -/* WIP: Declarations from radeon_asic.h - * These will move back to radeon_asic.h as soon as it has morphed into - * a real header. */ -uint32_t radeon_legacy_get_engine_clock(struct radeon_device *rdev); -void radeon_legacy_set_engine_clock(struct radeon_device *rdev, uint32_t eng_clock); -uint32_t radeon_legacy_get_memory_clock(struct radeon_device *rdev); -void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable); - -uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev); -void radeon_atom_set_engine_clock(struct radeon_device *rdev, uint32_t eng_clock); -uint32_t radeon_atom_get_memory_clock(struct radeon_device *rdev); -void radeon_atom_set_memory_clock(struct radeon_device *rdev, uint32_t mem_clock); -void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable); - /* * IOCTL. */ diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 9a3bf44..0ddb2da 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h @@ -29,6 +29,20 @@ #define __RADEON_ASIC_H__ /* + * common functions + */ +uint32_t radeon_legacy_get_engine_clock(struct radeon_device *rdev); +void radeon_legacy_set_engine_clock(struct radeon_device *rdev, uint32_t eng_clock); +uint32_t radeon_legacy_get_memory_clock(struct radeon_device *rdev); +void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable); + +uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev); +void radeon_atom_set_engine_clock(struct radeon_device *rdev, uint32_t eng_clock); +uint32_t radeon_atom_get_memory_clock(struct radeon_device *rdev); +void radeon_atom_set_memory_clock(struct radeon_device *rdev, uint32_t mem_clock); +void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable); + +/* * r100,rv100,rs100,rv200,rs200 */ extern int r100_init(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index 4d5427a..db0c4f0 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c @@ -28,6 +28,7 @@ #include #include #include "radeon.h" +#include "radeon_asic.h" #include "rs400d.h" /* This files gather functions specifics to : rs400,rs480 */ @@ -537,40 +538,6 @@ int rs400_init(struct radeon_device *rdev) return 0; } -void r100_vga_set_state(struct radeon_device *rdev, bool state); -extern int r300_gpu_reset(struct radeon_device *rdev); -void r100_cp_commit(struct radeon_device *rdev); -void r300_ring_start(struct radeon_device *rdev); -int r100_irq_set(struct radeon_device *rdev); -void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); -int r100_irq_set(struct radeon_device *rdev); -int r100_irq_process(struct radeon_device *rdev); -u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); -extern void r300_fence_ring_emit(struct radeon_device *rdev, - struct radeon_fence *fence); -extern int r300_cs_parse(struct radeon_cs_parser *p); -int r100_copy_blit(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -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 r100_set_surface_reg(struct radeon_device *rdev, int reg, - uint32_t tiling_flags, uint32_t pitch, - uint32_t offset, uint32_t obj_size); -int r100_clear_surface_reg(struct radeon_device *rdev, int reg); -void r100_bandwidth_update(struct radeon_device *rdev); -void r100_hpd_init(struct radeon_device *rdev); -void r100_hpd_fini(struct radeon_device *rdev); -bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); -void r100_hpd_set_polarity(struct radeon_device *rdev, - enum radeon_hpd_id hpd); -int r100_ring_test(struct radeon_device *rdev); - struct radeon_asic rs400_asic = { .init = &rs400_init, .fini = &rs400_fini, diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index d3f75fd..d9ed2c5 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c @@ -37,14 +37,13 @@ */ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" +#include "radeon_asic.h" #include "atom.h" #include "rs600d.h" #include "rs600_reg_safe.h" -void rs600_gpu_init(struct radeon_device *rdev); -int rs600_mc_wait_for_idle(struct radeon_device *rdev); - /* hpd for digital panel detect/disconnect */ bool rs600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd) { @@ -682,31 +681,6 @@ int rs600_init(struct radeon_device *rdev) return 0; } -void r100_vga_set_state(struct radeon_device *rdev, bool state); -extern int r300_gpu_reset(struct radeon_device *rdev); -void r100_cp_commit(struct radeon_device *rdev); -void r300_ring_start(struct radeon_device *rdev); -void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); -u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); -extern void r300_fence_ring_emit(struct radeon_device *rdev, - struct radeon_fence *fence); -extern int r300_cs_parse(struct radeon_cs_parser *p); -int r100_copy_blit(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -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 r100_set_surface_reg(struct radeon_device *rdev, int reg, - uint32_t tiling_flags, uint32_t pitch, - uint32_t offset, uint32_t obj_size); -int r100_clear_surface_reg(struct radeon_device *rdev, int reg); -int r100_ring_test(struct radeon_device *rdev); - struct radeon_asic rs600_asic = { .init = &rs600_init, .fini = &rs600_fini, diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c index 5c84c0b..33e0c40 100644 --- a/drivers/gpu/drm/radeon/rs690.c +++ b/drivers/gpu/drm/radeon/rs690.c @@ -27,6 +27,7 @@ */ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "atom.h" #include "rs690d.h" @@ -742,40 +743,6 @@ int rs690_init(struct radeon_device *rdev) return 0; } -void r100_vga_set_state(struct radeon_device *rdev, bool state); -extern int r300_gpu_reset(struct radeon_device *rdev); -void r100_cp_commit(struct radeon_device *rdev); -void r300_ring_start(struct radeon_device *rdev); -void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); -extern void r300_fence_ring_emit(struct radeon_device *rdev, - struct radeon_fence *fence); -extern int r300_cs_parse(struct radeon_cs_parser *p); -int r100_copy_blit(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -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 r100_set_surface_reg(struct radeon_device *rdev, int reg, - uint32_t tiling_flags, uint32_t pitch, - uint32_t offset, uint32_t obj_size); -int r100_clear_surface_reg(struct radeon_device *rdev, int reg); -int r100_ring_test(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); -u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); -void rs600_hpd_init(struct radeon_device *rdev); -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); -int rs600_irq_set(struct radeon_device *rdev); -int rs600_irq_process(struct radeon_device *rdev); - struct radeon_asic rs690_asic = { .init = &rs690_init, .fini = &rs690_fini, diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c index a27494f..b3572cb 100644 --- a/drivers/gpu/drm/radeon/rv515.c +++ b/drivers/gpu/drm/radeon/rv515.c @@ -29,14 +29,13 @@ #include "drmP.h" #include "rv515d.h" #include "radeon.h" +#include "radeon_asic.h" #include "atom.h" #include "rv515_reg_safe.h" /* This files gather functions specifics to: rv515 */ int rv515_debugfs_pipes_info_init(struct radeon_device *rdev); int rv515_debugfs_ga_info_init(struct radeon_device *rdev); -void rv515_gpu_init(struct radeon_device *rdev); -int rv515_mc_wait_for_idle(struct radeon_device *rdev); void rv515_debugfs(struct radeon_device *rdev) { @@ -1183,40 +1182,6 @@ void rv515_bandwidth_update(struct radeon_device *rdev) rv515_bandwidth_avivo_update(rdev); } -void r100_vga_set_state(struct radeon_device *rdev, bool state); -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); -void r100_cp_commit(struct radeon_device *rdev); -void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); -int r100_ring_test(struct radeon_device *rdev); -int rs600_irq_set(struct radeon_device *rdev); -int rs600_irq_process(struct radeon_device *rdev); -u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); -extern void r300_fence_ring_emit(struct radeon_device *rdev, - struct radeon_fence *fence); -extern int r300_cs_parse(struct radeon_cs_parser *p); -int r100_copy_blit(struct radeon_device *rdev, - uint64_t src_offset, - uint64_t dst_offset, - unsigned num_pages, - struct radeon_fence *fence); -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 r100_set_surface_reg(struct radeon_device *rdev, int reg, - uint32_t tiling_flags, uint32_t pitch, - uint32_t offset, uint32_t obj_size); -int r100_clear_surface_reg(struct radeon_device *rdev, int reg); -extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); -extern int rv370_get_pcie_lanes(struct radeon_device *rdev); -void rs600_hpd_init(struct radeon_device *rdev); -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); - struct radeon_asic rv515_asic = { .init = &rv515_init, .fini = &rv515_fini, diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 309bc66..2afc76e 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c @@ -29,6 +29,7 @@ #include #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "radeon_drm.h" #include "rv770d.h" #include "atom.h" @@ -37,10 +38,6 @@ #define R700_PFP_UCODE_SIZE 848 #define R700_PM4_UCODE_SIZE 1360 -static void rv770_gpu_init(struct radeon_device *rdev); -void rv770_fini(struct radeon_device *rdev); - - /* * GART */ @@ -1166,34 +1163,6 @@ void rv770_fini(struct radeon_device *rdev) radeon_dummy_page_fini(rdev); } -void r600_cp_commit(struct radeon_device *rdev); -void r600_vga_set_state(struct radeon_device *rdev, bool state); -void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); -int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); -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, - uint64_t src_offset, uint64_t dst_offset, - unsigned num_pages, struct radeon_fence *fence); -int r600_irq_process(struct radeon_device *rdev); -int r600_irq_set(struct radeon_device *rdev); -u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); -void r600_fence_ring_emit(struct radeon_device *rdev, - struct radeon_fence *fence); -extern int rv370_get_pcie_lanes(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); -int r600_clear_surface_reg(struct radeon_device *rdev, int reg); -void rv515_bandwidth_update(struct radeon_device *rdev); -void r600_hpd_init(struct radeon_device *rdev); -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); -int r600_cs_parse(struct radeon_cs_parser *p); - struct radeon_asic rv770_asic = { .init = &rv770_init, .fini = &rv770_fini,