diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-06-22 16:15:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-30 21:34:59 -0400 |
commit | 6f0fcbc667ca55ed25818467069853e6d750cd7d (patch) | |
tree | 26cb9d675fd262b04485df6b8d21bb82a491a2c1 /drivers/gpu/nvgpu/common | |
parent | 001c7c3185d9b087f89f48a41bee27d2d06721f6 (diff) |
gpu: nvgpu: Convert logging from dev_*() to nvgpu_*()
Convert a few calls from dev_*() logging to nvgpu_*(). This reduces
dependency to Linux specific struct device pointer.
JIRA NVGPU-38
Change-Id: Ib51a6b1287db25b7dd4d164aec3ac75fa2801ebf
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master/r/1507929
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/driver_common.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_as.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/nvhost.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/timers.c | 6 |
4 files changed, 8 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index a7bc230c..eb4f490f 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c | |||
@@ -165,9 +165,9 @@ int nvgpu_probe(struct gk20a *g, | |||
165 | err = platform->probe(g->dev); | 165 | err = platform->probe(g->dev); |
166 | if (err) { | 166 | if (err) { |
167 | if (err == -EPROBE_DEFER) | 167 | if (err == -EPROBE_DEFER) |
168 | dev_info(g->dev, "platform probe failed"); | 168 | nvgpu_info(g, "platform probe failed"); |
169 | else | 169 | else |
170 | dev_err(g->dev, "platform probe failed"); | 170 | nvgpu_err(g, "platform probe failed"); |
171 | return err; | 171 | return err; |
172 | } | 172 | } |
173 | 173 | ||
@@ -184,7 +184,7 @@ int nvgpu_probe(struct gk20a *g, | |||
184 | if (platform->late_probe) { | 184 | if (platform->late_probe) { |
185 | err = platform->late_probe(g->dev); | 185 | err = platform->late_probe(g->dev); |
186 | if (err) { | 186 | if (err) { |
187 | dev_err(g->dev, "late probe failed"); | 187 | nvgpu_err(g, "late probe failed"); |
188 | return err; | 188 | return err; |
189 | } | 189 | } |
190 | } | 190 | } |
@@ -196,7 +196,7 @@ int nvgpu_probe(struct gk20a *g, | |||
196 | 196 | ||
197 | g->dbg_regops_tmp_buf = nvgpu_kzalloc(g, SZ_4K); | 197 | g->dbg_regops_tmp_buf = nvgpu_kzalloc(g, SZ_4K); |
198 | if (!g->dbg_regops_tmp_buf) { | 198 | if (!g->dbg_regops_tmp_buf) { |
199 | dev_err(g->dev, "couldn't allocate regops tmp buf"); | 199 | nvgpu_err(g, "couldn't allocate regops tmp buf"); |
200 | return -ENOMEM; | 200 | return -ENOMEM; |
201 | } | 201 | } |
202 | g->dbg_regops_tmp_buf_ops = | 202 | g->dbg_regops_tmp_buf_ops = |
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c index 405301ee..273024bd 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c | |||
@@ -377,7 +377,6 @@ long gk20a_as_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
377 | (struct nvgpu_as_map_buffer_batch_args *)buf); | 377 | (struct nvgpu_as_map_buffer_batch_args *)buf); |
378 | break; | 378 | break; |
379 | default: | 379 | default: |
380 | dev_dbg(dev_from_gk20a(g), "unrecognized as ioctl: 0x%x", cmd); | ||
381 | err = -ENOTTY; | 380 | err = -ENOTTY; |
382 | break; | 381 | break; |
383 | } | 382 | } |
diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c index e190096e..96865f7d 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost.c | |||
@@ -37,13 +37,13 @@ int nvgpu_get_nvhost_dev(struct gk20a *g) | |||
37 | 37 | ||
38 | host1x_pdev = of_find_device_by_node(host1x_node); | 38 | host1x_pdev = of_find_device_by_node(host1x_node); |
39 | if (!host1x_pdev) { | 39 | if (!host1x_pdev) { |
40 | dev_warn(g->dev, "host1x device not available"); | 40 | nvgpu_warn(g, "host1x device not available"); |
41 | return -EPROBE_DEFER; | 41 | return -EPROBE_DEFER; |
42 | } | 42 | } |
43 | 43 | ||
44 | } else { | 44 | } else { |
45 | if (g->has_syncpoints) { | 45 | if (g->has_syncpoints) { |
46 | dev_warn(g->dev, "host1x reference not found. assuming no syncpoints support\n"); | 46 | nvgpu_warn(g, "host1x reference not found. assuming no syncpoints support"); |
47 | g->has_syncpoints = false; | 47 | g->has_syncpoints = false; |
48 | } | 48 | } |
49 | return 0; | 49 | return 0; |
diff --git a/drivers/gpu/nvgpu/common/linux/timers.c b/drivers/gpu/nvgpu/common/linux/timers.c index cfebb799..2953902e 100644 --- a/drivers/gpu/nvgpu/common/linux/timers.c +++ b/drivers/gpu/nvgpu/common/linux/timers.c | |||
@@ -97,8 +97,7 @@ static int __nvgpu_timeout_expired_msg_cpu(struct nvgpu_timeout *timeout, | |||
97 | 97 | ||
98 | vsnprintf(buf, sizeof(buf), fmt, args); | 98 | vsnprintf(buf, sizeof(buf), fmt, args); |
99 | 99 | ||
100 | dev_err(dev_from_gk20a(g), | 100 | nvgpu_err(g, "Timeout detected @ %pF %s", caller, buf); |
101 | "Timeout detected @ %pF %s\n", caller, buf); | ||
102 | } | 101 | } |
103 | 102 | ||
104 | return -ETIMEDOUT; | 103 | return -ETIMEDOUT; |
@@ -122,8 +121,7 @@ static int __nvgpu_timeout_expired_msg_retry(struct nvgpu_timeout *timeout, | |||
122 | 121 | ||
123 | vsnprintf(buf, sizeof(buf), fmt, args); | 122 | vsnprintf(buf, sizeof(buf), fmt, args); |
124 | 123 | ||
125 | dev_err(dev_from_gk20a(g), | 124 | nvgpu_err(g, "No more retries @ %pF %s", caller, buf); |
126 | "No more retries @ %pF %s\n", caller, buf); | ||
127 | } | 125 | } |
128 | 126 | ||
129 | return -ETIMEDOUT; | 127 | return -ETIMEDOUT; |