mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: handle clk arb event posting in OS specific code
The mechanism of posting events to userspace is OS specific. In linux this works through poll fd, wherein we can make use of nvgpu_cond variables to poll and trigger the corresponding wait_queue. The post event functionality on QNX doesn't work on poll though. It uses iofunc_notify_trigger to post the events to the calling process. As such QNX can't work with nvgpu_cond's. To overcome this issue, it is proposed to create OS specific interface function for posting clk arb events. Linux can call nvgpu_cond based implementation, which makes sense since these are already initialized and poll'ed in Linux specific code only. QNX can implement this interface to call iofunc_notify_* functions, as per its need. Jira VQRM-3741 Change-Id: I7d9f71dae2ae7f6a09cd56662003fd1b7e50324c Signed-off-by: Sourab Gupta <sourabg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1709656 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
9352136ad3
commit
85d7b3c5cc
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user