Commit Graph

443 Commits

Author SHA1 Message Date
TuxSH
3ecd841ec2 Update svcGetDebugThreadContext, add svcSetDebugThreadContext, implement threadDumpContext 2018-09-18 01:13:55 +02:00
TuxSH
5498d3e0c7 Add ThreadContext, RegisterGroup, svcGetThreadContext3, threadDumpContext 2018-09-18 01:13:55 +02:00
Vicki Pfau
d9e3be27a2 Add psm:GetChargerType 2018-09-18 01:13:24 +02:00
fincs
4645ef7004 gfx: Add gfxAppendFence. Remove obsolete comments related to double buffering. 2018-09-16 18:03:35 +02:00
fincs
a50942509f NvGpfifo: Redesign API to allow for submitting multiple entries at once 2018-09-16 16:35:57 +02:00
plutooo
4a13ee3e62 Fix function name to not cause linker problems due to symbol truncation issues 2018-09-15 08:42:32 +02:00
plutooo
7279ef0415 Fix signature of svcContinueDebugEvent for firmware 3.0.0 and forward 2018-09-15 08:14:09 +02:00
plutooo
f2c959b941 Fix compilation error on pre-14 C++ 2018-09-15 08:11:31 +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
cae1954ebc nv: add cloned session handle used with certain requests; add Ioctl2 2018-09-14 02:15:24 +02:00
fincs
ad17cb74c7 kernel/ipc.h: add ipcCloneSession 2018-09-14 01:35:24 +02:00
fincs
1cbc67e650 NvBuffer: actually unmap and free the buffer in nvBufferFree 2018-09-13 20:05:55 +02:00
Rajko Stojadinovic
dcdb5c28a4 Fix fsOpenFileSystem (#153)
* Fix fsOpenFileSystem

* Make fsOpenFileSystem and fsOpenFileSystemWithId work on all firmware versions

* Add some comments for fsOpenFileSystem(WithId)
2018-09-09 19:56:38 +02:00
Random
122fec028c Added nsListApplicationRecord and nsListContentMetaStatus (#163) 2018-09-09 19:56:16 +02:00
neonsea
20a39ef86c Add appletBeginBlockingHomeButton() and appletEndBlockingHomeButton() (#165) 2018-09-09 19:55:53 +02:00
XorTroll
cd813ddb60 Add psm service and psmGetBatteryChargePercentage function (fixed) (#166) 2018-09-09 19:55:36 +02:00
Michael Scire
6ef26bff1a Implement kernelAbove600() 2018-09-09 19:55:12 +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
e3a7187973 gfx: Remove gfxSetDrawFlip. Make 0 the default transform instead of FLIP_V. 2018-08-31 20:14:50 +02:00
fincs
0d1b8bd723 BqQueueBufferInput: add swapInterval field (purpose currently unknown) 2018-08-31 20:11:53 +02:00
fincs
651dd72ac1 Add bqCancelBuffer and use it in gfx.c 2018-08-31 14:14:54 +02:00
fincs
a62fae427b Introduce Module_LibnxBinder result codes (based on Android status_t) and binderConvertErrorCode 2018-08-31 13:59:18 +02:00
fincs
819a6f0d89 display/binder.h: refactoring and other changes:
- Removed session_handle/native_handle state
- Consequence of the above: simplified binderCreate/binderInitSession
- Now using viGetSession_IHOSBinderDriverRelay internally
- Changed binderGetNativeHandle to return an Event
- Added readable aliases for binderAdjustRefcount
- gfx: now using async bqDequeueBuffer when the binder event is available
2018-08-31 13:05:23 +02:00
fincs
60cbb68f46 gfx: use new NvFence waiting code 2018-08-31 13:05:23 +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
b26bb6ce76 viGetDisplayVsyncEvent: return an Event instead of a raw handle 2018-08-31 13:05:22 +02:00
fincs
88e9d3bb83 kernel/event.h: several fixes, including autoclear support 2018-08-31 13:05:22 +02:00
fincs
f2f59c75c0 display/gfx.h & buffer_producer.h: Start major refactor, highly WIP 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
ace0dea08b Move Android types to display/types.h; add PIXEL_FORMAT/GRALLOC_USAGE enums 2018-08-31 13:05:22 +02:00
fincs
4e7159ce02 VI service: major revamp, see details:
- Added viOpenDefaultDisplay.
- Replaced viOpenLayer with viCreateLayer.
- NativeWindow parcel data is now parsed by viCreateLayer, and the
  ViLayer struct contains a new igbp_binder_obj_id field.
- LayerFlags/LayerId parameters replaced by weak global variables
  __nx_vi_layer_id/__nx_vi_stray_layer_flags.
- The root vi:* session is closed on startup.
- Simplified corresponding gfx code.
- Misc style fixes
2018-08-31 13:05:22 +02:00
fincs
180cd9b550 display/parcel.h: publish ParcelHeader struct 2018-08-31 13:05:22 +02:00
Jules Blok
e234129598 gfx: Add a buffer index to gfxGetFramebufferHandle(). 2018-08-31 13:05:22 +02:00
Jules Blok
4f331eb9f7 gfx: Add function to query framebuffer pitch. 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