mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
nvgpu: vgpu: ga10b: enable compression
- contiguous mempool has been added on server side. - init cbc support only on compression flag enabled - enable compression flag only on silicon Jira GVSCI-12883 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Change-Id: I339f25b81224b55124928231be65070660e27080 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2676951 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
30c434efc1
commit
cf43371073
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -266,11 +266,13 @@ int vgpu_finalize_poweron_common(struct gk20a *g)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NVGPU_COMPRESSION
|
#ifdef CONFIG_NVGPU_COMPRESSION
|
||||||
|
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_COMPRESSION)) {
|
||||||
err = nvgpu_cbc_init_support(g);
|
err = nvgpu_cbc_init_support(g);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
nvgpu_err(g, "failed to init cbc");
|
nvgpu_err(g, "failed to init cbc");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
err = g->ops.chip_init_gpu_characteristics(g);
|
err = g->ops.chip_init_gpu_characteristics(g);
|
||||||
|
|||||||
@@ -130,6 +130,7 @@
|
|||||||
#include <nvgpu/clk_arb.h>
|
#include <nvgpu/clk_arb.h>
|
||||||
#include <nvgpu/grmgr.h>
|
#include <nvgpu/grmgr.h>
|
||||||
#include <nvgpu/perfbuf.h>
|
#include <nvgpu/perfbuf.h>
|
||||||
|
#include <nvgpu/soc.h>
|
||||||
|
|
||||||
#include "common/vgpu/init/init_vgpu.h"
|
#include "common/vgpu/init/init_vgpu.h"
|
||||||
#include "common/vgpu/fb/fb_vgpu.h"
|
#include "common/vgpu/fb/fb_vgpu.h"
|
||||||
@@ -1213,8 +1214,19 @@ int vgpu_ga10b_init_hal(struct gk20a *g)
|
|||||||
priv->constants.max_sm_diversity_config_count;
|
priv->constants.max_sm_diversity_config_count;
|
||||||
|
|
||||||
#ifdef CONFIG_NVGPU_COMPRESSION
|
#ifdef CONFIG_NVGPU_COMPRESSION
|
||||||
|
if (nvgpu_platform_is_silicon(g)) {
|
||||||
|
nvgpu_set_enabled(g, NVGPU_SUPPORT_COMPRESSION, true);
|
||||||
|
} else {
|
||||||
nvgpu_set_enabled(g, NVGPU_SUPPORT_COMPRESSION, false);
|
nvgpu_set_enabled(g, NVGPU_SUPPORT_COMPRESSION, false);
|
||||||
nvgpu_set_enabled(g, NVGPU_SUPPORT_POST_L2_COMPRESSION, false);
|
}
|
||||||
|
|
||||||
|
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_COMPRESSION)) {
|
||||||
|
nvgpu_set_enabled(g, NVGPU_SUPPORT_POST_L2_COMPRESSION, true);
|
||||||
|
} else {
|
||||||
|
gops->cbc.init = NULL;
|
||||||
|
gops->cbc.ctrl = NULL;
|
||||||
|
gops->cbc.alloc_comptags = NULL;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NVGPU_RECOVERY
|
#ifdef CONFIG_NVGPU_RECOVERY
|
||||||
|
|||||||
Reference in New Issue
Block a user