From 9981cf44243e644e7ba3f01b66e08bea5b24979b Mon Sep 17 00:00:00 2001 From: Lauri Peltonen Date: Thu, 21 Aug 2014 18:08:31 -0700 Subject: gpu: nvgpu: cde: Increase the number of cde contexts Allocate four channels for cde jobs. Bug 1546619 Change-Id: Id2637f71426f42c2d553d38cd74873b9f0628b55 Signed-off-by: Lauri Peltonen Reviewed-on: http://git-master/r/499671 Reviewed-by: Jussi Rasanen Tested-by: Jussi Rasanen GVS: Gerrit_Virtual_Submit Reviewed-by: Arto Merilainen Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/cde_gk20a.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.h b/drivers/gpu/nvgpu/gk20a/cde_gk20a.h index 49296234..92757271 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.h @@ -26,6 +26,14 @@ #define MAX_CDE_USER_PARAMS 32 #define MAX_CDE_OBJ_IDS 4 +/* + * The size of the context ring buffer that is dedicated for handling cde + * jobs. Re-using a context (=channel) for a differnt cde job forces a cpu + * wait on the previous job to that channel, so increasing this value + * reduces the likelihood of stalls. + */ +#define NUM_CDE_CONTEXTS 4 + struct dma_buf; struct gk20a; @@ -241,7 +249,7 @@ struct gk20a_cde_app { struct mutex mutex; struct vm_gk20a *vm; - struct gk20a_cde_ctx cde_ctx[1]; + struct gk20a_cde_ctx cde_ctx[NUM_CDE_CONTEXTS]; int cde_ctx_ptr; u32 shader_parameter; -- cgit v1.2.2