diff options
author | Sourab Gupta <sourabg@nvidia.com> | 2018-05-03 00:08:10 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-07 07:42:02 -0400 |
commit | c92afad630f0539dfd2d28369d493715648b4ace (patch) | |
tree | cbcd80480693f6a7a9c7cc71366fa2bda74ed08b /drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c | |
parent | 6e739d924fe9b778fa82396e0e941143f498acb8 (diff) |
gpu: nvgpu: use nvgpu logging in clk arbiter
Clk arbiter uses the legacy gk20a_dbg_fn logging APIs.
Use nvgpu logging instead, while also defining a new
log mask for clk arbiter.
Jira VQRM-3741
Change-Id: I86feb4fa434b404705cc3fba1e854180d4df508d
Signed-off-by: Sourab Gupta <sourabg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1707394
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c index 27afe777..62b6ae17 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c | |||
@@ -55,7 +55,7 @@ static int nvgpu_clk_arb_release_completion_dev(struct inode *inode, | |||
55 | struct nvgpu_clk_session *session = dev->session; | 55 | struct nvgpu_clk_session *session = dev->session; |
56 | 56 | ||
57 | 57 | ||
58 | gk20a_dbg_fn(""); | 58 | nvgpu_log(session->g, gpu_dbg_fn | gpu_dbg_clk_arb, " "); |
59 | 59 | ||
60 | nvgpu_ref_put(&session->refcount, nvgpu_clk_arb_free_session); | 60 | nvgpu_ref_put(&session->refcount, nvgpu_clk_arb_free_session); |
61 | nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd); | 61 | nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd); |
@@ -66,7 +66,7 @@ static unsigned int nvgpu_clk_arb_poll_dev(struct file *filp, poll_table *wait) | |||
66 | { | 66 | { |
67 | struct nvgpu_clk_dev *dev = filp->private_data; | 67 | struct nvgpu_clk_dev *dev = filp->private_data; |
68 | 68 | ||
69 | gk20a_dbg_fn(""); | 69 | nvgpu_log(dev->session->g, gpu_dbg_fn | gpu_dbg_clk_arb, " "); |
70 | 70 | ||
71 | poll_wait(filp, &dev->readout_wq.wq, wait); | 71 | poll_wait(filp, &dev->readout_wq.wq, wait); |
72 | return nvgpu_atomic_xchg(&dev->poll_mask, 0); | 72 | return nvgpu_atomic_xchg(&dev->poll_mask, 0); |
@@ -81,7 +81,7 @@ static int nvgpu_clk_arb_release_event_dev(struct inode *inode, | |||
81 | 81 | ||
82 | arb = session->g->clk_arb; | 82 | arb = session->g->clk_arb; |
83 | 83 | ||
84 | gk20a_dbg_fn(""); | 84 | nvgpu_log(session->g, gpu_dbg_fn | gpu_dbg_clk_arb, " "); |
85 | 85 | ||
86 | if (arb) { | 86 | if (arb) { |
87 | nvgpu_spinlock_acquire(&arb->users_lock); | 87 | nvgpu_spinlock_acquire(&arb->users_lock); |
@@ -128,7 +128,8 @@ static ssize_t nvgpu_clk_arb_read_event_dev(struct file *filp, char __user *buf, | |||
128 | struct nvgpu_gpu_event_info info; | 128 | struct nvgpu_gpu_event_info info; |
129 | ssize_t err; | 129 | ssize_t err; |
130 | 130 | ||
131 | gk20a_dbg_fn("filp=%p, buf=%p, size=%zu", filp, buf, size); | 131 | nvgpu_log(dev->session->g, gpu_dbg_fn | gpu_dbg_clk_arb, |
132 | "filp=%p, buf=%p, size=%zu", filp, buf, size); | ||
132 | 133 | ||
133 | if ((size - *off) < sizeof(info)) | 134 | if ((size - *off) < sizeof(info)) |
134 | return 0; | 135 | return 0; |
@@ -242,7 +243,7 @@ static int nvgpu_clk_arb_install_fd(struct gk20a *g, | |||
242 | char name[64]; | 243 | char name[64]; |
243 | struct nvgpu_clk_dev *dev; | 244 | struct nvgpu_clk_dev *dev; |
244 | 245 | ||
245 | gk20a_dbg_fn(""); | 246 | nvgpu_log(g, gpu_dbg_fn | gpu_dbg_clk_arb, " "); |
246 | 247 | ||
247 | dev = nvgpu_kzalloc(g, sizeof(*dev)); | 248 | dev = nvgpu_kzalloc(g, sizeof(*dev)); |
248 | if (!dev) | 249 | if (!dev) |
@@ -298,7 +299,7 @@ int nvgpu_clk_arb_install_event_fd(struct gk20a *g, | |||
298 | struct nvgpu_clk_dev *dev; | 299 | struct nvgpu_clk_dev *dev; |
299 | int fd; | 300 | int fd; |
300 | 301 | ||
301 | gk20a_dbg_fn(""); | 302 | nvgpu_log(g, gpu_dbg_fn | gpu_dbg_clk_arb, " "); |
302 | 303 | ||
303 | fd = nvgpu_clk_arb_install_fd(g, session, &event_dev_ops, &dev); | 304 | fd = nvgpu_clk_arb_install_fd(g, session, &event_dev_ops, &dev); |
304 | if (fd < 0) | 305 | if (fd < 0) |
@@ -330,7 +331,7 @@ int nvgpu_clk_arb_install_request_fd(struct gk20a *g, | |||
330 | struct nvgpu_clk_dev *dev; | 331 | struct nvgpu_clk_dev *dev; |
331 | int fd; | 332 | int fd; |
332 | 333 | ||
333 | gk20a_dbg_fn(""); | 334 | nvgpu_log(g, gpu_dbg_fn | gpu_dbg_clk_arb, " "); |
334 | 335 | ||
335 | fd = nvgpu_clk_arb_install_fd(g, session, &completion_dev_ops, &dev); | 336 | fd = nvgpu_clk_arb_install_fd(g, session, &completion_dev_ops, &dev); |
336 | if (fd < 0) | 337 | if (fd < 0) |
@@ -349,7 +350,7 @@ int nvgpu_clk_arb_commit_request_fd(struct gk20a *g, | |||
349 | struct fd fd; | 350 | struct fd fd; |
350 | int err = 0; | 351 | int err = 0; |
351 | 352 | ||
352 | gk20a_dbg_fn(""); | 353 | nvgpu_log(g, gpu_dbg_fn | gpu_dbg_clk_arb, " "); |
353 | 354 | ||
354 | fd = fdget(request_fd); | 355 | fd = fdget(request_fd); |
355 | if (!fd.file) | 356 | if (!fd.file) |
@@ -383,7 +384,8 @@ int nvgpu_clk_arb_set_session_target_mhz(struct nvgpu_clk_session *session, | |||
383 | struct fd fd; | 384 | struct fd fd; |
384 | int err = 0; | 385 | int err = 0; |
385 | 386 | ||
386 | gk20a_dbg_fn("domain=0x%08x target_mhz=%u", api_domain, target_mhz); | 387 | nvgpu_log(session->g, gpu_dbg_fn | gpu_dbg_clk_arb, |
388 | "domain=0x%08x target_mhz=%u", api_domain, target_mhz); | ||
387 | 389 | ||
388 | fd = fdget(request_fd); | 390 | fd = fdget(request_fd); |
389 | if (!fd.file) | 391 | if (!fd.file) |