[PR #128] [MERGED] gnm_driver: Gnm eventq and GPU flips #1318

Closed
opened 2026-02-27 21:12:04 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/128
Author: @psucien
Created: 5/8/2024
Status: Merged
Merged: 5/10/2024
Merged by: @georgemoralis

Base: mainHead: gnm_driver/basic_sync


📝 Commits (10+)

  • 4206ec3 video_core, kernel: added gfx eop event handling
  • 50bcd13 video_out: added display buffer labels
  • 5f83ad2 gnm_driver: sceGnmInsertWaitFlipDone added
  • 72ea0be gnm_driver: sceGnmSetEmbeddedVsShader added
  • 4746f51 gnm_driver: various fixes
  • c7cfe26 video_out: sceVideoOutSubmitEopFlip stub added
  • 498c5eb gnm_driver: sceGnmSubmitAndFlipCommandBuffers implementation
  • bfb1813 amdgpu: EOP irq and dummy PM4 handlers
  • 8e0c67f amdgpu: wait_reg_mem and write_data implementation
  • 581688c amdgpu: EOS event packet handling

📊 Changes

16 files changed (+636 additions, -75 deletions)

View changed files

📝 src/core/libraries/gnmdriver/gnmdriver.cpp (+221 -31)
📝 src/core/libraries/gnmdriver/gnmdriver.h (+12 -6)
📝 src/core/libraries/kernel/event_queue.cpp (+8 -0)
📝 src/core/libraries/kernel/event_queue.h (+13 -1)
📝 src/core/libraries/kernel/event_queues.cpp (+13 -8)
📝 src/core/libraries/kernel/event_queues.h (+1 -0)
📝 src/core/libraries/kernel/libkernel.cpp (+1 -0)
📝 src/core/libraries/videoout/driver.cpp (+10 -2)
📝 src/core/libraries/videoout/driver.h (+9 -1)
📝 src/core/libraries/videoout/video_out.cpp (+22 -0)
📝 src/core/libraries/videoout/video_out.h (+4 -0)
src/core/platform.h (+76 -0)
📝 src/video_core/amdgpu/liverpool.cpp (+45 -12)
📝 src/video_core/amdgpu/liverpool.h (+19 -1)
📝 src/video_core/amdgpu/pm4_cmds.h (+181 -12)
📝 src/video_core/amdgpu/pm4_opcodes.h (+1 -1)

📄 Description

This PR implements Gnm EOP event handling and support for GPU submitted flips.
The next functions were added

GnmDriver:

  • sceGnmAddEqEvent
  • sceGnmDeleteEqEvent
  • sceGnmInsertWaitFlipDone
  • sceGnmSetEmbeddedVsShader
  • sceGnmSubmitAndFlipCommandBuffers

VideoOut:

  • sceVideoOutGetBufferLabelAddress
  • sceVideoOutSubmitEopFlip

To maintain proper sync between GPU and presenter, a new entity Platform::IrqController was introduced.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/128 **Author:** [@psucien](https://github.com/psucien) **Created:** 5/8/2024 **Status:** ✅ Merged **Merged:** 5/10/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `gnm_driver/basic_sync` --- ### 📝 Commits (10+) - [`4206ec3`](https://github.com/shadps4-emu/shadPS4/commit/4206ec3c9449230896aaeeeef210e0429bd380e3) video_core, kernel: added gfx eop event handling - [`50bcd13`](https://github.com/shadps4-emu/shadPS4/commit/50bcd1348272b79bc5f3f4f96d992cb0ac1687de) video_out: added display buffer labels - [`5f83ad2`](https://github.com/shadps4-emu/shadPS4/commit/5f83ad2ecb688f033282324b6a1b2f3ee762210d) gnm_driver: `sceGnmInsertWaitFlipDone` added - [`72ea0be`](https://github.com/shadps4-emu/shadPS4/commit/72ea0be9ffd173593005967ff97547c1a1521bd7) gnm_driver: `sceGnmSetEmbeddedVsShader` added - [`4746f51`](https://github.com/shadps4-emu/shadPS4/commit/4746f514ffdee75f5ada963f41f7a11e7b5b8591) gnm_driver: various fixes - [`c7cfe26`](https://github.com/shadps4-emu/shadPS4/commit/c7cfe2622d1b3ce35cf5d31ced7a4f92417cab91) video_out: `sceVideoOutSubmitEopFlip` stub added - [`498c5eb`](https://github.com/shadps4-emu/shadPS4/commit/498c5eb0cdbafc5ed2ae6ea558e704ee42392531) gnm_driver: `sceGnmSubmitAndFlipCommandBuffers` implementation - [`bfb1813`](https://github.com/shadps4-emu/shadPS4/commit/bfb18135fb902eba27581f564519e8d1b058bb1e) amdgpu: EOP irq and dummy PM4 handlers - [`8e0c67f`](https://github.com/shadps4-emu/shadPS4/commit/8e0c67f12ea29215f4842b7d29bda99872809d72) amdgpu: `wait_reg_mem` and `write_data` implementation - [`581688c`](https://github.com/shadps4-emu/shadPS4/commit/581688c1ac18e698b4d9ebb879e2c3218d4133d9) amdgpu: EOS event packet handling ### 📊 Changes **16 files changed** (+636 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/gnmdriver/gnmdriver.cpp` (+221 -31) 📝 `src/core/libraries/gnmdriver/gnmdriver.h` (+12 -6) 📝 `src/core/libraries/kernel/event_queue.cpp` (+8 -0) 📝 `src/core/libraries/kernel/event_queue.h` (+13 -1) 📝 `src/core/libraries/kernel/event_queues.cpp` (+13 -8) 📝 `src/core/libraries/kernel/event_queues.h` (+1 -0) 📝 `src/core/libraries/kernel/libkernel.cpp` (+1 -0) 📝 `src/core/libraries/videoout/driver.cpp` (+10 -2) 📝 `src/core/libraries/videoout/driver.h` (+9 -1) 📝 `src/core/libraries/videoout/video_out.cpp` (+22 -0) 📝 `src/core/libraries/videoout/video_out.h` (+4 -0) ➕ `src/core/platform.h` (+76 -0) 📝 `src/video_core/amdgpu/liverpool.cpp` (+45 -12) 📝 `src/video_core/amdgpu/liverpool.h` (+19 -1) 📝 `src/video_core/amdgpu/pm4_cmds.h` (+181 -12) 📝 `src/video_core/amdgpu/pm4_opcodes.h` (+1 -1) </details> ### 📄 Description This PR implements Gnm EOP event handling and support for GPU submitted flips. The next functions were added GnmDriver: * `sceGnmAddEqEvent` * `sceGnmDeleteEqEvent` * `sceGnmInsertWaitFlipDone` * `sceGnmSetEmbeddedVsShader` * `sceGnmSubmitAndFlipCommandBuffers` VideoOut: * `sceVideoOutGetBufferLabelAddress` * `sceVideoOutSubmitEopFlip` To maintain proper sync between GPU and presenter, a new entity `Platform::IrqController` was introduced. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:12:04 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#1318
No description provided.