Commit Graph

61 Commits

Author SHA1 Message Date
averne
601fe1e98b nvfence: expose nvhost-ctrl fd 2025-01-19 18:35:39 +01:00
averne
919e3d3938 Update for review 2024-02-04 00:57:09 +01:00
averne
b615b01d44 nvchannel: Implement GET_CLK_RATE and SET_SUBMIT_TIMEOUT 2024-02-04 00:57:09 +01:00
averne
8b17648d0b nv: Implement ioctl GET_GPU_TIME 2022-07-02 16:02:01 +02:00
averne
0716ed6ffd
Add some nvchannel ioctls (#534) 2021-02-28 21:17:57 +01:00
fincs
a1af4494bf
Add nvGpuChannelGetErrorInfo, see details:
- Rename NvError(Type) to NvNotification(Type)
- Introduce NvError struct (output of GetErrorInfo)
- Add nvioctlChannel_GetErrorInfo
2020-04-19 22:18:45 +02:00
fincs
dc20bf67e9
nvGpuChannelCreate: make channel priority configurable 2020-04-19 22:14:53 +02:00
fincs
d966bee9fa Const correctness in nvGpuZbcAddColor (and fix comment typo) 2019-05-17 21:20:11 +02:00
fincs
320b054f6e Added nvGpu* wrapper functions for zcull/zbc/tpc ioctls 2019-05-17 21:15:57 +02:00
fincs
f13c3cface Add/correct /dev/nvhost-ctrl-gpu ioctls 2019-05-17 20:03:05 +02:00
fincs
06733c4750 Fix NvColorFormat enum 2019-01-04 22:30:52 +01:00
fincs
f448b0fbad nvioctlMap_Param -> nvioctlNvmap_Param 2018-12-19 19:33:31 +01:00
fincs
f381066a43 Add NvColorFormat enum 2018-12-19 19:33:31 +01:00
fincs
d87f9541d1 NvMap: added support for loading remote NvMap objects (from id) 2018-12-19 19:33:31 +01:00
fincs
72a48f6598 Add nvioctlMap_Param and NvMapParam enum 2018-12-19 19:33:31 +01:00
fincs
bf43284c9f Misc code style fixes, rename NvGraphicBuffer::layers to planes 2018-12-19 19:33:31 +01:00
fincs
412c84d5f9 Rename NvInfo to NvGpu 2018-12-19 19:33:31 +01:00
fincs
c5f8275978 Rename nvMapFree to nvMapClose for consistency reasons 2018-12-19 19:33:31 +01:00
fincs
ec6d878d12 Major buffer producer refactor, see details:
- Introduced NativeHandle (display/types.h)
- Introduced NvGraphicBuffer (nvidia/graphic_buffer.h)
- Renamed BqQueueBufferInput to BqBufferInput
- Renamed BqQueueBufferOutput to BqBufferOutput
- BqGraphicBuffer is now defined and marshalled in a way that matches
  official sw more closely, with a pointer to a NativeHandle instead of
  inline flattened data and other miscellaneous junk
- Const correctness fixes
- bqSetPreallocatedBuffer now has flattening logic for BqGraphicBuffer
- bqRequestBuffer doesn't have this logic for now, passing anything other
  than NULL will fail
- gfx.c updated to use the refactored buffer producer
2018-12-19 19:33:31 +01:00
fincs
5fe01c065a Major refactor and redesign of nvidia wrapper objects, see details:
- NvBuffer replaced with NvMap, which only manages the creation of
  raw nvmap objects. Users must map these objects manually to
  address spaces.
- nvAddressSpaceBindToChannel removed.
- nvChannelSetNvmapFd is now automatic and has been removed.
- Nv3DContext, NvCmdList, NvErrorNotifier, NvGpfifo, NvGpu and
  NvZcullContext have all been removed.
- Introduced NvGpuChannel, which provides all functionality that was
  part of said removed objects.
- Other miscellaneous changes and fixes.
2018-12-19 19:33:31 +01:00
fincs
85a20f43dc NvAddressSpace: major overhaul, see details:
- Now contains a 'page_size' field, used throughout the functions
- Removed NvPageSize
- Removed nvAddressSpaceReserveAlign/AtFixedAddr/Full
- Added nvAddressSpaceAlloc/AllocFixed/Free (replacing above functions)
- Removed nvAddressSpaceMapBuffer/UnmapBuffer
- Added nvAddressSpaceMap/MapFixed/Modify/Unmap (replacing above functions)
- Adapted NvBuffer/NvGpu to use the new functions
2018-12-19 19:33:31 +01:00
fincs
22499d8ddf nvhost-as-gpu.c: fix some mistakes, add nvioctlNvhostAsGpu_FreeSpace, add NvAllocSpaceFlags, add NvMapBufferFlags_Modify 2018-12-19 19:33:31 +01:00
fincs
f0de0c869d Added nvInfoGetGpuCharacteristics 2018-12-19 19:33:31 +01:00
fincs
fba43b0f10 nvBufferCreate: use separate is_cpu_cacheable/is_gpu_cacheable parameters 2018-10-17 00:32:47 +02:00
fincs
a50942509f NvGpfifo: Redesign API to allow for submitting multiple entries at once 2018-09-16 16:35:57 +02:00
Lioncash
9ff32e3260 Resolve trivial -Wmissing-prototypes warnings
Gets rid of trivial warnings caused by headers not being included into
the relevant .c file, empty parameter lists missing void, or functions
missing a prototype in the header.
2018-09-14 19:07:34 +02:00
fincs
e7ae7ea846 nv wrappers: Handle cacheability settings properly, more details:
- nvAddressSpaceMapBuffer now accepts a flags parameter instead of
  hardcoding NvMapBufferFlags_IsCacheable.
- NvBufferFlags was incorrect and was thus removed.
- nvBufferCreate/nvBufferCreateRw replaced with nvBufferCreate, with
  an extra 'is_cacheable' bool parameter. There's no such thing as a
  "read-only/read-write" buffer.
- nvBufferMakeCpuUncached/nvBufferMakeCpuCached were removed.
2018-09-14 18:09:58 +02:00
fincs
f469fa7458 Add nvioctlChannel_KickoffPb (uses Ioctl2) 2018-09-14 02:15:55 +02:00
fincs
1cbc67e650 NvBuffer: actually unmap and free the buffer in nvBufferFree 2018-09-13 20:05:55 +02:00
fincs
52c0cee10c Add nvioctlChannel_SetTimeout & nvChannelSetTimeout 2018-09-08 14:17:54 +02:00
fincs
de664c5655 error_notifier.h: Add missing functions to header 2018-09-08 14:17:27 +02:00
fincs
999edaa8b2 Changes to NvCmdList and NvGpfifo, see details:
- NvCmdList:
  - Added 'offset' parameter: start of the cmdlist within the buffer
  - Added nvCmdListReset for resetting a cmdlist (offset/num_cmds cleared)
- NvGpfifo:
  - nvGpfifoCreate: disabled fence wait
  - nvGpfifoSubmit -> nvGpfifoSubmitCmdList:
    - Added fence_incr parameter
    - Cleaned up flags and gpfifo entry creation
    - Now advances cmdlist offset by the number of cmds submitted
      instead of going back to the beginning
2018-09-07 17:27:15 +02:00
fincs
7f4001bec2 Potentially fix race condition nvGpfifoCreate by waiting on the fence returned by nvioctlChannel_AllocGpfifoEx2 2018-09-05 14:00:28 +02:00
fincs
d718a8dd28 NvBufferFlags_Nintendo doesn't exist, it's a misreading of the alignment parameter 2018-09-05 13:59:50 +02:00
fincs
a70acdd445 Implement nvFence 2018-08-31 13:05:23 +02:00
fincs
57e1f5f4cb nvioctlNvhostCtrl: add EventWaitAsync, EventUnregister; fix EventRegister 2018-08-31 13:05:23 +02:00
fincs
10684e205a nvidia/fence.h: sketching on NvFence/NvMultiFence {not implemented} 2018-08-31 13:05:22 +02:00
fincs
30e2ca8ec3 Introduce nvidia/types.h & move NvBufferKind to it (renamed to NvKind) 2018-08-31 13:05:22 +02:00
Jules Blok
06e50f74ab gfx: Add a call to get the framebuffer nvmap handle. 2018-08-31 13:05:22 +02:00
plutooo
de93886c56 Buildfix 2018-08-31 13:05:22 +02:00
plutooo
a3a2e57fc2 More updates to nvidia 2018-08-31 13:05:22 +02:00
plutooo
1c88d99131 Implement cmd list 2018-08-31 13:05:22 +02:00
plutooo
d6dbb59872 Change code style 2018-08-31 13:05:22 +02:00
plutooo
9c234d4d40 Started sketching on cmd lists 2018-08-31 13:05:22 +02:00
plutooo
6d21700ff7 Get rid of flag todo 2018-08-31 13:05:22 +02:00
plutooo
28cac45af8 Completing error notifier 2018-08-31 13:05:22 +02:00
plutooo
267e4e509b Error notifier bringup 2018-08-31 13:05:22 +02:00
plutooo
d6f2e1118c Zcull context works 2018-08-31 13:05:22 +02:00
plutooo
420d445a84 Minor fixes, now gets to whitescreen 2018-08-31 13:05:22 +02:00
plutooo
577a76dc06 Minor fixes, adding custom flag to buffer allocation 2018-08-31 13:05:22 +02:00