mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Add nvioctlChannel_SetTimeout & nvChannelSetTimeout
This commit is contained in:
parent
de664c5655
commit
52c0cee10c
@ -10,4 +10,5 @@ Result nvChannelCreate(NvChannel* c, const char* dev);
|
||||
void nvChannelClose(NvChannel* c);
|
||||
|
||||
Result nvChannelSetPriority(NvChannel* c, NvChannelPriority prio);
|
||||
Result nvChannelSetTimeout(NvChannel* c, u32 timeout);
|
||||
Result nvChannelSetNvmapFd(NvChannel* c);
|
||||
|
@ -185,5 +185,6 @@ Result nvioctlChannel_ZCullBind(u32 fd, u64 gpu_va, u32 mode);
|
||||
Result nvioctlChannel_SetErrorNotifier(u32 fd, u32 enable);
|
||||
Result nvioctlChannel_GetErrorNotification(u32 fd, NvError* out);
|
||||
Result nvioctlChannel_SetPriority(u32 fd, u32 priority);
|
||||
Result nvioctlChannel_SetTimeout(u32 fd, u32 timeout);
|
||||
Result nvioctlChannel_AllocGpfifoEx2(u32 fd, u32 num_entries, u32 flags, u32 unk0, u32 unk1, u32 unk2, u32 unk3, nvioctl_fence *fence_out);
|
||||
Result nvioctlChannel_SetUserData(u32 fd, void* addr);
|
||||
|
@ -40,6 +40,10 @@ Result nvChannelSetPriority(NvChannel* c, NvChannelPriority prio) {
|
||||
return nvioctlChannel_SetPriority(c->fd, prio);
|
||||
}
|
||||
|
||||
Result nvChannelSetTimeout(NvChannel* c, u32 timeout) {
|
||||
return nvioctlChannel_SetTimeout(c->fd, timeout);
|
||||
}
|
||||
|
||||
Result nvChannelSetNvmapFd(NvChannel* c) {
|
||||
return nvioctlChannel_SetNvmapFd(c->fd, nvBufferGetNvmapFd());
|
||||
}
|
||||
|
@ -116,6 +116,17 @@ Result nvioctlChannel_SetPriority(u32 fd, u32 priority) {
|
||||
return nvIoctl(fd, _NV_IOW(0x48, 0x0D, data), &data);
|
||||
}
|
||||
|
||||
Result nvioctlChannel_SetTimeout(u32 fd, u32 timeout) {
|
||||
struct {
|
||||
__nv_in u32 timeout;
|
||||
} data;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
data.timeout = timeout;
|
||||
|
||||
return nvIoctl(fd, _NV_IOW(0x48, 0x03, data), &data);
|
||||
}
|
||||
|
||||
Result nvioctlChannel_AllocGpfifoEx2(u32 fd, u32 num_entries, u32 flags, u32 unk0, u32 unk1, u32 unk2, u32 unk3, nvioctl_fence *fence_out) {
|
||||
Result rc=0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user