From b87422a86f4dd3b59ef91c3ce37945865a6cfbef Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Mon, 27 Apr 2020 22:07:21 -0400 Subject: VideoCore/GPU: Delegate subchannel engines to the dma pusher. --- src/video_core/dma_pusher.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/video_core/dma_pusher.h') diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h index 6cef71306..e8b714e94 100644 --- a/src/video_core/dma_pusher.h +++ b/src/video_core/dma_pusher.h @@ -4,11 +4,13 @@ #pragma once +#include #include #include #include "common/bit_field.h" #include "common/common_types.h" +#include "video_core/engines/engine_interface.h" namespace Core { class System; @@ -69,7 +71,13 @@ public: void DispatchCalls(); + void BindSubchannel(Tegra::Engines::EngineInterface* engine, u32 subchannel_id) { + subchannels[subchannel_id] = engine; + } + private: + static constexpr u32 non_puller_methods = 0x40; + static constexpr u32 max_subchannels = 8; bool Step(); void SetState(const CommandHeader& command_header); @@ -88,6 +96,7 @@ private: u32 method_count; ///< Current method count u32 length_pending; ///< Large NI command length pending bool non_incrementing; ///< Current command's NI flag + bool is_last_call; }; DmaState dma_state{}; @@ -96,6 +105,8 @@ private: GPUVAddr dma_mget{}; ///< main pushbuffer last read address bool ib_enable{true}; ///< IB mode enabled + std::array subchannels{}; + GPU& gpu; Core::System& system; }; -- cgit v1.2.3