1
0
mirror of https://github.com/switchbrew/libnx.git synced 2025-07-20 01:22:14 +02:00

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
nx
include/switch/nvidia
source/nvidia

View File

@ -18,7 +18,7 @@ typedef struct NvGpuChannel
u32 num_entries; u32 num_entries;
} NvGpuChannel; } NvGpuChannel;
Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as); Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as, NvChannelPriority prio);
void nvGpuChannelClose(NvGpuChannel* c); void nvGpuChannelClose(NvGpuChannel* c);
Result nvGpuChannelZcullBind(NvGpuChannel* c, iova_t iova); Result nvGpuChannelZcullBind(NvGpuChannel* c, iova_t iova);

View File

@ -10,7 +10,7 @@
#include "nvidia/fence.h" #include "nvidia/fence.h"
#include "nvidia/gpu_channel.h" #include "nvidia/gpu_channel.h"
Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as) Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as, NvChannelPriority prio)
{ {
Result res; Result res;
@ -36,7 +36,7 @@ Result nvGpuChannelCreate(NvGpuChannel* c, struct NvAddressSpace* as)
res = nvioctlChannel_SetErrorNotifier(c->base.fd, 1); res = nvioctlChannel_SetErrorNotifier(c->base.fd, 1);
if (R_SUCCEEDED(res)) if (R_SUCCEEDED(res))
res = nvChannelSetPriority(&c->base, NvChannelPriority_Medium); res = nvChannelSetPriority(&c->base, prio);
if (R_FAILED(res)) if (R_FAILED(res))
nvGpuChannelClose(c); nvGpuChannelClose(c);