Skip to content

Commit

Permalink
nvfence: expose nvhost-ctrl fd
Browse files Browse the repository at this point in the history
  • Loading branch information
averne committed Jan 19, 2025
1 parent a063ceb commit 601fe1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions nx/include/switch/nvidia/fence.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ typedef struct {

Result nvFenceInit(void);
void nvFenceExit(void);
u32 nvFenceGetFd(void);

Result nvFenceWait(NvFence* f, s32 timeout_us);

Expand Down
5 changes: 5 additions & 0 deletions nx/source/nvidia/fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ void _nvFenceCleanup(void)
}
}

u32 nvFenceGetFd(void)
{
return g_ctrl_fd;
}

static Result _nvFenceEventWaitCommon(Event* event, u32 event_id, s32 timeout_us)
{
u64 timeout_ns = UINT64_MAX;
Expand Down

0 comments on commit 601fe1e

Please sign in to comment.