Get rid of flag todo

This commit is contained in:
plutoo 2018-03-11 01:42:45 +01:00
parent ab95d28e30
commit 9a10f85fab
2 changed files with 8 additions and 1 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

@ -45,7 +45,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) {