mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Move tsg_gk20a_from_ch to tsg_gk20a.c
The function tsg_gk20a_from_ch() is an operation on tsg_gk20a structure, so move it to be part of tsg_gk20a.c and export via tsg_gk20a.h. JIRA NVGPU-38 Change-Id: I2afba3533ac829088a5edf8b16cf4e071b69b77a Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1505172 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
84703739a5
commit
c50b02eb66
@@ -1541,20 +1541,6 @@ extern struct class nvgpu_class;
|
||||
int gk20a_prepare_poweroff(struct gk20a *g);
|
||||
int gk20a_finalize_poweron(struct gk20a *g);
|
||||
|
||||
static inline struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch)
|
||||
{
|
||||
struct tsg_gk20a *tsg = NULL;
|
||||
|
||||
if (gk20a_is_channel_marked_as_tsg(ch))
|
||||
{
|
||||
struct gk20a *g = ch->g;
|
||||
struct fifo_gk20a *f = &g->fifo;
|
||||
tsg = &f->tsg[ch->tsgid];
|
||||
}
|
||||
|
||||
return tsg;
|
||||
}
|
||||
|
||||
static inline void gk20a_channel_trace_sched_param(
|
||||
void (*trace)(int chid, int tsgid, pid_t pid, u32 timeslice,
|
||||
u32 timeout, const char *interleave,
|
||||
|
||||
@@ -323,6 +323,19 @@ void gk20a_tsg_release(struct kref *ref)
|
||||
gk20a_put(g);
|
||||
}
|
||||
|
||||
struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch)
|
||||
{
|
||||
struct tsg_gk20a *tsg = NULL;
|
||||
|
||||
if (gk20a_is_channel_marked_as_tsg(ch)) {
|
||||
struct gk20a *g = ch->g;
|
||||
struct fifo_gk20a *f = &g->fifo;
|
||||
tsg = &f->tsg[ch->tsgid];
|
||||
}
|
||||
|
||||
return tsg;
|
||||
}
|
||||
|
||||
void gk20a_init_tsg_ops(struct gpu_ops *gops)
|
||||
{
|
||||
gops->fifo.tsg_bind_channel = gk20a_tsg_bind_channel;
|
||||
|
||||
@@ -30,6 +30,7 @@ void gk20a_tsg_release(struct kref *ref);
|
||||
|
||||
int gk20a_init_tsg_support(struct gk20a *g, u32 tsgid);
|
||||
void gk20a_init_tsg_ops(struct gpu_ops *gops);
|
||||
struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch);
|
||||
|
||||
struct tsg_gk20a {
|
||||
struct gk20a *g;
|
||||
|
||||
Reference in New Issue
Block a user