diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-08-17 12:31:43 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-09-08 12:43:51 -0400 |
commit | 70cad5fbb593602a49f91e57c04d1da0334b3a49 (patch) | |
tree | 12db73aa8275b15b8b9771d6d39590e2228db24f /drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | |
parent | f31e575ed6b048f2139eab0433cce7f18e670b28 (diff) |
gpu: nvgpu: unify nvgpu and pci probe
We have completely different versions of probe for
nvgpu and pci device
Extract out common steps into nvgpu_probe() function
and separate it out in new file nvgpu_common.c
Divide task of nvgpu_probe() into further smaller
functions
Do platform specific things (like irq handling,
memresource management, power management) only in
individual probes and then call nvgpu_probe() to
complete the common initialization
Move all debugfs initialization to common gk20a_debug_init()
This also helps to bringup all debug nodes to pci device
Pass debugfs_symlink name as a parameter to gk20a_debug_init()
This allows us to set separate debugfs symlink for nvgpu
and pci device
In case of railgating, cde and ce debugfs, check if
platform supports them or not
Copy vidmem_is_vidmem from platform to mm structure
and set it to true for pci device
Return from gk20a_scale_init() if we don't have either of
governor or qos_notifier
Fix gk20a_alloc_debugfs_init() and gk20a_secure_page_alloc()
to receive device pointer instead of platform_device
Export gk20a_railgating_debugfs_init() so that we can call
it from gk20a_debug_init()
Jira DNVGPU-56
Jira DNVGPU-58
Change-Id: I3cc048082b0a1e57415a9fb8bfb9eec0f0a280cd
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1204207
(cherry picked from commit add6bb0a3d5bd98131bbe6f62d4358d4d722b0fe)
Reviewed-on: http://git-master/r/1204462
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_allocator.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c index d9e38200..3b20fa2e 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | |||
@@ -168,9 +168,9 @@ void gk20a_fini_alloc_debug(struct gk20a_allocator *a) | |||
168 | debugfs_remove(a->debugfs_entry); | 168 | debugfs_remove(a->debugfs_entry); |
169 | } | 169 | } |
170 | 170 | ||
171 | void gk20a_alloc_debugfs_init(struct platform_device *pdev) | 171 | void gk20a_alloc_debugfs_init(struct device *dev) |
172 | { | 172 | { |
173 | struct gk20a_platform *platform = platform_get_drvdata(pdev); | 173 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
174 | struct dentry *gpu_root = platform->debugfs; | 174 | struct dentry *gpu_root = platform->debugfs; |
175 | 175 | ||
176 | gk20a_alloc_debugfs_root = debugfs_create_dir("allocators", gpu_root); | 176 | gk20a_alloc_debugfs_root = debugfs_create_dir("allocators", gpu_root); |