mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
nvgpu: vgpu: add support to query rop_l2 en masks
Fetch ROP_L2 enable masks in addition to other parameters when guest sends command to query constants. Bug 200401223 Change-Id: Ie386f24caaf7acd1155fc3f2a5e8c1f27016970a Signed-off-by: Aparna Das <aparnad@nvidia.com> (cherry picked from commit a08bb08fb9fff40138d26e5e9bfa21267ca6b6af) Reviewed-on: https://git-master.nvidia.com/r/1694911 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d0e4dfd6ef
commit
31024f85eb
@@ -455,6 +455,7 @@ struct tegra_vgpu_engines_info {
|
||||
|
||||
#define TEGRA_VGPU_MAX_GPC_COUNT 16
|
||||
#define TEGRA_VGPU_MAX_TPC_COUNT_PER_GPC 16
|
||||
#define TEGRA_VGPU_L2_EN_MASK 32
|
||||
|
||||
struct tegra_vgpu_constants_params {
|
||||
u32 arch;
|
||||
@@ -494,6 +495,7 @@ struct tegra_vgpu_constants_params {
|
||||
u32 num_pce;
|
||||
u32 sm_per_tpc;
|
||||
u32 max_subctx_count;
|
||||
u32 l2_en_mask[TEGRA_VGPU_L2_EN_MASK];
|
||||
};
|
||||
|
||||
struct tegra_vgpu_channel_cyclestats_snapshot_params {
|
||||
|
||||
@@ -746,8 +746,23 @@ u32 vgpu_gr_get_max_lts_per_ltc(struct gk20a *g)
|
||||
|
||||
u32 *vgpu_gr_rop_l2_en_mask(struct gk20a *g)
|
||||
{
|
||||
/* no one use it yet */
|
||||
return NULL;
|
||||
struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
|
||||
u32 i, max_fbps_count = priv->constants.num_fbps;
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
if (g->gr.fbp_rop_l2_en_mask == NULL) {
|
||||
g->gr.fbp_rop_l2_en_mask =
|
||||
nvgpu_kzalloc(g, max_fbps_count * sizeof(u32));
|
||||
if (!g->gr.fbp_rop_l2_en_mask)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g->gr.max_fbps_count = max_fbps_count;
|
||||
for (i = 0; i < max_fbps_count; i++)
|
||||
g->gr.fbp_rop_l2_en_mask[i] = priv->constants.l2_en_mask[i];
|
||||
|
||||
return g->gr.fbp_rop_l2_en_mask;
|
||||
}
|
||||
|
||||
int vgpu_gr_add_zbc(struct gk20a *g, struct gr_gk20a *gr,
|
||||
@@ -840,6 +855,9 @@ static void vgpu_remove_gr_support(struct gr_gk20a *gr)
|
||||
|
||||
nvgpu_kfree(gr->g, gr->gpc_tpc_count);
|
||||
gr->gpc_tpc_count = NULL;
|
||||
|
||||
nvgpu_kfree(gr->g, gr->fbp_rop_l2_en_mask);
|
||||
gr->fbp_rop_l2_en_mask = NULL;
|
||||
}
|
||||
|
||||
static int vgpu_gr_init_gr_setup_sw(struct gk20a *g)
|
||||
|
||||
Reference in New Issue
Block a user