mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: prod programming for elcg ce unit
As part of nvgpu_ce_init_support, prod programming of elcg ce unit is done using following function: void nvgpu_cg_elcg_ce_load_enable(struct gk20a *g); Also, nvgpu_cg_elcg_set_elcg_enabled extended to include elcg_ce_load_gating_prod programming. Jira NVGPU-6026 Change-Id: I00f29f877b5ac4dc9d3438930b674327dece1150 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2512495 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
44c4611fda
commit
a54e34fd74
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -46,6 +46,10 @@ int nvgpu_ce_init_support(struct gk20a *g)
|
||||
|
||||
nvgpu_cg_blcg_ce_load_enable(g);
|
||||
|
||||
#if defined(CONFIG_NVGPU_HAL_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
|
||||
nvgpu_cg_elcg_ce_load_enable(g);
|
||||
#endif
|
||||
|
||||
if (g->ops.ce.init_prod_values != NULL) {
|
||||
g->ops.ce.init_prod_values(g);
|
||||
}
|
||||
|
||||
@@ -490,6 +490,11 @@ void nvgpu_cg_elcg_set_elcg_enabled(struct gk20a *g, bool enable)
|
||||
nvgpu_cg_set_mode(g, ELCG_MODE, ELCG_RUN);
|
||||
}
|
||||
}
|
||||
#if defined(CONFIG_NVGPU_HAL_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
|
||||
if (g->ops.cg.elcg_ce_load_gating_prod != NULL) {
|
||||
g->ops.cg.elcg_ce_load_gating_prod(g, g->elcg_enabled);
|
||||
}
|
||||
#endif
|
||||
nvgpu_mutex_release(&g->cg_pg_lock);
|
||||
}
|
||||
|
||||
@@ -623,4 +628,21 @@ void nvgpu_cg_slcg_set_slcg_enabled(struct gk20a *g, bool enable)
|
||||
done:
|
||||
nvgpu_mutex_release(&g->cg_pg_lock);
|
||||
}
|
||||
|
||||
void nvgpu_cg_elcg_ce_load_enable(struct gk20a *g)
|
||||
{
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
nvgpu_mutex_acquire(&g->cg_pg_lock);
|
||||
if (!g->elcg_enabled) {
|
||||
goto done;
|
||||
}
|
||||
#if defined(CONFIG_NVGPU_HAL_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
|
||||
if (g->ops.cg.elcg_ce_load_gating_prod != NULL) {
|
||||
g->ops.cg.elcg_ce_load_gating_prod(g, true);
|
||||
}
|
||||
#endif
|
||||
done:
|
||||
nvgpu_mutex_release(&g->cg_pg_lock);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -447,6 +447,25 @@ void nvgpu_cg_slcg_therm_load_enable(struct gk20a *g);
|
||||
*/
|
||||
void nvgpu_cg_slcg_ce2_load_enable(struct gk20a *g);
|
||||
|
||||
/**
|
||||
* @brief During nvgpu power-on, as part of CE initialization,
|
||||
* this function is called to load register configuration
|
||||
* for ELCG for CE.
|
||||
*
|
||||
* @param g [in] The GPU driver struct.
|
||||
*
|
||||
* Checks the platform software capability elcg_enabled and programs registers
|
||||
* for configuring production gating values for ELCG for CE. This is called
|
||||
* in #nvgpu_ce_init_support.
|
||||
*
|
||||
* Steps:
|
||||
* - Acquire the mutex #cg_pg_lock.
|
||||
* - Check if #elcg_enabled is set, else skip ELCG programming.
|
||||
* - Load ELCG prod settings for CE.
|
||||
* - Release the mutex #cg_pg_lock.
|
||||
*/
|
||||
void nvgpu_cg_elcg_ce_load_enable(struct gk20a *g);
|
||||
|
||||
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||
|
||||
void nvgpu_cg_elcg_enable(struct gk20a *g);
|
||||
|
||||
Reference in New Issue
Block a user