feat(libSceVideoOut): implement AGC-facing SysGetBus, SysAddSetModeEvent2 and GetPipelineStatus #17914
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17914"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-11-09T22:22:34Z.
What
Implements the three
libSceVideoOutexports that PPSA31544's bundled AGC-related modules call, from firmware 4.03libSceVideoOut.sprxdisassembly plus the fakelib callsites:sceVideoOutSysGetBus(handle)returns the port's storedbusType,VIDEO_OUT_ERROR_INVALID_HANDLE(0x8029000b) when the handle has no live context. Firmware looks the handle up in its context table (handles 1-6, entry id must equal the handle); the bundledlibSceAgcDriver.sprxpasses the same handle it passessceVideoOutGetBufferLabelAddressandsceVideoOutSubmitEopFlip, then packs the result into a display command descriptor. AddsVideoOutDriver::GetBusType, an atomic open-port bus read mirroringHasConfig.sceVideoOutSysAddSetModeEvent2(eq, index, udata)accepts index 0 or 1 only (VIDEO_OUT_ERROR_INVALID_VALUE, 0x80290001, otherwise — firmware's translator returns 0x80290001 for anything else) and registers a set-mode event through the existingregisterVideoOutEventpath as firmware's shared event body does with kind0x73. Indexitargets porti + 1; an unopened port answersVIDEO_OUT_ERROR_INVALID_HANDLEwhere firmware would register anyway — recorded in the debt file.sceVideoOutGetPipelineStatus(out, reserved)validatesout != nullptrandreserved == 0(VIDEO_OUT_ERROR_INVALID_ADDRESS, 0x80290002, otherwise), then answers0x802900FF— firmware reads the active display-pipeline index over the video device (ioctl 0x80208218) and there is no host equivalent;sceVideoOutDriverGetLatestEopHandlealready returns the same code for the same reason.outis left untouched on failure as on the error path in firmware. The psml caller only inspectsout[0] == 1after the call.Removes all three from the debt stub table and documents the measured firmware behaviour and the remaining device-level gaps there.
Tested
Windows 11, MinGW GCC 15.2.0.
video_out_flip(28 tests): passes on this branch and onmain(31b4aa91e8) withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation— loader log showsadding layers "VK_LAYER_KHRONOS_validation"andInsert instance layer; zeroVUID-lines in both runs, so no new validation errors. Newlabelschecks coverSysGetBuson the open main port plus null/unopened/negative/out-of-range handles,SysAddSetModeEvent2index validation, event delivery andoutputModeEventsbookkeeping, andGetPipelineStatusargument validation and the device-failure path leavingoutuntouched.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)libSceAgcDriver.sprxandlibScePsml.sprximport these exports