nvGpuChannelCreate: make channel priority configurable

This commit is contained in:
fincs 2020-04-19 22:14:53 +02:00
parent 0de0dfdd8d
commit dc20bf67e9
No known key found for this signature in database
GPG Key ID: 62C7609ADA219C60
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);