mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: use API to get golden image size
Use API nvgpu_gr_obj_ctx_get/set_golden_image_size() exposed by gr.obj_ctx unit to get/set size of golden image Call nvgpu_gr_obj_ctx_init() from vgpu_gr_init_gr_setup_sw() to initialize golden image size in gr.obj_ctx unit even on vGPU Move g->ops.gr.falcon.init_ctx_state() call early in vgpu_gr_init_gr_setup_sw() so that gr.ctx_vars struct is prepared before fields in it accessed during rest of GR initialization Jira NVGPU-3112 Change-Id: Ie827ad6f30cc3d931519a1f9a709861d26f8da26 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2096162 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
6f0455a1c7
commit
0c297ce752
@@ -846,7 +846,7 @@ static ssize_t tpc_pg_mask_store(struct device *dev,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (gr->ctx_vars.golden_image_size) {
|
||||
if (nvgpu_gr_obj_ctx_get_golden_image_size(gr->golden_image) != 0) {
|
||||
nvgpu_err(g, "golden image size already initialized");
|
||||
nvgpu_mutex_release(&g->tpc_pg_lock);
|
||||
return -ENODEV;
|
||||
@@ -890,7 +890,7 @@ static ssize_t tpc_fs_mask_store(struct device *dev,
|
||||
nvgpu_gr_obj_ctx_deinit(g, g->gr.golden_image);
|
||||
|
||||
g->gr.ctx_vars.golden_image_initialized = false;
|
||||
g->gr.ctx_vars.golden_image_size = 0;
|
||||
nvgpu_gr_obj_ctx_set_golden_image_size(g->gr.golden_image, 0);
|
||||
|
||||
nvgpu_gr_config_deinit(g, g->gr.config);
|
||||
/* Cause next poweron to reinit just gr */
|
||||
|
||||
Reference in New Issue
Block a user