1639c308eSBen Skeggs /* 2639c308eSBen Skeggs * Copyright 2012 Red Hat Inc. 3639c308eSBen Skeggs * 4639c308eSBen Skeggs * Permission is hereby granted, free of charge, to any person obtaining a 5639c308eSBen Skeggs * copy of this software and associated documentation files (the "Software"), 6639c308eSBen Skeggs * to deal in the Software without restriction, including without limitation 7639c308eSBen Skeggs * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8639c308eSBen Skeggs * and/or sell copies of the Software, and to permit persons to whom the 9639c308eSBen Skeggs * Software is furnished to do so, subject to the following conditions: 10639c308eSBen Skeggs * 11639c308eSBen Skeggs * The above copyright notice and this permission notice shall be included in 12639c308eSBen Skeggs * all copies or substantial portions of the Software. 13639c308eSBen Skeggs * 14639c308eSBen Skeggs * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15639c308eSBen Skeggs * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16639c308eSBen Skeggs * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17639c308eSBen Skeggs * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18639c308eSBen Skeggs * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19639c308eSBen Skeggs * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20639c308eSBen Skeggs * OTHER DEALINGS IN THE SOFTWARE. 21639c308eSBen Skeggs * 22639c308eSBen Skeggs * Authors: Ben Skeggs 231bab09acSLyude Paul * Lyude Paul 24639c308eSBen Skeggs */ 251bab09acSLyude Paul #include "gk104.h" 26639c308eSBen Skeggs #include "gf100.h" 27d36a99d2SBen Skeggs #include "ram.h" 28639c308eSBen Skeggs 291bab09acSLyude Paul /* 301bab09acSLyude Paul ******************************************************************************* 311bab09acSLyude Paul * PGRAPH registers for clockgating 321bab09acSLyude Paul ******************************************************************************* 331bab09acSLyude Paul */ 341bab09acSLyude Paul const struct nvkm_therm_clkgate_init 351bab09acSLyude Paul gk104_fb_clkgate_blcg_init_unk_0[] = { 361bab09acSLyude Paul { 0x100d10, 1, 0x0000c244 }, 371bab09acSLyude Paul { 0x100d30, 1, 0x0000c242 }, 381bab09acSLyude Paul { 0x100d3c, 1, 0x00000242 }, 391bab09acSLyude Paul { 0x100d48, 1, 0x00000242 }, 401bab09acSLyude Paul { 0x100d1c, 1, 0x00000042 }, 411bab09acSLyude Paul {} 421bab09acSLyude Paul }; 431bab09acSLyude Paul 441bab09acSLyude Paul const struct nvkm_therm_clkgate_init 451bab09acSLyude Paul gk104_fb_clkgate_blcg_init_vm_0[] = { 461bab09acSLyude Paul { 0x100c98, 1, 0x00000242 }, 471bab09acSLyude Paul {} 481bab09acSLyude Paul }; 491bab09acSLyude Paul 501bab09acSLyude Paul const struct nvkm_therm_clkgate_init 511bab09acSLyude Paul gk104_fb_clkgate_blcg_init_main_0[] = { 521bab09acSLyude Paul { 0x10f000, 1, 0x00000042 }, 531bab09acSLyude Paul { 0x17e030, 1, 0x00000044 }, 541bab09acSLyude Paul { 0x17e040, 1, 0x00000044 }, 551bab09acSLyude Paul {} 561bab09acSLyude Paul }; 571bab09acSLyude Paul 581bab09acSLyude Paul const struct nvkm_therm_clkgate_init 591bab09acSLyude Paul gk104_fb_clkgate_blcg_init_bcast_0[] = { 601bab09acSLyude Paul { 0x17ea60, 4, 0x00000044 }, 611bab09acSLyude Paul {} 621bab09acSLyude Paul }; 631bab09acSLyude Paul 641bab09acSLyude Paul static const struct nvkm_therm_clkgate_pack 651bab09acSLyude Paul gk104_fb_clkgate_pack[] = { 661bab09acSLyude Paul { gk104_fb_clkgate_blcg_init_unk_0 }, 671bab09acSLyude Paul { gk104_fb_clkgate_blcg_init_vm_0 }, 681bab09acSLyude Paul { gk104_fb_clkgate_blcg_init_main_0 }, 691bab09acSLyude Paul { gk104_fb_clkgate_blcg_init_bcast_0 }, 701bab09acSLyude Paul {} 711bab09acSLyude Paul }; 721bab09acSLyude Paul 7303c8952fSBen Skeggs static const struct nvkm_fb_func 7403c8952fSBen Skeggs gk104_fb = { 75639c308eSBen Skeggs .dtor = gf100_fb_dtor, 7699c59172SBen Skeggs .oneinit = gf100_fb_oneinit, 77639c308eSBen Skeggs .init = gf100_fb_init, 78c73baa83SBen Skeggs .init_page = gf100_fb_init_page, 7903c8952fSBen Skeggs .intr = gf100_fb_intr, 80d36a99d2SBen Skeggs .ram_new = gk104_ram_new, 812854ab8dSBen Skeggs .default_bigpage = 17, 821bab09acSLyude Paul .clkgate_pack = gk104_fb_clkgate_pack, 8303c8952fSBen Skeggs }; 8403c8952fSBen Skeggs 8503c8952fSBen Skeggs int 8603c8952fSBen Skeggs gk104_fb_new(struct nvkm_device *device, int index, struct nvkm_fb **pfb) 8703c8952fSBen Skeggs { 8803c8952fSBen Skeggs return gf100_fb_new_(&gk104_fb, device, index, pfb); 8903c8952fSBen Skeggs } 90