summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/clk/clk_arb.c4
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c5
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/clk_arb.h3
3 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c
index 368bacc2..67e452f0 100644
--- a/drivers/gpu/nvgpu/clk/clk_arb.c
+++ b/drivers/gpu/nvgpu/clk/clk_arb.c
@@ -697,7 +697,7 @@ static u32 nvgpu_clk_arb_notify(struct nvgpu_clk_dev *dev,
697 697
698 if (poll_mask) { 698 if (poll_mask) {
699 nvgpu_atomic_set(&dev->poll_mask, poll_mask); 699 nvgpu_atomic_set(&dev->poll_mask, poll_mask);
700 nvgpu_cond_broadcast_interruptible(&dev->readout_wq); 700 nvgpu_clk_arb_event_post_event(dev);
701 } 701 }
702 702
703 return new_alarms_reported; 703 return new_alarms_reported;
@@ -1004,7 +1004,7 @@ exit_arb:
1004 nvgpu_list_for_each_entry_safe(dev, tmp, &arb->requests, 1004 nvgpu_list_for_each_entry_safe(dev, tmp, &arb->requests,
1005 nvgpu_clk_dev, node) { 1005 nvgpu_clk_dev, node) {
1006 nvgpu_atomic_set(&dev->poll_mask, NVGPU_POLLIN | NVGPU_POLLRDNORM); 1006 nvgpu_atomic_set(&dev->poll_mask, NVGPU_POLLIN | NVGPU_POLLRDNORM);
1007 nvgpu_cond_signal_interruptible(&dev->readout_wq); 1007 nvgpu_clk_arb_event_post_event(dev);
1008 nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd); 1008 nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd);
1009 nvgpu_list_del(&dev->node); 1009 nvgpu_list_del(&dev->node);
1010 } 1010 }
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c
index 09d47722..a7c6a607 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c
@@ -88,6 +88,11 @@ static unsigned int nvgpu_clk_arb_poll_dev(struct file *filp, poll_table *wait)
88 return nvgpu_convert_poll_mask(nvgpu_atomic_xchg(&dev->poll_mask, 0)); 88 return nvgpu_convert_poll_mask(nvgpu_atomic_xchg(&dev->poll_mask, 0));
89} 89}
90 90
91void nvgpu_clk_arb_event_post_event(struct nvgpu_clk_dev *dev)
92{
93 nvgpu_cond_broadcast_interruptible(&dev->readout_wq);
94}
95
91static int nvgpu_clk_arb_release_event_dev(struct inode *inode, 96static int nvgpu_clk_arb_release_event_dev(struct inode *inode,
92 struct file *filp) 97 struct file *filp)
93{ 98{
diff --git a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h
index e91a0dad..0c9bbe06 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h
@@ -349,6 +349,9 @@ int nvgpu_clk_notification_queue_alloc(struct gk20a *g,
349 349
350void nvgpu_clk_notification_queue_free(struct gk20a *g, 350void nvgpu_clk_notification_queue_free(struct gk20a *g,
351 struct nvgpu_clk_notification_queue *queue); 351 struct nvgpu_clk_notification_queue *queue);
352
353void nvgpu_clk_arb_event_post_event(struct nvgpu_clk_dev *dev);
354
352#ifdef CONFIG_DEBUG_FS 355#ifdef CONFIG_DEBUG_FS
353int nvgpu_clk_arb_debugfs_init(struct gk20a *g); 356int nvgpu_clk_arb_debugfs_init(struct gk20a *g);
354#endif 357#endif