diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index d109dbf8..ddaaa350 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -780,36 +780,36 @@ static void dump_ctx_switch_stats(struct gk20a *g, struct vm_gk20a *vm, | |||
780 | { | 780 | { |
781 | struct mem_desc *mem = &gr_ctx->mem; | 781 | struct mem_desc *mem = &gr_ctx->mem; |
782 | 782 | ||
783 | if (gk20a_mem_begin(g, mem)) { | 783 | if (nvgpu_mem_begin(g, mem)) { |
784 | WARN_ON("Cannot map context"); | 784 | WARN_ON("Cannot map context"); |
785 | return; | 785 | return; |
786 | } | 786 | } |
787 | gk20a_err(dev_from_gk20a(g), "ctxsw_prog_main_image_magic_value_o : %x (expect %x)\n", | 787 | gk20a_err(dev_from_gk20a(g), "ctxsw_prog_main_image_magic_value_o : %x (expect %x)\n", |
788 | gk20a_mem_rd(g, mem, | 788 | nvgpu_mem_rd(g, mem, |
789 | ctxsw_prog_main_image_magic_value_o()), | 789 | ctxsw_prog_main_image_magic_value_o()), |
790 | ctxsw_prog_main_image_magic_value_v_value_v()); | 790 | ctxsw_prog_main_image_magic_value_v_value_v()); |
791 | 791 | ||
792 | 792 | ||
793 | gk20a_err(dev_from_gk20a(g), "NUM_SAVE_OPERATIONS : %d\n", | 793 | gk20a_err(dev_from_gk20a(g), "NUM_SAVE_OPERATIONS : %d\n", |
794 | gk20a_mem_rd(g, mem, | 794 | nvgpu_mem_rd(g, mem, |
795 | ctxsw_prog_main_image_num_save_ops_o())); | 795 | ctxsw_prog_main_image_num_save_ops_o())); |
796 | gk20a_err(dev_from_gk20a(g), "WFI_SAVE_OPERATIONS : %d\n", | 796 | gk20a_err(dev_from_gk20a(g), "WFI_SAVE_OPERATIONS : %d\n", |
797 | gk20a_mem_rd(g, mem, | 797 | nvgpu_mem_rd(g, mem, |
798 | ctxsw_prog_main_image_num_wfi_save_ops_o())); | 798 | ctxsw_prog_main_image_num_wfi_save_ops_o())); |
799 | gk20a_err(dev_from_gk20a(g), "CTA_SAVE_OPERATIONS : %d\n", | 799 | gk20a_err(dev_from_gk20a(g), "CTA_SAVE_OPERATIONS : %d\n", |
800 | gk20a_mem_rd(g, mem, | 800 | nvgpu_mem_rd(g, mem, |
801 | ctxsw_prog_main_image_num_cta_save_ops_o())); | 801 | ctxsw_prog_main_image_num_cta_save_ops_o())); |
802 | gk20a_err(dev_from_gk20a(g), "GFXP_SAVE_OPERATIONS : %d\n", | 802 | gk20a_err(dev_from_gk20a(g), "GFXP_SAVE_OPERATIONS : %d\n", |
803 | gk20a_mem_rd(g, mem, | 803 | nvgpu_mem_rd(g, mem, |
804 | ctxsw_prog_main_image_num_gfxp_save_ops_o())); | 804 | ctxsw_prog_main_image_num_gfxp_save_ops_o())); |
805 | gk20a_err(dev_from_gk20a(g), "CILP_SAVE_OPERATIONS : %d\n", | 805 | gk20a_err(dev_from_gk20a(g), "CILP_SAVE_OPERATIONS : %d\n", |
806 | gk20a_mem_rd(g, mem, | 806 | nvgpu_mem_rd(g, mem, |
807 | ctxsw_prog_main_image_num_cilp_save_ops_o())); | 807 | ctxsw_prog_main_image_num_cilp_save_ops_o())); |
808 | gk20a_err(dev_from_gk20a(g), | 808 | gk20a_err(dev_from_gk20a(g), |
809 | "image gfx preemption option (GFXP is 1) %x\n", | 809 | "image gfx preemption option (GFXP is 1) %x\n", |
810 | gk20a_mem_rd(g, mem, | 810 | nvgpu_mem_rd(g, mem, |
811 | ctxsw_prog_main_image_graphics_preemption_options_o())); | 811 | ctxsw_prog_main_image_graphics_preemption_options_o())); |
812 | gk20a_mem_end(g, mem); | 812 | nvgpu_mem_end(g, mem); |
813 | } | 813 | } |
814 | 814 | ||
815 | static void gr_gv11b_free_gr_ctx(struct gk20a *g, struct vm_gk20a *vm, | 815 | static void gr_gv11b_free_gr_ctx(struct gk20a *g, struct vm_gk20a *vm, |
@@ -847,13 +847,13 @@ static void gr_gv11b_update_ctxsw_preemption_mode(struct gk20a *g, | |||
847 | 847 | ||
848 | if (gr_ctx->graphics_preempt_mode == NVGPU_GRAPHICS_PREEMPTION_MODE_GFXP) { | 848 | if (gr_ctx->graphics_preempt_mode == NVGPU_GRAPHICS_PREEMPTION_MODE_GFXP) { |
849 | gk20a_dbg_info("GfxP: %x", gfxp_preempt_option); | 849 | gk20a_dbg_info("GfxP: %x", gfxp_preempt_option); |
850 | gk20a_mem_wr(g, mem, ctxsw_prog_main_image_graphics_preemption_options_o(), | 850 | nvgpu_mem_wr(g, mem, ctxsw_prog_main_image_graphics_preemption_options_o(), |
851 | gfxp_preempt_option); | 851 | gfxp_preempt_option); |
852 | } | 852 | } |
853 | 853 | ||
854 | if (gr_ctx->compute_preempt_mode == NVGPU_COMPUTE_PREEMPTION_MODE_CILP) { | 854 | if (gr_ctx->compute_preempt_mode == NVGPU_COMPUTE_PREEMPTION_MODE_CILP) { |
855 | gk20a_dbg_info("CILP: %x", cilp_preempt_option); | 855 | gk20a_dbg_info("CILP: %x", cilp_preempt_option); |
856 | gk20a_mem_wr(g, mem, ctxsw_prog_main_image_compute_preemption_options_o(), | 856 | nvgpu_mem_wr(g, mem, ctxsw_prog_main_image_compute_preemption_options_o(), |
857 | cilp_preempt_option); | 857 | cilp_preempt_option); |
858 | } | 858 | } |
859 | 859 | ||
@@ -862,7 +862,7 @@ static void gr_gv11b_update_ctxsw_preemption_mode(struct gk20a *g, | |||
862 | u32 size; | 862 | u32 size; |
863 | u32 cbes_reserve; | 863 | u32 cbes_reserve; |
864 | 864 | ||
865 | gk20a_mem_wr(g, mem, ctxsw_prog_main_image_full_preemption_ptr_o(), | 865 | nvgpu_mem_wr(g, mem, ctxsw_prog_main_image_full_preemption_ptr_o(), |
866 | gr_ctx->t18x.preempt_ctxsw_buffer.gpu_va >> 8); | 866 | gr_ctx->t18x.preempt_ctxsw_buffer.gpu_va >> 8); |
867 | 867 | ||
868 | err = gr_gk20a_ctx_patch_write_begin(g, ch_ctx); | 868 | err = gr_gk20a_ctx_patch_write_begin(g, ch_ctx); |
@@ -1858,12 +1858,12 @@ static int gr_gv11b_commit_inst(struct channel_gk20a *c, u64 gpu_va) | |||
1858 | addr_hi = u64_hi32(ctx->mem.gpu_va); | 1858 | addr_hi = u64_hi32(ctx->mem.gpu_va); |
1859 | 1859 | ||
1860 | /* point this address to engine_wfi_ptr */ | 1860 | /* point this address to engine_wfi_ptr */ |
1861 | gk20a_mem_wr32(c->g, &c->inst_block, ram_in_engine_wfi_target_w(), | 1861 | nvgpu_mem_wr32(c->g, &c->inst_block, ram_in_engine_wfi_target_w(), |
1862 | ram_in_engine_cs_wfi_v() | | 1862 | ram_in_engine_cs_wfi_v() | |
1863 | ram_in_engine_wfi_mode_f(ram_in_engine_wfi_mode_virtual_v()) | | 1863 | ram_in_engine_wfi_mode_f(ram_in_engine_wfi_mode_virtual_v()) | |
1864 | ram_in_engine_wfi_ptr_lo_f(addr_lo)); | 1864 | ram_in_engine_wfi_ptr_lo_f(addr_lo)); |
1865 | 1865 | ||
1866 | gk20a_mem_wr32(c->g, &c->inst_block, ram_in_engine_wfi_ptr_hi_w(), | 1866 | nvgpu_mem_wr32(c->g, &c->inst_block, ram_in_engine_wfi_ptr_hi_w(), |
1867 | ram_in_engine_wfi_ptr_hi_f(addr_hi)); | 1867 | ram_in_engine_wfi_ptr_hi_f(addr_hi)); |
1868 | 1868 | ||
1869 | return 0; | 1869 | return 0; |
@@ -1930,20 +1930,20 @@ static void gv11b_restore_context_header(struct gk20a *g, | |||
1930 | u32 va_lo, va_hi; | 1930 | u32 va_lo, va_hi; |
1931 | struct gr_gk20a *gr = &g->gr; | 1931 | struct gr_gk20a *gr = &g->gr; |
1932 | 1932 | ||
1933 | va_hi = gk20a_mem_rd(g, ctxheader, | 1933 | va_hi = nvgpu_mem_rd(g, ctxheader, |
1934 | ctxsw_prog_main_image_context_buffer_ptr_hi_o()); | 1934 | ctxsw_prog_main_image_context_buffer_ptr_hi_o()); |
1935 | va_lo = gk20a_mem_rd(g, ctxheader, | 1935 | va_lo = nvgpu_mem_rd(g, ctxheader, |
1936 | ctxsw_prog_main_image_context_buffer_ptr_o()); | 1936 | ctxsw_prog_main_image_context_buffer_ptr_o()); |
1937 | gk20a_mem_wr_n(g, ctxheader, 0, | 1937 | nvgpu_mem_wr_n(g, ctxheader, 0, |
1938 | gr->ctx_vars.local_golden_image, | 1938 | gr->ctx_vars.local_golden_image, |
1939 | gr->ctx_vars.golden_image_size); | 1939 | gr->ctx_vars.golden_image_size); |
1940 | gk20a_mem_wr(g, ctxheader, | 1940 | nvgpu_mem_wr(g, ctxheader, |
1941 | ctxsw_prog_main_image_context_buffer_ptr_hi_o(), va_hi); | 1941 | ctxsw_prog_main_image_context_buffer_ptr_hi_o(), va_hi); |
1942 | gk20a_mem_wr(g, ctxheader, | 1942 | nvgpu_mem_wr(g, ctxheader, |
1943 | ctxsw_prog_main_image_context_buffer_ptr_o(), va_lo); | 1943 | ctxsw_prog_main_image_context_buffer_ptr_o(), va_lo); |
1944 | gk20a_mem_wr(g, ctxheader, | 1944 | nvgpu_mem_wr(g, ctxheader, |
1945 | ctxsw_prog_main_image_num_restore_ops_o(), 0); | 1945 | ctxsw_prog_main_image_num_restore_ops_o(), 0); |
1946 | gk20a_mem_wr(g, ctxheader, | 1946 | nvgpu_mem_wr(g, ctxheader, |
1947 | ctxsw_prog_main_image_num_save_ops_o(), 0); | 1947 | ctxsw_prog_main_image_num_save_ops_o(), 0); |
1948 | } | 1948 | } |
1949 | static void gr_gv11b_write_zcull_ptr(struct gk20a *g, | 1949 | static void gr_gv11b_write_zcull_ptr(struct gk20a *g, |
@@ -1954,9 +1954,9 @@ static void gr_gv11b_write_zcull_ptr(struct gk20a *g, | |||
1954 | gpu_va = gpu_va >> 8; | 1954 | gpu_va = gpu_va >> 8; |
1955 | va_lo = u64_lo32(gpu_va); | 1955 | va_lo = u64_lo32(gpu_va); |
1956 | va_hi = u64_hi32(gpu_va); | 1956 | va_hi = u64_hi32(gpu_va); |
1957 | gk20a_mem_wr(g, mem, | 1957 | nvgpu_mem_wr(g, mem, |
1958 | ctxsw_prog_main_image_zcull_ptr_o(), va_lo); | 1958 | ctxsw_prog_main_image_zcull_ptr_o(), va_lo); |
1959 | gk20a_mem_wr(g, mem, | 1959 | nvgpu_mem_wr(g, mem, |
1960 | ctxsw_prog_main_image_zcull_ptr_hi_o(), va_hi); | 1960 | ctxsw_prog_main_image_zcull_ptr_hi_o(), va_hi); |
1961 | } | 1961 | } |
1962 | 1962 | ||
@@ -1969,9 +1969,9 @@ static void gr_gv11b_write_pm_ptr(struct gk20a *g, | |||
1969 | gpu_va = gpu_va >> 8; | 1969 | gpu_va = gpu_va >> 8; |
1970 | va_lo = u64_lo32(gpu_va); | 1970 | va_lo = u64_lo32(gpu_va); |
1971 | va_hi = u64_hi32(gpu_va); | 1971 | va_hi = u64_hi32(gpu_va); |
1972 | gk20a_mem_wr(g, mem, | 1972 | nvgpu_mem_wr(g, mem, |
1973 | ctxsw_prog_main_image_pm_ptr_o(), va_lo); | 1973 | ctxsw_prog_main_image_pm_ptr_o(), va_lo); |
1974 | gk20a_mem_wr(g, mem, | 1974 | nvgpu_mem_wr(g, mem, |
1975 | ctxsw_prog_main_image_pm_ptr_hi_o(), va_hi); | 1975 | ctxsw_prog_main_image_pm_ptr_hi_o(), va_hi); |
1976 | } | 1976 | } |
1977 | 1977 | ||