123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694 |
- /*
- * Copyright 2008 Advanced Micro Devices, Inc.
- * Copyright 2008 Red Hat Inc.
- * Copyright 2009 Jerome Glisse.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: Dave Airlie
- * Alex Deucher
- * Jerome Glisse
- */
- #include <linux/console.h>
- #include <drm/drmP.h>
- #include <drm/drm_crtc_helper.h>
- #include <drm/radeon_drm.h>
- #include <linux/vgaarb.h>
- #include "radeon_reg.h"
- #include "radeon.h"
- #include "radeon_asic.h"
- #include "atom.h"
- /*
- * Registers accessors functions.
- */
- /**
- * radeon_invalid_rreg - dummy reg read function
- *
- * @rdev: radeon device pointer
- * @reg: offset of register
- *
- * Dummy register read function. Used for register blocks
- * that certain asics don't have (all asics).
- * Returns the value in the register.
- */
- static uint32_t radeon_invalid_rreg(struct radeon_device *rdev, uint32_t reg)
- {
- DRM_ERROR("Invalid callback to read register 0x%04X\n", reg);
- BUG_ON(1);
- return 0;
- }
- /**
- * radeon_invalid_wreg - dummy reg write function
- *
- * @rdev: radeon device pointer
- * @reg: offset of register
- * @v: value to write to the register
- *
- * Dummy register read function. Used for register blocks
- * that certain asics don't have (all asics).
- */
- static void radeon_invalid_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
- {
- DRM_ERROR("Invalid callback to write register 0x%04X with 0x%08X\n",
- reg, v);
- BUG_ON(1);
- }
- /**
- * radeon_register_accessor_init - sets up the register accessor callbacks
- *
- * @rdev: radeon device pointer
- *
- * Sets up the register accessor callbacks for various register
- * apertures. Not all asics have all apertures (all asics).
- */
- static void radeon_register_accessor_init(struct radeon_device *rdev)
- {
- rdev->mc_rreg = &radeon_invalid_rreg;
- 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) {
- rdev->pcie_reg_mask = 0xff;
- } else {
- rdev->pcie_reg_mask = 0x7ff;
- }
- /* FIXME: not sure here */
- if (rdev->family <= CHIP_R580) {
- rdev->pll_rreg = &r100_pll_rreg;
- rdev->pll_wreg = &r100_pll_wreg;
- }
- if (rdev->family >= CHIP_R420) {
- rdev->mc_rreg = &r420_mc_rreg;
- rdev->mc_wreg = &r420_mc_wreg;
- }
- if (rdev->family >= CHIP_RV515) {
- rdev->mc_rreg = &rv515_mc_rreg;
- rdev->mc_wreg = &rv515_mc_wreg;
- }
- if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) {
- rdev->mc_rreg = &rs400_mc_rreg;
- rdev->mc_wreg = &rs400_mc_wreg;
- }
- if (rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) {
- rdev->mc_rreg = &rs690_mc_rreg;
- rdev->mc_wreg = &rs690_mc_wreg;
- }
- if (rdev->family == CHIP_RS600) {
- rdev->mc_rreg = &rs600_mc_rreg;
- rdev->mc_wreg = &rs600_mc_wreg;
- }
- if (rdev->family == CHIP_RS780 || rdev->family == CHIP_RS880) {
- rdev->mc_rreg = &rs780_mc_rreg;
- rdev->mc_wreg = &rs780_mc_wreg;
- }
- if (rdev->family >= CHIP_BONAIRE) {
- rdev->pciep_rreg = &cik_pciep_rreg;
- rdev->pciep_wreg = &cik_pciep_wreg;
- } else if (rdev->family >= CHIP_R600) {
- rdev->pciep_rreg = &r600_pciep_rreg;
- rdev->pciep_wreg = &r600_pciep_wreg;
- }
- }
- static int radeon_invalid_get_allowed_info_register(struct radeon_device *rdev,
- u32 reg, u32 *val)
- {
- return -EINVAL;
- }
- /* helper to disable agp */
- /**
- * radeon_agp_disable - AGP disable helper function
- *
- * @rdev: radeon device pointer
- *
- * Removes AGP flags and changes the gart callbacks on AGP
- * cards when using the internal gart rather than AGP (all asics).
- */
- void radeon_agp_disable(struct radeon_device *rdev)
- {
- rdev->flags &= ~RADEON_IS_AGP;
- if (rdev->family >= CHIP_R600) {
- DRM_INFO("Forcing AGP to PCIE mode\n");
- rdev->flags |= RADEON_IS_PCIE;
- } else if (rdev->family >= CHIP_RV515 ||
- rdev->family == CHIP_RV380 ||
- rdev->family == CHIP_RV410 ||
- rdev->family == CHIP_R423) {
- DRM_INFO("Forcing AGP to PCIE mode\n");
- rdev->flags |= RADEON_IS_PCIE;
- rdev->asic->gart.tlb_flush = &rv370_pcie_gart_tlb_flush;
- rdev->asic->gart.get_page_entry = &rv370_pcie_gart_get_page_entry;
- rdev->asic->gart.set_page = &rv370_pcie_gart_set_page;
- } else {
- DRM_INFO("Forcing AGP to PCI mode\n");
- rdev->flags |= RADEON_IS_PCI;
- rdev->asic->gart.tlb_flush = &r100_pci_gart_tlb_flush;
- rdev->asic->gart.get_page_entry = &r100_pci_gart_get_page_entry;
- rdev->asic->gart.set_page = &r100_pci_gart_set_page;
- }
- rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024;
- }
- /*
- * ASIC
- */
- static struct radeon_asic_ring r100_gfx_ring = {
- .ib_execute = &r100_ring_ib_execute,
- .emit_fence = &r100_fence_ring_emit,
- .emit_semaphore = &r100_semaphore_ring_emit,
- .cs_parse = &r100_cs_parse,
- .ring_start = &r100_ring_start,
- .ring_test = &r100_ring_test,
- .ib_test = &r100_ib_test,
- .is_lockup = &r100_gpu_is_lockup,
- .get_rptr = &r100_gfx_get_rptr,
- .get_wptr = &r100_gfx_get_wptr,
- .set_wptr = &r100_gfx_set_wptr,
- };
- static struct radeon_asic r100_asic = {
- .init = &r100_init,
- .fini = &r100_fini,
- .suspend = &r100_suspend,
- .resume = &r100_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &r100_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &r100_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &r100_pci_gart_tlb_flush,
- .get_page_entry = &r100_pci_gart_get_page_entry,
- .set_page = &r100_pci_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r100_gfx_ring
- },
- .irq = {
- .set = &r100_irq_set,
- .process = &r100_irq_process,
- },
- .display = {
- .bandwidth_update = &r100_bandwidth_update,
- .get_vblank_counter = &r100_get_vblank_counter,
- .wait_for_vblank = &r100_wait_for_vblank,
- .set_backlight_level = &radeon_legacy_set_backlight_level,
- .get_backlight_level = &radeon_legacy_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = NULL,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &r100_hpd_init,
- .fini = &r100_hpd_fini,
- .sense = &r100_hpd_sense,
- .set_polarity = &r100_hpd_set_polarity,
- },
- .pm = {
- .misc = &r100_pm_misc,
- .prepare = &r100_pm_prepare,
- .finish = &r100_pm_finish,
- .init_profile = &r100_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_legacy_get_engine_clock,
- .set_engine_clock = &radeon_legacy_set_engine_clock,
- .get_memory_clock = &radeon_legacy_get_memory_clock,
- .set_memory_clock = NULL,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = &radeon_legacy_set_clock_gating,
- },
- .pflip = {
- .page_flip = &r100_page_flip,
- .page_flip_pending = &r100_page_flip_pending,
- },
- };
- static struct radeon_asic r200_asic = {
- .init = &r100_init,
- .fini = &r100_fini,
- .suspend = &r100_suspend,
- .resume = &r100_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &r100_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &r100_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &r100_pci_gart_tlb_flush,
- .get_page_entry = &r100_pci_gart_get_page_entry,
- .set_page = &r100_pci_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r100_gfx_ring
- },
- .irq = {
- .set = &r100_irq_set,
- .process = &r100_irq_process,
- },
- .display = {
- .bandwidth_update = &r100_bandwidth_update,
- .get_vblank_counter = &r100_get_vblank_counter,
- .wait_for_vblank = &r100_wait_for_vblank,
- .set_backlight_level = &radeon_legacy_set_backlight_level,
- .get_backlight_level = &radeon_legacy_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &r100_hpd_init,
- .fini = &r100_hpd_fini,
- .sense = &r100_hpd_sense,
- .set_polarity = &r100_hpd_set_polarity,
- },
- .pm = {
- .misc = &r100_pm_misc,
- .prepare = &r100_pm_prepare,
- .finish = &r100_pm_finish,
- .init_profile = &r100_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_legacy_get_engine_clock,
- .set_engine_clock = &radeon_legacy_set_engine_clock,
- .get_memory_clock = &radeon_legacy_get_memory_clock,
- .set_memory_clock = NULL,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = &radeon_legacy_set_clock_gating,
- },
- .pflip = {
- .page_flip = &r100_page_flip,
- .page_flip_pending = &r100_page_flip_pending,
- },
- };
- static struct radeon_asic_ring r300_gfx_ring = {
- .ib_execute = &r100_ring_ib_execute,
- .emit_fence = &r300_fence_ring_emit,
- .emit_semaphore = &r100_semaphore_ring_emit,
- .cs_parse = &r300_cs_parse,
- .ring_start = &r300_ring_start,
- .ring_test = &r100_ring_test,
- .ib_test = &r100_ib_test,
- .is_lockup = &r100_gpu_is_lockup,
- .get_rptr = &r100_gfx_get_rptr,
- .get_wptr = &r100_gfx_get_wptr,
- .set_wptr = &r100_gfx_set_wptr,
- };
- static struct radeon_asic_ring rv515_gfx_ring = {
- .ib_execute = &r100_ring_ib_execute,
- .emit_fence = &r300_fence_ring_emit,
- .emit_semaphore = &r100_semaphore_ring_emit,
- .cs_parse = &r300_cs_parse,
- .ring_start = &rv515_ring_start,
- .ring_test = &r100_ring_test,
- .ib_test = &r100_ib_test,
- .is_lockup = &r100_gpu_is_lockup,
- .get_rptr = &r100_gfx_get_rptr,
- .get_wptr = &r100_gfx_get_wptr,
- .set_wptr = &r100_gfx_set_wptr,
- };
- static struct radeon_asic r300_asic = {
- .init = &r300_init,
- .fini = &r300_fini,
- .suspend = &r300_suspend,
- .resume = &r300_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &r300_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &r300_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &r100_pci_gart_tlb_flush,
- .get_page_entry = &r100_pci_gart_get_page_entry,
- .set_page = &r100_pci_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r300_gfx_ring
- },
- .irq = {
- .set = &r100_irq_set,
- .process = &r100_irq_process,
- },
- .display = {
- .bandwidth_update = &r100_bandwidth_update,
- .get_vblank_counter = &r100_get_vblank_counter,
- .wait_for_vblank = &r100_wait_for_vblank,
- .set_backlight_level = &radeon_legacy_set_backlight_level,
- .get_backlight_level = &radeon_legacy_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &r100_hpd_init,
- .fini = &r100_hpd_fini,
- .sense = &r100_hpd_sense,
- .set_polarity = &r100_hpd_set_polarity,
- },
- .pm = {
- .misc = &r100_pm_misc,
- .prepare = &r100_pm_prepare,
- .finish = &r100_pm_finish,
- .init_profile = &r100_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_legacy_get_engine_clock,
- .set_engine_clock = &radeon_legacy_set_engine_clock,
- .get_memory_clock = &radeon_legacy_get_memory_clock,
- .set_memory_clock = NULL,
- .get_pcie_lanes = &rv370_get_pcie_lanes,
- .set_pcie_lanes = &rv370_set_pcie_lanes,
- .set_clock_gating = &radeon_legacy_set_clock_gating,
- },
- .pflip = {
- .page_flip = &r100_page_flip,
- .page_flip_pending = &r100_page_flip_pending,
- },
- };
- static struct radeon_asic r300_asic_pcie = {
- .init = &r300_init,
- .fini = &r300_fini,
- .suspend = &r300_suspend,
- .resume = &r300_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &r300_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &r300_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &rv370_pcie_gart_tlb_flush,
- .get_page_entry = &rv370_pcie_gart_get_page_entry,
- .set_page = &rv370_pcie_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r300_gfx_ring
- },
- .irq = {
- .set = &r100_irq_set,
- .process = &r100_irq_process,
- },
- .display = {
- .bandwidth_update = &r100_bandwidth_update,
- .get_vblank_counter = &r100_get_vblank_counter,
- .wait_for_vblank = &r100_wait_for_vblank,
- .set_backlight_level = &radeon_legacy_set_backlight_level,
- .get_backlight_level = &radeon_legacy_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &r100_hpd_init,
- .fini = &r100_hpd_fini,
- .sense = &r100_hpd_sense,
- .set_polarity = &r100_hpd_set_polarity,
- },
- .pm = {
- .misc = &r100_pm_misc,
- .prepare = &r100_pm_prepare,
- .finish = &r100_pm_finish,
- .init_profile = &r100_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_legacy_get_engine_clock,
- .set_engine_clock = &radeon_legacy_set_engine_clock,
- .get_memory_clock = &radeon_legacy_get_memory_clock,
- .set_memory_clock = NULL,
- .get_pcie_lanes = &rv370_get_pcie_lanes,
- .set_pcie_lanes = &rv370_set_pcie_lanes,
- .set_clock_gating = &radeon_legacy_set_clock_gating,
- },
- .pflip = {
- .page_flip = &r100_page_flip,
- .page_flip_pending = &r100_page_flip_pending,
- },
- };
- static struct radeon_asic r420_asic = {
- .init = &r420_init,
- .fini = &r420_fini,
- .suspend = &r420_suspend,
- .resume = &r420_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &r300_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &r300_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &rv370_pcie_gart_tlb_flush,
- .get_page_entry = &rv370_pcie_gart_get_page_entry,
- .set_page = &rv370_pcie_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r300_gfx_ring
- },
- .irq = {
- .set = &r100_irq_set,
- .process = &r100_irq_process,
- },
- .display = {
- .bandwidth_update = &r100_bandwidth_update,
- .get_vblank_counter = &r100_get_vblank_counter,
- .wait_for_vblank = &r100_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &r100_hpd_init,
- .fini = &r100_hpd_fini,
- .sense = &r100_hpd_sense,
- .set_polarity = &r100_hpd_set_polarity,
- },
- .pm = {
- .misc = &r100_pm_misc,
- .prepare = &r100_pm_prepare,
- .finish = &r100_pm_finish,
- .init_profile = &r420_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &rv370_get_pcie_lanes,
- .set_pcie_lanes = &rv370_set_pcie_lanes,
- .set_clock_gating = &radeon_atom_set_clock_gating,
- },
- .pflip = {
- .page_flip = &r100_page_flip,
- .page_flip_pending = &r100_page_flip_pending,
- },
- };
- static struct radeon_asic rs400_asic = {
- .init = &rs400_init,
- .fini = &rs400_fini,
- .suspend = &rs400_suspend,
- .resume = &rs400_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &r300_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &rs400_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &rs400_gart_tlb_flush,
- .get_page_entry = &rs400_gart_get_page_entry,
- .set_page = &rs400_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r300_gfx_ring
- },
- .irq = {
- .set = &r100_irq_set,
- .process = &r100_irq_process,
- },
- .display = {
- .bandwidth_update = &r100_bandwidth_update,
- .get_vblank_counter = &r100_get_vblank_counter,
- .wait_for_vblank = &r100_wait_for_vblank,
- .set_backlight_level = &radeon_legacy_set_backlight_level,
- .get_backlight_level = &radeon_legacy_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &r100_hpd_init,
- .fini = &r100_hpd_fini,
- .sense = &r100_hpd_sense,
- .set_polarity = &r100_hpd_set_polarity,
- },
- .pm = {
- .misc = &r100_pm_misc,
- .prepare = &r100_pm_prepare,
- .finish = &r100_pm_finish,
- .init_profile = &r100_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_legacy_get_engine_clock,
- .set_engine_clock = &radeon_legacy_set_engine_clock,
- .get_memory_clock = &radeon_legacy_get_memory_clock,
- .set_memory_clock = NULL,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = &radeon_legacy_set_clock_gating,
- },
- .pflip = {
- .page_flip = &r100_page_flip,
- .page_flip_pending = &r100_page_flip_pending,
- },
- };
- static struct radeon_asic rs600_asic = {
- .init = &rs600_init,
- .fini = &rs600_fini,
- .suspend = &rs600_suspend,
- .resume = &rs600_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &rs600_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &rs600_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &rs600_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r300_gfx_ring
- },
- .irq = {
- .set = &rs600_irq_set,
- .process = &rs600_irq_process,
- },
- .display = {
- .bandwidth_update = &rs600_bandwidth_update,
- .get_vblank_counter = &rs600_get_vblank_counter,
- .wait_for_vblank = &avivo_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &rs600_hpd_init,
- .fini = &rs600_hpd_fini,
- .sense = &rs600_hpd_sense,
- .set_polarity = &rs600_hpd_set_polarity,
- },
- .pm = {
- .misc = &rs600_pm_misc,
- .prepare = &rs600_pm_prepare,
- .finish = &rs600_pm_finish,
- .init_profile = &r420_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = &radeon_atom_set_clock_gating,
- },
- .pflip = {
- .page_flip = &rs600_page_flip,
- .page_flip_pending = &rs600_page_flip_pending,
- },
- };
- static struct radeon_asic rs690_asic = {
- .init = &rs690_init,
- .fini = &rs690_fini,
- .suspend = &rs690_suspend,
- .resume = &rs690_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &rs600_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &rs690_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &rs400_gart_tlb_flush,
- .get_page_entry = &rs400_gart_get_page_entry,
- .set_page = &rs400_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r300_gfx_ring
- },
- .irq = {
- .set = &rs600_irq_set,
- .process = &rs600_irq_process,
- },
- .display = {
- .get_vblank_counter = &rs600_get_vblank_counter,
- .bandwidth_update = &rs690_bandwidth_update,
- .wait_for_vblank = &avivo_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r200_copy_dma,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &rs600_hpd_init,
- .fini = &rs600_hpd_fini,
- .sense = &rs600_hpd_sense,
- .set_polarity = &rs600_hpd_set_polarity,
- },
- .pm = {
- .misc = &rs600_pm_misc,
- .prepare = &rs600_pm_prepare,
- .finish = &rs600_pm_finish,
- .init_profile = &r420_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = &radeon_atom_set_clock_gating,
- },
- .pflip = {
- .page_flip = &rs600_page_flip,
- .page_flip_pending = &rs600_page_flip_pending,
- },
- };
- static struct radeon_asic rv515_asic = {
- .init = &rv515_init,
- .fini = &rv515_fini,
- .suspend = &rv515_suspend,
- .resume = &rv515_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &rs600_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &rv515_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &rv370_pcie_gart_tlb_flush,
- .get_page_entry = &rv370_pcie_gart_get_page_entry,
- .set_page = &rv370_pcie_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &rv515_gfx_ring
- },
- .irq = {
- .set = &rs600_irq_set,
- .process = &rs600_irq_process,
- },
- .display = {
- .get_vblank_counter = &rs600_get_vblank_counter,
- .bandwidth_update = &rv515_bandwidth_update,
- .wait_for_vblank = &avivo_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &rs600_hpd_init,
- .fini = &rs600_hpd_fini,
- .sense = &rs600_hpd_sense,
- .set_polarity = &rs600_hpd_set_polarity,
- },
- .pm = {
- .misc = &rs600_pm_misc,
- .prepare = &rs600_pm_prepare,
- .finish = &rs600_pm_finish,
- .init_profile = &r420_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &rv370_get_pcie_lanes,
- .set_pcie_lanes = &rv370_set_pcie_lanes,
- .set_clock_gating = &radeon_atom_set_clock_gating,
- },
- .pflip = {
- .page_flip = &rs600_page_flip,
- .page_flip_pending = &rs600_page_flip_pending,
- },
- };
- static struct radeon_asic r520_asic = {
- .init = &r520_init,
- .fini = &rv515_fini,
- .suspend = &rv515_suspend,
- .resume = &r520_resume,
- .vga_set_state = &r100_vga_set_state,
- .asic_reset = &rs600_asic_reset,
- .mmio_hdp_flush = NULL,
- .gui_idle = &r100_gui_idle,
- .mc_wait_for_idle = &r520_mc_wait_for_idle,
- .get_allowed_info_register = radeon_invalid_get_allowed_info_register,
- .gart = {
- .tlb_flush = &rv370_pcie_gart_tlb_flush,
- .get_page_entry = &rv370_pcie_gart_get_page_entry,
- .set_page = &rv370_pcie_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &rv515_gfx_ring
- },
- .irq = {
- .set = &rs600_irq_set,
- .process = &rs600_irq_process,
- },
- .display = {
- .bandwidth_update = &rv515_bandwidth_update,
- .get_vblank_counter = &rs600_get_vblank_counter,
- .wait_for_vblank = &avivo_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r100_copy_blit,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r200_copy_dma,
- .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .copy = &r100_copy_blit,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r100_set_surface_reg,
- .clear_reg = r100_clear_surface_reg,
- },
- .hpd = {
- .init = &rs600_hpd_init,
- .fini = &rs600_hpd_fini,
- .sense = &rs600_hpd_sense,
- .set_polarity = &rs600_hpd_set_polarity,
- },
- .pm = {
- .misc = &rs600_pm_misc,
- .prepare = &rs600_pm_prepare,
- .finish = &rs600_pm_finish,
- .init_profile = &r420_pm_init_profile,
- .get_dynpm_state = &r100_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &rv370_get_pcie_lanes,
- .set_pcie_lanes = &rv370_set_pcie_lanes,
- .set_clock_gating = &radeon_atom_set_clock_gating,
- },
- .pflip = {
- .page_flip = &rs600_page_flip,
- .page_flip_pending = &rs600_page_flip_pending,
- },
- };
- static struct radeon_asic_ring r600_gfx_ring = {
- .ib_execute = &r600_ring_ib_execute,
- .emit_fence = &r600_fence_ring_emit,
- .emit_semaphore = &r600_semaphore_ring_emit,
- .cs_parse = &r600_cs_parse,
- .ring_test = &r600_ring_test,
- .ib_test = &r600_ib_test,
- .is_lockup = &r600_gfx_is_lockup,
- .get_rptr = &r600_gfx_get_rptr,
- .get_wptr = &r600_gfx_get_wptr,
- .set_wptr = &r600_gfx_set_wptr,
- };
- static struct radeon_asic_ring r600_dma_ring = {
- .ib_execute = &r600_dma_ring_ib_execute,
- .emit_fence = &r600_dma_fence_ring_emit,
- .emit_semaphore = &r600_dma_semaphore_ring_emit,
- .cs_parse = &r600_dma_cs_parse,
- .ring_test = &r600_dma_ring_test,
- .ib_test = &r600_dma_ib_test,
- .is_lockup = &r600_dma_is_lockup,
- .get_rptr = &r600_dma_get_rptr,
- .get_wptr = &r600_dma_get_wptr,
- .set_wptr = &r600_dma_set_wptr,
- };
- static struct radeon_asic r600_asic = {
- .init = &r600_init,
- .fini = &r600_fini,
- .suspend = &r600_suspend,
- .resume = &r600_resume,
- .vga_set_state = &r600_vga_set_state,
- .asic_reset = &r600_asic_reset,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &r600_mc_wait_for_idle,
- .get_xclk = &r600_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = r600_get_allowed_info_register,
- .gart = {
- .tlb_flush = &r600_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r600_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &r600_dma_ring,
- },
- .irq = {
- .set = &r600_irq_set,
- .process = &r600_irq_process,
- },
- .display = {
- .bandwidth_update = &rv515_bandwidth_update,
- .get_vblank_counter = &rs600_get_vblank_counter,
- .wait_for_vblank = &avivo_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r600_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &r600_copy_cpdma,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &r600_hpd_init,
- .fini = &r600_hpd_fini,
- .sense = &r600_hpd_sense,
- .set_polarity = &r600_hpd_set_polarity,
- },
- .pm = {
- .misc = &r600_pm_misc,
- .prepare = &rs600_pm_prepare,
- .finish = &rs600_pm_finish,
- .init_profile = &r600_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &r600_get_pcie_lanes,
- .set_pcie_lanes = &r600_set_pcie_lanes,
- .set_clock_gating = NULL,
- .get_temperature = &rv6xx_get_temp,
- },
- .pflip = {
- .page_flip = &rs600_page_flip,
- .page_flip_pending = &rs600_page_flip_pending,
- },
- };
- static struct radeon_asic_ring rv6xx_uvd_ring = {
- .ib_execute = &uvd_v1_0_ib_execute,
- .emit_fence = &uvd_v1_0_fence_emit,
- .emit_semaphore = &uvd_v1_0_semaphore_emit,
- .cs_parse = &radeon_uvd_cs_parse,
- .ring_test = &uvd_v1_0_ring_test,
- .ib_test = &uvd_v1_0_ib_test,
- .is_lockup = &radeon_ring_test_lockup,
- .get_rptr = &uvd_v1_0_get_rptr,
- .get_wptr = &uvd_v1_0_get_wptr,
- .set_wptr = &uvd_v1_0_set_wptr,
- };
- static struct radeon_asic rv6xx_asic = {
- .init = &r600_init,
- .fini = &r600_fini,
- .suspend = &r600_suspend,
- .resume = &r600_resume,
- .vga_set_state = &r600_vga_set_state,
- .asic_reset = &r600_asic_reset,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &r600_mc_wait_for_idle,
- .get_xclk = &r600_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = r600_get_allowed_info_register,
- .gart = {
- .tlb_flush = &r600_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r600_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &r600_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &rv6xx_uvd_ring,
- },
- .irq = {
- .set = &r600_irq_set,
- .process = &r600_irq_process,
- },
- .display = {
- .bandwidth_update = &rv515_bandwidth_update,
- .get_vblank_counter = &rs600_get_vblank_counter,
- .wait_for_vblank = &avivo_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r600_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &r600_copy_cpdma,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &r600_hpd_init,
- .fini = &r600_hpd_fini,
- .sense = &r600_hpd_sense,
- .set_polarity = &r600_hpd_set_polarity,
- },
- .pm = {
- .misc = &r600_pm_misc,
- .prepare = &rs600_pm_prepare,
- .finish = &rs600_pm_finish,
- .init_profile = &r600_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &r600_get_pcie_lanes,
- .set_pcie_lanes = &r600_set_pcie_lanes,
- .set_clock_gating = NULL,
- .get_temperature = &rv6xx_get_temp,
- .set_uvd_clocks = &r600_set_uvd_clocks,
- },
- .dpm = {
- .init = &rv6xx_dpm_init,
- .setup_asic = &rv6xx_setup_asic,
- .enable = &rv6xx_dpm_enable,
- .late_enable = &r600_dpm_late_enable,
- .disable = &rv6xx_dpm_disable,
- .pre_set_power_state = &r600_dpm_pre_set_power_state,
- .set_power_state = &rv6xx_dpm_set_power_state,
- .post_set_power_state = &r600_dpm_post_set_power_state,
- .display_configuration_changed = &rv6xx_dpm_display_configuration_changed,
- .fini = &rv6xx_dpm_fini,
- .get_sclk = &rv6xx_dpm_get_sclk,
- .get_mclk = &rv6xx_dpm_get_mclk,
- .print_power_state = &rv6xx_dpm_print_power_state,
- .debugfs_print_current_performance_level = &rv6xx_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &rv6xx_dpm_force_performance_level,
- .get_current_sclk = &rv6xx_dpm_get_current_sclk,
- .get_current_mclk = &rv6xx_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &rs600_page_flip,
- .page_flip_pending = &rs600_page_flip_pending,
- },
- };
- static struct radeon_asic rs780_asic = {
- .init = &r600_init,
- .fini = &r600_fini,
- .suspend = &r600_suspend,
- .resume = &r600_resume,
- .vga_set_state = &r600_vga_set_state,
- .asic_reset = &r600_asic_reset,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &r600_mc_wait_for_idle,
- .get_xclk = &r600_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = r600_get_allowed_info_register,
- .gart = {
- .tlb_flush = &r600_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r600_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &r600_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &rv6xx_uvd_ring,
- },
- .irq = {
- .set = &r600_irq_set,
- .process = &r600_irq_process,
- },
- .display = {
- .bandwidth_update = &rs690_bandwidth_update,
- .get_vblank_counter = &rs600_get_vblank_counter,
- .wait_for_vblank = &avivo_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &r600_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &r600_copy_cpdma,
- .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &r600_hpd_init,
- .fini = &r600_hpd_fini,
- .sense = &r600_hpd_sense,
- .set_polarity = &r600_hpd_set_polarity,
- },
- .pm = {
- .misc = &r600_pm_misc,
- .prepare = &rs600_pm_prepare,
- .finish = &rs600_pm_finish,
- .init_profile = &rs780_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = NULL,
- .set_memory_clock = NULL,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = NULL,
- .get_temperature = &rv6xx_get_temp,
- .set_uvd_clocks = &r600_set_uvd_clocks,
- },
- .dpm = {
- .init = &rs780_dpm_init,
- .setup_asic = &rs780_dpm_setup_asic,
- .enable = &rs780_dpm_enable,
- .late_enable = &r600_dpm_late_enable,
- .disable = &rs780_dpm_disable,
- .pre_set_power_state = &r600_dpm_pre_set_power_state,
- .set_power_state = &rs780_dpm_set_power_state,
- .post_set_power_state = &r600_dpm_post_set_power_state,
- .display_configuration_changed = &rs780_dpm_display_configuration_changed,
- .fini = &rs780_dpm_fini,
- .get_sclk = &rs780_dpm_get_sclk,
- .get_mclk = &rs780_dpm_get_mclk,
- .print_power_state = &rs780_dpm_print_power_state,
- .debugfs_print_current_performance_level = &rs780_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &rs780_dpm_force_performance_level,
- .get_current_sclk = &rs780_dpm_get_current_sclk,
- .get_current_mclk = &rs780_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &rs600_page_flip,
- .page_flip_pending = &rs600_page_flip_pending,
- },
- };
- static struct radeon_asic_ring rv770_uvd_ring = {
- .ib_execute = &uvd_v1_0_ib_execute,
- .emit_fence = &uvd_v2_2_fence_emit,
- .emit_semaphore = &uvd_v2_2_semaphore_emit,
- .cs_parse = &radeon_uvd_cs_parse,
- .ring_test = &uvd_v1_0_ring_test,
- .ib_test = &uvd_v1_0_ib_test,
- .is_lockup = &radeon_ring_test_lockup,
- .get_rptr = &uvd_v1_0_get_rptr,
- .get_wptr = &uvd_v1_0_get_wptr,
- .set_wptr = &uvd_v1_0_set_wptr,
- };
- static struct radeon_asic rv770_asic = {
- .init = &rv770_init,
- .fini = &rv770_fini,
- .suspend = &rv770_suspend,
- .resume = &rv770_resume,
- .asic_reset = &r600_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &r600_mc_wait_for_idle,
- .get_xclk = &rv770_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = r600_get_allowed_info_register,
- .gart = {
- .tlb_flush = &r600_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &r600_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &r600_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &rv770_uvd_ring,
- },
- .irq = {
- .set = &r600_irq_set,
- .process = &r600_irq_process,
- },
- .display = {
- .bandwidth_update = &rv515_bandwidth_update,
- .get_vblank_counter = &rs600_get_vblank_counter,
- .wait_for_vblank = &avivo_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &rv770_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &rv770_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &r600_hpd_init,
- .fini = &r600_hpd_fini,
- .sense = &r600_hpd_sense,
- .set_polarity = &r600_hpd_set_polarity,
- },
- .pm = {
- .misc = &rv770_pm_misc,
- .prepare = &rs600_pm_prepare,
- .finish = &rs600_pm_finish,
- .init_profile = &r600_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &r600_get_pcie_lanes,
- .set_pcie_lanes = &r600_set_pcie_lanes,
- .set_clock_gating = &radeon_atom_set_clock_gating,
- .set_uvd_clocks = &rv770_set_uvd_clocks,
- .get_temperature = &rv770_get_temp,
- },
- .dpm = {
- .init = &rv770_dpm_init,
- .setup_asic = &rv770_dpm_setup_asic,
- .enable = &rv770_dpm_enable,
- .late_enable = &rv770_dpm_late_enable,
- .disable = &rv770_dpm_disable,
- .pre_set_power_state = &r600_dpm_pre_set_power_state,
- .set_power_state = &rv770_dpm_set_power_state,
- .post_set_power_state = &r600_dpm_post_set_power_state,
- .display_configuration_changed = &rv770_dpm_display_configuration_changed,
- .fini = &rv770_dpm_fini,
- .get_sclk = &rv770_dpm_get_sclk,
- .get_mclk = &rv770_dpm_get_mclk,
- .print_power_state = &rv770_dpm_print_power_state,
- .debugfs_print_current_performance_level = &rv770_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &rv770_dpm_force_performance_level,
- .vblank_too_short = &rv770_dpm_vblank_too_short,
- .get_current_sclk = &rv770_dpm_get_current_sclk,
- .get_current_mclk = &rv770_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &rv770_page_flip,
- .page_flip_pending = &rv770_page_flip_pending,
- },
- };
- static struct radeon_asic_ring evergreen_gfx_ring = {
- .ib_execute = &evergreen_ring_ib_execute,
- .emit_fence = &r600_fence_ring_emit,
- .emit_semaphore = &r600_semaphore_ring_emit,
- .cs_parse = &evergreen_cs_parse,
- .ring_test = &r600_ring_test,
- .ib_test = &r600_ib_test,
- .is_lockup = &evergreen_gfx_is_lockup,
- .get_rptr = &r600_gfx_get_rptr,
- .get_wptr = &r600_gfx_get_wptr,
- .set_wptr = &r600_gfx_set_wptr,
- };
- static struct radeon_asic_ring evergreen_dma_ring = {
- .ib_execute = &evergreen_dma_ring_ib_execute,
- .emit_fence = &evergreen_dma_fence_ring_emit,
- .emit_semaphore = &r600_dma_semaphore_ring_emit,
- .cs_parse = &evergreen_dma_cs_parse,
- .ring_test = &r600_dma_ring_test,
- .ib_test = &r600_dma_ib_test,
- .is_lockup = &evergreen_dma_is_lockup,
- .get_rptr = &r600_dma_get_rptr,
- .get_wptr = &r600_dma_get_wptr,
- .set_wptr = &r600_dma_set_wptr,
- };
- static struct radeon_asic evergreen_asic = {
- .init = &evergreen_init,
- .fini = &evergreen_fini,
- .suspend = &evergreen_suspend,
- .resume = &evergreen_resume,
- .asic_reset = &evergreen_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
- .get_xclk = &rv770_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = evergreen_get_allowed_info_register,
- .gart = {
- .tlb_flush = &evergreen_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &evergreen_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &evergreen_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &rv770_uvd_ring,
- },
- .irq = {
- .set = &evergreen_irq_set,
- .process = &evergreen_irq_process,
- },
- .display = {
- .bandwidth_update = &evergreen_bandwidth_update,
- .get_vblank_counter = &evergreen_get_vblank_counter,
- .wait_for_vblank = &dce4_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &evergreen_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &evergreen_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &evergreen_hpd_init,
- .fini = &evergreen_hpd_fini,
- .sense = &evergreen_hpd_sense,
- .set_polarity = &evergreen_hpd_set_polarity,
- },
- .pm = {
- .misc = &evergreen_pm_misc,
- .prepare = &evergreen_pm_prepare,
- .finish = &evergreen_pm_finish,
- .init_profile = &r600_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &r600_get_pcie_lanes,
- .set_pcie_lanes = &r600_set_pcie_lanes,
- .set_clock_gating = NULL,
- .set_uvd_clocks = &evergreen_set_uvd_clocks,
- .get_temperature = &evergreen_get_temp,
- },
- .dpm = {
- .init = &cypress_dpm_init,
- .setup_asic = &cypress_dpm_setup_asic,
- .enable = &cypress_dpm_enable,
- .late_enable = &rv770_dpm_late_enable,
- .disable = &cypress_dpm_disable,
- .pre_set_power_state = &r600_dpm_pre_set_power_state,
- .set_power_state = &cypress_dpm_set_power_state,
- .post_set_power_state = &r600_dpm_post_set_power_state,
- .display_configuration_changed = &cypress_dpm_display_configuration_changed,
- .fini = &cypress_dpm_fini,
- .get_sclk = &rv770_dpm_get_sclk,
- .get_mclk = &rv770_dpm_get_mclk,
- .print_power_state = &rv770_dpm_print_power_state,
- .debugfs_print_current_performance_level = &rv770_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &rv770_dpm_force_performance_level,
- .vblank_too_short = &cypress_dpm_vblank_too_short,
- .get_current_sclk = &rv770_dpm_get_current_sclk,
- .get_current_mclk = &rv770_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &evergreen_page_flip,
- .page_flip_pending = &evergreen_page_flip_pending,
- },
- };
- static struct radeon_asic sumo_asic = {
- .init = &evergreen_init,
- .fini = &evergreen_fini,
- .suspend = &evergreen_suspend,
- .resume = &evergreen_resume,
- .asic_reset = &evergreen_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
- .get_xclk = &r600_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = evergreen_get_allowed_info_register,
- .gart = {
- .tlb_flush = &evergreen_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &evergreen_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &evergreen_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &rv770_uvd_ring,
- },
- .irq = {
- .set = &evergreen_irq_set,
- .process = &evergreen_irq_process,
- },
- .display = {
- .bandwidth_update = &evergreen_bandwidth_update,
- .get_vblank_counter = &evergreen_get_vblank_counter,
- .wait_for_vblank = &dce4_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &evergreen_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &evergreen_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &evergreen_hpd_init,
- .fini = &evergreen_hpd_fini,
- .sense = &evergreen_hpd_sense,
- .set_polarity = &evergreen_hpd_set_polarity,
- },
- .pm = {
- .misc = &evergreen_pm_misc,
- .prepare = &evergreen_pm_prepare,
- .finish = &evergreen_pm_finish,
- .init_profile = &sumo_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = NULL,
- .set_memory_clock = NULL,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = NULL,
- .set_uvd_clocks = &sumo_set_uvd_clocks,
- .get_temperature = &sumo_get_temp,
- },
- .dpm = {
- .init = &sumo_dpm_init,
- .setup_asic = &sumo_dpm_setup_asic,
- .enable = &sumo_dpm_enable,
- .late_enable = &sumo_dpm_late_enable,
- .disable = &sumo_dpm_disable,
- .pre_set_power_state = &sumo_dpm_pre_set_power_state,
- .set_power_state = &sumo_dpm_set_power_state,
- .post_set_power_state = &sumo_dpm_post_set_power_state,
- .display_configuration_changed = &sumo_dpm_display_configuration_changed,
- .fini = &sumo_dpm_fini,
- .get_sclk = &sumo_dpm_get_sclk,
- .get_mclk = &sumo_dpm_get_mclk,
- .print_power_state = &sumo_dpm_print_power_state,
- .debugfs_print_current_performance_level = &sumo_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &sumo_dpm_force_performance_level,
- .get_current_sclk = &sumo_dpm_get_current_sclk,
- .get_current_mclk = &sumo_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &evergreen_page_flip,
- .page_flip_pending = &evergreen_page_flip_pending,
- },
- };
- static struct radeon_asic btc_asic = {
- .init = &evergreen_init,
- .fini = &evergreen_fini,
- .suspend = &evergreen_suspend,
- .resume = &evergreen_resume,
- .asic_reset = &evergreen_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
- .get_xclk = &rv770_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = evergreen_get_allowed_info_register,
- .gart = {
- .tlb_flush = &evergreen_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &evergreen_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &evergreen_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &rv770_uvd_ring,
- },
- .irq = {
- .set = &evergreen_irq_set,
- .process = &evergreen_irq_process,
- },
- .display = {
- .bandwidth_update = &evergreen_bandwidth_update,
- .get_vblank_counter = &evergreen_get_vblank_counter,
- .wait_for_vblank = &dce4_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &evergreen_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &evergreen_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &evergreen_hpd_init,
- .fini = &evergreen_hpd_fini,
- .sense = &evergreen_hpd_sense,
- .set_polarity = &evergreen_hpd_set_polarity,
- },
- .pm = {
- .misc = &evergreen_pm_misc,
- .prepare = &evergreen_pm_prepare,
- .finish = &evergreen_pm_finish,
- .init_profile = &btc_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &r600_get_pcie_lanes,
- .set_pcie_lanes = &r600_set_pcie_lanes,
- .set_clock_gating = NULL,
- .set_uvd_clocks = &evergreen_set_uvd_clocks,
- .get_temperature = &evergreen_get_temp,
- },
- .dpm = {
- .init = &btc_dpm_init,
- .setup_asic = &btc_dpm_setup_asic,
- .enable = &btc_dpm_enable,
- .late_enable = &rv770_dpm_late_enable,
- .disable = &btc_dpm_disable,
- .pre_set_power_state = &btc_dpm_pre_set_power_state,
- .set_power_state = &btc_dpm_set_power_state,
- .post_set_power_state = &btc_dpm_post_set_power_state,
- .display_configuration_changed = &cypress_dpm_display_configuration_changed,
- .fini = &btc_dpm_fini,
- .get_sclk = &btc_dpm_get_sclk,
- .get_mclk = &btc_dpm_get_mclk,
- .print_power_state = &rv770_dpm_print_power_state,
- .debugfs_print_current_performance_level = &btc_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &rv770_dpm_force_performance_level,
- .vblank_too_short = &btc_dpm_vblank_too_short,
- .get_current_sclk = &btc_dpm_get_current_sclk,
- .get_current_mclk = &btc_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &evergreen_page_flip,
- .page_flip_pending = &evergreen_page_flip_pending,
- },
- };
- static struct radeon_asic_ring cayman_gfx_ring = {
- .ib_execute = &cayman_ring_ib_execute,
- .ib_parse = &evergreen_ib_parse,
- .emit_fence = &cayman_fence_ring_emit,
- .emit_semaphore = &r600_semaphore_ring_emit,
- .cs_parse = &evergreen_cs_parse,
- .ring_test = &r600_ring_test,
- .ib_test = &r600_ib_test,
- .is_lockup = &cayman_gfx_is_lockup,
- .vm_flush = &cayman_vm_flush,
- .get_rptr = &cayman_gfx_get_rptr,
- .get_wptr = &cayman_gfx_get_wptr,
- .set_wptr = &cayman_gfx_set_wptr,
- };
- static struct radeon_asic_ring cayman_dma_ring = {
- .ib_execute = &cayman_dma_ring_ib_execute,
- .ib_parse = &evergreen_dma_ib_parse,
- .emit_fence = &evergreen_dma_fence_ring_emit,
- .emit_semaphore = &r600_dma_semaphore_ring_emit,
- .cs_parse = &evergreen_dma_cs_parse,
- .ring_test = &r600_dma_ring_test,
- .ib_test = &r600_dma_ib_test,
- .is_lockup = &cayman_dma_is_lockup,
- .vm_flush = &cayman_dma_vm_flush,
- .get_rptr = &cayman_dma_get_rptr,
- .get_wptr = &cayman_dma_get_wptr,
- .set_wptr = &cayman_dma_set_wptr
- };
- static struct radeon_asic_ring cayman_uvd_ring = {
- .ib_execute = &uvd_v1_0_ib_execute,
- .emit_fence = &uvd_v2_2_fence_emit,
- .emit_semaphore = &uvd_v3_1_semaphore_emit,
- .cs_parse = &radeon_uvd_cs_parse,
- .ring_test = &uvd_v1_0_ring_test,
- .ib_test = &uvd_v1_0_ib_test,
- .is_lockup = &radeon_ring_test_lockup,
- .get_rptr = &uvd_v1_0_get_rptr,
- .get_wptr = &uvd_v1_0_get_wptr,
- .set_wptr = &uvd_v1_0_set_wptr,
- };
- static struct radeon_asic cayman_asic = {
- .init = &cayman_init,
- .fini = &cayman_fini,
- .suspend = &cayman_suspend,
- .resume = &cayman_resume,
- .asic_reset = &cayman_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
- .get_xclk = &rv770_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = cayman_get_allowed_info_register,
- .gart = {
- .tlb_flush = &cayman_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .vm = {
- .init = &cayman_vm_init,
- .fini = &cayman_vm_fini,
- .copy_pages = &cayman_dma_vm_copy_pages,
- .write_pages = &cayman_dma_vm_write_pages,
- .set_pages = &cayman_dma_vm_set_pages,
- .pad_ib = &cayman_dma_vm_pad_ib,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &cayman_gfx_ring,
- [CAYMAN_RING_TYPE_CP1_INDEX] = &cayman_gfx_ring,
- [CAYMAN_RING_TYPE_CP2_INDEX] = &cayman_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &cayman_dma_ring,
- [CAYMAN_RING_TYPE_DMA1_INDEX] = &cayman_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &cayman_uvd_ring,
- },
- .irq = {
- .set = &evergreen_irq_set,
- .process = &evergreen_irq_process,
- },
- .display = {
- .bandwidth_update = &evergreen_bandwidth_update,
- .get_vblank_counter = &evergreen_get_vblank_counter,
- .wait_for_vblank = &dce4_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &evergreen_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &evergreen_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &evergreen_hpd_init,
- .fini = &evergreen_hpd_fini,
- .sense = &evergreen_hpd_sense,
- .set_polarity = &evergreen_hpd_set_polarity,
- },
- .pm = {
- .misc = &evergreen_pm_misc,
- .prepare = &evergreen_pm_prepare,
- .finish = &evergreen_pm_finish,
- .init_profile = &btc_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &r600_get_pcie_lanes,
- .set_pcie_lanes = &r600_set_pcie_lanes,
- .set_clock_gating = NULL,
- .set_uvd_clocks = &evergreen_set_uvd_clocks,
- .get_temperature = &evergreen_get_temp,
- },
- .dpm = {
- .init = &ni_dpm_init,
- .setup_asic = &ni_dpm_setup_asic,
- .enable = &ni_dpm_enable,
- .late_enable = &rv770_dpm_late_enable,
- .disable = &ni_dpm_disable,
- .pre_set_power_state = &ni_dpm_pre_set_power_state,
- .set_power_state = &ni_dpm_set_power_state,
- .post_set_power_state = &ni_dpm_post_set_power_state,
- .display_configuration_changed = &cypress_dpm_display_configuration_changed,
- .fini = &ni_dpm_fini,
- .get_sclk = &ni_dpm_get_sclk,
- .get_mclk = &ni_dpm_get_mclk,
- .print_power_state = &ni_dpm_print_power_state,
- .debugfs_print_current_performance_level = &ni_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &ni_dpm_force_performance_level,
- .vblank_too_short = &ni_dpm_vblank_too_short,
- .get_current_sclk = &ni_dpm_get_current_sclk,
- .get_current_mclk = &ni_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &evergreen_page_flip,
- .page_flip_pending = &evergreen_page_flip_pending,
- },
- };
- static struct radeon_asic_ring trinity_vce_ring = {
- .ib_execute = &radeon_vce_ib_execute,
- .emit_fence = &radeon_vce_fence_emit,
- .emit_semaphore = &radeon_vce_semaphore_emit,
- .cs_parse = &radeon_vce_cs_parse,
- .ring_test = &radeon_vce_ring_test,
- .ib_test = &radeon_vce_ib_test,
- .is_lockup = &radeon_ring_test_lockup,
- .get_rptr = &vce_v1_0_get_rptr,
- .get_wptr = &vce_v1_0_get_wptr,
- .set_wptr = &vce_v1_0_set_wptr,
- };
- static struct radeon_asic trinity_asic = {
- .init = &cayman_init,
- .fini = &cayman_fini,
- .suspend = &cayman_suspend,
- .resume = &cayman_resume,
- .asic_reset = &cayman_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
- .get_xclk = &r600_get_xclk,
- .get_gpu_clock_counter = &r600_get_gpu_clock_counter,
- .get_allowed_info_register = cayman_get_allowed_info_register,
- .gart = {
- .tlb_flush = &cayman_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .vm = {
- .init = &cayman_vm_init,
- .fini = &cayman_vm_fini,
- .copy_pages = &cayman_dma_vm_copy_pages,
- .write_pages = &cayman_dma_vm_write_pages,
- .set_pages = &cayman_dma_vm_set_pages,
- .pad_ib = &cayman_dma_vm_pad_ib,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &cayman_gfx_ring,
- [CAYMAN_RING_TYPE_CP1_INDEX] = &cayman_gfx_ring,
- [CAYMAN_RING_TYPE_CP2_INDEX] = &cayman_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &cayman_dma_ring,
- [CAYMAN_RING_TYPE_DMA1_INDEX] = &cayman_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &cayman_uvd_ring,
- [TN_RING_TYPE_VCE1_INDEX] = &trinity_vce_ring,
- [TN_RING_TYPE_VCE2_INDEX] = &trinity_vce_ring,
- },
- .irq = {
- .set = &evergreen_irq_set,
- .process = &evergreen_irq_process,
- },
- .display = {
- .bandwidth_update = &dce6_bandwidth_update,
- .get_vblank_counter = &evergreen_get_vblank_counter,
- .wait_for_vblank = &dce4_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &evergreen_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &evergreen_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &evergreen_hpd_init,
- .fini = &evergreen_hpd_fini,
- .sense = &evergreen_hpd_sense,
- .set_polarity = &evergreen_hpd_set_polarity,
- },
- .pm = {
- .misc = &evergreen_pm_misc,
- .prepare = &evergreen_pm_prepare,
- .finish = &evergreen_pm_finish,
- .init_profile = &sumo_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = NULL,
- .set_memory_clock = NULL,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = NULL,
- .set_uvd_clocks = &sumo_set_uvd_clocks,
- .set_vce_clocks = &tn_set_vce_clocks,
- .get_temperature = &tn_get_temp,
- },
- .dpm = {
- .init = &trinity_dpm_init,
- .setup_asic = &trinity_dpm_setup_asic,
- .enable = &trinity_dpm_enable,
- .late_enable = &trinity_dpm_late_enable,
- .disable = &trinity_dpm_disable,
- .pre_set_power_state = &trinity_dpm_pre_set_power_state,
- .set_power_state = &trinity_dpm_set_power_state,
- .post_set_power_state = &trinity_dpm_post_set_power_state,
- .display_configuration_changed = &trinity_dpm_display_configuration_changed,
- .fini = &trinity_dpm_fini,
- .get_sclk = &trinity_dpm_get_sclk,
- .get_mclk = &trinity_dpm_get_mclk,
- .print_power_state = &trinity_dpm_print_power_state,
- .debugfs_print_current_performance_level = &trinity_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &trinity_dpm_force_performance_level,
- .enable_bapm = &trinity_dpm_enable_bapm,
- .get_current_sclk = &trinity_dpm_get_current_sclk,
- .get_current_mclk = &trinity_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &evergreen_page_flip,
- .page_flip_pending = &evergreen_page_flip_pending,
- },
- };
- static struct radeon_asic_ring si_gfx_ring = {
- .ib_execute = &si_ring_ib_execute,
- .ib_parse = &si_ib_parse,
- .emit_fence = &si_fence_ring_emit,
- .emit_semaphore = &r600_semaphore_ring_emit,
- .cs_parse = NULL,
- .ring_test = &r600_ring_test,
- .ib_test = &r600_ib_test,
- .is_lockup = &si_gfx_is_lockup,
- .vm_flush = &si_vm_flush,
- .get_rptr = &cayman_gfx_get_rptr,
- .get_wptr = &cayman_gfx_get_wptr,
- .set_wptr = &cayman_gfx_set_wptr,
- };
- static struct radeon_asic_ring si_dma_ring = {
- .ib_execute = &cayman_dma_ring_ib_execute,
- .ib_parse = &evergreen_dma_ib_parse,
- .emit_fence = &evergreen_dma_fence_ring_emit,
- .emit_semaphore = &r600_dma_semaphore_ring_emit,
- .cs_parse = NULL,
- .ring_test = &r600_dma_ring_test,
- .ib_test = &r600_dma_ib_test,
- .is_lockup = &si_dma_is_lockup,
- .vm_flush = &si_dma_vm_flush,
- .get_rptr = &cayman_dma_get_rptr,
- .get_wptr = &cayman_dma_get_wptr,
- .set_wptr = &cayman_dma_set_wptr,
- };
- static struct radeon_asic si_asic = {
- .init = &si_init,
- .fini = &si_fini,
- .suspend = &si_suspend,
- .resume = &si_resume,
- .asic_reset = &si_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
- .get_xclk = &si_get_xclk,
- .get_gpu_clock_counter = &si_get_gpu_clock_counter,
- .get_allowed_info_register = si_get_allowed_info_register,
- .gart = {
- .tlb_flush = &si_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .vm = {
- .init = &si_vm_init,
- .fini = &si_vm_fini,
- .copy_pages = &si_dma_vm_copy_pages,
- .write_pages = &si_dma_vm_write_pages,
- .set_pages = &si_dma_vm_set_pages,
- .pad_ib = &cayman_dma_vm_pad_ib,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &si_gfx_ring,
- [CAYMAN_RING_TYPE_CP1_INDEX] = &si_gfx_ring,
- [CAYMAN_RING_TYPE_CP2_INDEX] = &si_gfx_ring,
- [R600_RING_TYPE_DMA_INDEX] = &si_dma_ring,
- [CAYMAN_RING_TYPE_DMA1_INDEX] = &si_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &cayman_uvd_ring,
- [TN_RING_TYPE_VCE1_INDEX] = &trinity_vce_ring,
- [TN_RING_TYPE_VCE2_INDEX] = &trinity_vce_ring,
- },
- .irq = {
- .set = &si_irq_set,
- .process = &si_irq_process,
- },
- .display = {
- .bandwidth_update = &dce6_bandwidth_update,
- .get_vblank_counter = &evergreen_get_vblank_counter,
- .wait_for_vblank = &dce4_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &r600_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &si_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &si_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &evergreen_hpd_init,
- .fini = &evergreen_hpd_fini,
- .sense = &evergreen_hpd_sense,
- .set_polarity = &evergreen_hpd_set_polarity,
- },
- .pm = {
- .misc = &evergreen_pm_misc,
- .prepare = &evergreen_pm_prepare,
- .finish = &evergreen_pm_finish,
- .init_profile = &sumo_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = &r600_get_pcie_lanes,
- .set_pcie_lanes = &r600_set_pcie_lanes,
- .set_clock_gating = NULL,
- .set_uvd_clocks = &si_set_uvd_clocks,
- .set_vce_clocks = &si_set_vce_clocks,
- .get_temperature = &si_get_temp,
- },
- .dpm = {
- .init = &si_dpm_init,
- .setup_asic = &si_dpm_setup_asic,
- .enable = &si_dpm_enable,
- .late_enable = &si_dpm_late_enable,
- .disable = &si_dpm_disable,
- .pre_set_power_state = &si_dpm_pre_set_power_state,
- .set_power_state = &si_dpm_set_power_state,
- .post_set_power_state = &si_dpm_post_set_power_state,
- .display_configuration_changed = &si_dpm_display_configuration_changed,
- .fini = &si_dpm_fini,
- .get_sclk = &ni_dpm_get_sclk,
- .get_mclk = &ni_dpm_get_mclk,
- .print_power_state = &ni_dpm_print_power_state,
- .debugfs_print_current_performance_level = &si_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &si_dpm_force_performance_level,
- .vblank_too_short = &ni_dpm_vblank_too_short,
- .fan_ctrl_set_mode = &si_fan_ctrl_set_mode,
- .fan_ctrl_get_mode = &si_fan_ctrl_get_mode,
- .get_fan_speed_percent = &si_fan_ctrl_get_fan_speed_percent,
- .set_fan_speed_percent = &si_fan_ctrl_set_fan_speed_percent,
- .get_current_sclk = &si_dpm_get_current_sclk,
- .get_current_mclk = &si_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &evergreen_page_flip,
- .page_flip_pending = &evergreen_page_flip_pending,
- },
- };
- static struct radeon_asic_ring ci_gfx_ring = {
- .ib_execute = &cik_ring_ib_execute,
- .ib_parse = &cik_ib_parse,
- .emit_fence = &cik_fence_gfx_ring_emit,
- .emit_semaphore = &cik_semaphore_ring_emit,
- .cs_parse = NULL,
- .ring_test = &cik_ring_test,
- .ib_test = &cik_ib_test,
- .is_lockup = &cik_gfx_is_lockup,
- .vm_flush = &cik_vm_flush,
- .get_rptr = &cik_gfx_get_rptr,
- .get_wptr = &cik_gfx_get_wptr,
- .set_wptr = &cik_gfx_set_wptr,
- };
- static struct radeon_asic_ring ci_cp_ring = {
- .ib_execute = &cik_ring_ib_execute,
- .ib_parse = &cik_ib_parse,
- .emit_fence = &cik_fence_compute_ring_emit,
- .emit_semaphore = &cik_semaphore_ring_emit,
- .cs_parse = NULL,
- .ring_test = &cik_ring_test,
- .ib_test = &cik_ib_test,
- .is_lockup = &cik_gfx_is_lockup,
- .vm_flush = &cik_vm_flush,
- .get_rptr = &cik_compute_get_rptr,
- .get_wptr = &cik_compute_get_wptr,
- .set_wptr = &cik_compute_set_wptr,
- };
- static struct radeon_asic_ring ci_dma_ring = {
- .ib_execute = &cik_sdma_ring_ib_execute,
- .ib_parse = &cik_ib_parse,
- .emit_fence = &cik_sdma_fence_ring_emit,
- .emit_semaphore = &cik_sdma_semaphore_ring_emit,
- .cs_parse = NULL,
- .ring_test = &cik_sdma_ring_test,
- .ib_test = &cik_sdma_ib_test,
- .is_lockup = &cik_sdma_is_lockup,
- .vm_flush = &cik_dma_vm_flush,
- .get_rptr = &cik_sdma_get_rptr,
- .get_wptr = &cik_sdma_get_wptr,
- .set_wptr = &cik_sdma_set_wptr,
- };
- static struct radeon_asic_ring ci_vce_ring = {
- .ib_execute = &radeon_vce_ib_execute,
- .emit_fence = &radeon_vce_fence_emit,
- .emit_semaphore = &radeon_vce_semaphore_emit,
- .cs_parse = &radeon_vce_cs_parse,
- .ring_test = &radeon_vce_ring_test,
- .ib_test = &radeon_vce_ib_test,
- .is_lockup = &radeon_ring_test_lockup,
- .get_rptr = &vce_v1_0_get_rptr,
- .get_wptr = &vce_v1_0_get_wptr,
- .set_wptr = &vce_v1_0_set_wptr,
- };
- static struct radeon_asic ci_asic = {
- .init = &cik_init,
- .fini = &cik_fini,
- .suspend = &cik_suspend,
- .resume = &cik_resume,
- .asic_reset = &cik_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = &r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
- .get_xclk = &cik_get_xclk,
- .get_gpu_clock_counter = &cik_get_gpu_clock_counter,
- .get_allowed_info_register = cik_get_allowed_info_register,
- .gart = {
- .tlb_flush = &cik_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .vm = {
- .init = &cik_vm_init,
- .fini = &cik_vm_fini,
- .copy_pages = &cik_sdma_vm_copy_pages,
- .write_pages = &cik_sdma_vm_write_pages,
- .set_pages = &cik_sdma_vm_set_pages,
- .pad_ib = &cik_sdma_vm_pad_ib,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &ci_gfx_ring,
- [CAYMAN_RING_TYPE_CP1_INDEX] = &ci_cp_ring,
- [CAYMAN_RING_TYPE_CP2_INDEX] = &ci_cp_ring,
- [R600_RING_TYPE_DMA_INDEX] = &ci_dma_ring,
- [CAYMAN_RING_TYPE_DMA1_INDEX] = &ci_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &cayman_uvd_ring,
- [TN_RING_TYPE_VCE1_INDEX] = &ci_vce_ring,
- [TN_RING_TYPE_VCE2_INDEX] = &ci_vce_ring,
- },
- .irq = {
- .set = &cik_irq_set,
- .process = &cik_irq_process,
- },
- .display = {
- .bandwidth_update = &dce8_bandwidth_update,
- .get_vblank_counter = &evergreen_get_vblank_counter,
- .wait_for_vblank = &dce4_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &cik_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &cik_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &cik_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &evergreen_hpd_init,
- .fini = &evergreen_hpd_fini,
- .sense = &evergreen_hpd_sense,
- .set_polarity = &evergreen_hpd_set_polarity,
- },
- .pm = {
- .misc = &evergreen_pm_misc,
- .prepare = &evergreen_pm_prepare,
- .finish = &evergreen_pm_finish,
- .init_profile = &sumo_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = NULL,
- .set_uvd_clocks = &cik_set_uvd_clocks,
- .set_vce_clocks = &cik_set_vce_clocks,
- .get_temperature = &ci_get_temp,
- },
- .dpm = {
- .init = &ci_dpm_init,
- .setup_asic = &ci_dpm_setup_asic,
- .enable = &ci_dpm_enable,
- .late_enable = &ci_dpm_late_enable,
- .disable = &ci_dpm_disable,
- .pre_set_power_state = &ci_dpm_pre_set_power_state,
- .set_power_state = &ci_dpm_set_power_state,
- .post_set_power_state = &ci_dpm_post_set_power_state,
- .display_configuration_changed = &ci_dpm_display_configuration_changed,
- .fini = &ci_dpm_fini,
- .get_sclk = &ci_dpm_get_sclk,
- .get_mclk = &ci_dpm_get_mclk,
- .print_power_state = &ci_dpm_print_power_state,
- .debugfs_print_current_performance_level = &ci_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &ci_dpm_force_performance_level,
- .vblank_too_short = &ci_dpm_vblank_too_short,
- .powergate_uvd = &ci_dpm_powergate_uvd,
- .fan_ctrl_set_mode = &ci_fan_ctrl_set_mode,
- .fan_ctrl_get_mode = &ci_fan_ctrl_get_mode,
- .get_fan_speed_percent = &ci_fan_ctrl_get_fan_speed_percent,
- .set_fan_speed_percent = &ci_fan_ctrl_set_fan_speed_percent,
- .get_current_sclk = &ci_dpm_get_current_sclk,
- .get_current_mclk = &ci_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &evergreen_page_flip,
- .page_flip_pending = &evergreen_page_flip_pending,
- },
- };
- static struct radeon_asic kv_asic = {
- .init = &cik_init,
- .fini = &cik_fini,
- .suspend = &cik_suspend,
- .resume = &cik_resume,
- .asic_reset = &cik_asic_reset,
- .vga_set_state = &r600_vga_set_state,
- .mmio_hdp_flush = &r600_mmio_hdp_flush,
- .gui_idle = &r600_gui_idle,
- .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
- .get_xclk = &cik_get_xclk,
- .get_gpu_clock_counter = &cik_get_gpu_clock_counter,
- .get_allowed_info_register = cik_get_allowed_info_register,
- .gart = {
- .tlb_flush = &cik_pcie_gart_tlb_flush,
- .get_page_entry = &rs600_gart_get_page_entry,
- .set_page = &rs600_gart_set_page,
- },
- .vm = {
- .init = &cik_vm_init,
- .fini = &cik_vm_fini,
- .copy_pages = &cik_sdma_vm_copy_pages,
- .write_pages = &cik_sdma_vm_write_pages,
- .set_pages = &cik_sdma_vm_set_pages,
- .pad_ib = &cik_sdma_vm_pad_ib,
- },
- .ring = {
- [RADEON_RING_TYPE_GFX_INDEX] = &ci_gfx_ring,
- [CAYMAN_RING_TYPE_CP1_INDEX] = &ci_cp_ring,
- [CAYMAN_RING_TYPE_CP2_INDEX] = &ci_cp_ring,
- [R600_RING_TYPE_DMA_INDEX] = &ci_dma_ring,
- [CAYMAN_RING_TYPE_DMA1_INDEX] = &ci_dma_ring,
- [R600_RING_TYPE_UVD_INDEX] = &cayman_uvd_ring,
- [TN_RING_TYPE_VCE1_INDEX] = &ci_vce_ring,
- [TN_RING_TYPE_VCE2_INDEX] = &ci_vce_ring,
- },
- .irq = {
- .set = &cik_irq_set,
- .process = &cik_irq_process,
- },
- .display = {
- .bandwidth_update = &dce8_bandwidth_update,
- .get_vblank_counter = &evergreen_get_vblank_counter,
- .wait_for_vblank = &dce4_wait_for_vblank,
- .set_backlight_level = &atombios_set_backlight_level,
- .get_backlight_level = &atombios_get_backlight_level,
- },
- .copy = {
- .blit = &cik_copy_cpdma,
- .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
- .dma = &cik_copy_dma,
- .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
- .copy = &cik_copy_dma,
- .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
- },
- .surface = {
- .set_reg = r600_set_surface_reg,
- .clear_reg = r600_clear_surface_reg,
- },
- .hpd = {
- .init = &evergreen_hpd_init,
- .fini = &evergreen_hpd_fini,
- .sense = &evergreen_hpd_sense,
- .set_polarity = &evergreen_hpd_set_polarity,
- },
- .pm = {
- .misc = &evergreen_pm_misc,
- .prepare = &evergreen_pm_prepare,
- .finish = &evergreen_pm_finish,
- .init_profile = &sumo_pm_init_profile,
- .get_dynpm_state = &r600_pm_get_dynpm_state,
- .get_engine_clock = &radeon_atom_get_engine_clock,
- .set_engine_clock = &radeon_atom_set_engine_clock,
- .get_memory_clock = &radeon_atom_get_memory_clock,
- .set_memory_clock = &radeon_atom_set_memory_clock,
- .get_pcie_lanes = NULL,
- .set_pcie_lanes = NULL,
- .set_clock_gating = NULL,
- .set_uvd_clocks = &cik_set_uvd_clocks,
- .set_vce_clocks = &cik_set_vce_clocks,
- .get_temperature = &kv_get_temp,
- },
- .dpm = {
- .init = &kv_dpm_init,
- .setup_asic = &kv_dpm_setup_asic,
- .enable = &kv_dpm_enable,
- .late_enable = &kv_dpm_late_enable,
- .disable = &kv_dpm_disable,
- .pre_set_power_state = &kv_dpm_pre_set_power_state,
- .set_power_state = &kv_dpm_set_power_state,
- .post_set_power_state = &kv_dpm_post_set_power_state,
- .display_configuration_changed = &kv_dpm_display_configuration_changed,
- .fini = &kv_dpm_fini,
- .get_sclk = &kv_dpm_get_sclk,
- .get_mclk = &kv_dpm_get_mclk,
- .print_power_state = &kv_dpm_print_power_state,
- .debugfs_print_current_performance_level = &kv_dpm_debugfs_print_current_performance_level,
- .force_performance_level = &kv_dpm_force_performance_level,
- .powergate_uvd = &kv_dpm_powergate_uvd,
- .enable_bapm = &kv_dpm_enable_bapm,
- .get_current_sclk = &kv_dpm_get_current_sclk,
- .get_current_mclk = &kv_dpm_get_current_mclk,
- },
- .pflip = {
- .page_flip = &evergreen_page_flip,
- .page_flip_pending = &evergreen_page_flip_pending,
- },
- };
- /**
- * radeon_asic_init - register asic specific callbacks
- *
- * @rdev: radeon device pointer
- *
- * Registers the appropriate asic specific callbacks for each
- * chip family. Also sets other asics specific info like the number
- * of crtcs and the register aperture accessors (all asics).
- * Returns 0 for success.
- */
- int radeon_asic_init(struct radeon_device *rdev)
- {
- radeon_register_accessor_init(rdev);
- /* set the number of crtcs */
- if (rdev->flags & RADEON_SINGLE_CRTC)
- rdev->num_crtc = 1;
- else
- rdev->num_crtc = 2;
- rdev->has_uvd = false;
- switch (rdev->family) {
- case CHIP_R100:
- case CHIP_RV100:
- case CHIP_RS100:
- case CHIP_RV200:
- case CHIP_RS200:
- rdev->asic = &r100_asic;
- break;
- case CHIP_R200:
- case CHIP_RV250:
- case CHIP_RS300:
- case CHIP_RV280:
- rdev->asic = &r200_asic;
- break;
- case CHIP_R300:
- case CHIP_R350:
- case CHIP_RV350:
- case CHIP_RV380:
- if (rdev->flags & RADEON_IS_PCIE)
- rdev->asic = &r300_asic_pcie;
- else
- rdev->asic = &r300_asic;
- break;
- case CHIP_R420:
- case CHIP_R423:
- case CHIP_RV410:
- rdev->asic = &r420_asic;
- /* handle macs */
- if (rdev->bios == NULL) {
- rdev->asic->pm.get_engine_clock = &radeon_legacy_get_engine_clock;
- rdev->asic->pm.set_engine_clock = &radeon_legacy_set_engine_clock;
- rdev->asic->pm.get_memory_clock = &radeon_legacy_get_memory_clock;
- rdev->asic->pm.set_memory_clock = NULL;
- rdev->asic->display.set_backlight_level = &radeon_legacy_set_backlight_level;
- }
- break;
- case CHIP_RS400:
- case CHIP_RS480:
- rdev->asic = &rs400_asic;
- break;
- case CHIP_RS600:
- rdev->asic = &rs600_asic;
- break;
- case CHIP_RS690:
- case CHIP_RS740:
- rdev->asic = &rs690_asic;
- break;
- case CHIP_RV515:
- rdev->asic = &rv515_asic;
- break;
- case CHIP_R520:
- case CHIP_RV530:
- case CHIP_RV560:
- case CHIP_RV570:
- case CHIP_R580:
- rdev->asic = &r520_asic;
- break;
- case CHIP_R600:
- rdev->asic = &r600_asic;
- break;
- case CHIP_RV610:
- case CHIP_RV630:
- case CHIP_RV620:
- case CHIP_RV635:
- case CHIP_RV670:
- rdev->asic = &rv6xx_asic;
- rdev->has_uvd = true;
- break;
- case CHIP_RS780:
- case CHIP_RS880:
- rdev->asic = &rs780_asic;
- /* 760G/780V/880V don't have UVD */
- if ((rdev->pdev->device == 0x9616)||
- (rdev->pdev->device == 0x9611)||
- (rdev->pdev->device == 0x9613)||
- (rdev->pdev->device == 0x9711)||
- (rdev->pdev->device == 0x9713))
- rdev->has_uvd = false;
- else
- rdev->has_uvd = true;
- break;
- case CHIP_RV770:
- case CHIP_RV730:
- case CHIP_RV710:
- case CHIP_RV740:
- rdev->asic = &rv770_asic;
- rdev->has_uvd = true;
- break;
- case CHIP_CEDAR:
- case CHIP_REDWOOD:
- case CHIP_JUNIPER:
- case CHIP_CYPRESS:
- case CHIP_HEMLOCK:
- /* set num crtcs */
- if (rdev->family == CHIP_CEDAR)
- rdev->num_crtc = 4;
- else
- rdev->num_crtc = 6;
- rdev->asic = &evergreen_asic;
- rdev->has_uvd = true;
- break;
- case CHIP_PALM:
- case CHIP_SUMO:
- case CHIP_SUMO2:
- rdev->asic = &sumo_asic;
- rdev->has_uvd = true;
- break;
- case CHIP_BARTS:
- case CHIP_TURKS:
- case CHIP_CAICOS:
- /* set num crtcs */
- if (rdev->family == CHIP_CAICOS)
- rdev->num_crtc = 4;
- else
- rdev->num_crtc = 6;
- rdev->asic = &btc_asic;
- rdev->has_uvd = true;
- break;
- case CHIP_CAYMAN:
- rdev->asic = &cayman_asic;
- /* set num crtcs */
- rdev->num_crtc = 6;
- rdev->has_uvd = true;
- break;
- case CHIP_ARUBA:
- rdev->asic = &trinity_asic;
- /* set num crtcs */
- rdev->num_crtc = 4;
- rdev->has_uvd = true;
- rdev->cg_flags =
- RADEON_CG_SUPPORT_VCE_MGCG;
- break;
- case CHIP_TAHITI:
- case CHIP_PITCAIRN:
- case CHIP_VERDE:
- case CHIP_OLAND:
- case CHIP_HAINAN:
- rdev->asic = &si_asic;
- /* set num crtcs */
- if (rdev->family == CHIP_HAINAN)
- rdev->num_crtc = 0;
- else if (rdev->family == CHIP_OLAND)
- rdev->num_crtc = 2;
- else
- rdev->num_crtc = 6;
- if (rdev->family == CHIP_HAINAN)
- rdev->has_uvd = false;
- else
- rdev->has_uvd = true;
- switch (rdev->family) {
- case CHIP_TAHITI:
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_MC_MGCG |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_VCE_MGCG |
- RADEON_CG_SUPPORT_UVD_MGCG |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0;
- break;
- case CHIP_PITCAIRN:
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_GFX_RLC_LS |
- RADEON_CG_SUPPORT_MC_LS |
- RADEON_CG_SUPPORT_MC_MGCG |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_VCE_MGCG |
- RADEON_CG_SUPPORT_UVD_MGCG |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0;
- break;
- case CHIP_VERDE:
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_GFX_RLC_LS |
- RADEON_CG_SUPPORT_MC_LS |
- RADEON_CG_SUPPORT_MC_MGCG |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_VCE_MGCG |
- RADEON_CG_SUPPORT_UVD_MGCG |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0 |
- /*RADEON_PG_SUPPORT_GFX_PG | */
- RADEON_PG_SUPPORT_SDMA;
- break;
- case CHIP_OLAND:
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_GFX_RLC_LS |
- RADEON_CG_SUPPORT_MC_LS |
- RADEON_CG_SUPPORT_MC_MGCG |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_UVD_MGCG |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0;
- break;
- case CHIP_HAINAN:
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_GFX_RLC_LS |
- RADEON_CG_SUPPORT_MC_LS |
- RADEON_CG_SUPPORT_MC_MGCG |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0;
- break;
- default:
- rdev->cg_flags = 0;
- rdev->pg_flags = 0;
- break;
- }
- break;
- case CHIP_BONAIRE:
- case CHIP_HAWAII:
- rdev->asic = &ci_asic;
- rdev->num_crtc = 6;
- rdev->has_uvd = true;
- if (rdev->family == CHIP_BONAIRE) {
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CGTS_LS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_MC_LS |
- RADEON_CG_SUPPORT_MC_MGCG |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_SDMA_LS |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_VCE_MGCG |
- RADEON_CG_SUPPORT_UVD_MGCG |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0;
- } else {
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_MC_LS |
- RADEON_CG_SUPPORT_MC_MGCG |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_SDMA_LS |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_VCE_MGCG |
- RADEON_CG_SUPPORT_UVD_MGCG |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0;
- }
- break;
- case CHIP_KAVERI:
- case CHIP_KABINI:
- case CHIP_MULLINS:
- rdev->asic = &kv_asic;
- /* set num crtcs */
- if (rdev->family == CHIP_KAVERI) {
- rdev->num_crtc = 4;
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CGTS_LS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_SDMA_LS |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_VCE_MGCG |
- RADEON_CG_SUPPORT_UVD_MGCG |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0;
- /*RADEON_PG_SUPPORT_GFX_PG |
- RADEON_PG_SUPPORT_GFX_SMG |
- RADEON_PG_SUPPORT_GFX_DMG |
- RADEON_PG_SUPPORT_UVD |
- RADEON_PG_SUPPORT_VCE |
- RADEON_PG_SUPPORT_CP |
- RADEON_PG_SUPPORT_GDS |
- RADEON_PG_SUPPORT_RLC_SMU_HS |
- RADEON_PG_SUPPORT_ACP |
- RADEON_PG_SUPPORT_SAMU;*/
- } else {
- rdev->num_crtc = 2;
- rdev->cg_flags =
- RADEON_CG_SUPPORT_GFX_MGCG |
- RADEON_CG_SUPPORT_GFX_MGLS |
- /*RADEON_CG_SUPPORT_GFX_CGCG |*/
- RADEON_CG_SUPPORT_GFX_CGLS |
- RADEON_CG_SUPPORT_GFX_CGTS |
- RADEON_CG_SUPPORT_GFX_CGTS_LS |
- RADEON_CG_SUPPORT_GFX_CP_LS |
- RADEON_CG_SUPPORT_SDMA_MGCG |
- RADEON_CG_SUPPORT_SDMA_LS |
- RADEON_CG_SUPPORT_BIF_LS |
- RADEON_CG_SUPPORT_VCE_MGCG |
- RADEON_CG_SUPPORT_UVD_MGCG |
- RADEON_CG_SUPPORT_HDP_LS |
- RADEON_CG_SUPPORT_HDP_MGCG;
- rdev->pg_flags = 0;
- /*RADEON_PG_SUPPORT_GFX_PG |
- RADEON_PG_SUPPORT_GFX_SMG |
- RADEON_PG_SUPPORT_UVD |
- RADEON_PG_SUPPORT_VCE |
- RADEON_PG_SUPPORT_CP |
- RADEON_PG_SUPPORT_GDS |
- RADEON_PG_SUPPORT_RLC_SMU_HS |
- RADEON_PG_SUPPORT_SAMU;*/
- }
- rdev->has_uvd = true;
- break;
- default:
- /* FIXME: not supported yet */
- return -EINVAL;
- }
- if (rdev->flags & RADEON_IS_IGP) {
- rdev->asic->pm.get_memory_clock = NULL;
- rdev->asic->pm.set_memory_clock = NULL;
- }
- return 0;
- }
|