diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c index 368bacc20..67e452f00 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, if (poll_mask) { nvgpu_atomic_set(&dev->poll_mask, poll_mask); - nvgpu_cond_broadcast_interruptible(&dev->readout_wq); + nvgpu_clk_arb_event_post_event(dev); } return new_alarms_reported; @@ -1004,7 +1004,7 @@ exit_arb: nvgpu_list_for_each_entry_safe(dev, tmp, &arb->requests, nvgpu_clk_dev, node) { nvgpu_atomic_set(&dev->poll_mask, NVGPU_POLLIN | NVGPU_POLLRDNORM); - nvgpu_cond_signal_interruptible(&dev->readout_wq); + nvgpu_clk_arb_event_post_event(dev); nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd); nvgpu_list_del(&dev->node); } diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c index 09d47722a..a7c6a607a 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) return nvgpu_convert_poll_mask(nvgpu_atomic_xchg(&dev->poll_mask, 0)); } +void nvgpu_clk_arb_event_post_event(struct nvgpu_clk_dev *dev) +{ + nvgpu_cond_broadcast_interruptible(&dev->readout_wq); +} + static int nvgpu_clk_arb_release_event_dev(struct inode *inode, struct file *filp) { diff --git a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h index e91a0dad9..0c9bbe061 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, void nvgpu_clk_notification_queue_free(struct gk20a *g, struct nvgpu_clk_notification_queue *queue); + +void nvgpu_clk_arb_event_post_event(struct nvgpu_clk_dev *dev); + #ifdef CONFIG_DEBUG_FS int nvgpu_clk_arb_debugfs_init(struct gk20a *g); #endif