]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - drivers/gpu/drm/nouveau/core/engine/graph/nvc8.c
Merge tag 'pm+acpi-3.15-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafae...
[mirror_ubuntu-hirsute-kernel.git] / drivers / gpu / drm / nouveau / core / engine / graph / nvc8.c
CommitLineData
30f4e087
BS
1/*
2 * Copyright 2013 Red Hat Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * Authors: Ben Skeggs <bskeggs@redhat.com>
23 */
24
25#include "nvc0.h"
c33b1e8c 26#include "ctxnvc0.h"
30f4e087
BS
27
28/*******************************************************************************
29 * Graphics object classes
30 ******************************************************************************/
31
32struct nouveau_oclass
33nvc8_graph_sclass[] = {
34 { 0x902d, &nouveau_object_ofuncs },
35 { 0x9039, &nouveau_object_ofuncs },
36 { 0x9097, &nouveau_object_ofuncs },
37 { 0x90c0, &nouveau_object_ofuncs },
38 { 0x9197, &nouveau_object_ofuncs },
39 { 0x9297, &nouveau_object_ofuncs },
40 {}
41};
42
43/*******************************************************************************
c33b1e8c 44 * PGRAPH register lists
30f4e087
BS
45 ******************************************************************************/
46
c33b1e8c 47static const struct nvc0_graph_init
7e194533 48nvc8_graph_init_sm_0[] = {
30f4e087
BS
49 { 0x419e00, 1, 0x04, 0x00000000 },
50 { 0x419ea0, 1, 0x04, 0x00000000 },
51 { 0x419ea4, 1, 0x04, 0x00000100 },
52 { 0x419ea8, 1, 0x04, 0x00001100 },
53 { 0x419eac, 1, 0x04, 0x11100f02 },
54 { 0x419eb0, 1, 0x04, 0x00000003 },
55 { 0x419eb4, 4, 0x04, 0x00000000 },
56 { 0x419ec8, 1, 0x04, 0x06060618 },
57 { 0x419ed0, 1, 0x04, 0x0eff0e38 },
58 { 0x419ed4, 1, 0x04, 0x011104f1 },
59 { 0x419edc, 1, 0x04, 0x00000000 },
60 { 0x419f00, 1, 0x04, 0x00000000 },
61 { 0x419f2c, 1, 0x04, 0x00000000 },
62 {}
63};
64
c33b1e8c
BS
65static const struct nvc0_graph_pack
66nvc8_graph_pack_mmio[] = {
67 { nvc0_graph_init_main_0 },
68 { nvc0_graph_init_fe_0 },
69 { nvc0_graph_init_pri_0 },
70 { nvc0_graph_init_rstr2d_0 },
71 { nvc0_graph_init_pd_0 },
72 { nvc0_graph_init_ds_0 },
73 { nvc0_graph_init_scc_0 },
97af71fa
BS
74 { nvc0_graph_init_prop_0 },
75 { nvc0_graph_init_gpc_unk_0 },
76 { nvc0_graph_init_setup_0 },
77 { nvc0_graph_init_crstr_0 },
78 { nvc1_graph_init_setup_1 },
79 { nvc0_graph_init_zcull_0 },
80 { nvc0_graph_init_gpm_0 },
81 { nvc0_graph_init_gpc_unk_1 },
82 { nvc0_graph_init_gcc_0 },
7e194533
BS
83 { nvc0_graph_init_tpccs_0 },
84 { nvc0_graph_init_tex_0 },
85 { nvc0_graph_init_pe_0 },
86 { nvc0_graph_init_l1c_0 },
87 { nvc0_graph_init_wwdx_0 },
88 { nvc0_graph_init_tpccs_1 },
89 { nvc0_graph_init_mpc_0 },
90 { nvc8_graph_init_sm_0 },
c33b1e8c
BS
91 { nvc0_graph_init_be_0 },
92 { nvc0_graph_init_fe_1 },
7e194533 93 { nvc0_graph_init_pe_1 },
c33b1e8c 94 {}
30f4e087
BS
95};
96
c33b1e8c
BS
97/*******************************************************************************
98 * PGRAPH engine/subdev functions
99 ******************************************************************************/
100
30f4e087
BS
101struct nouveau_oclass *
102nvc8_graph_oclass = &(struct nvc0_graph_oclass) {
103 .base.handle = NV_ENGINE(GR, 0xc8),
104 .base.ofuncs = &(struct nouveau_ofuncs) {
105 .ctor = nvc0_graph_ctor,
106 .dtor = nvc0_graph_dtor,
107 .init = nvc0_graph_init,
108 .fini = _nouveau_graph_fini,
109 },
110 .cclass = &nvc8_grctx_oclass,
111 .sclass = nvc8_graph_sclass,
c33b1e8c 112 .mmio = nvc8_graph_pack_mmio,
30f4e087
BS
113 .fecs.ucode = &nvc0_graph_fecs_ucode,
114 .gpccs.ucode = &nvc0_graph_gpccs_ucode,
115}.base;