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:
parent
0de0dfdd8d
commit
dc20bf67e9
nx
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user