diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c | 165 |
1 files changed, 0 insertions, 165 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c index d5530368..c5464d5b 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include "gk20a/gk20a.h" | 41 | #include "gk20a/gk20a.h" |
42 | 42 | ||
43 | #include "platform_gk20a.h" | 43 | #include "platform_gk20a.h" |
44 | #include "platform_ecc_sysfs.h" | ||
45 | #include "platform_gk20a_tegra.h" | 44 | #include "platform_gk20a_tegra.h" |
46 | #include "platform_gp10b.h" | 45 | #include "platform_gp10b.h" |
47 | #include "platform_gp10b_tegra.h" | 46 | #include "platform_gp10b_tegra.h" |
@@ -177,11 +176,6 @@ static int gp10b_tegra_late_probe(struct device *dev) | |||
177 | 176 | ||
178 | static int gp10b_tegra_remove(struct device *dev) | 177 | static int gp10b_tegra_remove(struct device *dev) |
179 | { | 178 | { |
180 | struct gk20a *g = get_gk20a(dev); | ||
181 | |||
182 | if (g->ops.gr.remove_gr_sysfs) | ||
183 | g->ops.gr.remove_gr_sysfs(g); | ||
184 | |||
185 | /* deinitialise tegra specific scaling quirks */ | 179 | /* deinitialise tegra specific scaling quirks */ |
186 | gp10b_tegra_scale_exit(dev); | 180 | gp10b_tegra_scale_exit(dev); |
187 | 181 | ||
@@ -476,162 +470,3 @@ struct gk20a_platform gp10b_tegra_platform = { | |||
476 | 470 | ||
477 | .secure_buffer_size = 401408, | 471 | .secure_buffer_size = 401408, |
478 | }; | 472 | }; |
479 | |||
480 | void gr_gp10b_create_sysfs(struct gk20a *g) | ||
481 | { | ||
482 | int error = 0; | ||
483 | struct device *dev = dev_from_gk20a(g); | ||
484 | |||
485 | /* This stat creation function is called on GR init. GR can get | ||
486 | initialized multiple times but we only need to create the ECC | ||
487 | stats once. Therefore, add the following check to avoid | ||
488 | creating duplicate stat sysfs nodes. */ | ||
489 | if (g->ecc.gr.sm_lrf_single_err_count.counters != NULL) | ||
490 | return; | ||
491 | |||
492 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
493 | 0, | ||
494 | "sm_lrf_ecc_single_err_count", | ||
495 | &g->ecc.gr.sm_lrf_single_err_count); | ||
496 | |||
497 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
498 | 0, | ||
499 | "sm_lrf_ecc_double_err_count", | ||
500 | &g->ecc.gr.sm_lrf_double_err_count); | ||
501 | |||
502 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
503 | 0, | ||
504 | "sm_shm_ecc_sec_count", | ||
505 | &g->ecc.gr.sm_shm_sec_count); | ||
506 | |||
507 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
508 | 0, | ||
509 | "sm_shm_ecc_sed_count", | ||
510 | &g->ecc.gr.sm_shm_sed_count); | ||
511 | |||
512 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
513 | 0, | ||
514 | "sm_shm_ecc_ded_count", | ||
515 | &g->ecc.gr.sm_shm_ded_count); | ||
516 | |||
517 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
518 | 0, | ||
519 | "tex_ecc_total_sec_pipe0_count", | ||
520 | &g->ecc.gr.tex_total_sec_pipe0_count); | ||
521 | |||
522 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
523 | 0, | ||
524 | "tex_ecc_total_ded_pipe0_count", | ||
525 | &g->ecc.gr.tex_total_ded_pipe0_count); | ||
526 | |||
527 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
528 | 0, | ||
529 | "tex_ecc_unique_sec_pipe0_count", | ||
530 | &g->ecc.gr.tex_unique_sec_pipe0_count); | ||
531 | |||
532 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
533 | 0, | ||
534 | "tex_ecc_unique_ded_pipe0_count", | ||
535 | &g->ecc.gr.tex_unique_ded_pipe0_count); | ||
536 | |||
537 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
538 | 0, | ||
539 | "tex_ecc_total_sec_pipe1_count", | ||
540 | &g->ecc.gr.tex_total_sec_pipe1_count); | ||
541 | |||
542 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
543 | 0, | ||
544 | "tex_ecc_total_ded_pipe1_count", | ||
545 | &g->ecc.gr.tex_total_ded_pipe1_count); | ||
546 | |||
547 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
548 | 0, | ||
549 | "tex_ecc_unique_sec_pipe1_count", | ||
550 | &g->ecc.gr.tex_unique_sec_pipe1_count); | ||
551 | |||
552 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
553 | 0, | ||
554 | "tex_ecc_unique_ded_pipe1_count", | ||
555 | &g->ecc.gr.tex_unique_ded_pipe1_count); | ||
556 | |||
557 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
558 | 2, | ||
559 | "ecc_sec_count", | ||
560 | &g->ecc.ltc.l2_sec_count); | ||
561 | |||
562 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
563 | 2, | ||
564 | "ecc_ded_count", | ||
565 | &g->ecc.ltc.l2_ded_count); | ||
566 | |||
567 | if (error) | ||
568 | dev_err(dev, "Failed to create sysfs attributes!\n"); | ||
569 | } | ||
570 | |||
571 | void gr_gp10b_remove_sysfs(struct gk20a *g) | ||
572 | { | ||
573 | struct device *dev = dev_from_gk20a(g); | ||
574 | |||
575 | if (!g->ecc.gr.sm_lrf_single_err_count.counters) | ||
576 | return; | ||
577 | |||
578 | nvgpu_gr_ecc_stat_remove(dev, | ||
579 | 0, | ||
580 | &g->ecc.gr.sm_lrf_single_err_count); | ||
581 | |||
582 | nvgpu_gr_ecc_stat_remove(dev, | ||
583 | 0, | ||
584 | &g->ecc.gr.sm_lrf_double_err_count); | ||
585 | |||
586 | nvgpu_gr_ecc_stat_remove(dev, | ||
587 | 0, | ||
588 | &g->ecc.gr.sm_shm_sec_count); | ||
589 | |||
590 | nvgpu_gr_ecc_stat_remove(dev, | ||
591 | 0, | ||
592 | &g->ecc.gr.sm_shm_sed_count); | ||
593 | |||
594 | nvgpu_gr_ecc_stat_remove(dev, | ||
595 | 0, | ||
596 | &g->ecc.gr.sm_shm_ded_count); | ||
597 | |||
598 | nvgpu_gr_ecc_stat_remove(dev, | ||
599 | 0, | ||
600 | &g->ecc.gr.tex_total_sec_pipe0_count); | ||
601 | |||
602 | nvgpu_gr_ecc_stat_remove(dev, | ||
603 | 0, | ||
604 | &g->ecc.gr.tex_total_ded_pipe0_count); | ||
605 | |||
606 | nvgpu_gr_ecc_stat_remove(dev, | ||
607 | 0, | ||
608 | &g->ecc.gr.tex_unique_sec_pipe0_count); | ||
609 | |||
610 | nvgpu_gr_ecc_stat_remove(dev, | ||
611 | 0, | ||
612 | &g->ecc.gr.tex_unique_ded_pipe0_count); | ||
613 | |||
614 | nvgpu_gr_ecc_stat_remove(dev, | ||
615 | 0, | ||
616 | &g->ecc.gr.tex_total_sec_pipe1_count); | ||
617 | |||
618 | nvgpu_gr_ecc_stat_remove(dev, | ||
619 | 0, | ||
620 | &g->ecc.gr.tex_total_ded_pipe1_count); | ||
621 | |||
622 | nvgpu_gr_ecc_stat_remove(dev, | ||
623 | 0, | ||
624 | &g->ecc.gr.tex_unique_sec_pipe1_count); | ||
625 | |||
626 | nvgpu_gr_ecc_stat_remove(dev, | ||
627 | 0, | ||
628 | &g->ecc.gr.tex_unique_ded_pipe1_count); | ||
629 | |||
630 | nvgpu_gr_ecc_stat_remove(dev, | ||
631 | 2, | ||
632 | &g->ecc.ltc.l2_sec_count); | ||
633 | |||
634 | nvgpu_gr_ecc_stat_remove(dev, | ||
635 | 2, | ||
636 | &g->ecc.ltc.l2_ded_count); | ||
637 | } | ||