gpu: nvgpu: Disable compression for k6.1+

dmabuf internals that nvgpu relies upon for storing meta-data for
compressible buffers changed in k6.1. For now, disable compression
on all k6.1+ kernels.

Additionally, fix numerous compilation issues due to the bit rotted
compression config. All normal Tegra products support compression
and thus have this config enabled. Over the last several years
compression dependent code crept in that wasn't protected under the
compression config.

Bug 3844023

Change-Id: Ie5b9b5a2bcf1a763806c087af99203d62d0cb6e0
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2820846
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Tested-by: Sagar Kamble <skamble@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Alex Waterman
2022-12-02 21:06:51 +00:00
committed by mobile promotions
parent b754a2f0cf
commit 03533066aa
12 changed files with 81 additions and 21 deletions

View File

@@ -1912,8 +1912,10 @@ static int gk20a_probe(struct platform_device *dev)
if (err)
goto return_err;
#ifdef CONFIG_NVGPU_COMPRESSION
nvgpu_mutex_init(&l->dmabuf_priv_list_lock);
nvgpu_init_list_node(&l->dmabuf_priv_list);
#endif
gk20a->probe_done = true;
@@ -2045,8 +2047,10 @@ static int __exit gk20a_remove(struct platform_device *pdev)
err = nvgpu_remove(dev);
#ifdef CONFIG_NVGPU_COMPRESSION
gk20a_dma_buf_priv_list_clear(l);
nvgpu_mutex_destroy(&l->dmabuf_priv_list_lock);
#endif
unregister_reboot_notifier(&l->nvgpu_reboot_nb);