From b8a3e54ddaa0e68456b210e051cf66f135af09f8 Mon Sep 17 00:00:00 2001 From: sagar Date: Tue, 24 Mar 2020 12:06:56 +0530 Subject: [PATCH] gpu: nvgpu: add invalid ctxsw method * For ctxsw negative testing, nvgpu need to send and invalid method * Sending 0xFFFF method will result in triggering ctxsw error intr. JIRA NVGPU-5080 Change-Id: I6c16137d86ee2ddb25f1508161d9d6befcbcbefe Signed-off-by: sagar Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2317502 Tested-by: mobile promotions Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: automaticguardword Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b_fusa.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b_fusa.c b/drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b_fusa.c index 404e40e62..f58016e50 100644 --- a/drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b_fusa.c +++ b/drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b_fusa.c @@ -743,7 +743,11 @@ int gm20b_gr_falcon_ctrl_ctxsw(struct gk20a *g, u32 fecs_method, defined(CONFIG_NVGPU_CTXSW_FW_ERROR_CODE_TESTING) case NVGPU_GR_FALCON_METHOD_CTXSW_DISCOVER_PM_IMAGE_SIZE: op.method.addr = +#if defined(CONFIG_NVGPU_CTXSW_FW_ERROR_CODE_TESTING) + 0xFFFF; +#else gr_fecs_method_push_adr_discover_pm_image_size_v(); +#endif op.mailbox.ret = ret_val; flags |= NVGPU_GR_FALCON_SUBMIT_METHOD_F_SLEEP; break;