diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-30 18:53:08 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-24 02:35:06 -0400 |
commit | 66ec347db401affd8bcd425dc123e7162b9ae3bb (patch) | |
tree | cbeb24e465208c6ab3b9527a86ba35003837f176 /drivers/gpu/nvgpu/gk20a | |
parent | 2b582c5141752ff272c5d059b56433155bc3985a (diff) |
gpu: nvgpu: Reorg fifo HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the fifo
sub-module of the gpu_ops struct.
Perform HAL function assignments in hal_gxxxx.c through the
population of a chip-specific copy of gpu_ops.
Jira NVGPU-74
Change-Id: I43d94067a1d7eafba4cdb28311e0ce25812013a7
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1522553
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.h | 2 |
2 files changed, 0 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index a0dcd622..99d72292 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -342,9 +342,3 @@ struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch) | |||
342 | 342 | ||
343 | return tsg; | 343 | return tsg; |
344 | } | 344 | } |
345 | |||
346 | void gk20a_init_tsg_ops(struct gpu_ops *gops) | ||
347 | { | ||
348 | gops->fifo.tsg_bind_channel = gk20a_tsg_bind_channel; | ||
349 | gops->fifo.tsg_unbind_channel = gk20a_tsg_unbind_channel; | ||
350 | } | ||
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h index e6a4a3cc..40e12105 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h | |||
@@ -22,14 +22,12 @@ | |||
22 | #define NVGPU_INVALID_TSG_ID (-1) | 22 | #define NVGPU_INVALID_TSG_ID (-1) |
23 | 23 | ||
24 | struct channel_gk20a; | 24 | struct channel_gk20a; |
25 | struct gpu_ops; | ||
26 | 25 | ||
27 | bool gk20a_is_channel_marked_as_tsg(struct channel_gk20a *ch); | 26 | bool gk20a_is_channel_marked_as_tsg(struct channel_gk20a *ch); |
28 | struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g); | 27 | struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g); |
29 | void gk20a_tsg_release(struct kref *ref); | 28 | void gk20a_tsg_release(struct kref *ref); |
30 | 29 | ||
31 | int gk20a_init_tsg_support(struct gk20a *g, u32 tsgid); | 30 | int gk20a_init_tsg_support(struct gk20a *g, u32 tsgid); |
32 | void gk20a_init_tsg_ops(struct gpu_ops *gops); | ||
33 | struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch); | 31 | struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch); |
34 | 32 | ||
35 | struct tsg_gk20a { | 33 | struct tsg_gk20a { |