mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
nvGpuChannelCreate: make channel priority configurable
This commit is contained in:
parent
0de0dfdd8d
commit
dc20bf67e9
@ -18,7 +18,7 @@ typedef struct NvGpuChannel
|
||||
u32 num_entries;
|
||||
} NvGpuChannel;
|
||||
|
||||
Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as);
|
||||
Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as, NvChannelPriority prio);
|
||||
void nvGpuChannelClose(NvGpuChannel* c);
|
||||
|
||||
Result nvGpuChannelZcullBind(NvGpuChannel* c, iova_t iova);
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "nvidia/fence.h"
|
||||
#include "nvidia/gpu_channel.h"
|
||||
|
||||
Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as)
|
||||
Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as, NvChannelPriority prio)
|
||||
{
|
||||
Result res;
|
||||
|
||||
@ -36,7 +36,7 @@ Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as)
|
||||
res = nvioctlChannel_SetErrorNotifier(c->base.fd, 1);
|
||||
|
||||
if (R_SUCCEEDED(res))
|
||||
res = nvChannelSetPriority(&c->base, NvChannelPriority_Medium);
|
||||
res = nvChannelSetPriority(&c->base, prio);
|
||||
|
||||
if (R_FAILED(res))
|
||||
nvGpuChannelClose(c);
|
||||
|
Loading…
Reference in New Issue
Block a user