diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2012-08-19 16:59:59 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-02 23:13:06 -0400 |
commit | e6626254f99be74bdae291a12c3981b996de6409 (patch) | |
tree | f95ed355e1765ae9a547059b91439d894379f32e /drivers/gpu/drm | |
parent | c97f8c922ea78195aa7d833d639d2963cc11af8e (diff) |
drm/nouveau: constify instances of nouveau_bitfield and nouveau_enum structs
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/copy/nva3.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/graph/nv04.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/graph/nv10.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/graph/nv50.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/core/enum.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/engine/graph.h | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c | 16 |
12 files changed, 39 insertions, 39 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c b/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c index c43c33454a65..4df6da0af740 100644 --- a/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c +++ b/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c | |||
@@ -93,7 +93,7 @@ nva3_copy_cclass = { | |||
93 | * PCOPY engine/subdev functions | 93 | * PCOPY engine/subdev functions |
94 | ******************************************************************************/ | 94 | ******************************************************************************/ |
95 | 95 | ||
96 | static struct nouveau_enum nva3_copy_isr_error_name[] = { | 96 | static const struct nouveau_enum nva3_copy_isr_error_name[] = { |
97 | { 0x0001, "ILLEGAL_MTHD" }, | 97 | { 0x0001, "ILLEGAL_MTHD" }, |
98 | { 0x0002, "INVALID_ENUM" }, | 98 | { 0x0002, "INVALID_ENUM" }, |
99 | { 0x0003, "INVALID_BITFIELD" }, | 99 | { 0x0003, "INVALID_BITFIELD" }, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c index 0c0ce0fb58da..06d4a8791055 100644 --- a/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c | |||
@@ -104,7 +104,7 @@ nvc0_copy1_cclass = { | |||
104 | * PCOPY engine/subdev functions | 104 | * PCOPY engine/subdev functions |
105 | ******************************************************************************/ | 105 | ******************************************************************************/ |
106 | 106 | ||
107 | static struct nouveau_enum nvc0_copy_isr_error_name[] = { | 107 | static const struct nouveau_enum nvc0_copy_isr_error_name[] = { |
108 | { 0x0001, "ILLEGAL_MTHD" }, | 108 | { 0x0001, "ILLEGAL_MTHD" }, |
109 | { 0x0002, "INVALID_ENUM" }, | 109 | { 0x0002, "INVALID_ENUM" }, |
110 | { 0x0003, "INVALID_BITFIELD" }, | 110 | { 0x0003, "INVALID_BITFIELD" }, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c b/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c index 198989b21c28..1d85e5b66ca0 100644 --- a/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c +++ b/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c | |||
@@ -122,7 +122,7 @@ nv84_crypt_cclass = { | |||
122 | * PCRYPT engine/subdev functions | 122 | * PCRYPT engine/subdev functions |
123 | ******************************************************************************/ | 123 | ******************************************************************************/ |
124 | 124 | ||
125 | static struct nouveau_bitfield nv84_crypt_intr_mask[] = { | 125 | static const struct nouveau_bitfield nv84_crypt_intr_mask[] = { |
126 | { 0x00000001, "INVALID_STATE" }, | 126 | { 0x00000001, "INVALID_STATE" }, |
127 | { 0x00000002, "ILLEGAL_MTHD" }, | 127 | { 0x00000002, "ILLEGAL_MTHD" }, |
128 | { 0x00000004, "ILLEGAL_CLASS" }, | 128 | { 0x00000004, "ILLEGAL_CLASS" }, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c b/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c index 835b8eb22596..9e3876c89b96 100644 --- a/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c +++ b/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c | |||
@@ -92,7 +92,7 @@ nv98_crypt_cclass = { | |||
92 | * PCRYPT engine/subdev functions | 92 | * PCRYPT engine/subdev functions |
93 | ******************************************************************************/ | 93 | ******************************************************************************/ |
94 | 94 | ||
95 | static struct nouveau_enum nv98_crypt_isr_error_name[] = { | 95 | static const struct nouveau_enum nv98_crypt_isr_error_name[] = { |
96 | { 0x0000, "ILLEGAL_MTHD" }, | 96 | { 0x0000, "ILLEGAL_MTHD" }, |
97 | { 0x0001, "INVALID_BITFIELD" }, | 97 | { 0x0001, "INVALID_BITFIELD" }, |
98 | { 0x0002, "INVALID_ENUM" }, | 98 | { 0x0002, "INVALID_ENUM" }, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c index dda0a442453e..2dd68126f845 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | |||
@@ -324,7 +324,7 @@ nvc0_fifo_cclass = { | |||
324 | * PFIFO engine | 324 | * PFIFO engine |
325 | ******************************************************************************/ | 325 | ******************************************************************************/ |
326 | 326 | ||
327 | struct nouveau_enum nvc0_fifo_fault_unit[] = { | 327 | static const struct nouveau_enum nvc0_fifo_fault_unit[] = { |
328 | { 0x00, "PGRAPH" }, | 328 | { 0x00, "PGRAPH" }, |
329 | { 0x03, "PEEPHOLE" }, | 329 | { 0x03, "PEEPHOLE" }, |
330 | { 0x04, "BAR1" }, | 330 | { 0x04, "BAR1" }, |
@@ -340,7 +340,7 @@ struct nouveau_enum nvc0_fifo_fault_unit[] = { | |||
340 | {} | 340 | {} |
341 | }; | 341 | }; |
342 | 342 | ||
343 | struct nouveau_enum nvc0_fifo_fault_reason[] = { | 343 | static const struct nouveau_enum nvc0_fifo_fault_reason[] = { |
344 | { 0x00, "PT_NOT_PRESENT" }, | 344 | { 0x00, "PT_NOT_PRESENT" }, |
345 | { 0x01, "PT_TOO_SHORT" }, | 345 | { 0x01, "PT_TOO_SHORT" }, |
346 | { 0x02, "PAGE_NOT_PRESENT" }, | 346 | { 0x02, "PAGE_NOT_PRESENT" }, |
@@ -353,7 +353,7 @@ struct nouveau_enum nvc0_fifo_fault_reason[] = { | |||
353 | {} | 353 | {} |
354 | }; | 354 | }; |
355 | 355 | ||
356 | struct nouveau_enum nvc0_fifo_fault_hubclient[] = { | 356 | static const struct nouveau_enum nvc0_fifo_fault_hubclient[] = { |
357 | { 0x01, "PCOPY0" }, | 357 | { 0x01, "PCOPY0" }, |
358 | { 0x02, "PCOPY1" }, | 358 | { 0x02, "PCOPY1" }, |
359 | { 0x04, "DISPATCH" }, | 359 | { 0x04, "DISPATCH" }, |
@@ -371,7 +371,7 @@ struct nouveau_enum nvc0_fifo_fault_hubclient[] = { | |||
371 | {} | 371 | {} |
372 | }; | 372 | }; |
373 | 373 | ||
374 | struct nouveau_enum nvc0_fifo_fault_gpcclient[] = { | 374 | static const struct nouveau_enum nvc0_fifo_fault_gpcclient[] = { |
375 | { 0x01, "TEX" }, | 375 | { 0x01, "TEX" }, |
376 | { 0x0c, "ESETUP" }, | 376 | { 0x0c, "ESETUP" }, |
377 | { 0x0e, "CTXCTL" }, | 377 | { 0x0e, "CTXCTL" }, |
@@ -379,7 +379,7 @@ struct nouveau_enum nvc0_fifo_fault_gpcclient[] = { | |||
379 | {} | 379 | {} |
380 | }; | 380 | }; |
381 | 381 | ||
382 | struct nouveau_bitfield nvc0_fifo_subfifo_intr[] = { | 382 | static const struct nouveau_bitfield nvc0_fifo_subfifo_intr[] = { |
383 | /* { 0x00008000, "" } seen with null ib push */ | 383 | /* { 0x00008000, "" } seen with null ib push */ |
384 | { 0x00200000, "ILLEGAL_MTHD" }, | 384 | { 0x00200000, "ILLEGAL_MTHD" }, |
385 | { 0x00800000, "EMPTY_SUBC" }, | 385 | { 0x00800000, "EMPTY_SUBC" }, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c index f4803239c5f9..36e81b6fafbc 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | |||
@@ -368,11 +368,11 @@ nve0_fifo_cclass = { | |||
368 | * PFIFO engine | 368 | * PFIFO engine |
369 | ******************************************************************************/ | 369 | ******************************************************************************/ |
370 | 370 | ||
371 | struct nouveau_enum nve0_fifo_fault_unit[] = { | 371 | static const struct nouveau_enum nve0_fifo_fault_unit[] = { |
372 | {} | 372 | {} |
373 | }; | 373 | }; |
374 | 374 | ||
375 | struct nouveau_enum nve0_fifo_fault_reason[] = { | 375 | static const struct nouveau_enum nve0_fifo_fault_reason[] = { |
376 | { 0x00, "PT_NOT_PRESENT" }, | 376 | { 0x00, "PT_NOT_PRESENT" }, |
377 | { 0x01, "PT_TOO_SHORT" }, | 377 | { 0x01, "PT_TOO_SHORT" }, |
378 | { 0x02, "PAGE_NOT_PRESENT" }, | 378 | { 0x02, "PAGE_NOT_PRESENT" }, |
@@ -385,15 +385,15 @@ struct nouveau_enum nve0_fifo_fault_reason[] = { | |||
385 | {} | 385 | {} |
386 | }; | 386 | }; |
387 | 387 | ||
388 | struct nouveau_enum nve0_fifo_fault_hubclient[] = { | 388 | static const struct nouveau_enum nve0_fifo_fault_hubclient[] = { |
389 | {} | 389 | {} |
390 | }; | 390 | }; |
391 | 391 | ||
392 | struct nouveau_enum nve0_fifo_fault_gpcclient[] = { | 392 | static const struct nouveau_enum nve0_fifo_fault_gpcclient[] = { |
393 | {} | 393 | {} |
394 | }; | 394 | }; |
395 | 395 | ||
396 | struct nouveau_bitfield nve0_fifo_subfifo_intr[] = { | 396 | static const struct nouveau_bitfield nve0_fifo_subfifo_intr[] = { |
397 | { 0x00200000, "ILLEGAL_MTHD" }, | 397 | { 0x00200000, "ILLEGAL_MTHD" }, |
398 | { 0x00800000, "EMPTY_SUBC" }, | 398 | { 0x00800000, "EMPTY_SUBC" }, |
399 | {} | 399 | {} |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv04.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv04.c index e5b01899dece..618528248457 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nv04.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv04.c | |||
@@ -1213,13 +1213,13 @@ nv04_graph_idle(void *obj) | |||
1213 | return true; | 1213 | return true; |
1214 | } | 1214 | } |
1215 | 1215 | ||
1216 | static struct nouveau_bitfield | 1216 | static const struct nouveau_bitfield |
1217 | nv04_graph_intr_name[] = { | 1217 | nv04_graph_intr_name[] = { |
1218 | { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, | 1218 | { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, |
1219 | {} | 1219 | {} |
1220 | }; | 1220 | }; |
1221 | 1221 | ||
1222 | static struct nouveau_bitfield | 1222 | static const struct nouveau_bitfield |
1223 | nv04_graph_nstatus[] = { | 1223 | nv04_graph_nstatus[] = { |
1224 | { NV04_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, | 1224 | { NV04_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, |
1225 | { NV04_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, | 1225 | { NV04_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, |
@@ -1228,7 +1228,7 @@ nv04_graph_nstatus[] = { | |||
1228 | {} | 1228 | {} |
1229 | }; | 1229 | }; |
1230 | 1230 | ||
1231 | struct nouveau_bitfield | 1231 | const struct nouveau_bitfield |
1232 | nv04_graph_nsource[] = { | 1232 | nv04_graph_nsource[] = { |
1233 | { NV03_PGRAPH_NSOURCE_NOTIFICATION, "NOTIFICATION" }, | 1233 | { NV03_PGRAPH_NSOURCE_NOTIFICATION, "NOTIFICATION" }, |
1234 | { NV03_PGRAPH_NSOURCE_DATA_ERROR, "DATA_ERROR" }, | 1234 | { NV03_PGRAPH_NSOURCE_DATA_ERROR, "DATA_ERROR" }, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv10.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv10.c index ce38196634df..92521c89e77f 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nv10.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv10.c | |||
@@ -1135,13 +1135,13 @@ nv10_graph_tile_prog(struct nouveau_engine *engine, int i) | |||
1135 | pfifo->start(pfifo, &flags); | 1135 | pfifo->start(pfifo, &flags); |
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | struct nouveau_bitfield nv10_graph_intr_name[] = { | 1138 | const struct nouveau_bitfield nv10_graph_intr_name[] = { |
1139 | { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, | 1139 | { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, |
1140 | { NV_PGRAPH_INTR_ERROR, "ERROR" }, | 1140 | { NV_PGRAPH_INTR_ERROR, "ERROR" }, |
1141 | {} | 1141 | {} |
1142 | }; | 1142 | }; |
1143 | 1143 | ||
1144 | struct nouveau_bitfield nv10_graph_nstatus[] = { | 1144 | const struct nouveau_bitfield nv10_graph_nstatus[] = { |
1145 | { NV10_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, | 1145 | { NV10_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, |
1146 | { NV10_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, | 1146 | { NV10_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, |
1147 | { NV10_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, | 1147 | { NV10_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c index c93b5258eaec..7d30d0287ab2 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c | |||
@@ -232,7 +232,7 @@ nv84_graph_tlb_flush(struct nouveau_engine *engine) | |||
232 | return timeout ? -EBUSY : 0; | 232 | return timeout ? -EBUSY : 0; |
233 | } | 233 | } |
234 | 234 | ||
235 | static struct nouveau_enum nv50_mp_exec_error_names[] = { | 235 | static const struct nouveau_enum nv50_mp_exec_error_names[] = { |
236 | { 3, "STACK_UNDERFLOW", NULL }, | 236 | { 3, "STACK_UNDERFLOW", NULL }, |
237 | { 4, "QUADON_ACTIVE", NULL }, | 237 | { 4, "QUADON_ACTIVE", NULL }, |
238 | { 8, "TIMEOUT", NULL }, | 238 | { 8, "TIMEOUT", NULL }, |
@@ -241,30 +241,30 @@ static struct nouveau_enum nv50_mp_exec_error_names[] = { | |||
241 | {} | 241 | {} |
242 | }; | 242 | }; |
243 | 243 | ||
244 | static struct nouveau_bitfield nv50_graph_trap_m2mf[] = { | 244 | static const struct nouveau_bitfield nv50_graph_trap_m2mf[] = { |
245 | { 0x00000001, "NOTIFY" }, | 245 | { 0x00000001, "NOTIFY" }, |
246 | { 0x00000002, "IN" }, | 246 | { 0x00000002, "IN" }, |
247 | { 0x00000004, "OUT" }, | 247 | { 0x00000004, "OUT" }, |
248 | {} | 248 | {} |
249 | }; | 249 | }; |
250 | 250 | ||
251 | static struct nouveau_bitfield nv50_graph_trap_vfetch[] = { | 251 | static const struct nouveau_bitfield nv50_graph_trap_vfetch[] = { |
252 | { 0x00000001, "FAULT" }, | 252 | { 0x00000001, "FAULT" }, |
253 | {} | 253 | {} |
254 | }; | 254 | }; |
255 | 255 | ||
256 | static struct nouveau_bitfield nv50_graph_trap_strmout[] = { | 256 | static const struct nouveau_bitfield nv50_graph_trap_strmout[] = { |
257 | { 0x00000001, "FAULT" }, | 257 | { 0x00000001, "FAULT" }, |
258 | {} | 258 | {} |
259 | }; | 259 | }; |
260 | 260 | ||
261 | static struct nouveau_bitfield nv50_graph_trap_ccache[] = { | 261 | static const struct nouveau_bitfield nv50_graph_trap_ccache[] = { |
262 | { 0x00000001, "FAULT" }, | 262 | { 0x00000001, "FAULT" }, |
263 | {} | 263 | {} |
264 | }; | 264 | }; |
265 | 265 | ||
266 | /* There must be a *lot* of these. Will take some time to gather them up. */ | 266 | /* There must be a *lot* of these. Will take some time to gather them up. */ |
267 | struct nouveau_enum nv50_data_error_names[] = { | 267 | const struct nouveau_enum nv50_data_error_names[] = { |
268 | { 0x00000003, "INVALID_OPERATION", NULL }, | 268 | { 0x00000003, "INVALID_OPERATION", NULL }, |
269 | { 0x00000004, "INVALID_VALUE", NULL }, | 269 | { 0x00000004, "INVALID_VALUE", NULL }, |
270 | { 0x00000005, "INVALID_ENUM", NULL }, | 270 | { 0x00000005, "INVALID_ENUM", NULL }, |
@@ -310,7 +310,7 @@ struct nouveau_enum nv50_data_error_names[] = { | |||
310 | {} | 310 | {} |
311 | }; | 311 | }; |
312 | 312 | ||
313 | static struct nouveau_bitfield nv50_graph_intr_name[] = { | 313 | static const struct nouveau_bitfield nv50_graph_intr_name[] = { |
314 | { 0x00000001, "NOTIFY" }, | 314 | { 0x00000001, "NOTIFY" }, |
315 | { 0x00000002, "COMPUTE_QUERY" }, | 315 | { 0x00000002, "COMPUTE_QUERY" }, |
316 | { 0x00000010, "ILLEGAL_MTHD" }, | 316 | { 0x00000010, "ILLEGAL_MTHD" }, |
diff --git a/drivers/gpu/drm/nouveau/core/include/core/enum.h b/drivers/gpu/drm/nouveau/core/include/core/enum.h index 62ec0416ebcf..e7b1e181943b 100644 --- a/drivers/gpu/drm/nouveau/core/include/core/enum.h +++ b/drivers/gpu/drm/nouveau/core/include/core/enum.h | |||
@@ -4,7 +4,7 @@ | |||
4 | struct nouveau_enum { | 4 | struct nouveau_enum { |
5 | u32 value; | 5 | u32 value; |
6 | const char *name; | 6 | const char *name; |
7 | void *data; | 7 | const void *data; |
8 | }; | 8 | }; |
9 | 9 | ||
10 | const struct nouveau_enum * | 10 | const struct nouveau_enum * |
diff --git a/drivers/gpu/drm/nouveau/core/include/engine/graph.h b/drivers/gpu/drm/nouveau/core/include/engine/graph.h index 388cfcff7bd0..6943b40d0817 100644 --- a/drivers/gpu/drm/nouveau/core/include/engine/graph.h +++ b/drivers/gpu/drm/nouveau/core/include/engine/graph.h | |||
@@ -60,13 +60,13 @@ extern struct nouveau_oclass nv50_graph_oclass; | |||
60 | extern struct nouveau_oclass nvc0_graph_oclass; | 60 | extern struct nouveau_oclass nvc0_graph_oclass; |
61 | extern struct nouveau_oclass nve0_graph_oclass; | 61 | extern struct nouveau_oclass nve0_graph_oclass; |
62 | 62 | ||
63 | extern struct nouveau_bitfield nv04_graph_nsource[]; | 63 | extern const struct nouveau_bitfield nv04_graph_nsource[]; |
64 | extern struct nouveau_ofuncs nv04_graph_ofuncs; | 64 | extern struct nouveau_ofuncs nv04_graph_ofuncs; |
65 | bool nv04_graph_idle(void *obj); | 65 | bool nv04_graph_idle(void *obj); |
66 | 66 | ||
67 | extern struct nouveau_bitfield nv10_graph_intr_name[]; | 67 | extern const struct nouveau_bitfield nv10_graph_intr_name[]; |
68 | extern struct nouveau_bitfield nv10_graph_nstatus[]; | 68 | extern const struct nouveau_bitfield nv10_graph_nstatus[]; |
69 | 69 | ||
70 | extern struct nouveau_enum nv50_data_error_names[]; | 70 | extern const struct nouveau_enum nv50_data_error_names[]; |
71 | 71 | ||
72 | #endif | 72 | #endif |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c index eaf18fb2c306..436e9efe7ef5 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c | |||
@@ -331,7 +331,7 @@ nv50_fb_oclass = { | |||
331 | }, | 331 | }, |
332 | }; | 332 | }; |
333 | 333 | ||
334 | static struct nouveau_enum vm_dispatch_subclients[] = { | 334 | static const struct nouveau_enum vm_dispatch_subclients[] = { |
335 | { 0x00000000, "GRCTX", NULL }, | 335 | { 0x00000000, "GRCTX", NULL }, |
336 | { 0x00000001, "NOTIFY", NULL }, | 336 | { 0x00000001, "NOTIFY", NULL }, |
337 | { 0x00000002, "QUERY", NULL }, | 337 | { 0x00000002, "QUERY", NULL }, |
@@ -342,14 +342,14 @@ static struct nouveau_enum vm_dispatch_subclients[] = { | |||
342 | {} | 342 | {} |
343 | }; | 343 | }; |
344 | 344 | ||
345 | static struct nouveau_enum vm_ccache_subclients[] = { | 345 | static const struct nouveau_enum vm_ccache_subclients[] = { |
346 | { 0x00000000, "CB", NULL }, | 346 | { 0x00000000, "CB", NULL }, |
347 | { 0x00000001, "TIC", NULL }, | 347 | { 0x00000001, "TIC", NULL }, |
348 | { 0x00000002, "TSC", NULL }, | 348 | { 0x00000002, "TSC", NULL }, |
349 | {} | 349 | {} |
350 | }; | 350 | }; |
351 | 351 | ||
352 | static struct nouveau_enum vm_prop_subclients[] = { | 352 | static const struct nouveau_enum vm_prop_subclients[] = { |
353 | { 0x00000000, "RT0", NULL }, | 353 | { 0x00000000, "RT0", NULL }, |
354 | { 0x00000001, "RT1", NULL }, | 354 | { 0x00000001, "RT1", NULL }, |
355 | { 0x00000002, "RT2", NULL }, | 355 | { 0x00000002, "RT2", NULL }, |
@@ -366,19 +366,19 @@ static struct nouveau_enum vm_prop_subclients[] = { | |||
366 | {} | 366 | {} |
367 | }; | 367 | }; |
368 | 368 | ||
369 | static struct nouveau_enum vm_pfifo_subclients[] = { | 369 | static const struct nouveau_enum vm_pfifo_subclients[] = { |
370 | { 0x00000000, "PUSHBUF", NULL }, | 370 | { 0x00000000, "PUSHBUF", NULL }, |
371 | { 0x00000001, "SEMAPHORE", NULL }, | 371 | { 0x00000001, "SEMAPHORE", NULL }, |
372 | {} | 372 | {} |
373 | }; | 373 | }; |
374 | 374 | ||
375 | static struct nouveau_enum vm_bar_subclients[] = { | 375 | static const struct nouveau_enum vm_bar_subclients[] = { |
376 | { 0x00000000, "FB", NULL }, | 376 | { 0x00000000, "FB", NULL }, |
377 | { 0x00000001, "IN", NULL }, | 377 | { 0x00000001, "IN", NULL }, |
378 | {} | 378 | {} |
379 | }; | 379 | }; |
380 | 380 | ||
381 | static struct nouveau_enum vm_client[] = { | 381 | static const struct nouveau_enum vm_client[] = { |
382 | { 0x00000000, "STRMOUT", NULL }, | 382 | { 0x00000000, "STRMOUT", NULL }, |
383 | { 0x00000003, "DISPATCH", vm_dispatch_subclients }, | 383 | { 0x00000003, "DISPATCH", vm_dispatch_subclients }, |
384 | { 0x00000004, "PFIFO_WRITE", NULL }, | 384 | { 0x00000004, "PFIFO_WRITE", NULL }, |
@@ -397,7 +397,7 @@ static struct nouveau_enum vm_client[] = { | |||
397 | {} | 397 | {} |
398 | }; | 398 | }; |
399 | 399 | ||
400 | static struct nouveau_enum vm_engine[] = { | 400 | static const struct nouveau_enum vm_engine[] = { |
401 | { 0x00000000, "PGRAPH", NULL }, | 401 | { 0x00000000, "PGRAPH", NULL }, |
402 | { 0x00000001, "PVP", NULL }, | 402 | { 0x00000001, "PVP", NULL }, |
403 | { 0x00000004, "PEEPHOLE", NULL }, | 403 | { 0x00000004, "PEEPHOLE", NULL }, |
@@ -413,7 +413,7 @@ static struct nouveau_enum vm_engine[] = { | |||
413 | {} | 413 | {} |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static struct nouveau_enum vm_fault[] = { | 416 | static const struct nouveau_enum vm_fault[] = { |
417 | { 0x00000000, "PT_NOT_PRESENT", NULL }, | 417 | { 0x00000000, "PT_NOT_PRESENT", NULL }, |
418 | { 0x00000001, "PT_TOO_SHORT", NULL }, | 418 | { 0x00000001, "PT_TOO_SHORT", NULL }, |
419 | { 0x00000002, "PAGE_NOT_PRESENT", NULL }, | 419 | { 0x00000002, "PAGE_NOT_PRESENT", NULL }, |