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

@@ -38,7 +38,9 @@
#include "os_linux.h"
#include "dmabuf_vidmem.h"
#ifdef CONFIG_NVGPU_COMPRESSION
void gk20a_mm_delete_priv(struct gk20a_dmabuf_priv *priv);
#endif
enum nvgpu_aperture gk20a_dmabuf_aperture(struct gk20a *g,
struct dma_buf *dmabuf)
@@ -68,6 +70,7 @@ enum nvgpu_aperture gk20a_dmabuf_aperture(struct gk20a *g,
#endif
}
#ifdef CONFIG_NVGPU_COMPRESSION
static struct gk20a_dmabuf_priv *dma_buf_ops_to_gk20a_priv(
struct dma_buf_ops *ops)
{
@@ -94,7 +97,6 @@ static void nvgpu_dma_buf_release(struct dma_buf *dmabuf)
nvgpu_mutex_acquire(&l->dmabuf_priv_list_lock);
gk20a_mm_delete_priv(priv);
nvgpu_mutex_release(&l->dmabuf_priv_list_lock);
dmabuf->ops->release(dmabuf);
}
@@ -137,6 +139,7 @@ struct gk20a_dmabuf_priv *gk20a_dma_buf_get_drvdata(
return priv;
}
#endif
struct sg_table *nvgpu_mm_pin(struct device *dev,
struct dma_buf *dmabuf, struct dma_buf_attachment **attachment,
@@ -178,6 +181,7 @@ void nvgpu_mm_unpin(struct device *dev,
/* This function must be called after acquiring the global level
* dmabuf_priv_list_lock.
*/
#ifdef CONFIG_NVGPU_COMPRESSION
void gk20a_mm_delete_priv(struct gk20a_dmabuf_priv *priv)
{
struct gk20a_buffer_state *s, *s_tmp;
@@ -325,6 +329,7 @@ out:
*state = s;
return err;
}
#endif
static void *__gk20a_dmabuf_vmap(struct dma_buf *dmabuf)
{