diff --git a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export index aa91e07b5..35088a538 100644 --- a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export +++ b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export @@ -110,7 +110,6 @@ gv11b_ce_init_prod_values gv11b_ce_mthd_buffer_fault_in_bar2_fault gv11b_ce_stall_isr gv11b_channel_count -gv11b_channel_debug_dump gv11b_channel_read_state gv11b_channel_reset_faulted gv11b_channel_unbind diff --git a/userspace/required_tests.ini b/userspace/required_tests.ini index ac9cab8ea..d57f945e0 100644 --- a/userspace/required_tests.ini +++ b/userspace/required_tests.ini @@ -524,7 +524,6 @@ test_gm20b_channel_force_ctx_reload.force_ctx_reload=0 test_fifo_init_support.init_support=0 test_fifo_remove_support.remove_support=0 test_gv11b_channel_count.count=0 -test_gv11b_channel_debug_dump.debug_dump=0 test_gv11b_channel_read_state.read_state=0 test_gv11b_channel_reset_faulted.reset_faulted=0 test_gv11b_channel_unbind.unbind=0 diff --git a/userspace/units/fifo/channel/gv11b/nvgpu-channel-gv11b.c b/userspace/units/fifo/channel/gv11b/nvgpu-channel-gv11b.c index 87061bec4..8b4631f43 100644 --- a/userspace/units/fifo/channel/gv11b/nvgpu-channel-gv11b.c +++ b/userspace/units/fifo/channel/gv11b/nvgpu-channel-gv11b.c @@ -224,99 +224,12 @@ done: return ret; } -#define F_CHANNEL_DUMP_DETERMINISTIC BIT(0) -#define F_CHANNEL_DUMP_ENABLED BIT(1) -#define F_CHANNEL_DUMP_BUSY BIT(2) -#define F_CHANNEL_DUMP_SEMA BIT(3) -#define F_CHANNEL_DUMP_LAST BIT(4) - -static const char *f_channel_dump[] = { - "deterministic", - "enabled", - "busy", - "sema", -}; - -static void test_debug_out(void *ctx, const char *str, size_t len) -{ - struct unit_ctx *unit_ctx = ctx; - - unit_ctx->count++; - if (len >= unit_ctx->size || strlen(str) > len) { - unit_ctx->err++; - unit_err(unit_ctx->m, "** oversize string" ); - } else { - unit_verbose(unit_ctx->m, "%s", str); - } -} - -int test_gv11b_channel_debug_dump(struct unit_module *m, - struct gk20a *g, void *args) -{ - bool privileged = false; - u32 runlist_id = NVGPU_INVALID_RUNLIST_ID; - struct nvgpu_channel *ch; - int ret = UNIT_FAIL; - u32 branches; - struct unit_ctx unit_ctx; - struct nvgpu_debug_context o; - - o.fn = test_debug_out; - o.ctx = &unit_ctx; - - unit_ctx.m = m; - unit_ctx.size = sizeof(o.buf); - - ch = nvgpu_channel_open_new(g, runlist_id, - privileged, getpid(), getpid()); - unit_assert(ch, goto done); - - for (branches = 0U; branches < F_CHANNEL_DUMP_LAST; branches++) { - - struct nvgpu_channel_dump_info _info, *info = &_info; - - unit_verbose(m, "%s branches=%s\n", - __func__, branches_str(branches, f_channel_dump)); - - memset(info, 0, sizeof(*info)); - - info->chid = ch->chid; - info->tsgid = ch->tsgid; - info->pid = ch->pid; - info->refs = nvgpu_atomic_read(&ch->ref_count); - info->deterministic = (branches & F_CHANNEL_DUMP_DETERMINISTIC) != 0; - info->hw_state.enabled = (branches & F_CHANNEL_DUMP_ENABLED) != 0; - info->hw_state.busy = (branches & F_CHANNEL_DUMP_BUSY) != 0; - info->hw_state.status_string = "fake"; - info->sema.addr = branches & F_CHANNEL_DUMP_SEMA ? 0x1000beef : 0; - - unit_ctx.count = 0; - gv11b_channel_debug_dump(g, &o, info); - -#ifdef CONFIG_DEBUG_FS - unit_assert(unit_ctx.count > 4, goto done); - unit_assert(unit_ctx.err == 0, goto done); -#endif - } - - - ret = UNIT_SUCCESS; -done: - if (ch) { - nvgpu_channel_close(ch); - } - - return ret; -} - - struct unit_module_test nvgpu_channel_gv11b_tests[] = { UNIT_TEST(init_support, test_fifo_init_support, NULL, 0), UNIT_TEST(unbind, test_gv11b_channel_unbind, NULL, 0), UNIT_TEST(count, test_gv11b_channel_count, NULL, 0), UNIT_TEST(read_state, test_gv11b_channel_read_state, NULL, 0), UNIT_TEST(reset_faulted, test_gv11b_channel_reset_faulted, NULL, 0), - UNIT_TEST(debug_dump, test_gv11b_channel_debug_dump, NULL, 0), UNIT_TEST(remove_support, test_fifo_remove_support, NULL, 0), }; diff --git a/userspace/units/fifo/channel/gv11b/nvgpu-channel-gv11b.h b/userspace/units/fifo/channel/gv11b/nvgpu-channel-gv11b.h index 2fbb11101..86aeb82ef 100644 --- a/userspace/units/fifo/channel/gv11b/nvgpu-channel-gv11b.h +++ b/userspace/units/fifo/channel/gv11b/nvgpu-channel-gv11b.h @@ -124,31 +124,6 @@ int test_gv11b_channel_read_state(struct unit_module *m, int test_gv11b_channel_reset_faulted(struct unit_module *m, struct gk20a *g, void *args); -/** - * Test specification for: test_gv11b_channel_debug_dump - * - * Description: Branch coverage for gv11b_channel_debug_dump - * - * Test Type: Feature - * - * Targets: gops_channel.debug_dump, gv11b_channel_debug_dump - * - * Input: test_fifo_init_support() run for this GPU - * - * Steps: - * - Allocate channel. - * - Build nvgpu_channel_dump_info structure. - * - Call gv11b_channel_debug_output, with all combinations of - * channel deterministic, enabled, busy and sema. - * - If gk20a_debug_output actually calls output function, - * check that length of output string does not exceed buffer - * capacity. - * - * Output: Returns PASS if all branches gave expected results. FAIL otherwise. - */ -int test_gv11b_channel_debug_dump(struct unit_module *m, - struct gk20a *g, void *args); - /** * @} */ diff --git a/userspace/units/fifo/channel/nvgpu-channel.c b/userspace/units/fifo/channel/nvgpu-channel.c index 61866c764..21e2f4186 100644 --- a/userspace/units/fifo/channel/nvgpu-channel.c +++ b/userspace/units/fifo/channel/nvgpu-channel.c @@ -1589,13 +1589,6 @@ static void stub_ramfc_capture_ram_dump(struct gk20a *g, stub[1].chid = ch->chid; } -static void stub_channel_debug_dump(struct gk20a *g, - struct nvgpu_debug_context *o, - struct nvgpu_channel_dump_info *info) -{ - -} - int test_channel_debug_dump(struct unit_module *m, struct gk20a *g, void *vargs) { struct nvgpu_channel *ch = NULL; @@ -1629,7 +1622,6 @@ int test_channel_debug_dump(struct unit_module *m, struct gk20a *g, void *vargs) g->ops.channel.read_state = stub_channel_read_state; g->ops.ramfc.capture_ram_dump = stub_ramfc_capture_ram_dump; - g->ops.channel.debug_dump = stub_channel_debug_dump; for (branches = 0U; branches < F_CHANNEL_DEBUG_DUMP_LAST; branches++) {