mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Update the error code for tpc_pg_mask
- nvpmodel service used to expect a return value of -ENODEV from the
underlying tpc_pg_mask_store() when the golden image size was
initialized.
- With the current implementation, the return value is -EINVAL due to
which write for new tpc_pg_mask was not successful.
- Update the return value to -EBUSY for the case where golden image
is already initialized.
Bug 3765637
Change-Id: I5a1a38cce035ea245db5d72c9f5db210d3bb95f1
Signed-off-by: Divya <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2778855
(cherry picked from commit 1274f25dda)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2780005
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Yi-Wei Wang <yiweiw@nvidia.com>
This commit is contained in:
@@ -1120,7 +1120,11 @@ static ssize_t tpc_pg_mask_store(struct device *dev,
|
||||
!= 0) {
|
||||
nvgpu_err(g, "golden image size already initialized");
|
||||
nvgpu_mutex_release(&g->static_pg_lock);
|
||||
return -EINVAL;
|
||||
/*
|
||||
* as golden context is already created,
|
||||
* return busy error code
|
||||
*/
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (platform->set_tpc_pg_mask != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user