video_core: CPU flip relay (#415)

* video_core: cpu flip is propagated via gpu thread now

* tentative fix for cpu flips racing

* libraries: videoout: better flip status handling
This commit is contained in:
psucien 2024-08-14 11:36:11 +02:00 committed by GitHub
parent ad3b6c793c
commit 27cb218584
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 98 additions and 33 deletions

View file

@ -48,13 +48,14 @@ public:
VAddr cpu_address, bool is_eop) {
const auto info = VideoCore::ImageInfo{attribute, cpu_address};
const auto image_id = texture_cache.FindImage(info);
texture_cache.UpdateImage(image_id, is_eop ? nullptr : &flip_scheduler);
auto& image = texture_cache.GetImage(image_id);
return PrepareFrameInternal(image, is_eop);
}
Frame* PrepareBlankFrame() {
Frame* PrepareBlankFrame(bool is_eop) {
auto& image = texture_cache.GetImage(VideoCore::NULL_IMAGE_ID);
return PrepareFrameInternal(image, true);
return PrepareFrameInternal(image, is_eop);
}
VideoCore::Image& RegisterVideoOutSurface(
@ -75,6 +76,11 @@ public:
void Present(Frame* frame);
void RecreateFrame(Frame* frame, u32 width, u32 height);
void FlushDraw() {
SubmitInfo info{};
draw_scheduler.Flush(info);
}
private:
Frame* PrepareFrameInternal(VideoCore::Image& image, bool is_eop = true);
Frame* GetRenderFrame();