diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-10-30 09:53:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-02 08:10:59 -0400 |
commit | 0aa4cea63b906401df1bece74cef4a566054cf59 (patch) | |
tree | 3e44c0e472d4872d4b47c201a657e11149042540 /drivers/gpu/nvgpu/common | |
parent | 00b255cf43a2f85d4d9a0378c4a85e7a20e6adc8 (diff) |
gpu: nvgpu: use struct gk20a for create_gr_sysfs
API gr_gp10b_create_sysfs() and GR HAL create_gr_sysfs() right now receive
linux specific struct device
But since this function is called from/declared in common code, we need to
remove linux dependency from it
Hence update the API and GR HAL to receive struct gk20a pointer instead
of device pointer
Jira NVGPU-259
Change-Id: I7effa16407d47a2ab5f9562ec4a4dec975a32d6c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1588464
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c index fb8686c2..1f7a7694 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <nvgpu/hashtable.h> | 31 | #include <nvgpu/hashtable.h> |
32 | #include <nvgpu/nvhost.h> | 32 | #include <nvgpu/nvhost.h> |
33 | 33 | ||
34 | #include "os_linux.h" | ||
35 | |||
34 | #include "clk.h" | 36 | #include "clk.h" |
35 | 37 | ||
36 | #include "gk20a/platform_gk20a.h" | 38 | #include "gk20a/platform_gk20a.h" |
@@ -610,10 +612,10 @@ void gp10b_ecc_stat_remove(struct device *dev, | |||
610 | nvgpu_kfree(g, dev_attr_array); | 612 | nvgpu_kfree(g, dev_attr_array); |
611 | } | 613 | } |
612 | 614 | ||
613 | void gr_gp10b_create_sysfs(struct device *dev) | 615 | void gr_gp10b_create_sysfs(struct gk20a *g) |
614 | { | 616 | { |
615 | int error = 0; | 617 | int error = 0; |
616 | struct gk20a *g = get_gk20a(dev); | 618 | struct device *dev = dev_from_gk20a(g); |
617 | 619 | ||
618 | /* This stat creation function is called on GR init. GR can get | 620 | /* This stat creation function is called on GR init. GR can get |
619 | initialized multiple times but we only need to create the ECC | 621 | initialized multiple times but we only need to create the ECC |