mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: remove golden_image_initialized flag from gr_gk20a struct
struct gr_gk20a defines boolean flag golden_image_initialized to indicate if golden_image is initialized or not common.gr.obj_ctx also added a flag of its own to check if golden_image is ready Add new API nvgpu_gr_obj_ctx_is_golden_image_ready() in common.gr.obj_ctx unit to get status of golden_image Use this new API everywhere to check if golden image is ready Remove g->gr.ctx_vars.golden_image_initialized Also remove ctx_mutex from struct gr_gk20a Add new flag golden_image_initialized to struct nvgpu_pmu_pg and set it when golden image is initialized. This is needed to avoid circular dependency between GR and PMU Jira NVGPU-3112 Change-Id: Id391294cede6424e15a9a9de29c40d013b509534 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2099400 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
8e96d56cee
commit
45c56fd633
@@ -31,6 +31,7 @@
|
||||
#include <nvgpu/io.h>
|
||||
#include <nvgpu/gk20a.h>
|
||||
#include <nvgpu/regops.h>
|
||||
#include <nvgpu/gr/obj_ctx.h>
|
||||
|
||||
static int regop_bsearch_range_cmp(const void *pkey, const void *pelem)
|
||||
{
|
||||
@@ -69,13 +70,7 @@ static inline bool linear_search(u32 offset, const u32 *list, u64 size)
|
||||
*/
|
||||
static bool gr_context_info_available(struct nvgpu_gr *gr)
|
||||
{
|
||||
bool initialized;
|
||||
|
||||
nvgpu_mutex_acquire(&gr->ctx_mutex);
|
||||
initialized = gr->ctx_vars.golden_image_initialized;
|
||||
nvgpu_mutex_release(&gr->ctx_mutex);
|
||||
|
||||
return initialized;
|
||||
return nvgpu_gr_obj_ctx_is_golden_image_ready(gr->golden_image);
|
||||
}
|
||||
|
||||
static bool validate_reg_ops(struct gk20a *g,
|
||||
|
||||
Reference in New Issue
Block a user