diff options
author | Sami Kiminki <skiminki@nvidia.com> | 2017-09-15 11:58:58 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-10 11:37:52 -0500 |
commit | 98bd673a7371940f24d37ad3a6d7b426995e737e (patch) | |
tree | 6ee7b48f4e76e876c774343753a0b0b0b1df7547 | |
parent | d99b72974d06d4b3bc577bae8dc721b7b8f3cde9 (diff) |
gpu: nvgpu: Remove PTE kind code for GV100/GV11B
Remove gv11b_init_uncompressed_kind_map(), gv11b_init_kind_attr(), and
the related kind setup code. They are not needed anymore.
While we're doing these changes, remove a redundant assignment of
g->bootstrap_owner in hal_gv100.c.
Bug 1902982
Change-Id: Ib40d8f55cfbfa34143a3765c2b4913926ca021fd
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1560931
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fb_gv11b.c | 440 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fb_gv11b.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | 2 |
5 files changed, 0 insertions, 451 deletions
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 88008e77..7f2b149b 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -764,11 +764,6 @@ int gv100_init_hal(struct gk20a *g) | |||
764 | g->pmu_lsf_pmu_wpr_init_done = 0; | 764 | g->pmu_lsf_pmu_wpr_init_done = 0; |
765 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; | 765 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; |
766 | 766 | ||
767 | gv11b_init_uncompressed_kind_map(); | ||
768 | gv11b_init_kind_attr(); | ||
769 | |||
770 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; | ||
771 | |||
772 | g->name = "gv10x"; | 767 | g->name = "gv10x"; |
773 | 768 | ||
774 | return 0; | 769 | return 0; |
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c index d89018e5..be567c26 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <nvgpu/barrier.h> | 31 | #include <nvgpu/barrier.h> |
32 | 32 | ||
33 | #include "gk20a/gk20a.h" | 33 | #include "gk20a/gk20a.h" |
34 | #include "gk20a/kind_gk20a.h" | ||
35 | #include "gk20a/mm_gk20a.h" | 34 | #include "gk20a/mm_gk20a.h" |
36 | 35 | ||
37 | #include "gp10b/fb_gp10b.h" | 36 | #include "gp10b/fb_gp10b.h" |
@@ -262,445 +261,6 @@ static const char *const gpc_client_descs_gv11b[] = { | |||
262 | "t1 36", "t1 37", "t1 38", "t1 39", | 261 | "t1 36", "t1 37", "t1 38", "t1 39", |
263 | }; | 262 | }; |
264 | 263 | ||
265 | noinline_for_stack void gv11b_init_uncompressed_kind_map(void) | ||
266 | { | ||
267 | int i; | ||
268 | |||
269 | for (i = 0; i < 256; i++) | ||
270 | gk20a_uc_kind_map[i] = gmmu_pte_kind_invalid_v(); | ||
271 | |||
272 | /* From gv11b */ | ||
273 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms2_4cbra_v()] = | ||
274 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms2_4cbra_v()] = | ||
275 | gmmu_pte_kind_generic_16bx2_v(); | ||
276 | |||
277 | /* From gp10b */ | ||
278 | gk20a_uc_kind_map[gmmu_pte_kind_z16_2cz_v()] = | ||
279 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms2_2cz_v()] = | ||
280 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms4_2cz_v()] = | ||
281 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms8_2cz_v()] = | ||
282 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms16_2cz_v()] = | ||
283 | gmmu_pte_kind_z16_v(); | ||
284 | |||
285 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms4_4cbra_v()] = | ||
286 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms4_4cbra_v()] = | ||
287 | gmmu_pte_kind_generic_16bx2_v(); | ||
288 | |||
289 | /* From gm20b */ | ||
290 | gk20a_uc_kind_map[gmmu_pte_kind_s8_v()] = | ||
291 | gk20a_uc_kind_map[gmmu_pte_kind_s8_2s_v()] = | ||
292 | gmmu_pte_kind_s8_v(); | ||
293 | |||
294 | /* From gk20a */ | ||
295 | gk20a_uc_kind_map[gmmu_pte_kind_z16_v()] = | ||
296 | gk20a_uc_kind_map[gmmu_pte_kind_z16_2c_v()] = | ||
297 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms2_2c_v()] = | ||
298 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms4_2c_v()] = | ||
299 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms8_2c_v()] = | ||
300 | gk20a_uc_kind_map[gmmu_pte_kind_z16_2z_v()] = | ||
301 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms2_2z_v()] = | ||
302 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms4_2z_v()] = | ||
303 | gk20a_uc_kind_map[gmmu_pte_kind_z16_ms8_2z_v()] = | ||
304 | gmmu_pte_kind_z16_v(); | ||
305 | |||
306 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_v()] = | ||
307 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_2cz_v()] = | ||
308 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_ms2_2cz_v()] = | ||
309 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_ms4_2cz_v()] = | ||
310 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_ms8_2cz_v()] = | ||
311 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_2cs_v()] = | ||
312 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_ms2_2cs_v()] = | ||
313 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_ms4_2cs_v()] = | ||
314 | gk20a_uc_kind_map[gmmu_pte_kind_s8z24_ms8_2cs_v()] = | ||
315 | gmmu_pte_kind_s8z24_v(); | ||
316 | |||
317 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms4_vc4_v()] = | ||
318 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms4_vc4_2cs_v()] = | ||
319 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms4_vc4_2czv_v()] = | ||
320 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms4_vc4_2zv_v()] = | ||
321 | gmmu_pte_kind_v8z24_ms4_vc4_v(); | ||
322 | |||
323 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms8_vc8_v()] = | ||
324 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms8_vc8_2cs_v()] = | ||
325 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms8_vc8_2czv_v()] = | ||
326 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms8_vc8_2zv_v()] = | ||
327 | gmmu_pte_kind_v8z24_ms8_vc8_v(); | ||
328 | |||
329 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms4_vc12_v()] = | ||
330 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms4_vc12_2cs_v()] = | ||
331 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms4_vc12_2czv_v()] = | ||
332 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms4_vc12_2zv_v()] = | ||
333 | gmmu_pte_kind_v8z24_ms4_vc12_v(); | ||
334 | |||
335 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms8_vc24_v()] = | ||
336 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms8_vc24_2cs_v()] = | ||
337 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms8_vc24_2czv_v()] = | ||
338 | gk20a_uc_kind_map[gmmu_pte_kind_v8z24_ms8_vc24_2zv_v()] = | ||
339 | gmmu_pte_kind_v8z24_ms8_vc24_v(); | ||
340 | |||
341 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_v()] = | ||
342 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_2cs_v()] = | ||
343 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_ms2_2cs_v()] = | ||
344 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_ms4_2cs_v()] = | ||
345 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_ms8_2cs_v()] = | ||
346 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_2cz_v()] = | ||
347 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_ms2_2cz_v()] = | ||
348 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_ms4_2cz_v()] = | ||
349 | gk20a_uc_kind_map[gmmu_pte_kind_z24s8_ms8_2cz_v()] = | ||
350 | gmmu_pte_kind_z24s8_v(); | ||
351 | |||
352 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_v()] = | ||
353 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_2cs_v()] = | ||
354 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_ms2_2cs_v()] = | ||
355 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_ms4_2cs_v()] = | ||
356 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_ms8_2cs_v()] = | ||
357 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_2cz_v()] = | ||
358 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_ms2_2cz_v()] = | ||
359 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_ms4_2cz_v()] = | ||
360 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_ms8_2cz_v()] = | ||
361 | gmmu_pte_kind_zf32_v(); | ||
362 | |||
363 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_v()] = | ||
364 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_2cs_v()] = | ||
365 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_2cszv_v()] = | ||
366 | gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_v(); | ||
367 | |||
368 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms4_vc4_v()] = | ||
369 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms4_vc4_2cs_v()] = | ||
370 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms4_vc4_2cszv_v()] = | ||
371 | gmmu_pte_kind_x8z24_x16v8s8_ms4_vc4_v(); | ||
372 | |||
373 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms8_vc8_v()] = | ||
374 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms8_vc8_2cs_v()] = | ||
375 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms8_vc8_2cszv_v()] = | ||
376 | gmmu_pte_kind_x8z24_x16v8s8_ms8_vc8_v(); | ||
377 | |||
378 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_v()] = | ||
379 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_2cs_v()] = | ||
380 | gk20a_uc_kind_map[gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_2cszv_v()] = | ||
381 | gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_v(); | ||
382 | |||
383 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_v()] = | ||
384 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_2cs_v()] = | ||
385 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_2cszv_v()] = | ||
386 | gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_v(); | ||
387 | |||
388 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms4_vc4_v()] = | ||
389 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms4_vc4_2cs_v()] = | ||
390 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms4_vc4_2cszv_v()] = | ||
391 | gmmu_pte_kind_zf32_x16v8s8_ms4_vc4_v(); | ||
392 | |||
393 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms8_vc8_v()] = | ||
394 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms8_vc8_2cs_v()] = | ||
395 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms8_vc8_2cszv_v()] = | ||
396 | gmmu_pte_kind_zf32_x16v8s8_ms8_vc8_v(); | ||
397 | |||
398 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_v()] = | ||
399 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_2cs_v()] = | ||
400 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_2cszv_v()] = | ||
401 | gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_v(); | ||
402 | |||
403 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_v()] = | ||
404 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_2cszv_v()] = | ||
405 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_ms2_2cszv_v()] = | ||
406 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_ms4_2cszv_v()] = | ||
407 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_ms8_2cszv_v()] = | ||
408 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_2cs_v()] = | ||
409 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_ms2_2cs_v()] = | ||
410 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_ms4_2cs_v()] = | ||
411 | gk20a_uc_kind_map[gmmu_pte_kind_zf32_x24s8_ms8_2cs_v()] = | ||
412 | gmmu_pte_kind_zf32_x24s8_v(); | ||
413 | |||
414 | gk20a_uc_kind_map[gmmu_pte_kind_c32_2c_v()] = | ||
415 | gk20a_uc_kind_map[gmmu_pte_kind_c32_2cba_v()] = | ||
416 | gk20a_uc_kind_map[gmmu_pte_kind_c32_2cra_v()] = | ||
417 | gk20a_uc_kind_map[gmmu_pte_kind_c32_2bra_v()] = | ||
418 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms2_2c_v()] = | ||
419 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms4_2c_v()] = | ||
420 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms4_2cbr_v()] = | ||
421 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms4_2cba_v()] = | ||
422 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms4_2cra_v()] = | ||
423 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms4_2bra_v()] = | ||
424 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms8_ms16_2c_v()] = | ||
425 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms8_ms16_2cra_v()] = | ||
426 | gk20a_uc_kind_map[gmmu_pte_kind_c64_2c_v()] = | ||
427 | gk20a_uc_kind_map[gmmu_pte_kind_c64_2cbr_v()] = | ||
428 | gk20a_uc_kind_map[gmmu_pte_kind_c64_2cba_v()] = | ||
429 | gk20a_uc_kind_map[gmmu_pte_kind_c64_2cra_v()] = | ||
430 | gk20a_uc_kind_map[gmmu_pte_kind_c64_2bra_v()] = | ||
431 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms2_2c_v()] = | ||
432 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms4_2c_v()] = | ||
433 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms4_2cbr_v()] = | ||
434 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms4_2cba_v()] = | ||
435 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms4_2cra_v()] = | ||
436 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms4_2bra_v()] = | ||
437 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms8_ms16_2c_v()] = | ||
438 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms8_ms16_2cra_v()] = | ||
439 | gk20a_uc_kind_map[gmmu_pte_kind_c128_2c_v()] = | ||
440 | gk20a_uc_kind_map[gmmu_pte_kind_c128_2cr_v()] = | ||
441 | gk20a_uc_kind_map[gmmu_pte_kind_c128_ms2_2c_v()] = | ||
442 | gk20a_uc_kind_map[gmmu_pte_kind_c128_ms2_2cr_v()] = | ||
443 | gk20a_uc_kind_map[gmmu_pte_kind_c128_ms4_2c_v()] = | ||
444 | gk20a_uc_kind_map[gmmu_pte_kind_c128_ms4_2cr_v()] = | ||
445 | gk20a_uc_kind_map[gmmu_pte_kind_c128_ms8_ms16_2c_v()] = | ||
446 | gk20a_uc_kind_map[gmmu_pte_kind_c128_ms8_ms16_2cr_v()] = | ||
447 | gmmu_pte_kind_generic_16bx2_v(); | ||
448 | |||
449 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms4_vc4_2czv_v()] = | ||
450 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms4_vc4_2cs_v()] = | ||
451 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms4_vc4_2zv_v()] = | ||
452 | gmmu_pte_kind_z24v8_ms4_vc4_v(); | ||
453 | |||
454 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms4_vc12_2czv_v()] = | ||
455 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms4_vc12_2cs_v()] = | ||
456 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms4_vc12_2zv_v()] = | ||
457 | gmmu_pte_kind_z24v8_ms4_vc12_v(); | ||
458 | |||
459 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms8_vc8_2cs_v()] = | ||
460 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms8_vc8_2czv_v()] = | ||
461 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms8_vc8_2zv_v()] = | ||
462 | gmmu_pte_kind_z24v8_ms8_vc8_v(); | ||
463 | |||
464 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms8_vc24_2cs_v()] = | ||
465 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms8_vc24_2czv_v()] = | ||
466 | gk20a_uc_kind_map[gmmu_pte_kind_z24v8_ms8_vc24_2zv_v()] = | ||
467 | gmmu_pte_kind_z24v8_ms8_vc24_v(); | ||
468 | |||
469 | gk20a_uc_kind_map[gmmu_pte_kind_x8c24_v()] = | ||
470 | gmmu_pte_kind_x8c24_v(); | ||
471 | } | ||
472 | |||
473 | static noinline_for_stack bool gv11b_kind_supported(u8 k) | ||
474 | { | ||
475 | return /* From gv11b */ | ||
476 | k == gmmu_pte_kind_c32_ms2_4cbra_v() | ||
477 | || k == gmmu_pte_kind_c64_ms2_4cbra_v() | ||
478 | /* From gp10b */ | ||
479 | || (k >= gmmu_pte_kind_z16_2cz_v() && | ||
480 | k <= gmmu_pte_kind_z16_ms8_2cz_v()) | ||
481 | || k == gmmu_pte_kind_z16_ms16_2cz_v() | ||
482 | || k == gmmu_pte_kind_c32_ms4_4cbra_v() | ||
483 | || k == gmmu_pte_kind_c64_ms4_4cbra_v() | ||
484 | /* From gm20b */ | ||
485 | || (k == gmmu_pte_kind_smsked_message_v()) | ||
486 | || (k >= gmmu_pte_kind_s8_v() && | ||
487 | k <= gmmu_pte_kind_s8_2s_v()) | ||
488 | /* From gk20a */ | ||
489 | || gk20a_kind_work_creation(k) | ||
490 | || (k == gmmu_pte_kind_invalid_v()) | ||
491 | || (k == gmmu_pte_kind_pitch_v()) | ||
492 | || (k >= gmmu_pte_kind_z16_v() && | ||
493 | k <= gmmu_pte_kind_z16_ms8_2c_v()) | ||
494 | || (k >= gmmu_pte_kind_z16_2z_v() && | ||
495 | k <= gmmu_pte_kind_z16_ms8_2z_v()) | ||
496 | || (k == gmmu_pte_kind_s8z24_v()) | ||
497 | || (k >= gmmu_pte_kind_s8z24_2cz_v() && | ||
498 | k <= gmmu_pte_kind_s8z24_ms8_2cz_v()) | ||
499 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_v() && | ||
500 | k <= gmmu_pte_kind_v8z24_ms8_vc24_v()) | ||
501 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_2czv_v() && | ||
502 | k <= gmmu_pte_kind_v8z24_ms8_vc24_2zv_v()) | ||
503 | || (k == gmmu_pte_kind_z24s8_v()) | ||
504 | || (k >= gmmu_pte_kind_z24s8_2cz_v() && | ||
505 | k <= gmmu_pte_kind_z24s8_ms8_2cz_v()) | ||
506 | || (k == gmmu_pte_kind_zf32_v()) | ||
507 | || (k >= gmmu_pte_kind_zf32_2cz_v() && | ||
508 | k <= gmmu_pte_kind_zf32_ms8_2cz_v()) | ||
509 | || (k >= gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_v() && | ||
510 | k <= gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_v()) | ||
511 | || (k >= gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_2cszv_v() && | ||
512 | k <= gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_v()) | ||
513 | || (k >= gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_2cszv_v() && | ||
514 | k <= gmmu_pte_kind_zf32_x24s8_v()) | ||
515 | || (k >= gmmu_pte_kind_zf32_x24s8_2cszv_v() && | ||
516 | k <= gmmu_pte_kind_zf32_x24s8_ms8_2cszv_v()) | ||
517 | || (k == gmmu_pte_kind_generic_16bx2_v()) | ||
518 | || (k == gmmu_pte_kind_c32_2c_v()) | ||
519 | || (k == gmmu_pte_kind_c32_2cra_v()) | ||
520 | || (k == gmmu_pte_kind_c32_ms2_2c_v()) | ||
521 | || (k >= gmmu_pte_kind_c32_ms4_2c_v() && | ||
522 | k <= gmmu_pte_kind_c32_ms4_2cbr_v()) | ||
523 | || (k >= gmmu_pte_kind_c32_ms4_2cra_v() && | ||
524 | k <= gmmu_pte_kind_c64_2c_v()) | ||
525 | || (k == gmmu_pte_kind_c64_2cra_v()) | ||
526 | || (k == gmmu_pte_kind_c64_ms2_2c_v()) | ||
527 | || (k >= gmmu_pte_kind_c64_ms4_2c_v() && | ||
528 | k <= gmmu_pte_kind_c64_ms4_2cbr_v()) | ||
529 | || (k >= gmmu_pte_kind_c64_ms4_2cra_v() && | ||
530 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()) | ||
531 | || (k == gmmu_pte_kind_pitch_no_swizzle_v()); | ||
532 | } | ||
533 | |||
534 | static noinline_for_stack bool gv11b_kind_z(u8 k) | ||
535 | { | ||
536 | return /* From gv11b */ | ||
537 | (k == gmmu_pte_kind_c32_ms2_4cbra_v()) | ||
538 | || (k == gmmu_pte_kind_c64_ms2_4cbra_v()) | ||
539 | /* From gp10b */ | ||
540 | || (k >= gmmu_pte_kind_z16_2cz_v() && | ||
541 | k <= gmmu_pte_kind_z16_ms8_2cz_v()) | ||
542 | || (k == gmmu_pte_kind_z16_ms16_2cz_v()) | ||
543 | /* From gm20b */ | ||
544 | || (k >= gmmu_pte_kind_s8_v() && | ||
545 | k <= gmmu_pte_kind_s8_2s_v()) | ||
546 | /* From gk20a */ | ||
547 | || (k >= gmmu_pte_kind_z16_v() && | ||
548 | k <= gmmu_pte_kind_v8z24_ms8_vc24_v()) | ||
549 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_1zv_v() && | ||
550 | k <= gmmu_pte_kind_v8z24_ms8_vc24_2cs_v()) | ||
551 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_2czv_v() && | ||
552 | k <= gmmu_pte_kind_z24v8_ms8_vc24_v()) | ||
553 | || (k >= gmmu_pte_kind_z24v8_ms4_vc12_1zv_v() && | ||
554 | k <= gmmu_pte_kind_z24v8_ms8_vc24_2cs_v()) | ||
555 | || (k >= gmmu_pte_kind_z24v8_ms4_vc12_2czv_v() && | ||
556 | k <= gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_1cs_v()) | ||
557 | || (k >= gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_1zv_v() && | ||
558 | k <= gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_1cs_v()) | ||
559 | || (k >= gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_1zv_v() && | ||
560 | k <= gmmu_pte_kind_zf32_x24s8_ms16_1cs_v()); | ||
561 | } | ||
562 | |||
563 | static noinline_for_stack bool gv11b_kind_c(u8 k) | ||
564 | { | ||
565 | return gk20a_kind_work_creation(k) | ||
566 | || (k == gmmu_pte_kind_pitch_v()) | ||
567 | || (k == gmmu_pte_kind_generic_16bx2_v()) | ||
568 | || (k >= gmmu_pte_kind_c32_2c_v() && | ||
569 | k <= gmmu_pte_kind_c32_ms2_2cbr_v()) | ||
570 | || (k >= gmmu_pte_kind_c32_ms4_2c_v() && | ||
571 | k <= gmmu_pte_kind_c64_ms2_2cbr_v()) | ||
572 | || (k >= gmmu_pte_kind_c64_ms4_2c_v() && | ||
573 | k <= gmmu_pte_kind_pitch_no_swizzle_v()); | ||
574 | } | ||
575 | |||
576 | static noinline_for_stack bool gv11b_kind_compressible(u8 k) | ||
577 | { | ||
578 | |||
579 | return /* From gv11b */ | ||
580 | (k == gmmu_pte_kind_c32_ms2_4cbra_v()) | ||
581 | || (k == gmmu_pte_kind_c64_ms2_4cbra_v()) | ||
582 | /* From gp10b */ | ||
583 | || (k >= gmmu_pte_kind_z16_2cz_v() && | ||
584 | k <= gmmu_pte_kind_z16_ms8_2cz_v()) | ||
585 | || (k == gmmu_pte_kind_z16_ms16_2cz_v()) | ||
586 | || (k == gmmu_pte_kind_c32_ms4_4cbra_v()) | ||
587 | || (k == gmmu_pte_kind_c64_ms4_4cbra_v()) | ||
588 | /* From gm20b */ | ||
589 | || (k >= gmmu_pte_kind_s8_v() && | ||
590 | k <= gmmu_pte_kind_s8_2s_v()) | ||
591 | /* From gk20a */ | ||
592 | || (k >= gmmu_pte_kind_s8z24_1z_v() && | ||
593 | k <= gmmu_pte_kind_s8z24_ms16_4cszv_v()) | ||
594 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_1zv_v() && | ||
595 | k <= gmmu_pte_kind_v8z24_ms8_vc24_2cs_v()) | ||
596 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_2czv_v() && | ||
597 | k <= gmmu_pte_kind_v8z24_ms8_vc24_4cszv_v()) | ||
598 | || (k >= gmmu_pte_kind_z24s8_1z_v() && | ||
599 | k <= gmmu_pte_kind_z24s8_ms16_4cszv_v()) | ||
600 | || (k >= gmmu_pte_kind_z24v8_ms4_vc12_1zv_v() && | ||
601 | k <= gmmu_pte_kind_z24v8_ms8_vc24_2cs_v()) | ||
602 | || (k >= gmmu_pte_kind_z24v8_ms4_vc12_2czv_v() && | ||
603 | k <= gmmu_pte_kind_z24v8_ms8_vc24_4cszv_v()) | ||
604 | || (k >= gmmu_pte_kind_zf32_1z_v() && | ||
605 | k <= gmmu_pte_kind_zf32_ms16_2cz_v()) | ||
606 | || (k >= gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_1cs_v() && | ||
607 | k <= gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_1cs_v()) | ||
608 | || (k >= gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_1zv_v() && | ||
609 | k <= gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_2cszv_v()) | ||
610 | || (k >= gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_1cs_v() && | ||
611 | k <= gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_1cs_v()) | ||
612 | || (k >= gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_1zv_v() && | ||
613 | k <= gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_2cszv_v()) | ||
614 | || (k >= gmmu_pte_kind_zf32_x24s8_1cs_v() && | ||
615 | k <= gmmu_pte_kind_zf32_x24s8_ms16_1cs_v()) | ||
616 | || (k >= gmmu_pte_kind_zf32_x24s8_2cszv_v() && | ||
617 | k <= gmmu_pte_kind_c32_ms2_2cbr_v()) | ||
618 | || (k >= gmmu_pte_kind_c32_ms4_2c_v() && | ||
619 | k <= gmmu_pte_kind_c64_ms2_2cbr_v()) | ||
620 | || (k >= gmmu_pte_kind_c64_ms4_2c_v() && | ||
621 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); | ||
622 | } | ||
623 | |||
624 | static noinline_for_stack bool gv11b_kind_zbc(u8 k) | ||
625 | { | ||
626 | |||
627 | return /* From gv11b */ | ||
628 | (k == gmmu_pte_kind_c32_ms2_4cbra_v()) | ||
629 | || (k == gmmu_pte_kind_c64_ms2_4cbra_v()) | ||
630 | /* From gp10b */ | ||
631 | || (k >= gmmu_pte_kind_z16_2cz_v() && | ||
632 | k <= gmmu_pte_kind_z16_ms8_2cz_v()) | ||
633 | || (k == gmmu_pte_kind_z16_ms16_2cz_v()) | ||
634 | || (k == gmmu_pte_kind_c32_ms4_4cbra_v()) | ||
635 | || (k == gmmu_pte_kind_c64_ms4_4cbra_v()) | ||
636 | /* From gm20b */ | ||
637 | || (k >= gmmu_pte_kind_s8_v() && | ||
638 | k <= gmmu_pte_kind_s8_2s_v()) | ||
639 | /* From gk20a */ | ||
640 | || (k >= gmmu_pte_kind_z16_2c_v() && | ||
641 | k <= gmmu_pte_kind_z16_ms16_2c_v()) | ||
642 | || (k >= gmmu_pte_kind_s8z24_2cz_v() && | ||
643 | k <= gmmu_pte_kind_s8z24_ms16_4cszv_v()) | ||
644 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_2cs_v() && | ||
645 | k <= gmmu_pte_kind_v8z24_ms8_vc24_2cs_v()) | ||
646 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_2czv_v() && | ||
647 | k <= gmmu_pte_kind_v8z24_ms8_vc24_2czv_v()) | ||
648 | || (k >= gmmu_pte_kind_v8z24_ms4_vc12_4cszv_v() && | ||
649 | k <= gmmu_pte_kind_v8z24_ms8_vc24_4cszv_v()) | ||
650 | || (k >= gmmu_pte_kind_z24s8_2cs_v() && | ||
651 | k <= gmmu_pte_kind_z24s8_ms16_4cszv_v()) | ||
652 | || (k >= gmmu_pte_kind_z24v8_ms4_vc12_2cs_v() && | ||
653 | k <= gmmu_pte_kind_z24v8_ms8_vc24_2cs_v()) | ||
654 | || (k >= gmmu_pte_kind_z24v8_ms4_vc12_2czv_v() && | ||
655 | k <= gmmu_pte_kind_z24v8_ms8_vc24_2czv_v()) | ||
656 | || (k >= gmmu_pte_kind_z24v8_ms4_vc12_4cszv_v() && | ||
657 | k <= gmmu_pte_kind_z24v8_ms8_vc24_4cszv_v()) | ||
658 | || (k >= gmmu_pte_kind_zf32_2cs_v() && | ||
659 | k <= gmmu_pte_kind_zf32_ms16_2cz_v()) | ||
660 | || (k >= gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_1cs_v() && | ||
661 | k <= gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_1cs_v()) | ||
662 | || (k >= gmmu_pte_kind_x8z24_x16v8s8_ms4_vc12_1czv_v() && | ||
663 | k <= gmmu_pte_kind_x8z24_x16v8s8_ms8_vc24_2cszv_v()) | ||
664 | || (k >= gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_1cs_v() && | ||
665 | k <= gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_1cs_v()) | ||
666 | || (k >= gmmu_pte_kind_zf32_x16v8s8_ms4_vc12_1czv_v() && | ||
667 | k <= gmmu_pte_kind_zf32_x16v8s8_ms8_vc24_2cszv_v()) | ||
668 | || (k >= gmmu_pte_kind_zf32_x24s8_1cs_v() && | ||
669 | k <= gmmu_pte_kind_zf32_x24s8_ms16_1cs_v()) | ||
670 | || (k >= gmmu_pte_kind_zf32_x24s8_2cszv_v() && | ||
671 | k <= gmmu_pte_kind_c32_2cra_v()) | ||
672 | || (k >= gmmu_pte_kind_c32_ms2_2c_v() && | ||
673 | k <= gmmu_pte_kind_c32_ms2_2cbr_v()) | ||
674 | || (k >= gmmu_pte_kind_c32_ms4_2c_v() && | ||
675 | k <= gmmu_pte_kind_c32_ms4_2cra_v()) | ||
676 | || (k >= gmmu_pte_kind_c32_ms8_ms16_2c_v() && | ||
677 | k <= gmmu_pte_kind_c64_2cra_v()) | ||
678 | || (k >= gmmu_pte_kind_c64_ms2_2c_v() && | ||
679 | k <= gmmu_pte_kind_c64_ms2_2cbr_v()) | ||
680 | || (k >= gmmu_pte_kind_c64_ms4_2c_v() && | ||
681 | k <= gmmu_pte_kind_c64_ms4_2cra_v()) | ||
682 | || (k >= gmmu_pte_kind_c64_ms8_ms16_2c_v() && | ||
683 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); | ||
684 | } | ||
685 | |||
686 | void gv11b_init_kind_attr(void) | ||
687 | { | ||
688 | u16 k; | ||
689 | |||
690 | for (k = 0; k < NV_KIND_ATTR_SIZE; k++) { | ||
691 | if (gv11b_kind_supported((u8)k)) | ||
692 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_SUPPORTED; | ||
693 | if (gv11b_kind_compressible((u8)k)) | ||
694 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_COMPRESSIBLE; | ||
695 | if (gv11b_kind_z((u8)k)) | ||
696 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_Z; | ||
697 | if (gv11b_kind_c((u8)k)) | ||
698 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_C; | ||
699 | if (gv11b_kind_zbc((u8)k)) | ||
700 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_ZBC; | ||
701 | } | ||
702 | } | ||
703 | |||
704 | u32 gv11b_fb_is_fault_buf_enabled(struct gk20a *g, | 264 | u32 gv11b_fb_is_fault_buf_enabled(struct gk20a *g, |
705 | unsigned int index) | 265 | unsigned int index) |
706 | { | 266 | { |
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h index 4ebee343..d9a6fa77 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h | |||
@@ -69,6 +69,4 @@ void gv11b_fb_disable_hub_intr(struct gk20a *g, | |||
69 | unsigned int index, unsigned int intr_type); | 69 | unsigned int index, unsigned int intr_type); |
70 | bool gv11b_fb_mmu_fault_pending(struct gk20a *g); | 70 | bool gv11b_fb_mmu_fault_pending(struct gk20a *g); |
71 | 71 | ||
72 | noinline_for_stack void gv11b_init_uncompressed_kind_map(void); | ||
73 | void gv11b_init_kind_attr(void); | ||
74 | #endif | 72 | #endif |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 681ddf3a..5d8bbbdb 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -771,8 +771,6 @@ int gv11b_init_hal(struct gk20a *g) | |||
771 | } | 771 | } |
772 | 772 | ||
773 | __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false); | 773 | __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false); |
774 | gv11b_init_uncompressed_kind_map(); | ||
775 | gv11b_init_kind_attr(); | ||
776 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; | 774 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; |
777 | 775 | ||
778 | g->name = "gv11b"; | 776 | g->name = "gv11b"; |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c index a2c95edd..a496d3fc 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -636,8 +636,6 @@ int vgpu_gv11b_init_hal(struct gk20a *g) | |||
636 | } | 636 | } |
637 | 637 | ||
638 | __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false); | 638 | __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false); |
639 | gv11b_init_uncompressed_kind_map(); | ||
640 | gv11b_init_kind_attr(); | ||
641 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; | 639 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; |
642 | 640 | ||
643 | g->name = "gv11b"; | 641 | g->name = "gv11b"; |