17d094d29SLyude Paul /*
27d094d29SLyude Paul * Copyright 2017 Red Hat Inc.
37d094d29SLyude Paul *
47d094d29SLyude Paul * Permission is hereby granted, free of charge, to any person obtaining a
57d094d29SLyude Paul * copy of this software and associated documentation files (the "Software"),
67d094d29SLyude Paul * to deal in the Software without restriction, including without limitation
77d094d29SLyude Paul * the rights to use, copy, modify, merge, publish, distribute, sublicense,
87d094d29SLyude Paul * and/or sell copies of the Software, and to permit persons to whom the
97d094d29SLyude Paul * Software is furnished to do so, subject to the following conditions:
107d094d29SLyude Paul *
117d094d29SLyude Paul * The above copyright notice and this permission notice shall be included in
127d094d29SLyude Paul * all copies or substantial portions of the Software.
137d094d29SLyude Paul *
147d094d29SLyude Paul * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
157d094d29SLyude Paul * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
167d094d29SLyude Paul * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
177d094d29SLyude Paul * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
187d094d29SLyude Paul * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
197d094d29SLyude Paul * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
207d094d29SLyude Paul * OTHER DEALINGS IN THE SOFTWARE.
217d094d29SLyude Paul *
227d094d29SLyude Paul * Authors: Lyude Paul
237d094d29SLyude Paul */
247d094d29SLyude Paul #include "gf100.h"
257d094d29SLyude Paul #include "gk104.h"
267d094d29SLyude Paul #include "ram.h"
277d094d29SLyude Paul #include <subdev/therm.h>
287d094d29SLyude Paul #include <subdev/fb.h>
297d094d29SLyude Paul
307d094d29SLyude Paul /*
317d094d29SLyude Paul *******************************************************************************
327d094d29SLyude Paul * PGRAPH registers for clockgating
337d094d29SLyude Paul *******************************************************************************
347d094d29SLyude Paul */
357d094d29SLyude Paul
367d094d29SLyude Paul static const struct nvkm_therm_clkgate_init
377d094d29SLyude Paul gk110_fb_clkgate_blcg_init_unk_0[] = {
387d094d29SLyude Paul { 0x100d10, 1, 0x0000c242 },
397d094d29SLyude Paul { 0x100d30, 1, 0x0000c242 },
407d094d29SLyude Paul { 0x100d3c, 1, 0x00000242 },
417d094d29SLyude Paul { 0x100d48, 1, 0x0000c242 },
427d094d29SLyude Paul { 0x100d1c, 1, 0x00000042 },
437d094d29SLyude Paul {}
447d094d29SLyude Paul };
457d094d29SLyude Paul
467d094d29SLyude Paul static const struct nvkm_therm_clkgate_pack
477d094d29SLyude Paul gk110_fb_clkgate_pack[] = {
487d094d29SLyude Paul { gk110_fb_clkgate_blcg_init_unk_0 },
497d094d29SLyude Paul { gk104_fb_clkgate_blcg_init_vm_0 },
507d094d29SLyude Paul { gk104_fb_clkgate_blcg_init_main_0 },
517d094d29SLyude Paul { gk104_fb_clkgate_blcg_init_bcast_0 },
527d094d29SLyude Paul {}
537d094d29SLyude Paul };
547d094d29SLyude Paul
557d094d29SLyude Paul static const struct nvkm_fb_func
567d094d29SLyude Paul gk110_fb = {
577d094d29SLyude Paul .dtor = gf100_fb_dtor,
587d094d29SLyude Paul .oneinit = gf100_fb_oneinit,
597d094d29SLyude Paul .init = gf100_fb_init,
607d094d29SLyude Paul .init_page = gf100_fb_init_page,
617d094d29SLyude Paul .intr = gf100_fb_intr,
62*86d8740dSKarol Herbst .sysmem.flush_page_init = gf100_fb_sysmem_flush_page_init,
637d094d29SLyude Paul .ram_new = gk104_ram_new,
647d094d29SLyude Paul .default_bigpage = 17,
657d094d29SLyude Paul .clkgate_pack = gk110_fb_clkgate_pack,
667d094d29SLyude Paul };
677d094d29SLyude Paul
687d094d29SLyude Paul int
gk110_fb_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_fb ** pfb)69b7a9369aSBen Skeggs gk110_fb_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_fb **pfb)
707d094d29SLyude Paul {
71b7a9369aSBen Skeggs return gf100_fb_new_(&gk110_fb, device, type, inst, pfb);
727d094d29SLyude Paul }
73