Commit Graph

77 Commits

Author SHA1 Message Date
averne
b615b01d44 nvchannel: Implement GET_CLK_RATE and SET_SUBMIT_TIMEOUT 2024-02-04 00:57:09 +01:00
averne
be45a91b9c nvchannel: Fix SET_CLK_RATE 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
3bb44d77b7 Fix nvioctlChannel_Submit syncpt writeback 2021-03-07 19:59:46 +01:00
averne
0716ed6ffd
Add some nvchannel ioctls (#534) 2021-02-28 21:17:57 +01:00
fincs
076657fd31
Allow user override of dynamic memory allocation functions throughout libnx 2021-01-22 18:37:46 +01:00
Michael Scire
e5ae43f4c2 results: use R_VALUE for comparisons 2020-12-01 02:26:26 +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
f5e4615a40
nvChannelClose: cleanup fixes 2020-04-19 22:15:32 +02:00
fincs
dc20bf67e9
nvGpuChannelCreate: make channel priority configurable 2020-04-19 22:14:53 +02:00
fincs
6535d6f871
Remove U64_MAX in favor of using UINT64_MAX 2020-03-16 16:21:33 +01:00
fincs
cacf8615a8
Remove arm/atomics.h (use C <stdatomic.h> or C++ <atomic> instead) 2020-03-16 12:51:07 +01:00
fincs
2c19f13f74
nvFence/nvGpu/nvMap: use service guard instead of unsafe atomic refcnt 2020-03-16 12:48:08 +01:00
fincs
067492ee17
nvAddressSpaceCreate: call InitializeEx with the proper page size value... 2019-08-14 21:02:56 +02:00
fincs
b3dd512253 Fix typo in nvAddressSpaceModify 2019-07-30 16:35:35 +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
42878b603a Use eventActive instead of manually checking Event::revent 2019-04-30 02:31:47 +02:00
fincs
11b7bece4a Change all services except fatal to use hosversion* instead of kernelAboveXYZ 2019-02-18 21:48:49 +01:00
fincs
f448b0fbad nvioctlMap_Param -> nvioctlNvmap_Param 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
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
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
20204e3c48 NvFence: fix regression on 1.x 2018-10-06 16:47:25 +02:00
fincs
67886bb3df nvGpuClose: correct order of operations 2018-09-26 21:08:30 +02:00
fincs
a50942509f NvGpfifo: Redesign API to allow for submitting multiple entries at once 2018-09-16 16:35:57 +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
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
99f37184fb nvQueryEvent: return an Event instead of a raw Handle 2018-08-31 13:05:23 +02:00
fincs
88e9d3bb83 kernel/event.h: several fixes, including autoclear support 2018-08-31 13:05:22 +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
fincs
a0b3d3e193 source/nvidia/: do NOT include <switch.h> 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
Jules Blok
d93c45a18d gpfifo: Reset the command buffer after submission.
Don't forget to wait on the fence before re-using the buffer.
2018-08-31 13:05:22 +02:00
Jules Blok
9ce884f29e cmd_list: The number of entries is the number of ints. 2018-08-31 13:05:22 +02:00