mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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
This commit is contained in:
committed by
mobile promotions
parent
001c7c3185
commit
6f0fcbc667
@@ -165,9 +165,9 @@ int nvgpu_probe(struct gk20a *g,
|
||||
err = platform->probe(g->dev);
|
||||
if (err) {
|
||||
if (err == -EPROBE_DEFER)
|
||||
dev_info(g->dev, "platform probe failed");
|
||||
nvgpu_info(g, "platform probe failed");
|
||||
else
|
||||
dev_err(g->dev, "platform probe failed");
|
||||
nvgpu_err(g, "platform probe failed");
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ int nvgpu_probe(struct gk20a *g,
|
||||
if (platform->late_probe) {
|
||||
err = platform->late_probe(g->dev);
|
||||
if (err) {
|
||||
dev_err(g->dev, "late probe failed");
|
||||
nvgpu_err(g, "late probe failed");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ int nvgpu_probe(struct gk20a *g,
|
||||
|
||||
g->dbg_regops_tmp_buf = nvgpu_kzalloc(g, SZ_4K);
|
||||
if (!g->dbg_regops_tmp_buf) {
|
||||
dev_err(g->dev, "couldn't allocate regops tmp buf");
|
||||
nvgpu_err(g, "couldn't allocate regops tmp buf");
|
||||
return -ENOMEM;
|
||||
}
|
||||
g->dbg_regops_tmp_buf_ops =
|
||||
|
||||
@@ -377,7 +377,6 @@ long gk20a_as_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
(struct nvgpu_as_map_buffer_batch_args *)buf);
|
||||
break;
|
||||
default:
|
||||
dev_dbg(dev_from_gk20a(g), "unrecognized as ioctl: 0x%x", cmd);
|
||||
err = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -37,13 +37,13 @@ int nvgpu_get_nvhost_dev(struct gk20a *g)
|
||||
|
||||
host1x_pdev = of_find_device_by_node(host1x_node);
|
||||
if (!host1x_pdev) {
|
||||
dev_warn(g->dev, "host1x device not available");
|
||||
nvgpu_warn(g, "host1x device not available");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (g->has_syncpoints) {
|
||||
dev_warn(g->dev, "host1x reference not found. assuming no syncpoints support\n");
|
||||
nvgpu_warn(g, "host1x reference not found. assuming no syncpoints support");
|
||||
g->has_syncpoints = false;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -97,8 +97,7 @@ static int __nvgpu_timeout_expired_msg_cpu(struct nvgpu_timeout *timeout,
|
||||
|
||||
vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
|
||||
dev_err(dev_from_gk20a(g),
|
||||
"Timeout detected @ %pF %s\n", caller, buf);
|
||||
nvgpu_err(g, "Timeout detected @ %pF %s", caller, buf);
|
||||
}
|
||||
|
||||
return -ETIMEDOUT;
|
||||
@@ -122,8 +121,7 @@ static int __nvgpu_timeout_expired_msg_retry(struct nvgpu_timeout *timeout,
|
||||
|
||||
vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
|
||||
dev_err(dev_from_gk20a(g),
|
||||
"No more retries @ %pF %s\n", caller, buf);
|
||||
nvgpu_err(g, "No more retries @ %pF %s", caller, buf);
|
||||
}
|
||||
|
||||
return -ETIMEDOUT;
|
||||
|
||||
@@ -2050,7 +2050,7 @@ int nvgpu_vm_map_buffer(struct vm_gk20a *vm,
|
||||
/* get ref to the mem handle (released on unmap_locked) */
|
||||
dmabuf = dma_buf_get(dmabuf_fd);
|
||||
if (IS_ERR(dmabuf)) {
|
||||
dev_warn(dev_from_vm(vm), "%s: fd %d is not a dmabuf",
|
||||
nvgpu_warn(gk20a_from_vm(vm), "%s: fd %d is not a dmabuf",
|
||||
__func__, dmabuf_fd);
|
||||
return PTR_ERR(dmabuf);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -46,7 +46,7 @@ static int vgpu_css_init_snapshot_buffer(struct gr_gk20a *gr)
|
||||
err = of_parse_phandle_with_fixed_args(np,
|
||||
"mempool-css", 1, 0, &args);
|
||||
if (err) {
|
||||
dev_info(dev_from_gk20a(g), "dt missing mempool-css\n");
|
||||
nvgpu_info(g, "dt missing mempool-css");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -54,15 +54,15 @@ static int vgpu_css_init_snapshot_buffer(struct gr_gk20a *gr)
|
||||
mempool = args.args[0];
|
||||
css_cookie = tegra_hv_mempool_reserve(hv_np, mempool);
|
||||
if (IS_ERR(css_cookie)) {
|
||||
dev_info(dev_from_gk20a(g),
|
||||
"mempool %u reserve failed\n", mempool);
|
||||
nvgpu_info(g,
|
||||
"mempool %u reserve failed", mempool);
|
||||
err = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Make sure buffer size is large enough */
|
||||
if (css_cookie->size < CSS_MIN_HW_SNAPSHOT_SIZE) {
|
||||
dev_info(dev_from_gk20a(g), "mempool size %lld too small\n",
|
||||
nvgpu_info(g, "mempool size %lld too small",
|
||||
css_cookie->size);
|
||||
err = -ENOMEM;
|
||||
goto fail;
|
||||
@@ -74,7 +74,7 @@ static int vgpu_css_init_snapshot_buffer(struct gr_gk20a *gr)
|
||||
buf = ioremap_cache(css_cookie->ipa, css_cookie->size);
|
||||
#endif
|
||||
if (!buf) {
|
||||
dev_info(dev_from_gk20a(g), "ioremap_cache failed\n");
|
||||
nvgpu_info(g, "ioremap_cache failed");
|
||||
err = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ static int vgpu_init_support(struct platform_device *pdev)
|
||||
int err = 0;
|
||||
|
||||
if (!r) {
|
||||
dev_err(dev_from_gk20a(g), "faield to get gk20a bar1\n");
|
||||
nvgpu_err(g, "failed to get gk20a bar1");
|
||||
err = -ENXIO;
|
||||
goto fail;
|
||||
}
|
||||
@@ -276,8 +276,7 @@ static int vgpu_init_support(struct platform_device *pdev)
|
||||
if (r->name && !strcmp(r->name, "/vgpu")) {
|
||||
regs = devm_ioremap_resource(&pdev->dev, r);
|
||||
if (IS_ERR(regs)) {
|
||||
dev_err(dev_from_gk20a(g),
|
||||
"failed to remap gk20a regs\n");
|
||||
nvgpu_err(g, "failed to remap gk20a bar1");
|
||||
err = PTR_ERR(regs);
|
||||
goto fail;
|
||||
}
|
||||
@@ -292,7 +291,7 @@ static int vgpu_init_support(struct platform_device *pdev)
|
||||
|
||||
g->dbg_regops_tmp_buf = nvgpu_kzalloc(g, SZ_4K);
|
||||
if (!g->dbg_regops_tmp_buf) {
|
||||
dev_err(g->dev, "couldn't allocate regops tmp buf");
|
||||
nvgpu_err(g, "couldn't allocate regops tmp buf");
|
||||
return -ENOMEM;
|
||||
}
|
||||
g->dbg_regops_tmp_buf_ops =
|
||||
|
||||
Reference in New Issue
Block a user