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

@@ -1928,7 +1928,6 @@ int ga100_init_hal(struct gk20a *g)
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_COMPRESSION)) {
nvgpu_set_enabled(g, NVGPU_SUPPORT_POST_L2_COMPRESSION, false);
nvgpu_set_enabled(g, NVGPU_SUPPORT_BUFFER_METADATA, true);
} else {
gops->cbc.init = NULL;
gops->cbc.ctrl = NULL;