Get rid of flag todo

This commit is contained in:
plutooo 2018-03-11 01:42:45 +01:00 committed by fincs
parent 28cac45af8
commit 6d21700ff7
2 changed files with 8 additions and 2 deletions

View File

@ -129,6 +129,12 @@ typedef enum {
NvZcullConfig_PartOfRegularBuffer = 3
} NvZcullConfig;
// Used with nvioctlNvhostAsGpu_MapBufferEx().
typedef enum {
NvMapBufferFlags_FixedOffset = 0,
NvMapBufferFlags_IsCachable = 4,
} NvMapBufferFlags;
typedef enum {
NvErrorType_FifoErrorIdleTimeout=8,
NvErrorType_GrErrorSwNotify=13,

View File

@ -44,8 +44,8 @@ Result nvasReserveFull(NvAddressSpace* a) {
}
Result nvasMapBuffer(NvAddressSpace* a, NvBuffer* buffer, NvBufferKind kind, iova_t* iova_out) {
// TODO: What is flag==4?
return nvioctlNvhostAsGpu_MapBufferEx(a->fd, 4, kind, buffer->fd, 0x10000, 0, 0, 0, iova_out);
return nvioctlNvhostAsGpu_MapBufferEx(
a->fd, NvMapBufferFlags_IsCachable, kind, buffer->fd, 0x10000, 0, 0, 0, iova_out);
}
Result nvasBindToChannel(NvAddressSpace* a, NvChannel* channel) {