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

@@ -1234,6 +1234,7 @@ static ssize_t tsg_timeslice_max_us_store(struct device *dev,
static DEVICE_ATTR(tsg_timeslice_max_us, ROOTRW, tsg_timeslice_max_us_read,
tsg_timeslice_max_us_store);
#ifdef CONFIG_NVGPU_COMPRESSION
static ssize_t comptag_mem_deduct_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
@@ -1267,6 +1268,7 @@ static ssize_t comptag_mem_deduct_show(struct device *dev,
static DEVICE_ATTR(comptag_mem_deduct, ROOTRW,
comptag_mem_deduct_show, comptag_mem_deduct_store);
#endif
#ifdef CONFIG_NVGPU_MIG
static ssize_t mig_mode_config_list_show(struct device *dev,
@@ -1527,7 +1529,10 @@ void nvgpu_remove_sysfs(struct device *dev)
device_remove_file(dev, &dev_attr_gpu_powered_on);
#ifdef CONFIG_NVGPU_COMPRESSION
device_remove_file(dev, &dev_attr_comptag_mem_deduct);
#endif
#ifdef CONFIG_NVGPU_MIG
device_remove_file(dev, &dev_attr_mig_mode_config_list);
device_remove_file(dev, &dev_attr_mig_mode_config_list_parsable);
@@ -1599,7 +1604,10 @@ int nvgpu_create_sysfs(struct device *dev)
error |= device_create_file(dev, &dev_attr_gpu_powered_on);
error |= device_create_file(dev, &dev_attr_comptag_mem_deduct);
#ifdef CONFIG_NVGPU_COMPRESSION
device_create_file(dev, &dev_attr_comptag_mem_deduct);
#endif
#ifdef CONFIG_NVGPU_MIG
error |= device_create_file(dev, &dev_attr_mig_mode_config_list);
error |= device_create_file(dev, &dev_attr_mig_mode_config_list_parsable);