Commit Graph

47 Commits

Author SHA1 Message Date
plutoo
b34f59e179 ARM cache operations 2018-01-22 20:29:49 +01:00
plutoo
6fa8370bfb This looks better 2018-01-22 20:11:55 +01:00
TuxSH
5abc4873d8 Include only what is really necessary...
add pragma once in every header, etc.
2018-01-22 18:42:57 +01:00
plutoo
e54bbc54ea Fix codestyle for results 2018-01-21 18:40:23 +01:00
plutoo
fbfb5cdba2 NV code style 2018-01-06 13:43:18 +01:00
yellows8
d62709adc7 Added gfxInitResolution() + added gfx.h comments. Updated gfxGetFramebufferDisplayOffset() so that the returned pixel-offset is in a region that's not displayed when the x/y is out-of-bounds. Fixed g_gfx_framebuf_aligned_{width/height} init when the initial width/height is not the default 0. Updated nvioctlNvhostAsGpu_InitializeEx/nvioctlNvhostAsGpu_AllocSpace usage etc, required for using non-720p framebufs. 2017-12-27 18:52:54 -05:00
yellows8
f00bc78569 Moved framebuf width/height/size fields from nvgfx into gfx + code used with those. Moved g_gfxprod_BufferInitData into gfx + renamed it. Moved code for using bufferProducerGraphicBufferInit() / struct init code into gfx. Removed commented out code for g_nvgfx_totalframebufs init. Replaced hard-coded width/height constants in gfx with the width/height fields. 2017-12-27 18:52:53 -05:00
yellows8
e128fd58f1 Disabled nvmap objs which aren't used afterwards which don't use an input_offset for MapBufferEx. Moved bufferProducerGraphicBufferInit() code outside of the loop and added a comment. Only use kind 0xdb for MapBufferEx framebuf init in the loop, since the other kind is unrelated to framebuf. 2017-12-27 18:52:53 -05:00
yellows8
a814c79827 Properly setup the data in bufferProducerGraphicBuffer via a struct. Setup size/width/height fields properly in bufferProducerGraphicBuffer, instead of hard-coding. 2017-12-27 18:52:53 -05:00
yellows8
917036cec6 Updated bufferProducerGraphicBuffer struct. 2017-12-27 18:52:53 -05:00
yellows8
dd4a9bbca6 Added bufferProducerGraphicBuffer struct. Parse the bufferProducerRequestBuffer parcel reply properly. Renamed bufferProducerTegraBufferInit to bufferProducerGraphicBufferInit + renamed the enum for it, and handle input/output for it properly. Properly return rc in bufferProducerGraphicBufferInit(). 2017-12-27 18:52:53 -05:00
yellows8
824dadd291 Added better code for gpfifo handling which is disabled, currently broken with the data written into the gpfifo-data mem. Updated nvgfxEventWait(). Load the classnum for nvioctlChannel_AllocObjCtx() from gpu_characteristics. Added disabled code for gpfifo in gfx.c + added a comment. 2017-12-27 18:52:53 -05:00
yellows8
edf2d1417a Handle nvioctlChannel_ZCullBind() properly. 2017-12-27 18:52:53 -05:00
yellows8
945615ece3 Updated nvgfxEventWait() and nvioctlNvhostCtrl_EventWait(). Updated _gfxDequeueBuffer(). 2017-12-27 18:52:53 -05:00
yellows8
2db9a5fdb9 Imported enum for use with bufferProducerQuery(). Changed gfxGetDisplayResolution to static with adjusted name and removed it from the .h. Disabled _gfxGetDisplayResolution. Added disabled get-{resolution/width/height} code. Check fence->is_valid when calling nvgfxEventWait(), with the commented out line. 2017-12-27 18:52:52 -05:00
yellows8
63016db072 Updated bufferProducerFence. Updated nvgfxEventWait. Added better initialization validation to binder, etc. In bufferProducerDequeueBuffer(), use sizeof instead of a constant for the fence size. Updated g_gfxQueueBufferData. Fixed validation in _gfxGetNativeWindowID. Other changes. 2017-12-27 18:52:52 -05:00
plutoo
806a75c841 More refactoring, renamed graphicsproducer -> bufferproducer 2017-12-27 18:52:52 -05:00
plutoo
2fd13b5556 Moving ioctls to separate files 2017-12-27 18:52:39 -05:00
yellows8
24adf197af Moved the single-framebuf-size field from gfx into nvgfx. Use this field instead of hard-coded size in nvgfx, in some cases. Other adjustments. 2017-12-27 18:50:16 -05:00
yellows8
7c826e57e8 Changed g_nvgfx_totalframebufs to 2. Removed the gfxFlushBuffers() call in _gfxInit() and added a dcache-flush in nvmapobjInitialize(). Moved the nvgfxGetFramebuffer() call. Added a delay in _gfxInit(). Changed the initial g_gfxCurrentBuffer value, which is then updated by _gfxDequeueBuffer() later. Adjusted the code for updating g_gfxCurrentBuffer. For the gfxproducerDequeueBuffer() call, changed the value for the async param from 1 to 0. 2017-12-27 18:50:16 -05:00
yellows8
34e22c82df Use total-framebufs value from a global field instead of hard-coding it. 2017-12-27 18:50:15 -05:00
yellows8
283fdabbf6 Renamed gfxproducerBufferInit to gfxproducerTegraBufferInit. Use an enum for the binder 'code' for this. Added comments for the BufferInitData structure. 2017-12-27 18:50:15 -05:00
yellows8
ee3a74fa60 nvgfx event adjustments. Fixed loop interation check for running buffer init. Disabled updating a field in g_gfxQueueBufferData with _gfxQueueBuffer(). 2017-12-27 18:50:15 -05:00
yellows8
a85ee0458d Implemented interface for accessing framebuf. Adjustments for gfx init/exit. Removed 0x77 memset for framebuf in nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
b577367011 Implemented nvioctlNvmap_FromID() and nvioctlNvmap_GetID().
Added PARCEL_LOGGING define in parcel.c.
Fixed the 'code' value used in gfxproducerQueueBuffer().
Moved some gfxproducer init into nvgfx.
Moved some nvgfx event init into nvgfxEventInit().
Updated the code using gfxproducerBufferInit() for setting the nvmap-handles.
Disabled a nvQueryEvent() call which now fails.
Other changes.
The setup framebuf/windowbuf is now displayed.
2017-12-27 18:50:15 -05:00
yellows8
24fa9b0f4b More nv event stuff. Updated comment regarding NVHOST_IOCTL_CTRL_GET_CONFIG. 2017-12-27 18:50:15 -05:00
yellows8
79fd32f0c7 More nvgfx event stuff, still broken. 2017-12-27 18:50:15 -05:00
yellows8
0f0a4cd0fe Added nvioctlNvhostCtrl_EventSignal and nvioctlNvhostCtrl_EventWait. More nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
8d68cb401f Yet another nvmap obj added to nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
cc22a5e92a Another nvmap obj. 2017-12-27 18:50:15 -05:00
yellows8
453e8b8303 More nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
e9dbf4d18f More nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
9e10c02c88 Fixed kind value for last *MapBufferEx() loop interation. 2017-12-27 18:50:15 -05:00
yellows8
bccd0df4ae More nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
2d3887fb0c Implemented more nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
1908b29708 Added nvioctlChannel_SubmitGPFIFO(). 2017-12-27 18:50:15 -05:00
yellows8
eeb43bae97 Added nvioctlChannel_ZCullBind(). Added more nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
017770b509 More ioctls + nvgfx init. Added nvmapobjSetup(). 2017-12-27 18:50:15 -05:00
yellows8
31b945dff9 Store nvmap obj state inside of a dedicated obj struct + funcs for using that, etc. 2017-12-27 18:50:15 -05:00
yellows8
20ec051ca4 Implemented nvioctlNvhostCtrlGpu_GetL2State(). 2017-12-27 18:50:15 -05:00
yellows8
690b8be39a Implemented setting offset in nvioctlNvhostAsGpu_MapBufferEx(). Fixed broken MapBufferEx usage in nvgfx init for the second nvmap obj. 2017-12-27 18:50:15 -05:00
yellows8
bf65d6734a Added note regarding nvQueryEvent. 2017-12-27 18:50:15 -05:00
yellows8
f6ab87e309 Added an ioctl usage comment to nvgfx. 2017-12-27 18:50:15 -05:00
yellows8
cfffdcc444 Setup the second nvmap obj. 2017-12-27 18:50:15 -05:00
yellows8
0cc65093e3 Implemented the ioctls which were skipped during nvgfx init. nvgfx init adjustments. Fixed ioctl direction define for nvioctlNvhostAsGpu_MapBufferEx, this now works properly. 2017-12-27 18:50:15 -05:00
yellows8
704ead0d5f Added more nvioctls + more nvgfx init. 2017-12-27 18:50:15 -05:00
yellows8
619a9a378c Added nvgfx. 2017-12-27 18:50:14 -05:00