summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* nvdrv: use static typing for SessionId, smmu Asid typesLiam2024-01-191-1/+1
|
* NVDRV: Implement sessions and initial implementation of SMMUFernando Sahmkow2024-01-191-1/+1
|
* nvdrv: rework to remove memcpyLiam2023-10-251-26/+26
|
* nvdrv: fix up remaining copy callsLiam2023-10-251-11/+9
|
* nvdrv: convert nvhost_gpuLiam2023-10-251-61/+32
|
* nvdrv: add ioctl command serialization, convert nvhost_as_gpuLiam2023-10-251-3/+3
|
* Remove memory allocations in some hot pathsKelebek12023-06-221-29/+30
|
* memory: rename global memory references to application memoryLiam2023-03-241-2/+2
|
* Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"ameerj2023-02-031-18/+17
| | | | | This reverts commit 25fc5c0e1158cb8e81cbc769b24ad84032a1fbfd, reversing changes made to af20e25081f97d55b451606c87922e2b49f0d363.
* Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"liamwhite2023-02-021-17/+18
|
* nvdrv: Use std::span for inputsameerj2022-12-291-18/+17
| | | | Allows the use of HLERequestContext::ReadBufferSpan
* Add break for default casesKyle Kienapfel2022-11-141-3/+2
| | | | | | | | | | | Visual Studio has an option to search all files in a solution, so I did a search in there for "default:" looking for any missing break statements. I've left out default statements that return something, and that throw something, even if via ThrowInvalidType. UNREACHABLE leads towards throw R_THROW macro leads towards a return
* General: address feedbackFernando Sahmkow2022-10-061-1/+1
|
* Address Feedback from bylaws.Fernando Sahmkow2022-10-061-1/+1
|
* NvDec: Fix regressions.Fernando Sahmkow2022-10-061-0/+1
|
* NVDRV: Further improvements.Fernando Sahmkow2022-10-061-30/+29
|
* NVDRV: Further refactors and eliminate old code.Fernando Sahmkow2022-10-061-2/+5
|
* VideoCore: Refactor syncing.Fernando Sahmkow2022-10-061-5/+5
|
* VideoCore: implement channels on gpu caches.Fernando Sahmkow2022-10-061-11/+23
|
* NVDRV: Fix Open/Close and make sure each device is correctly created.Fernando Sahmkow2022-10-061-4/+8
|
* NVDRV: Implement new NvMapFernando Sahmkow2022-10-061-4/+5
|
* NVDRV: Refactor and add new NvMap.Fernando Sahmkow2022-10-061-4/+5
|
* NVDRV: Implement QueryEvent.Fernando Sahmkow2022-10-061-2/+24
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* hle: nvdrv: Rename Fence to NvFence to avoid naming conflicts.bunnei2022-03-251-3/+4
|
* core: Remove unused includesameerj2021-11-041-1/+0
|
* gpu: Migrate implementation to the cpp fileameerj2021-10-031-3/+10
|
* service: Resolve cases of member field shadowingLioncash2021-05-041-5/+5
| | | | | Now all that remains is for kernel code to be 'shadow-free' and then -Wshadow can be turned into an error.
* nvdrv: Pass device fd and handle device create methods for device opening and closingChloe Marcec2021-03-251-4/+8
| | | | We pass the fd to the ioctl as well as alert the device when it's opened or closed to allow for fd unique actions to take place
* hle: service: nvdrv: Revert #4981 to remove usage of SleepClientThread.bunnei2020-12-291-5/+3
| | | | - Note, this always processes the ioctl right away, which fixes BotW 1.0.0 issues.
* nvservices: Reintroducee IoctlCtrlChloe Marcec2020-11-241-3/+5
| | | | Fixes regression caused by #4907 which caused games like Breath of the Wild 1.0.0 not to boot.
* core: Make nvservices more standardizedChloe Marcec2020-11-101-79/+105
|
* video_core: dma_pusher: Remove integrity check on command lists.bunnei2020-11-071-1/+0
| | | | - This seems to cause softlocks in Breath of the Wild.
* fixup! hle service: nvdrv: nvhost_gpu: Update to use SyncpointManager and other improvements.bunnei2020-11-011-3/+10
|
* hle service: nvdrv: nvhost_gpu: Update to use SyncpointManager and other improvements.bunnei2020-11-011-42/+88
| | | | | - Refactor so that SubmitGPFIFO and KickoffPB use shared functionality. - Implement add_wait and add_increment flags.
* Revert "core: Fix clang build"bunnei2020-10-211-5/+3
|
* core: Fix clang buildLioncash2020-10-181-3/+5
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* nvhost_gpu: implement ChannelSetTimeslicenamkazy2020-02-161-0/+12
|
* core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory classLioncash2019-11-271-2/+2
| | | | | | | | | | | | | | With all of the trivial parts of the memory interface moved over, we can get right into moving over the bits that are used. Note that this does require the use of GetInstance from the global system instance to be used within hle_ipc.cpp and the gdbstub. This is fine for the time being, as they both already rely on the global system instance in other functions. These will be removed in a change directed at both of these respectively. For now, it's sufficient, as it still accomplishes the goal of de-globalizing the memory code.
* service/nvdrv: Silence -WswitchReinUsesLisp2019-10-051-0/+2
|
* Merge pull request #2873 from ogniK5377/new-ioctlsFernando Sahmkow2019-09-221-7/+13
|\ | | | | Initial implementation of Ioctl2 & Ioctl3
| * Initial implementation of Ioctl2 & Ioctl3David Marcec2019-09-191-7/+13
| | | | | | | | Purpose of Ioctl2 and Ioctl3 is to prevent the passing of raw pointers through ioctls
* | Mark KickOffPb & SubmitGPFIFO as traceDavid Marcec2019-09-211-4/+4
|/ | | | These functions are not stubbed and are called fairly often. Due to the nature of how often they're called, we should keep them marked as LOG_TRACE instead of LOG_DEBUG or LOG_WARNING
* NVFlinger: Correct GCC compile errorFernando Sahmkow2019-07-051-5/+3
|
* NVServices: Correct CtrlEventWaitSync to block the ipc until timeout.Fernando Sahmkow2019-07-051-1/+2
|
* nv_services: Deglobalize NvServicesFernando Sahmkow2019-07-051-4/+5
|
* nv_services: Create GPU channels correctlyFernando Sahmkow2019-07-051-2/+4
|
* video_core: Implement GPU side SyncpointsFernando Sahmkow2019-07-051-6/+24
|
* nv_services: Correct buffer queue fencing and GPFifo fencingFernando Sahmkow2019-07-051-4/+4
|
* gpu: Refactor command and swap buffers interface for asynch.bunnei2019-03-071-12/+2
|
* nvhost_gpu: Skip empty GPU command lists.bunnei2018-12-151-0/+4
|
* Merge pull request #1801 from ogniK5377/log-before-executebunnei2018-11-291-0/+10
|\ | | | | Changed logging to be "Log before execution", Added more error logging, all services/svc should now log on some level
| * Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec2018-11-261-0/+10
| |
* | dma_pushbuffer: Optimize to avoid loop and copy on Push.bunnei2018-11-281-8/+6
| |
* | gpu: Rewrite GPU command list processing with DmaPusher class.bunnei2018-11-271-3/+10
|/ | | | - More accurate impl., fixes Undertale (among other games).
* hle/service: Default constructors and destructors in the cpp file where applicableLioncash2018-09-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a destructor isn't defaulted into a cpp file, it can cause the use of forward declarations to seemingly fail to compile for non-obvious reasons. It also allows inlining of the construction/destruction logic all over the place where a constructor or destructor is invoked, which can lead to code bloat. This isn't so much a worry here, given the services won't be created and destroyed frequently. The cause of the above mentioned non-obvious errors can be demonstrated as follows: ------- Demonstrative example, if you know how the described error happens, skip forwards ------- Assume we have the following in the header, which we'll call "thing.h": \#include <memory> // Forward declaration. For example purposes, assume the definition // of Object is in some header named "object.h" class Object; class Thing { public: // assume no constructors or destructors are specified here, // or the constructors/destructors are defined as: // // Thing() = default; // ~Thing() = default; // // ... Some interface member functions would be defined here private: std::shared_ptr<Object> obj; }; If this header is included in a cpp file, (which we'll call "main.cpp"), this will result in a compilation error, because even though no destructor is specified, the destructor will still need to be generated by the compiler because std::shared_ptr's destructor is *not* trivial (in other words, it does something other than nothing), as std::shared_ptr's destructor needs to do two things: 1. Decrement the shared reference count of the object being pointed to, and if the reference count decrements to zero, 2. Free the Object instance's memory (aka deallocate the memory it's pointing to). And so the compiler generates the code for the destructor doing this inside main.cpp. Now, keep in mind, the Object forward declaration is not a complete type. All it does is tell the compiler "a type named Object exists" and allows us to use the name in certain situations to avoid a header dependency. So the compiler needs to generate destruction code for Object, but the compiler doesn't know *how* to destruct it. A forward declaration doesn't tell the compiler anything about Object's constructor or destructor. So, the compiler will issue an error in this case because it's undefined behavior to try and deallocate (or construct) an incomplete type and std::shared_ptr and std::unique_ptr make sure this isn't the case internally. Now, if we had defaulted the destructor in "thing.cpp", where we also include "object.h", this would never be an issue, as the destructor would only have its code generated in one place, and it would be in a place where the full class definition of Object would be visible to the compiler. ---------------------- End example ---------------------------- Given these service classes are more than certainly going to change in the future, this defaults the constructors and destructors into the relevant cpp files to make the construction and destruction of all of the services consistent and unlikely to run into cases where forward declarations are indirectly causing compilation errors. It also has the plus of avoiding the need to rebuild several services if destruction logic changes, since it would only be necessary to recompile the single cpp file.
* video_core: Move command buffer loop.Markus Wick2018-09-101-14/+12
| | | | This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList.
* nvhost_gpu: Don't over copy IoctlSubmitGpfifo.bunnei2018-08-081-1/+1
|
* nvdrv: Get rid of indirect inclusionsLioncash2018-08-071-2/+4
|
* nvhost_gpu: Added checks to ensure we don't read past the end of the entries when handling a GPU command list.Subv2018-07-311-3/+6
|
* GPU: Implement the NVGPU_IOCTL_CHANNEL_KICKOFF_PB ioctl2 command.Subv2018-07-211-2/+28
| | | | | This behaves quite similarly to the SubmitGPFIFO command. Referenced from Ryujinx. Many thanks to @gdkchan for investigating this!
* Update clang formatJames Rowe2018-07-031-10/+10
|
* Rename logging macro back to LOG_*James Rowe2018-07-031-12/+12
|
* Build: Fixed some MSVC warnings in various parts of the code.Subv2018-06-201-1/+2
|
* Stub NVGPU_IOCTL_CHANNEL_SET_TIMEOUTmailwl2018-05-241-0/+9
| | | | Used in Nintendo Labo ToyCon 1&2
* Implemented NVHOST_IOCTL_CHANNEL_GET_WAITBASE (#440)David2018-05-221-0/+11
| | | | | | | | | | * Implemented NVHOST_IOCTL_CHANNEL_GET_WAITBASE struct + 4 seems to be hard coded at 0 and struct + 0 seems to be ignored? * IocGetWaitbase -> IocChannelGetWaitbaseCommand * Added super late fixes
* general: Make formatting of logged hex values more straightforwardLioncash2018-05-021-1/+1
| | | | | | This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
* GPU: Don't write to invalid memory locations when handling ioctls that don't have an output.Subv2018-05-011-3/+0
|
* nvdrv: Move logging macros over to new fmt-compatible onesLioncash2018-04-241-18/+19
|
* Nvdrv: Assert when receiving an unimplemented ioctl in the nv* handlers.Subv2018-04-231-1/+1
|
* service: Use nested namespace specifiers where applicableLioncash2018-04-201-6/+2
| | | | Tidies up namespace declarations
* nvhost_gpu: Silence formatting specifier warningsLioncash2018-02-141-6/+8
|
* Make a GPU class in VideoCore to contain the GPU state.Subv2018-02-121-4/+3
| | | | Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
* GPU: Added a command processor to decode the GPU pushbuffers and forward the commands to their respective engines.Subv2018-02-121-1/+3
|
* Extra nvdrv support (#162)David2018-02-061-0/+144
* FinishInitalize needed for 3.0.1+ games * nvdrv:s and nvdrv:t both use NVDRV * Most settings return 0 on hardware, disabled NV_MEMORY_PROFILER for now. NVN_THROUGH_OPENGL & NVRM_GPU_PREVENT_USE are a few interesting settings to look at. Carefully choosing settings can help with drawing graphics later on * Initial /dev/nvhost-gpu support * ZCullBind * Stubbed SetErrorNotifier * Fixed SetErrorNotifier log, Added SetChannelPriority * Allocate GPFIFO Ex2, Allocate Obj Ctx, Submit GPFIFO * oops * Fixed up naming/structs/enums. Used vector instead of array for "gpfifo_entry" * Added missing fixes * /dev/nvhost-ctrl-gpu * unneeded struct * Forgot u32 in enum class * Automatic descriptor swapping for ioctls, fixed nvgpu_gpu_get_tpc_masks_args being incorrect size * nvdrv#QueryEvent * Renamed logs for nvdrv * Refactor ioctl so nv_result isn't needed * /dev/nvhost-as-gpu * Fixed Log service naming, CtxObjects now u32, renamed all structs, added static_asserts to structs, used INSERT_PADDING_WORDS instead of u32s * nvdevices now uses "Ioctl" union, * IoctlGpfifoEntry now uses bit field * final changes