nv_services: Create GPU channels correctly

This commit is contained in:
Fernando Sahmkow 2019-06-07 15:16:54 -04:00 committed by FernandoS27
parent 82b829625b
commit 7039ece0a0
2 changed files with 5 additions and 2 deletions

View File

@ -119,8 +119,10 @@ u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& ou
params.num_entries, params.flags, params.unk0, params.unk1, params.unk2, params.num_entries, params.flags, params.unk0, params.unk1, params.unk2,
params.unk3); params.unk3);
params.fence_out.id = 0; auto& gpu = Core::System::GetInstance().GPU();
params.fence_out.value = 0; params.fence_out.id = channels;
params.fence_out.value = gpu.GetSyncpointValue(channels);
channels++;
std::memcpy(output.data(), &params, output.size()); std::memcpy(output.data(), &params, output.size());
return 0; return 0;
} }

View File

@ -190,6 +190,7 @@ private:
u32 ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output); u32 ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output);
std::shared_ptr<nvmap> nvmap_dev; std::shared_ptr<nvmap> nvmap_dev;
u32 channels{};
}; };
} // namespace Service::Nvidia::Devices } // namespace Service::Nvidia::Devices