gpu: nvgpu: make buffer metadata support independent of compression

Earlier, buffer metadata support was made dependent on compression.
However that is not required.

Update the enabled flag NVGPU_SUPPORT_BUFFER_METADATA setup for
various hals. Enable it for all from linux characteristics init.

Update REGISTER_BUFFER and GET_BUFFER_INFO ioctls to seggregate
the compile/runtime compression functionality.

If compression is disabled, return error in case comptags are
required else don't fail the REGISTER_BUFFER ioctl.

Bug 200767700

Change-Id: I3850ccc879f180c97b830fb3d652c094b9d28a5b
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2614378
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sagar Kamble
2021-10-21 15:37:06 +05:30
committed by mobile promotions
parent c347b6e4ff
commit 83dbb711bb
11 changed files with 28 additions and 22 deletions

View File

@@ -995,6 +995,8 @@ struct nvgpu_gpu_set_deterministic_opts_args {
* return 0 on success, < 0 in case of failure.
* retval -EINVAL if the enabled flag NVGPU_SUPPORT_BUFFER_METADATA
* isn't set or invalid params.
* retval -EINVAL if the enabled flag NVGPU_SUPPORT_COMPRESSION
* isn't set and comptags are required.
* retval -ENOMEM in case of sufficient memory is not available for
* privdata or comptags.
* retval -EFAULT if the metadata blob copy fails.