mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: update for gr_priv header cleanup
To avoid gr_priv inclusion outside gr unit for deferencing the gr struct for gr->config pointer, add new call nvgpu_gr_get_config_ptr which returns gr->config pointer. Jira NVGPU-3218 Change-Id: Ibe6827f75c7621b72490f100c3a77baf02db2dd0 Signed-off-by: Vinod G <vinodg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2111737 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> GVS: Gerrit_Virtual_Submit 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
3df5e43f53
commit
4b1d58e3f9
@@ -27,12 +27,11 @@
|
||||
#include <nvgpu/os_sched.h>
|
||||
#include <nvgpu/gk20a.h>
|
||||
#include <nvgpu/gr/config.h>
|
||||
#include <nvgpu/gr/gr.h>
|
||||
#include <nvgpu/channel.h>
|
||||
#include <nvgpu/tsg.h>
|
||||
#include <nvgpu/fifo.h>
|
||||
|
||||
#include "common/gr/gr_priv.h"
|
||||
|
||||
#include "platform_gk20a.h"
|
||||
#include "ioctl_tsg.h"
|
||||
#include "ioctl_channel.h"
|
||||
@@ -64,7 +63,7 @@ static int gk20a_tsg_ioctl_bind_channel_ex(struct gk20a *g,
|
||||
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
|
||||
struct gk20a_sched_ctrl *sched = &l->sched_ctrl;
|
||||
struct nvgpu_channel *ch;
|
||||
struct nvgpu_gr *gr = g->gr;
|
||||
struct nvgpu_gr_config *gr_config = nvgpu_gr_get_config_ptr(g);
|
||||
int err = 0;
|
||||
|
||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_sched, "tsgid=%u", tsg->tsgid);
|
||||
@@ -88,7 +87,7 @@ static int gk20a_tsg_ioctl_bind_channel_ex(struct gk20a *g,
|
||||
|
||||
if (arg->tpc_pg_enabled && (!tsg->tpc_num_initialized)) {
|
||||
if ((arg->num_active_tpcs >
|
||||
nvgpu_gr_config_get_max_tpc_count(gr->config)) ||
|
||||
nvgpu_gr_config_get_max_tpc_count(gr_config)) ||
|
||||
!(arg->num_active_tpcs)) {
|
||||
nvgpu_err(g, "Invalid num of active TPCs");
|
||||
err = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user