diff options
author | mpurohit <mpurohit@nvidia.com> | 2018-04-04 02:02:35 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-06 12:23:50 -0400 |
commit | 5bb1de5b31cf20f125391b20a74112e36fee55d0 (patch) | |
tree | c76815199bcc6b07aa149dfaebef9821b99a6592 /drivers/gpu/nvgpu/gk20a | |
parent | fb150bfe8d327c83923aa98cdd3906c7f790c3fd (diff) |
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 <mpurohit@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1688302
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
3782 | struct zbc_color_table *c_tbl; | 3782 | struct zbc_color_table *c_tbl; |
3783 | struct zbc_depth_table *d_tbl; | 3783 | struct zbc_depth_table *d_tbl; |
3784 | u32 i; | 3784 | u32 i; |
3785 | int ret = -ENOMEM; | 3785 | int ret = -ENOSPC; |
3786 | bool added = false; | 3786 | bool added = false; |
3787 | u32 entries; | 3787 | u32 entries; |
3788 | 3788 | ||