gpu: nvgpu: Move dev field from gk20a to nvgpu_os_linux

Move field "struct device *dev" from struct gk20a to struct
nvgpu_os_linux. The field is valid only for Linux.

JIRA NVGPU-38

Change-Id: I09286aa3a9c5a2406e5a27c1fbf21b2c515b4dd4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master/r/1514162
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Terje Bergstrom
2017-07-02 12:30:20 -07:00
committed by mobile promotions
parent dfd42c2b28
commit cba424539d
39 changed files with 44 additions and 14 deletions

View File

@@ -22,6 +22,8 @@
#include <soc/tegra/tegra-dvfs.h>
#include "clk.h"
#include "os_linux.h"
#include "gk20a/gk20a.h"
#include "gk20a/platform_gk20a.h"

View File

@@ -21,6 +21,7 @@
#include "debug_kmem.h"
#include "debug_pmu.h"
#include "debug_sched.h"
#include "os_linux.h"
#include "gk20a/gk20a.h"
#include "gk20a/platform_gk20a.h"

View File

@@ -14,6 +14,7 @@
#include "debug_allocator.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#include <linux/debugfs.h>
#include <linux/seq_file.h>

View File

@@ -14,6 +14,7 @@
#include "debug_cde.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#include <linux/debugfs.h>

View File

@@ -14,6 +14,7 @@
#include "debug_ce.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#include <linux/debugfs.h>

View File

@@ -18,6 +18,7 @@
#include "gk20a/platform_gk20a.h"
#include "gm20b/clk_gm20b.h"
#include "os_linux.h"
static int rate_get(void *data, u64 *val)
{

View File

@@ -14,6 +14,7 @@
#include "debug_fifo.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#include <linux/debugfs.h>
#include <linux/seq_file.h>

View File

@@ -14,6 +14,7 @@
#include "debug_gr.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#include <linux/debugfs.h>

View File

@@ -14,6 +14,7 @@
#include "debug_mm.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#include <linux/debugfs.h>

View File

@@ -15,6 +15,7 @@
#include <nvgpu/enabled.h>
#include "debug_pmu.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#include <linux/debugfs.h>
#include <linux/seq_file.h>

View File

@@ -14,6 +14,7 @@
#include "debug_sched.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#include <linux/debugfs.h>
#include <linux/seq_file.h>

View File

@@ -27,6 +27,7 @@
#include "gk20a/gk20a.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
#if defined(CONFIG_GK20A_VIDMEM)
static u64 __nvgpu_dma_alloc(struct nvgpu_allocator *allocator, dma_addr_t at,

View File

@@ -22,6 +22,7 @@
#include "gk20a/gk20a.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
static const struct firmware *do_request_firmware(struct device *dev,
const char *prefix, const char *fw_name, int flags)

View File

@@ -21,6 +21,7 @@
#include "gk20a/gk20a.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
/*
* Define a length for log buffers. This is the buffer that the 'fmt, ...' part

View File

@@ -865,7 +865,7 @@ static int gk20a_probe(struct platform_device *dev)
gk20a = &l->g;
set_gk20a(dev, gk20a);
gk20a->dev = &dev->dev;
l->dev = &dev->dev;
gk20a->log_mask = NVGPU_DEFAULT_DBG_MASK;
nvgpu_kmem_init(gk20a);

View File

@@ -23,7 +23,7 @@
#include "nvhost_priv.h"
#include "gk20a/gk20a.h"
#include "gk20a/platform_gk20a.h"
#include "os_linux.h"
int nvgpu_get_nvhost_dev(struct gk20a *g)
{

View File

@@ -22,6 +22,7 @@
struct nvgpu_os_linux {
struct gk20a g;
struct device *dev;
struct {
struct cdev cdev;
@@ -75,6 +76,11 @@ static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g)
return container_of(g, struct nvgpu_os_linux, g);
}
static inline struct device *dev_from_gk20a(struct gk20a *g)
{
return nvgpu_os_linux_from_gk20a(g)->dev;
}
#define INTERFACE_NAME "nvhost%s-gpu"
#endif

View File

@@ -29,6 +29,7 @@
#include "module.h"
#include "intr.h"
#include "sysfs.h"
#include "os_linux.h"
#include "pci.h"
@@ -367,7 +368,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
}
platform->g = g;
g->dev = &pdev->dev;
l->dev = &pdev->dev;
err = pci_enable_device(pdev);
if (err)

View File

@@ -52,6 +52,7 @@
#include "gm20b/clk_gm20b.h"
#include "clk.h"
#include "os_linux.h"
#include "../../../arch/arm/mach-tegra/iomap.h"

View File

@@ -29,6 +29,7 @@
#include "gk20a/platform_gk20a.h"
#include "vm_priv.h"
#include "os_linux.h"
static struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf_reverse(
struct vm_gk20a *vm, struct dma_buf *dmabuf, u32 kind)