summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/nvdrv.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* nvnflinger: fix nameLiam2023-03-011-3/+3
|
* service: move hle_ipc from kernelLiam2023-03-011-1/+1
|
* service: refactor server architectureLiam2023-02-211-9/+14
| | | | Converts services to have their own processes
* Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"ameerj2023-02-031-4/+4
| | | | | 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-4/+4
|
* nvdrv: Use std::span for inputsameerj2022-12-291-4/+4
| | | | Allows the use of HLERequestContext::ReadBufferSpan
* nvdrv: Simplify builder declarationsLioncash2022-11-281-26/+18
| | | | | | | | We can just use auto here. If one of these ever happens to not be derived from nvdevice, then this will cause a compilation error. We can also move the devices into the collection to get rid of an unnecessary atomic reference count increment and decrement.
* nvdrv: fix container destruction orderLiam2022-10-241-1/+1
|
* kernel: remove KWritableEventLiam2022-10-131-1/+0
|
* General: address feedbackFernando Sahmkow2022-10-061-3/+1
|
* general: Format licenses as per SPDX guidelinesMorph2022-10-061-4/+3
|
* NvDec: Fix regressions.Fernando Sahmkow2022-10-061-1/+4
|
* NVDRV: Further refactors and eliminate old code.Fernando Sahmkow2022-10-061-21/+0
|
* NVDRV: Refactor Host1xFernando Sahmkow2022-10-061-1/+1
|
* VideoCore: implement channels on gpu caches.Fernando Sahmkow2022-10-061-1/+1
|
* NVDRV: Fix clearing when destroying.Fernando Sahmkow2022-10-061-5/+2
|
* NVDRV: Fix Open/Close and make sure each device is correctly created.Fernando Sahmkow2022-10-061-106/+68
|
* NVDRV: Implement new NvMapFernando Sahmkow2022-10-061-9/+6
|
* NVDRV: Refactor and add new NvMap.Fernando Sahmkow2022-10-061-7/+9
|
* NVDRV: Cleanup.Fernando Sahmkow2022-10-061-24/+29
|
* NVDRV: Implement QueryEvent.Fernando Sahmkow2022-10-061-23/+23
|
* NvHost: Remake Ctrl Implementation.Fernando Sahmkow2022-10-061-16/+112
|
* 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.
* core: Remove unused includesameerj2021-11-041-1/+0
|
* hle: service: nvdrv: Remove unused kernel reference.bunnei2021-07-211-1/+0
|
* hle: service: Add a helper module for managing kernel objects.bunnei2021-07-211-5/+5
|
* service: Append service name prefix to common filenamesMorph2021-07-141-1/+1
|
* hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.bunnei2021-05-061-4/+4
|
* hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps.bunnei2021-05-061-2/+1
|
* hle: kernel: Ensure all kernel objects with KAutoObject are properly created.bunnei2021-05-061-0/+1
|
* hle: kernel: Migrate KEvent to KAutoObject.bunnei2021-05-061-4/+8
|
* hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.bunnei2021-05-061-1/+1
|
* nvdrv: Pass device fd and handle device create methods for device opening and closingChloe Marcec2021-03-251-3/+7
| | | | 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: kernel: Reimplement KReadableEvent and KWritableEvent.bunnei2021-02-051-4/+6
|
* hle: kernel: Rename WritableEvent to KWritableEvent.bunnei2021-02-051-3/+3
|
* hle: kernel: Rename ReadableEvent to KReadableEvent.bunnei2021-02-051-2/+2
|
* nvdec syncpt incorporationameerj2021-01-071-2/+4
| | | | laying the groundwork for async gpu, although this does not fully implement async nvdec operations
* hle: service: nvdrv: Revert #4981 to remove usage of SleepClientThread.bunnei2020-12-291-7/+6
| | | | - Note, this always processes the ioctl right away, which fixes BotW 1.0.0 issues.
* service: Eliminate usages of the global system instanceLioncash2020-11-271-5/+5
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* nvservices: Reintroducee IoctlCtrlChloe Marcec2020-11-241-6/+7
| | | | Fixes regression caused by #4907 which caused games like Breath of the Wild 1.0.0 not to boot.
* Addressed issuesChloe Marcec2020-11-101-5/+5
|
* core: Make nvservices more standardizedChloe Marcec2020-11-101-14/+79
|
* ipc_helpers: Remove usage of the global system instanceLioncash2020-11-081-0/+1
| | | | | | | | | Resolves numerous deprecation warnings throughout the codebase due to inclusion of this header. Now building core should be significantly less noisy (and also relying on less global state). This also uncovered quite a few modules that were relying on indirect includes, which have also been fixed.
* hle service: nvdrv: nvhost_gpu: Update to use SyncpointManager and other improvements.bunnei2020-11-011-1/+2
| | | | | - Refactor so that SubmitGPFIFO and KickoffPB use shared functionality. - Implement add_wait and add_increment flags.
* hle service: nvdrv: nvhost_ctrl: Update to use SyncpointManager.bunnei2020-11-011-1/+2
|
* hle service: nvdrv: Update to instantiate SyncpointManager.bunnei2020-11-011-4/+5
|
* hle: service: nvdrv: Implement SyncpointManager, to manage syncpoints.bunnei2020-11-011-1/+1
|
* video_core: NVDEC Implementationameerj2020-10-271-2/+2
| | | | | | | | | | | | | | This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library. The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data. To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library. Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header. Async GPU is not properly implemented at the moment. Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei2019-11-251-2/+2
| | | | | | * kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details.
* kernel: events: Remove ResetType::Automatic.bunnei2019-11-031-2/+1
| | | | | | | | - This does not actually seem to exist in the real kernel - games reset these automatically. # Conflicts: # src/core/hle/service/am/applets/applets.cpp # src/core/hle/service/filesystem/fsp_srv.cpp
* Nvdrv: Correct Async regression and avoid signaling empty buffer vsyncsFernando Sahmkow2019-10-051-2/+2
|
* Initial implementation of Ioctl2 & Ioctl3David Marcec2019-09-191-3/+4
| | | | Purpose of Ioctl2 and Ioctl3 is to prevent the passing of raw pointers through ioctls
* NVServices: Styling, define constructors as explicit and correctionsFernando Sahmkow2019-07-051-2/+2
|
* NVServices: Make NVEvents Automatic according to documentation.Fernando Sahmkow2019-07-051-2/+2
|
* NVServices: Correct CtrlEventWaitSync to block the ipc until timeout.Fernando Sahmkow2019-07-051-2/+7
|
* GPU: Correct Interrupts to interrupt on syncpt/value instead of event, mirroring hardwareFernando Sahmkow2019-07-051-6/+7
|
* nv_services: Deglobalize NvServicesFernando Sahmkow2019-07-051-15/+16
|
* nvhost_ctrl: Corrections to event handlingFernando Sahmkow2019-07-051-1/+1
|
* nv_services: Implement NvQueryEvent, NvCtrlEventWait, NvEventRegister, NvEventUnregisterFernando Sahmkow2019-07-051-1/+25
|
* hle/service: Default constructors and destructors in the cpp file where applicableLioncash2018-09-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Registered missing channel devicesDavid Marcec2018-08-131-0/+4
|
* nvdrv: Get rid of global std::weak_ptrLioncash2018-08-081-4/+3
| | | | | Rather than use global state, we can simply pass the instance into the NVFlinger instance directly.
* nvdrv: Make Ioctl()'s definition match its prototypeLioncash2018-08-071-1/+1
| | | | | The only reason this wasn't a compilation error is because we use little-endian systems.
* service/nvdrv: Take std::string in Open() by const referenceLioncash2018-07-251-1/+1
| | | | | | | | | Avoids copies from being made, since the string is only ever used for lookup, the data is never transfered anywhere. Ideally, we'd use a std::string_view here, but devices is a std::unordered_map, not a std::map, so we can't use heterogenous lookup here.
* service/nvdrv: Use std::move where applicableLioncash2018-07-251-3/+5
| | | | | | | Avoids unnecessary reference count increments and decrements. In one case, we don't need to make a shared_ptr copy at all, just to call a member function.
* Services/nvdrv: add '/dev/nvhost-nvdec' devicemailwl2018-05-301-0/+2
|
* general: Convert assertion macros over to be fmt-compatibleLioncash2018-04-271-2/+2
|
* service: Use nested namespace specifiers where applicableLioncash2018-04-201-4/+2
| | | | Tidies up namespace declarations
* Make a GPU class in VideoCore to contain the GPU state.Subv2018-02-121-5/+2
| | | | Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
* nvdrv: Make the GPU memory manager available to nvhost-gpu.Subv2018-02-121-2/+5
|
* nvhost_as_gpu: Add nvmap as a class member.bunnei2018-02-081-1/+1
|
* Extra nvdrv support (#162)David2018-02-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Added nvmemp, Added /dev/nvhost-ctrl, SetClientPID now stores pid (#114)David2018-01-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * Added nvmemp, Added /dev/nvhost-ctrl, SetClientPID now stores pid * used clang-format-3.9 instead * lowercase pid * Moved nvmemp handlers to cpp * Removed unnecessary logging for NvOsGetConfigU32. Cleaned up log and changed to LOG_DEBUG * using std::arrays instead of c arrays * nvhost get config now uses std::array completely * added pid logging back * updated cmakelist * missing includes * added array, removed memcpy * clang-format6.0
* Format: Run the new clang format on everythingJames Rowe2018-01-211-1/+1
|
* nvdrv: stubbed Close(cmd 2)Frederic Meyer2018-01-171-0/+10
|
* NV: Implemented the nvdrv service, which uses the same interface as nvdrv:aSubv2018-01-171-2/+4
|
* NV: Move the nvdrv classes into the Nvidia namespace, and move the functionality to a s single module that services call.Subv2018-01-171-6/+37
|
* yuzu: Update license text to be consistent across project.bunnei2018-01-131-1/+1
|
* NV: Expose the nvdisp_disp0 device and a weak reference to the nvdrv:a service.Subv2018-01-111-2/+6
| | | | | | NVFlinger will call into the nvdisp_disp0 device to perform screen flips, bypassing the ioctl interface. We now have the address of the framebuffer to draw, we just need to actually put it on the screen.
* NV: Implemented the nvdrv:a service and the /dev/nvmap device.Subv2018-01-111-0/+16