From 5bb1de5b31cf20f125391b20a74112e36fee55d0 Mon Sep 17 00:00:00 2001 From: mpurohit Date: Wed, 4 Apr 2018 11:32:35 +0530 Subject: gpu: nvgpu: gk20a: Use ENOSPC instead of ENOMEM Modify gr_gk20a_add_zbc() to return -ENOSPC instead of -ENOMEM when all slots are already used. ENOMEM is more meant for memory allocation failures, anyway. This is required for porting nvgpu_gpu_zbc test case using libnvrm_gpu APIs. Bug 1967537 JIRA VQRM-3348 Change-Id: Ib7bcb6ba94d2ca168bcad517a8a7260fbf278a91 Signed-off-by: Mahesh Purohit Reviewed-on: https://git-master.nvidia.com/r/1688302 Reviewed-by: Bharat Nihalani Tested-by: Bharat Nihalani Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Konsta Holtta Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 680b1637..65144cc5 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -3782,7 +3782,7 @@ int gr_gk20a_add_zbc(struct gk20a *g, struct gr_gk20a *gr, struct zbc_color_table *c_tbl; struct zbc_depth_table *d_tbl; u32 i; - int ret = -ENOMEM; + int ret = -ENOSPC; bool added = false; u32 entries; -- cgit v1.2.2