diff --git a/.github/workflows/check-freeze-period.yml b/.github/workflows/check-freeze-period.yml new file mode 100644 index 00000000000..f6f9349e56c --- /dev/null +++ b/.github/workflows/check-freeze-period.yml @@ -0,0 +1,63 @@ +name: Check freeze period + +on: + workflow_call: + +permissions: + pull-requests: read + +jobs: + check-freeze-period: + runs-on: self-hosted + defaults: + run: + shell: bash + + steps: + - name: Check if freeze is active + run: | + DAY=$(date +%d) + LAST_DAY=$(date -d "$(date +%Y-%m-01) +1 month -1 day" +%d) + FREEZE_START=$((LAST_DAY - 6)) + if [ "$DAY" -ge "$FREEZE_START" ]; then + echo "Freeze is active (last 7 days of the month)." + echo "FREEZE=true" >> "$GITHUB_ENV" + else + echo "No freeze active." + echo "FREEZE=false" >> "$GITHUB_ENV" + fi + + - name: Get PR number + if: env.FREEZE == 'true' + env: + GH_TOKEN: ${{ github.token }} + MG_HEAD_REF: ${{ github.event.merge_group.head_ref }} + run: | + if [[ "${{ github.event_name }}" == "merge_group" ]]; then + PR_NUMBER=$(grep -oE 'pr-[0-9]+' <<< "$MG_HEAD_REF" | cut -d- -f2) + if [[ -z "$PR_NUMBER" ]]; then + echo "Could not extract PR number from ref: $MG_HEAD_REF" + exit 1 + fi + else + PR_NUMBER="${{ github.event.pull_request.number }}" + fi + echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV" + + - name: Validate bugfix label + if: env.FREEZE == 'true' + env: + GH_TOKEN: ${{ github.token }} + run: | + LABELS=$(gh pr view "$PR_NUMBER" \ + --repo "${{ github.repository }}" \ + --json labels \ + --jq '[.labels[].name] | join(",")') + if [[ "$LABELS" != *"bugfix"* ]]; then + echo "Freeze is active. PR must have the 'bugfix' label." + echo "Labels found: $LABELS" + exit 1 + fi + echo "PR complies with freeze policy (has 'bugfix' label)." + + diff --git a/.github/workflows/update-mirror-sources.yml b/.github/workflows/update-mirror-sources.yml index 99147018ee3..88e5a32a98e 100644 --- a/.github/workflows/update-mirror-sources.yml +++ b/.github/workflows/update-mirror-sources.yml @@ -18,7 +18,7 @@ jobs: - name: Maximize build space uses: justinthelaw/maximize-github-runner-space@v0.9.0 with: - skip-components: docker-engine + skip-components: docker-engine,gh-cli - uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/validate-pull-request.yml b/.github/workflows/validate-pull-request.yml index 82f5729f2e2..81be9a89bab 100644 --- a/.github/workflows/validate-pull-request.yml +++ b/.github/workflows/validate-pull-request.yml @@ -106,48 +106,7 @@ jobs: echo "๐Ÿ’ฅ Commit linting failed. Please fix your commit messages." exit 1 fi - - name: Check if freeze is active - run: | - DAY=$(date +%d) - LAST_DAY=$(date -d "$(date +%Y-%m-01) +1 month -1 day" +%d) - FREEZE_START=$((LAST_DAY - 6)) - if [ "$DAY" -ge "$FREEZE_START" ]; then - echo "๐ŸงŠ Freeze is active (last 7 days of the month)." - echo "FREEZE=true" >> "$GITHUB_ENV" - else - echo "No freeze active." - echo "FREEZE=false" >> "$GITHUB_ENV" - fi - - name: Get PR number - if: env.FREEZE == 'true' - env: - GH_TOKEN: ${{ github.token }} - MG_HEAD_REF: ${{ github.event.merge_group.head_ref }} - run: | - if [[ "${{ github.event_name }}" == "merge_group" ]]; then - PR_NUMBER=$(grep -oE 'pr-[0-9]+' <<< "$MG_HEAD_REF" | cut -d- -f2) - if [[ -z "$PR_NUMBER" ]]; then - echo "โŒ Could not extract PR number from ref: $MG_HEAD_REF" - exit 1 - fi - else - PR_NUMBER="${{ github.event.pull_request.number }}" - fi - echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV" - - - name: Validate bugfix label - if: env.FREEZE == 'true' - env: - GH_TOKEN: ${{ github.token }} - run: | - LABELS=$(gh pr view "$PR_NUMBER" \ - --repo "${{ github.repository }}" \ - --json labels \ - --jq '[.labels[].name] | join(",")') - if [[ "$LABELS" != *"bugfix"* ]]; then - echo "โŒ Freeze is active. PR must have the 'bugfix' label." - echo " Labels found: $LABELS" - exit 1 - fi - echo "โœ… PR complies with freeze policy (has 'bugfix' label)." + check-freeze-period: + uses: ./.github/workflows/check-freeze-period.yml + secrets: inherit diff --git a/20260728_20h02m04s_grim.png b/20260728_20h02m04s_grim.png new file mode 100644 index 00000000000..9eb3093fc2c Binary files /dev/null and b/20260728_20h02m04s_grim.png differ diff --git a/260720.patch b/260720.patch new file mode 100644 index 00000000000..af2741f4ba3 --- /dev/null +++ b/260720.patch @@ -0,0 +1,25 @@ +diff --git a/projects/ROCKNIX/packages/graphics/mesa/package.mk b/projects/ROCKNIX/packages/graphics/mesa/package.mk +index cdee18e603..8fa73cb931 100644 +--- a/projects/ROCKNIX/packages/graphics/mesa/package.mk ++++ b/projects/ROCKNIX/packages/graphics/mesa/package.mk +@@ -12,7 +12,7 @@ PKG_DEPENDS_TARGET="toolchain expat libdrm Mako:host pyyaml:host" + PKG_LONGDESC="Mesa is a 3-D graphics library with an API." + PKG_TOOLCHAIN="meson" + PKG_PATCH_DIRS+=" ${DEVICE}" +-PKG_VERSION="26.1.2" ++PKG_VERSION="26.2.0-rc1" + PKG_URL="https://gitlab.freedesktop.org/mesa/mesa/-/archive/mesa-${PKG_VERSION}/mesa-mesa-${PKG_VERSION}.tar.gz" + + if listcontains "${GRAPHIC_DRIVERS}" "panfrost" || \ +diff --git a/projects/ROCKNIX/packages/multimedia/vlc/package.mk b/projects/ROCKNIX/packages/multimedia/vlc/package.mk +index 5e9aa7751c..b77486d085 100644 +--- a/projects/ROCKNIX/packages/multimedia/vlc/package.mk ++++ b/projects/ROCKNIX/packages/multimedia/vlc/package.mk +@@ -38,6 +38,7 @@ pre_configure_target() { + + DISABLED_FEATURES="--disable-dependency-tracking \ + --without-contrib \ ++ --disable-gst-decode \ + --disable-alsa \ + --disable-nls \ + --disable-dbus \ diff --git a/diagnostics/azahar/azahar_log-20260718.txt b/diagnostics/azahar/azahar_log-20260718.txt new file mode 100644 index 00000000000..b22f349dfd0 --- /dev/null +++ b/diagnostics/azahar/azahar_log-20260718.txt @@ -0,0 +1,151 @@ +[ 0.200332] Input input_common/udp/client.cpp:StartCommunication:206: Starting communication with UDP input server on 127.0.0.1:26760 +[ 0.454792] Frontend citra_qt/citra_qt.cpp:GMainWindow:454: Azahar Version: b42d091 | master-b42d0916b-dirty +[ 0.454917] Frontend citra_qt/citra_qt.cpp:GMainWindow:472: Host OS: Linux 7.0.2 +[ 0.454955] Frontend citra_qt/citra_qt.cpp:GMainWindow:475: Host RAM: 2.91 GiB +[ 0.454961] Frontend citra_qt/citra_qt.cpp:GMainWindow:476: Host Swap: 2.00 GiB +[ 0.512816] Frontend citra_qt/citra_qt.cpp:BootGame:1465: Azahar starting... +[ 0.514205] Frontend citra_qt/citra_qt.cpp:BootGame:1488: Loading per application config file for title 00040000000C8A00 +[ 0.522178] Config common/settings.cpp:LogSettings:85: Azahar Configuration: +[ 0.522210] Config common/settings.cpp:operator():82: Core_UseCpuJit: true +[ 0.522214] Config common/settings.cpp:operator():82: Core_CPUClockPercentage: 100 +[ 0.522216] Config common/settings.cpp:operator():82: Controller_UseArticController: false +[ 0.522218] Config common/settings.cpp:operator():82: Renderer_UseGLES: true +[ 0.522220] Config common/settings.cpp:operator():82: Renderer_GraphicsAPI: Vulkan +[ 0.522222] Config common/settings.cpp:operator():82: Renderer_AsyncShaders: false +[ 0.522223] Config common/settings.cpp:operator():82: Renderer_AsyncPresentation: true +[ 0.522225] Config common/settings.cpp:operator():82: Renderer_SpirvShaderGen: true +[ 0.522227] Config common/settings.cpp:operator():82: Renderer_DisableSpirvOptimizer: true +[ 0.522230] Config common/settings.cpp:operator():82: Renderer_Debug: false +[ 0.522233] Config common/settings.cpp:operator():82: Renderer_UseHwShader: true +[ 0.522235] Config common/settings.cpp:operator():82: Renderer_ShadersAccurateMul: true +[ 0.522242] Config common/settings.cpp:operator():82: Renderer_UseShaderJit: false +[ 0.522245] Config common/settings.cpp:operator():82: Renderer_UseResolutionFactor: 1 +[ 0.522247] Config common/settings.cpp:operator():82: Renderer_UseIntegerScaling: false +[ 0.522252] Config common/settings.cpp:operator():82: Renderer_FrameLimit: 100 +[ 0.522254] Config common/settings.cpp:operator():82: Renderer_VSyncNew: true +[ 0.522256] Config common/settings.cpp:operator():82: Renderer_PostProcessingShader: None (builtin) +[ 0.522258] Config common/settings.cpp:operator():82: Renderer_FilterMode: true +[ 0.522261] Config common/settings.cpp:operator():82: Renderer_TextureFilter: None +[ 0.522263] Config common/settings.cpp:operator():82: Renderer_TextureSampling: GameControlled +[ 0.522268] Config common/settings.cpp:operator():82: Renderer_DelayGameRenderThreasUs: 0 +[ 0.522270] Config common/settings.cpp:operator():82: Renderer_DisableRightEyeRender: true +[ 0.522273] Config common/settings.cpp:operator():82: Stereoscopy_Render3d: 0 +[ 0.522281] Config common/settings.cpp:operator():82: Stereoscopy_Factor3d: 0 +[ 0.522284] Config common/settings.cpp:operator():82: Stereoscopy_Swap_Eyes: false +[ 0.522287] Config common/settings.cpp:operator():82: Stereoscopy_Render_3d_to_which_display: 0 +[ 0.522290] Config common/settings.cpp:operator():82: Stereoscopy_MonoRenderOption: 0 +[ 0.522293] Config common/settings.cpp:operator():82: Layout_LayoutOption: 4 +[ 0.522295] Config common/settings.cpp:operator():82: Layout_PortraitLayoutOption: 0 +[ 0.522298] Config common/settings.cpp:operator():82: Layout_SecondaryDisplayLayout: 0 +[ 0.522303] Config common/settings.cpp:operator():82: Layout_SwapScreen: false +[ 0.522305] Config common/settings.cpp:operator():82: Layout_UprightScreen: false +[ 0.522307] Config common/settings.cpp:operator():82: Layout_ScreenGap: 0 +[ 0.522312] Config common/settings.cpp:operator():82: Layout_LargeScreenProportion: 2 +[ 0.522315] Config common/settings.cpp:operator():82: Layout_SmallScreenPosition: 2 +[ 0.522317] Config common/settings.cpp:operator():82: Utility_DumpTextures: false +[ 0.522319] Config common/settings.cpp:operator():82: Utility_CustomTextures: false +[ 0.522321] Config common/settings.cpp:operator():82: Utility_PreloadTextures: false +[ 0.522324] Config common/settings.cpp:operator():82: Utility_AsyncCustomLoading: true +[ 0.522325] Config common/settings.cpp:operator():82: Utility_UseDiskShaderCache: true +[ 0.522340] Config common/settings.cpp:operator():82: Audio_Emulation: HLE +[ 0.522343] Config common/settings.cpp:operator():82: Audio_OutputType: 0 +[ 0.522345] Config common/settings.cpp:operator():82: Audio_OutputDevice: Auto +[ 0.522355] Config common/settings.cpp:operator():82: Audio_InputType: 0 +[ 0.522357] Config common/settings.cpp:operator():82: Audio_InputDevice: Auto +[ 0.522364] Config common/settings.cpp:operator():82: Audio_EnableAudioStretching: true +[ 0.522367] Config common/settings.cpp:operator():82: Audio_EnableRealtime: false +[ 0.522369] Config common/settings.cpp:operator():82: Camera_OuterRightName: blank +[ 0.522371] Config common/settings.cpp:operator():82: Camera_OuterRightConfig: +[ 0.522374] Config common/settings.cpp:operator():82: Camera_OuterRightFlip: 0 +[ 0.522376] Config common/settings.cpp:operator():82: Camera_InnerName: blank +[ 0.522379] Config common/settings.cpp:operator():82: Camera_InnerConfig: +[ 0.522382] Config common/settings.cpp:operator():82: Camera_InnerFlip: 0 +[ 0.522385] Config common/settings.cpp:operator():82: Camera_OuterLeftName: blank +[ 0.522387] Config common/settings.cpp:operator():82: Camera_OuterLeftConfig: +[ 0.522388] Config common/settings.cpp:operator():82: Camera_OuterLeftFlip: 0 +[ 0.522389] Config common/settings.cpp:operator():82: DataStorage_UseVirtualSd: true +[ 0.522391] Config common/settings.cpp:operator():82: DataStorage_UseCustomStorage: false +[ 0.522392] Config common/settings.cpp:operator():82: System_IsNew3ds: false +[ 0.522394] Config common/settings.cpp:operator():82: System_LLEApplets: true +[ 0.522396] Config common/settings.cpp:operator():82: System_RegionValue: -1 +[ 0.522400] Config common/settings.cpp:operator():82: System_PluginLoader: false +[ 0.522403] Config common/settings.cpp:operator():82: System_PluginLoaderAllowed: true +[ 0.522411] Config common/settings.cpp:operator():82: System_ApplyRegionFreePatch: true +[ 0.522413] Config common/settings.cpp:operator():82: Debugging_DelayStartForLLEModules: true +[ 0.522415] Config common/settings.cpp:operator():82: Debugging_UseGdbstub: false +[ 0.522416] Config common/settings.cpp:operator():82: Debugging_GdbstubPort: 24689 +[ 0.522417] Config common/settings.cpp:operator():82: Debugging_InstantDebugLog: false +[ 0.522418] Config common/settings.cpp:operator():82: Debugging_ToggleUniqueDataConsoleType: false +[ 0.958303] Audio.Sink audio_core/cubeb_sink.cpp:StateCallback:135: Cubeb Audio Stream Started +[ 0.960004] Service.FS core/file_sys/ncch_container.cpp:LoadOverrides:412: Loaded NCCH /storage/.local/share/azahar/nand/00000000000000000000000000000000/title/0004009b/00014202/content/00000000.app is tainted, application behavior may not be as expected! +[ 0.962245] Service.HTTP core/hle/service/http/http_c.cpp:DecryptClCertA:2106: ClCertA file missing, using default +[ 0.979577] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_swapchain +[ 0.979611] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_image_format_list +[ 0.979615] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_EXT_shader_stencil_export unavailable. +[ 0.979618] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_external_memory_host +[ 0.979621] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_tooling_info +[ 0.979623] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_timeline_semaphore +[ 0.979626] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_KHR_portability_subset unavailable. +[ 0.979628] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():435: Extension VK_EXT_extended_dynamic_state has been blacklisted because it is broken on Qualcomm and ARM drivers +[ 0.979631] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_custom_border_color +[ 0.979633] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_index_type_uint8 +[ 0.979634] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_EXT_fragment_shader_interlock unavailable. +[ 0.979638] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_pipeline_creation_cache_control +[ 0.979639] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_KHR_fragment_shader_barycentric unavailable. +[ 0.989636] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CreateFormatTable:302: Format B8G8R8Unorm unsupported, falling back unconditionally to R8G8B8A8Unorm +[ 0.989757] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:691: VK_DRIVER: Mali-G52 29.1.0 +[ 0.989766] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:692: VK_DEVICE: Mali-G52 +[ 0.989769] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:693: VK_VERSION: 1.3.303 +[ 0.990245] Render.Vulkan video_core/renderer_vulkan/renderer_vulkan.cpp:IsLowRefreshRate:101: Refresh rate is above emulated 3DS screen: 60hz. Good. +[ 1.016860] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 128 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.879745] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Upload buffer with size 524288 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.883560] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Download buffer with size 16384 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.897685] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 65536 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.899827] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 8192 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.900880] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 2048 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.901481] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 2048 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.023687] Render.Vulkan video_core/renderer_vulkan/renderer_vulkan.cpp:IsLowRefreshRate:101: Refresh rate is above emulated 3DS screen: 60hz. Good. +[ 2.031061] Loader core/loader/ncch.cpp:Load:324: Program ID: 00040000000C8A00 +[ 2.031259] Service.FS core/file_sys/ncch_container.cpp:OpenFile:128: Failed to open /storage/.local/share/azahar/sdmc/Nintendo 3DS/00000000000000000000000000000000/00000000000000000000000000000000/title/0004000e/000c8a00/content/00000000.app +[ 2.188997] Loader core/hle/kernel/process.cpp:ParseKernelCaps:198: ExHeader kernel version: 2.33 +[ 2.193877] Service.FS core/file_sys/ncch_container.cpp:LoadSectionExeFS:468: Attempting to load logo from the ExeFS +[ 2.243753] Core.Cheats core/cheats/cheats.cpp:LoadCheatFile:92: Attempting to load cheats file: /storage/.local/share/azahar/cheats/00040000000C8A00.txt +[ 2.244407] Core.Cheats core/cheats/gateway_cheat.cpp:LoadFile:491: GatewayCheat::LoadFile failed, file doesn't exist: /storage/.local/share/azahar/cheats/00040000000C8A00.txt +[ 2.248687] Render.Vulkan video_core/renderer_vulkan/vk_pipeline_cache.cpp:LoadDriverPipelineDiskCache:239: No pipeline cache found for title_id=00040000000C8A00 +[ 2.249486] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitVSCache:585: Loading VS disk shader cache for title 00040000000C8A00 +[ 2.259187] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitFSCache:896: Loading FS disk shader cache for title 00040000000C8A00 +[ 2.268726] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitGSCache:1113: Loading GS disk shader cache for title 00040000000C8A00 +[ 2.269966] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitPLCache:1332: Loading PL disk shader cache for title 00040000000C8A00 +[ 2.273862] Service.CAM citra_qt/camera/qt_multimedia_camera.cpp:ResumeCameras:50: Resuming all cameras +[ 2.277343] Frontend citra_qt/citra_qt.cpp:HoldWakeLockLinux:1269: Couldn't connect to XDP D-Bus endpoint +[ 2.282483] Frontend common/linux/gamemode.cpp:StartGamemode:15: Failed to start gamemode: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory +[ 2.719834] Service.SRV core/hle/service/sm/srv.cpp:RegisterClient:64: (STUBBED) called. Caller PID=11 +[ 2.787014] Service.SRV core/hle/service/sm/srv.cpp:EnableNotification:86: (STUBBED) called +[ 2.822774] Service.NDM core/hle/service/ndm/ndm_u.cpp:OverrideDefaultDaemons:195: (STUBBED) bit_mask=0x0000000F +[ 2.828692] Service.NDM core/hle/service/ndm/ndm_u.cpp:SuspendDaemons:74: (STUBBED) bit_mask=0x00000006 +[ 2.831739] Service.FS core/hle/service/fs/fs_user.cpp:InitializeWithSdkVersion:1079: (STUBBED) called, version: 0x040203C8 +[ 2.875444] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default +[ 2.994602] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default +[ 3.241630] Service.FS core/file_sys/savedata_archive.cpp:OpenFile:75: Non-existing file /storage/.local/share/azahar/nand/data/00000000000000000000000000000000/sysdata/00010034/00000000/BOSS_SV.db can't be open without mode create. +[ 3.241854] Service.FS core/file_sys/savedata_archive.cpp:OpenFile:75: Non-existing file /storage/.local/share/azahar/nand/data/00000000000000000000000000000000/sysdata/00010034/00000000/BOSS_SS.db can't be open without mode create. +[ 3.241929] Service.BOSS core/hle/service/boss/online_service.cpp:InitializeSession:104: Could not open BOSS database. +[ 3.249933] Service.APT core/hle/service/apt/apt.cpp:NotifyToWait:362: (STUBBED) app_id=768 +[ 3.264366] Service.APT core/hle/service/apt/apt.cpp:AppletUtility:711: (STUBBED) called command=0X00000007, input_size=0X00000004, output_size=0X00000001 +[ 3.267567] Service.APT core/hle/service/apt/apt.cpp:AppletUtility:711: (STUBBED) called command=0X00000004, input_size=0X00000001, output_size=0X00000001 +[ 3.922269] Service.DSP audio_core/hle/hle.cpp:LoadComponent:512: Firmware hash: 0xe031661c89e654ee +[ 3.922335] Service.DSP audio_core/hle/hle.cpp:LoadComponent:517: Structures hash: 0x228655de1258d999 +[ 3.922343] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:LoadComponent:191: called size=0xC234, prog_mask=0x00FF, data_mask=0x00FF +[ 3.926251] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:RegisterInterruptEvents:258: Registered interrupt=2, channel=2, event=event-00116300 +[ 3.927453] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:GetSemaphoreEventHandle:275: (STUBBED) called +[ 3.928649] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:SetSemaphoreMask:285: (STUBBED) called mask=0x2000 +[ 3.930693] Audio.DSP audio_core/hle/hle.cpp:PipeWrite:235: Application has requested initialization of DSP hardware +[ 3.931752] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:SetSemaphore:57: called, semaphore_value=4000 +[ 3.939104] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:SetSemaphore:57: called, semaphore_value=4000 +[ 4.010127] Service.CFG core/hle/service/cfg/cfg.cpp:UpdatePreferredRegionCode:1081: Preferred region code set to 5 +[ 4.010191] Service.CFG core/hle/service/cfg/cfg.cpp:UpdatePreferredRegionCode:1084: System language 1 does not fit the region. Adjusted to 7 +[ 4.010567] Service.FS core/file_sys/ncch_container.cpp:LoadOverrides:412: Loaded NCCH /storage/.local/share/azahar/nand/00000000000000000000000000000000/title/0004009b/00014202/content/00000000.app is tainted, application behavior may not be as expected! +[ 4.010639] Service.FS core/file_sys/ncch_container.cpp:ReadOverrideRomFS:689: File /storage/.local/share/azahar/nand/00000000000000000000000000000000/title/0004009b/00014202/content/00000000.app.romfs overriding built-in RomFS; LayeredFS not enabled +[ 5.152767] Service.APT core/hle/service/apt/apt.cpp:AppletUtility:711: (STUBBED) called command=0X00000004, input_size=0X00000001, output_size=0X00000001 +[ 5.198969] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default +[ 5.598539] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default +[ 5.601950] Service.FS ./core/file_sys/file_backend.h:GetReadDelayNs:51: Delay generator was not initalized. Using default diff --git a/diagnostics/azahar/azahar_log-20260725.txt b/diagnostics/azahar/azahar_log-20260725.txt new file mode 100644 index 00000000000..e2a090263ad --- /dev/null +++ b/diagnostics/azahar/azahar_log-20260725.txt @@ -0,0 +1,127 @@ +[ 0.196620] Input input_common/udp/client.cpp:StartCommunication:206: Starting communication with UDP input server on 127.0.0.1:26760 +[ 0.376556] Frontend citra_qt/citra_qt.cpp:GMainWindow:454: Azahar Version: b42d091 | master-b42d0916b-dirty +[ 0.376682] Frontend citra_qt/citra_qt.cpp:GMainWindow:472: Host OS: Linux 7.0.2 +[ 0.376723] Frontend citra_qt/citra_qt.cpp:GMainWindow:475: Host RAM: 2.91 GiB +[ 0.376729] Frontend citra_qt/citra_qt.cpp:GMainWindow:476: Host Swap: 2.00 GiB +[ 0.451722] Frontend citra_qt/citra_qt.cpp:BootGame:1465: Azahar starting... +[ 0.453082] Frontend citra_qt/citra_qt.cpp:BootGame:1488: Loading per application config file for title 00040000000C8A00 +[ 0.459564] Config common/settings.cpp:LogSettings:85: Azahar Configuration: +[ 0.459590] Config common/settings.cpp:operator():82: Core_UseCpuJit: true +[ 0.459594] Config common/settings.cpp:operator():82: Core_CPUClockPercentage: 100 +[ 0.459596] Config common/settings.cpp:operator():82: Controller_UseArticController: false +[ 0.459598] Config common/settings.cpp:operator():82: Renderer_UseGLES: true +[ 0.459600] Config common/settings.cpp:operator():82: Renderer_GraphicsAPI: Vulkan +[ 0.459603] Config common/settings.cpp:operator():82: Renderer_AsyncShaders: false +[ 0.459604] Config common/settings.cpp:operator():82: Renderer_AsyncPresentation: true +[ 0.459605] Config common/settings.cpp:operator():82: Renderer_SpirvShaderGen: true +[ 0.459607] Config common/settings.cpp:operator():82: Renderer_DisableSpirvOptimizer: true +[ 0.459610] Config common/settings.cpp:operator():82: Renderer_Debug: false +[ 0.459619] Config common/settings.cpp:operator():82: Renderer_UseHwShader: true +[ 0.459681] Config common/settings.cpp:operator():82: Renderer_ShadersAccurateMul: true +[ 0.459684] Config common/settings.cpp:operator():82: Renderer_UseShaderJit: false +[ 0.459686] Config common/settings.cpp:operator():82: Renderer_UseResolutionFactor: 1 +[ 0.459688] Config common/settings.cpp:operator():82: Renderer_UseIntegerScaling: false +[ 0.459692] Config common/settings.cpp:operator():82: Renderer_FrameLimit: 100 +[ 0.459694] Config common/settings.cpp:operator():82: Renderer_VSyncNew: true +[ 0.459698] Config common/settings.cpp:operator():82: Renderer_PostProcessingShader: None (builtin) +[ 0.459700] Config common/settings.cpp:operator():82: Renderer_FilterMode: true +[ 0.459704] Config common/settings.cpp:operator():82: Renderer_TextureFilter: None +[ 0.459706] Config common/settings.cpp:operator():82: Renderer_TextureSampling: GameControlled +[ 0.459708] Config common/settings.cpp:operator():82: Renderer_DelayGameRenderThreasUs: 0 +[ 0.459711] Config common/settings.cpp:operator():82: Renderer_DisableRightEyeRender: true +[ 0.459715] Config common/settings.cpp:operator():82: Stereoscopy_Render3d: 0 +[ 0.459717] Config common/settings.cpp:operator():82: Stereoscopy_Factor3d: 0 +[ 0.459721] Config common/settings.cpp:operator():82: Stereoscopy_Swap_Eyes: false +[ 0.459723] Config common/settings.cpp:operator():82: Stereoscopy_Render_3d_to_which_display: 0 +[ 0.459725] Config common/settings.cpp:operator():82: Stereoscopy_MonoRenderOption: 0 +[ 0.459728] Config common/settings.cpp:operator():82: Layout_LayoutOption: 4 +[ 0.459730] Config common/settings.cpp:operator():82: Layout_PortraitLayoutOption: 0 +[ 0.459732] Config common/settings.cpp:operator():82: Layout_SecondaryDisplayLayout: 0 +[ 0.459735] Config common/settings.cpp:operator():82: Layout_SwapScreen: false +[ 0.459736] Config common/settings.cpp:operator():82: Layout_UprightScreen: false +[ 0.459738] Config common/settings.cpp:operator():82: Layout_ScreenGap: 0 +[ 0.459744] Config common/settings.cpp:operator():82: Layout_LargeScreenProportion: 2 +[ 0.459746] Config common/settings.cpp:operator():82: Layout_SmallScreenPosition: 2 +[ 0.459748] Config common/settings.cpp:operator():82: Utility_DumpTextures: false +[ 0.459749] Config common/settings.cpp:operator():82: Utility_CustomTextures: false +[ 0.459751] Config common/settings.cpp:operator():82: Utility_PreloadTextures: false +[ 0.459755] Config common/settings.cpp:operator():82: Utility_AsyncCustomLoading: true +[ 0.459758] Config common/settings.cpp:operator():82: Utility_UseDiskShaderCache: true +[ 0.459760] Config common/settings.cpp:operator():82: Audio_Emulation: HLE +[ 0.459763] Config common/settings.cpp:operator():82: Audio_OutputType: 0 +[ 0.459765] Config common/settings.cpp:operator():82: Audio_OutputDevice: Auto +[ 0.459766] Config common/settings.cpp:operator():82: Audio_InputType: 0 +[ 0.459770] Config common/settings.cpp:operator():82: Audio_InputDevice: Auto +[ 0.459773] Config common/settings.cpp:operator():82: Audio_EnableAudioStretching: true +[ 0.459775] Config common/settings.cpp:operator():82: Audio_EnableRealtime: false +[ 0.459777] Config common/settings.cpp:operator():82: Camera_OuterRightName: blank +[ 0.459778] Config common/settings.cpp:operator():82: Camera_OuterRightConfig: +[ 0.459780] Config common/settings.cpp:operator():82: Camera_OuterRightFlip: 0 +[ 0.459783] Config common/settings.cpp:operator():82: Camera_InnerName: blank +[ 0.459784] Config common/settings.cpp:operator():82: Camera_InnerConfig: +[ 0.459785] Config common/settings.cpp:operator():82: Camera_InnerFlip: 0 +[ 0.459786] Config common/settings.cpp:operator():82: Camera_OuterLeftName: blank +[ 0.459787] Config common/settings.cpp:operator():82: Camera_OuterLeftConfig: +[ 0.459788] Config common/settings.cpp:operator():82: Camera_OuterLeftFlip: 0 +[ 0.459789] Config common/settings.cpp:operator():82: DataStorage_UseVirtualSd: true +[ 0.459790] Config common/settings.cpp:operator():82: DataStorage_UseCustomStorage: false +[ 0.459792] Config common/settings.cpp:operator():82: System_IsNew3ds: false +[ 0.459793] Config common/settings.cpp:operator():82: System_LLEApplets: true +[ 0.459794] Config common/settings.cpp:operator():82: System_RegionValue: -1 +[ 0.459795] Config common/settings.cpp:operator():82: System_PluginLoader: false +[ 0.459796] Config common/settings.cpp:operator():82: System_PluginLoaderAllowed: true +[ 0.459798] Config common/settings.cpp:operator():82: System_ApplyRegionFreePatch: true +[ 0.459800] Config common/settings.cpp:operator():82: Debugging_DelayStartForLLEModules: true +[ 0.459800] Config common/settings.cpp:operator():82: Debugging_UseGdbstub: false +[ 0.459802] Config common/settings.cpp:operator():82: Debugging_GdbstubPort: 24689 +[ 0.459802] Config common/settings.cpp:operator():82: Debugging_InstantDebugLog: false +[ 0.459804] Config common/settings.cpp:operator():82: Debugging_ToggleUniqueDataConsoleType: false +[ 1.074431] Audio.Sink audio_core/cubeb_sink.cpp:StateCallback:135: Cubeb Audio Stream Started +[ 1.077377] Service.FS core/file_sys/ncch_container.cpp:LoadOverrides:412: Loaded NCCH /storage/.local/share/azahar/nand/00000000000000000000000000000000/title/0004009b/00014202/content/00000000.app is tainted, application behavior may not be as expected! +[ 1.081325] Service.HTTP core/hle/service/http/http_c.cpp:DecryptClCertA:2106: ClCertA file missing, using default +[ 1.121658] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_swapchain +[ 1.121687] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_image_format_list +[ 1.121693] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_EXT_shader_stencil_export unavailable. +[ 1.121696] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_external_memory_host +[ 1.121700] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_tooling_info +[ 1.121702] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_timeline_semaphore +[ 1.121705] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_KHR_portability_subset unavailable. +[ 1.121708] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():435: Extension VK_EXT_extended_dynamic_state has been blacklisted because it is broken on Qualcomm and ARM drivers +[ 1.121711] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_custom_border_color +[ 1.121714] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_index_type_uint8 +[ 1.121715] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_EXT_fragment_shader_interlock unavailable. +[ 1.121718] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_pipeline_creation_cache_control +[ 1.121719] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_KHR_fragment_shader_barycentric unavailable. +[ 1.131652] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CreateFormatTable:302: Format B8G8R8Unorm unsupported, falling back unconditionally to R8G8B8A8Unorm +[ 1.131821] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:691: VK_DRIVER: Mali-G52 29.1.0 +[ 1.131834] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:692: VK_DEVICE: Mali-G52 +[ 1.131836] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:693: VK_VERSION: 1.3.303 +[ 1.132356] Render.Vulkan video_core/renderer_vulkan/renderer_vulkan.cpp:IsLowRefreshRate:101: Refresh rate is above emulated 3DS screen: 60hz. Good. +[ 1.161959] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 128 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.261661] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Upload buffer with size 524288 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.268504] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Download buffer with size 16384 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.305814] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 65536 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.310856] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 8192 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.312603] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 2048 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.314813] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 2048 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.442410] Render.Vulkan video_core/renderer_vulkan/renderer_vulkan.cpp:IsLowRefreshRate:101: Refresh rate is above emulated 3DS screen: 60hz. Good. +[ 2.453469] Loader core/loader/ncch.cpp:Load:324: Program ID: 00040000000C8A00 +[ 2.453655] Service.FS core/file_sys/ncch_container.cpp:OpenFile:128: Failed to open /storage/.local/share/azahar/sdmc/Nintendo 3DS/00000000000000000000000000000000/00000000000000000000000000000000/title/0004000e/000c8a00/content/00000000.app +[ 2.580027] Loader core/hle/kernel/process.cpp:ParseKernelCaps:198: ExHeader kernel version: 2.33 +[ 2.582507] Service.FS core/file_sys/ncch_container.cpp:LoadSectionExeFS:468: Attempting to load logo from the ExeFS +[ 2.633505] Core.Cheats core/cheats/cheats.cpp:LoadCheatFile:92: Attempting to load cheats file: /storage/.local/share/azahar/cheats/00040000000C8A00.txt +[ 2.637338] Core.Cheats core/cheats/gateway_cheat.cpp:LoadFile:491: GatewayCheat::LoadFile failed, file doesn't exist: /storage/.local/share/azahar/cheats/00040000000C8A00.txt +[ 2.639840] Render.Vulkan video_core/renderer_vulkan/vk_pipeline_cache.cpp:LoadDriverPipelineDiskCache:239: No pipeline cache found for title_id=00040000000C8A00 +[ 2.640673] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitVSCache:585: Loading VS disk shader cache for title 00040000000C8A00 +[ 2.648385] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitFSCache:896: Loading FS disk shader cache for title 00040000000C8A00 +[ 2.655408] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitGSCache:1113: Loading GS disk shader cache for title 00040000000C8A00 +[ 2.655998] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitPLCache:1332: Loading PL disk shader cache for title 00040000000C8A00 +[ 2.843158] Service.CAM citra_qt/camera/qt_multimedia_camera.cpp:ResumeCameras:50: Resuming all cameras +[ 2.864056] Frontend citra_qt/citra_qt.cpp:HoldWakeLockLinux:1269: Couldn't connect to XDP D-Bus endpoint +[ 2.866031] Frontend common/linux/gamemode.cpp:StartGamemode:15: Failed to start gamemode: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory +[ 3.507703] Service.SRV core/hle/service/sm/srv.cpp:RegisterClient:64: (STUBBED) called. Caller PID=11 +[ 3.570544] Service.SRV core/hle/service/sm/srv.cpp:EnableNotification:86: (STUBBED) called +[ 3.609101] Service.NDM core/hle/service/ndm/ndm_u.cpp:OverrideDefaultDaemons:195: (STUBBED) bit_mask=0x0000000F +[ 3.617103] Service.NDM core/hle/service/ndm/ndm_u.cpp:SuspendDaemons:74: (STUBBED) bit_mask=0x00000006 +[ 3.619759] Service.FS core/hle/service/fs/fs_user.cpp:InitializeWithSdkVersion:1079: (STUBBED) called, version: 0x040203C8 +[ 3.688790] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default diff --git a/diagnostics/azahar/azahar_log-20260726.txt b/diagnostics/azahar/azahar_log-20260726.txt new file mode 100644 index 00000000000..0973f9a5acc --- /dev/null +++ b/diagnostics/azahar/azahar_log-20260726.txt @@ -0,0 +1,151 @@ +[ 0.188108] Input input_common/udp/client.cpp:StartCommunication:206: Starting communication with UDP input server on 127.0.0.1:26760 +[ 0.450955] Frontend citra_qt/citra_qt.cpp:GMainWindow:454: Azahar Version: b42d091 | master-b42d0916b-dirty +[ 0.451078] Frontend citra_qt/citra_qt.cpp:GMainWindow:472: Host OS: Linux 7.0.2 +[ 0.451117] Frontend citra_qt/citra_qt.cpp:GMainWindow:475: Host RAM: 2.91 GiB +[ 0.451124] Frontend citra_qt/citra_qt.cpp:GMainWindow:476: Host Swap: 2.00 GiB +[ 0.510059] Frontend citra_qt/citra_qt.cpp:BootGame:1465: Azahar starting... +[ 0.511560] Frontend citra_qt/citra_qt.cpp:BootGame:1488: Loading per application config file for title 00040000000C8A00 +[ 0.518395] Config common/settings.cpp:LogSettings:85: Azahar Configuration: +[ 0.518419] Config common/settings.cpp:operator():82: Core_UseCpuJit: true +[ 0.518423] Config common/settings.cpp:operator():82: Core_CPUClockPercentage: 100 +[ 0.518425] Config common/settings.cpp:operator():82: Controller_UseArticController: false +[ 0.518426] Config common/settings.cpp:operator():82: Renderer_UseGLES: true +[ 0.518428] Config common/settings.cpp:operator():82: Renderer_GraphicsAPI: Vulkan +[ 0.518430] Config common/settings.cpp:operator():82: Renderer_AsyncShaders: false +[ 0.518432] Config common/settings.cpp:operator():82: Renderer_AsyncPresentation: true +[ 0.518433] Config common/settings.cpp:operator():82: Renderer_SpirvShaderGen: true +[ 0.518434] Config common/settings.cpp:operator():82: Renderer_DisableSpirvOptimizer: true +[ 0.518439] Config common/settings.cpp:operator():82: Renderer_Debug: false +[ 0.518440] Config common/settings.cpp:operator():82: Renderer_UseHwShader: true +[ 0.518441] Config common/settings.cpp:operator():82: Renderer_ShadersAccurateMul: true +[ 0.518447] Config common/settings.cpp:operator():82: Renderer_UseShaderJit: false +[ 0.518450] Config common/settings.cpp:operator():82: Renderer_UseResolutionFactor: 1 +[ 0.518451] Config common/settings.cpp:operator():82: Renderer_UseIntegerScaling: false +[ 0.518455] Config common/settings.cpp:operator():82: Renderer_FrameLimit: 100 +[ 0.518457] Config common/settings.cpp:operator():82: Renderer_VSyncNew: true +[ 0.518459] Config common/settings.cpp:operator():82: Renderer_PostProcessingShader: None (builtin) +[ 0.518460] Config common/settings.cpp:operator():82: Renderer_FilterMode: true +[ 0.518463] Config common/settings.cpp:operator():82: Renderer_TextureFilter: None +[ 0.518465] Config common/settings.cpp:operator():82: Renderer_TextureSampling: GameControlled +[ 0.518466] Config common/settings.cpp:operator():82: Renderer_DelayGameRenderThreasUs: 0 +[ 0.518468] Config common/settings.cpp:operator():82: Renderer_DisableRightEyeRender: true +[ 0.518470] Config common/settings.cpp:operator():82: Stereoscopy_Render3d: 0 +[ 0.518472] Config common/settings.cpp:operator():82: Stereoscopy_Factor3d: 0 +[ 0.518474] Config common/settings.cpp:operator():82: Stereoscopy_Swap_Eyes: false +[ 0.518476] Config common/settings.cpp:operator():82: Stereoscopy_Render_3d_to_which_display: 0 +[ 0.518479] Config common/settings.cpp:operator():82: Stereoscopy_MonoRenderOption: 0 +[ 0.518481] Config common/settings.cpp:operator():82: Layout_LayoutOption: 4 +[ 0.518483] Config common/settings.cpp:operator():82: Layout_PortraitLayoutOption: 0 +[ 0.518486] Config common/settings.cpp:operator():82: Layout_SecondaryDisplayLayout: 0 +[ 0.518488] Config common/settings.cpp:operator():82: Layout_SwapScreen: false +[ 0.518490] Config common/settings.cpp:operator():82: Layout_UprightScreen: false +[ 0.518492] Config common/settings.cpp:operator():82: Layout_ScreenGap: 0 +[ 0.518495] Config common/settings.cpp:operator():82: Layout_LargeScreenProportion: 2 +[ 0.518497] Config common/settings.cpp:operator():82: Layout_SmallScreenPosition: 2 +[ 0.518499] Config common/settings.cpp:operator():82: Utility_DumpTextures: false +[ 0.518502] Config common/settings.cpp:operator():82: Utility_CustomTextures: false +[ 0.518504] Config common/settings.cpp:operator():82: Utility_PreloadTextures: false +[ 0.518506] Config common/settings.cpp:operator():82: Utility_AsyncCustomLoading: true +[ 0.518509] Config common/settings.cpp:operator():82: Utility_UseDiskShaderCache: true +[ 0.518512] Config common/settings.cpp:operator():82: Audio_Emulation: HLE +[ 0.518513] Config common/settings.cpp:operator():82: Audio_OutputType: 0 +[ 0.518515] Config common/settings.cpp:operator():82: Audio_OutputDevice: Auto +[ 0.518518] Config common/settings.cpp:operator():82: Audio_InputType: 0 +[ 0.518519] Config common/settings.cpp:operator():82: Audio_InputDevice: Auto +[ 0.518521] Config common/settings.cpp:operator():82: Audio_EnableAudioStretching: true +[ 0.518524] Config common/settings.cpp:operator():82: Audio_EnableRealtime: false +[ 0.518525] Config common/settings.cpp:operator():82: Camera_OuterRightName: blank +[ 0.518527] Config common/settings.cpp:operator():82: Camera_OuterRightConfig: +[ 0.518529] Config common/settings.cpp:operator():82: Camera_OuterRightFlip: 0 +[ 0.518530] Config common/settings.cpp:operator():82: Camera_InnerName: blank +[ 0.518533] Config common/settings.cpp:operator():82: Camera_InnerConfig: +[ 0.518534] Config common/settings.cpp:operator():82: Camera_InnerFlip: 0 +[ 0.518535] Config common/settings.cpp:operator():82: Camera_OuterLeftName: blank +[ 0.518537] Config common/settings.cpp:operator():82: Camera_OuterLeftConfig: +[ 0.518538] Config common/settings.cpp:operator():82: Camera_OuterLeftFlip: 0 +[ 0.518540] Config common/settings.cpp:operator():82: DataStorage_UseVirtualSd: true +[ 0.518541] Config common/settings.cpp:operator():82: DataStorage_UseCustomStorage: false +[ 0.518542] Config common/settings.cpp:operator():82: System_IsNew3ds: false +[ 0.518544] Config common/settings.cpp:operator():82: System_LLEApplets: true +[ 0.518548] Config common/settings.cpp:operator():82: System_RegionValue: -1 +[ 0.518549] Config common/settings.cpp:operator():82: System_PluginLoader: false +[ 0.518551] Config common/settings.cpp:operator():82: System_PluginLoaderAllowed: true +[ 0.518553] Config common/settings.cpp:operator():82: System_ApplyRegionFreePatch: true +[ 0.518554] Config common/settings.cpp:operator():82: Debugging_DelayStartForLLEModules: true +[ 0.518555] Config common/settings.cpp:operator():82: Debugging_UseGdbstub: false +[ 0.518556] Config common/settings.cpp:operator():82: Debugging_GdbstubPort: 24689 +[ 0.518558] Config common/settings.cpp:operator():82: Debugging_InstantDebugLog: false +[ 0.518559] Config common/settings.cpp:operator():82: Debugging_ToggleUniqueDataConsoleType: false +[ 0.959160] Audio.Sink audio_core/cubeb_sink.cpp:StateCallback:135: Cubeb Audio Stream Started +[ 0.961513] Service.FS core/file_sys/ncch_container.cpp:LoadOverrides:412: Loaded NCCH /storage/.local/share/azahar/nand/00000000000000000000000000000000/title/0004009b/00014202/content/00000000.app is tainted, application behavior may not be as expected! +[ 0.966167] Service.HTTP core/hle/service/http/http_c.cpp:DecryptClCertA:2106: ClCertA file missing, using default +[ 0.990302] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_swapchain +[ 0.990632] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_image_format_list +[ 0.990689] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_EXT_shader_stencil_export unavailable. +[ 0.990742] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_external_memory_host +[ 0.990792] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_tooling_info +[ 0.990842] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_KHR_timeline_semaphore +[ 0.990966] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_KHR_portability_subset unavailable. +[ 0.991095] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():435: Extension VK_EXT_extended_dynamic_state has been blacklisted because it is broken on Qualcomm and ARM drivers +[ 0.991291] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_custom_border_color +[ 0.991345] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_index_type_uint8 +[ 0.991394] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_EXT_fragment_shader_interlock unavailable. +[ 0.994991] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():431: Enabling extension: VK_EXT_pipeline_creation_cache_control +[ 0.995054] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:operator():440: Extension VK_KHR_fragment_shader_barycentric unavailable. +[ 1.005288] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CreateFormatTable:302: Format B8G8R8Unorm unsupported, falling back unconditionally to R8G8B8A8Unorm +[ 1.005466] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:691: VK_DRIVER: Mali-G52 29.1.0 +[ 1.005470] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:692: VK_DEVICE: Mali-G52 +[ 1.005472] Render.Vulkan video_core/renderer_vulkan/vk_instance.cpp:CollectToolingInfo:693: VK_VERSION: 1.3.303 +[ 1.005964] Render.Vulkan video_core/renderer_vulkan/renderer_vulkan.cpp:IsLowRefreshRate:101: Refresh rate is above emulated 3DS screen: 60hz. Good. +[ 1.032862] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 128 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.876502] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Upload buffer with size 524288 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.880263] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Download buffer with size 16384 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.894450] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 65536 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.896457] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 8192 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.897026] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 2048 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 1.897555] Render.Vulkan video_core/renderer_vulkan/vk_stream_buffer.cpp:CreateBuffers:238: Created Stream buffer with size 2048 KiB (flags { DeviceLocal | HostVisible | HostCoherent }) +[ 2.022008] Render.Vulkan video_core/renderer_vulkan/renderer_vulkan.cpp:IsLowRefreshRate:101: Refresh rate is above emulated 3DS screen: 60hz. Good. +[ 2.031149] Loader core/loader/ncch.cpp:Load:324: Program ID: 00040000000C8A00 +[ 2.031314] Service.FS core/file_sys/ncch_container.cpp:OpenFile:128: Failed to open /storage/.local/share/azahar/sdmc/Nintendo 3DS/00000000000000000000000000000000/00000000000000000000000000000000/title/0004000e/000c8a00/content/00000000.app +[ 2.134283] Loader core/hle/kernel/process.cpp:ParseKernelCaps:198: ExHeader kernel version: 2.33 +[ 2.137030] Service.FS core/file_sys/ncch_container.cpp:LoadSectionExeFS:468: Attempting to load logo from the ExeFS +[ 2.186239] Core.Cheats core/cheats/cheats.cpp:LoadCheatFile:92: Attempting to load cheats file: /storage/.local/share/azahar/cheats/00040000000C8A00.txt +[ 2.186310] Core.Cheats core/cheats/gateway_cheat.cpp:LoadFile:491: GatewayCheat::LoadFile failed, file doesn't exist: /storage/.local/share/azahar/cheats/00040000000C8A00.txt +[ 2.188499] Render.Vulkan video_core/renderer_vulkan/vk_pipeline_cache.cpp:LoadDriverPipelineDiskCache:239: No pipeline cache found for title_id=00040000000C8A00 +[ 2.189759] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitVSCache:585: Loading VS disk shader cache for title 00040000000C8A00 +[ 2.197817] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitFSCache:896: Loading FS disk shader cache for title 00040000000C8A00 +[ 2.199239] Service.CAM citra_qt/camera/qt_multimedia_camera.cpp:ResumeCameras:50: Resuming all cameras +[ 2.201676] Frontend citra_qt/citra_qt.cpp:HoldWakeLockLinux:1269: Couldn't connect to XDP D-Bus endpoint +[ 2.203312] Frontend common/linux/gamemode.cpp:StartGamemode:15: Failed to start gamemode: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory +[ 2.206301] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitGSCache:1113: Loading GS disk shader cache for title 00040000000C8A00 +[ 2.206801] Render.Vulkan video_core/renderer_vulkan/vk_shader_disk_cache.cpp:InitPLCache:1332: Loading PL disk shader cache for title 00040000000C8A00 +[ 2.725410] Service.SRV core/hle/service/sm/srv.cpp:RegisterClient:64: (STUBBED) called. Caller PID=11 +[ 2.795741] Service.SRV core/hle/service/sm/srv.cpp:EnableNotification:86: (STUBBED) called +[ 2.835912] Service.NDM core/hle/service/ndm/ndm_u.cpp:OverrideDefaultDaemons:195: (STUBBED) bit_mask=0x0000000F +[ 2.842534] Service.NDM core/hle/service/ndm/ndm_u.cpp:SuspendDaemons:74: (STUBBED) bit_mask=0x00000006 +[ 2.846436] Service.FS core/hle/service/fs/fs_user.cpp:InitializeWithSdkVersion:1079: (STUBBED) called, version: 0x040203C8 +[ 2.892249] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default +[ 3.016412] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default +[ 3.267584] Service.FS core/file_sys/savedata_archive.cpp:OpenFile:75: Non-existing file /storage/.local/share/azahar/nand/data/00000000000000000000000000000000/sysdata/00010034/00000000/BOSS_SV.db can't be open without mode create. +[ 3.267694] Service.FS core/file_sys/savedata_archive.cpp:OpenFile:75: Non-existing file /storage/.local/share/azahar/nand/data/00000000000000000000000000000000/sysdata/00010034/00000000/BOSS_SS.db can't be open without mode create. +[ 3.267698] Service.BOSS core/hle/service/boss/online_service.cpp:InitializeSession:104: Could not open BOSS database. +[ 3.274407] Service.APT core/hle/service/apt/apt.cpp:NotifyToWait:362: (STUBBED) app_id=768 +[ 3.298972] Service.APT core/hle/service/apt/apt.cpp:AppletUtility:711: (STUBBED) called command=0X00000007, input_size=0X00000004, output_size=0X00000001 +[ 3.300586] Service.APT core/hle/service/apt/apt.cpp:AppletUtility:711: (STUBBED) called command=0X00000004, input_size=0X00000001, output_size=0X00000001 +[ 3.941305] Service.DSP audio_core/hle/hle.cpp:LoadComponent:512: Firmware hash: 0xe031661c89e654ee +[ 3.941355] Service.DSP audio_core/hle/hle.cpp:LoadComponent:517: Structures hash: 0x228655de1258d999 +[ 3.941362] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:LoadComponent:191: called size=0xC234, prog_mask=0x00FF, data_mask=0x00FF +[ 3.944454] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:RegisterInterruptEvents:258: Registered interrupt=2, channel=2, event=event-00116300 +[ 3.945642] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:GetSemaphoreEventHandle:275: (STUBBED) called +[ 3.946855] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:SetSemaphoreMask:285: (STUBBED) called mask=0x2000 +[ 3.949020] Audio.DSP audio_core/hle/hle.cpp:PipeWrite:235: Application has requested initialization of DSP hardware +[ 3.950177] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:SetSemaphore:57: called, semaphore_value=4000 +[ 3.957046] Service.DSP core/hle/service/dsp/dsp_dsp.cpp:SetSemaphore:57: called, semaphore_value=4000 +[ 4.020300] Service.CFG core/hle/service/cfg/cfg.cpp:UpdatePreferredRegionCode:1081: Preferred region code set to 5 +[ 4.020430] Service.CFG core/hle/service/cfg/cfg.cpp:UpdatePreferredRegionCode:1084: System language 1 does not fit the region. Adjusted to 7 +[ 4.020820] Service.FS core/file_sys/ncch_container.cpp:LoadOverrides:412: Loaded NCCH /storage/.local/share/azahar/nand/00000000000000000000000000000000/title/0004009b/00014202/content/00000000.app is tainted, application behavior may not be as expected! +[ 4.020862] Service.FS core/file_sys/ncch_container.cpp:ReadOverrideRomFS:689: File /storage/.local/share/azahar/nand/00000000000000000000000000000000/title/0004009b/00014202/content/00000000.app.romfs overriding built-in RomFS; LayeredFS not enabled +[ 5.147166] Service.APT core/hle/service/apt/apt.cpp:AppletUtility:711: (STUBBED) called command=0X00000004, input_size=0X00000001, output_size=0X00000001 +[ 5.188462] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default +[ 5.577525] Service.FS ./core/file_sys/archive_backend.h:GetOpenDelayNs:221: Delay generator was not initalized. Using default +[ 5.585314] Service.FS ./core/file_sys/file_backend.h:GetReadDelayNs:51: Delay generator was not initalized. Using default diff --git a/diagnostics/azahar/exec-azahar-20260718.log b/diagnostics/azahar/exec-azahar-20260718.log new file mode 100644 index 00000000000..ca2ad4378b1 --- /dev/null +++ b/diagnostics/azahar/exec-azahar-20260718.log @@ -0,0 +1,34 @@ +Emulation Run Log - Started at ์ผ 7์›” 26 10:45:49 KST 2026 + +ARG1: /storage/roms/3ds/Crashmo (Kor).3ds +ARG2: -P3ds +ARG3: --core=azahar-sa +ARG4: --emulator=azahar +ARGS: /storage/roms/3ds/Crashmo (Kor).3ds -P3ds --core=azahar-sa --emulator=azahar +EMULATOR: azahar +PLATFORM: 3ds +CORE: azahar-sa +ROM NAME: /storage/roms/3ds/Crashmo (Kor).3ds +BASE ROM NAME: Crashmo (Kor).3ds +USING CONFIG: /storage/.config/retroarch/retroarch.cfg +USING APPENDCONFIG : /tmp/.retroarch.cfg +GAME GUIDE PATH: No Game Guide Found + +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh Disabling BT +runemu.sh: /usr/bin/runemu.sh Configuring for azahar +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh executing game: /storage/roms/3ds/Crashmo (Kor).3ds +runemu.sh: /usr/bin/runemu.sh script to execute: ${RUN_SHELL} "/usr/bin/start_${CORE%-*}.sh" "${ROMNAME}" "${PLATFORM}" +runemu.sh: /usr/bin/runemu.sh Configure big.little () +runemu.sh: /usr/bin/runemu.sh Set emulation performance mode to (ondemand) +runemu.sh: /usr/bin/runemu.sh Executing /usr/bin/bash /usr/bin/start_azahar.sh /storage/roms/3ds/Crashmo (Kor).3ds 3ds +Could not open module param file '/sys/module/bifrost_kbase/parameters/large_page_conf' +/usr/bin/start_azahar.sh: line 221: 4066 Killed ${EMUPERF} /usr/bin/azahar "${1}" +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh Restore system GPU performance mode (auto) +runemu.sh: /usr/bin/runemu.sh Restore active threads () +runemu.sh: /usr/bin/runemu.sh Checking errors: 0 +runemu.sh: /usr/bin/runemu.sh Cleaning up and exiting +runemu.sh: /usr/bin/runemu.sh Enabling BT +runemu.sh: /usr/bin/runemu.sh Clearing screen diff --git a/diagnostics/azahar/exec-azahar-20260725.log b/diagnostics/azahar/exec-azahar-20260725.log new file mode 100644 index 00000000000..59e0c9b2261 --- /dev/null +++ b/diagnostics/azahar/exec-azahar-20260725.log @@ -0,0 +1,40 @@ +Emulation Run Log - Started at ์ผ 7์›” 26 10:34:02 KST 2026 + +ARG1: /storage/roms/3ds/Crashmo (Kor).3ds +ARG2: -P3ds +ARG3: --core=azahar-sa +ARG4: --emulator=azahar +ARGS: /storage/roms/3ds/Crashmo (Kor).3ds -P3ds --core=azahar-sa --emulator=azahar +EMULATOR: azahar +PLATFORM: 3ds +CORE: azahar-sa +ROM NAME: /storage/roms/3ds/Crashmo (Kor).3ds +BASE ROM NAME: Crashmo (Kor).3ds +USING CONFIG: /storage/.config/retroarch/retroarch.cfg +USING APPENDCONFIG : /tmp/.retroarch.cfg +GAME GUIDE PATH: No Game Guide Found + +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh Disabling BT +runemu.sh: /usr/bin/runemu.sh Configuring for azahar +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh executing game: /storage/roms/3ds/Crashmo (Kor).3ds +runemu.sh: /usr/bin/runemu.sh script to execute: ${RUN_SHELL} "/usr/bin/start_${CORE%-*}.sh" "${ROMNAME}" "${PLATFORM}" +runemu.sh: /usr/bin/runemu.sh Configure big.little () +runemu.sh: /usr/bin/runemu.sh Set emulation performance mode to (ondemand) +runemu.sh: /usr/bin/runemu.sh Executing /usr/bin/bash /usr/bin/start_azahar.sh /storage/roms/3ds/Crashmo (Kor).3ds 3ds +qt.qpa.xcb: could not connect to display :0.0 +qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. +qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. +This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. + +Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-brcm, wayland-egl, wayland, xcb. + +/usr/bin/start_azahar.sh: line 221: 19259 Aborted ${EMUPERF} /usr/bin/azahar "${1}" +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh Restore system GPU performance mode (auto) +runemu.sh: /usr/bin/runemu.sh Restore active threads () +runemu.sh: /usr/bin/runemu.sh Checking errors: 0 +runemu.sh: /usr/bin/runemu.sh Cleaning up and exiting +runemu.sh: /usr/bin/runemu.sh Enabling BT +runemu.sh: /usr/bin/runemu.sh Clearing screen diff --git a/diagnostics/azahar/exec-azahar-20260726.log b/diagnostics/azahar/exec-azahar-20260726.log new file mode 100644 index 00000000000..9090482d022 --- /dev/null +++ b/diagnostics/azahar/exec-azahar-20260726.log @@ -0,0 +1,34 @@ +Emulation Run Log - Started at ์ผ 7์›” 26 13:51:55 KST 2026 + +ARG1: /storage/roms/3ds/Crashmo (Kor).3ds +ARG2: -P3ds +ARG3: --core=azahar-sa +ARG4: --emulator=azahar +ARGS: /storage/roms/3ds/Crashmo (Kor).3ds -P3ds --core=azahar-sa --emulator=azahar +EMULATOR: azahar +PLATFORM: 3ds +CORE: azahar-sa +ROM NAME: /storage/roms/3ds/Crashmo (Kor).3ds +BASE ROM NAME: Crashmo (Kor).3ds +USING CONFIG: /storage/.config/retroarch/retroarch.cfg +USING APPENDCONFIG : /tmp/.retroarch.cfg +GAME GUIDE PATH: No Game Guide Found + +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh Disabling BT +runemu.sh: /usr/bin/runemu.sh Configuring for azahar +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh executing game: /storage/roms/3ds/Crashmo (Kor).3ds +runemu.sh: /usr/bin/runemu.sh script to execute: ${RUN_SHELL} "/usr/bin/start_${CORE%-*}.sh" "${ROMNAME}" "${PLATFORM}" +runemu.sh: /usr/bin/runemu.sh Configure big.little () +runemu.sh: /usr/bin/runemu.sh Set emulation performance mode to (ondemand) +runemu.sh: /usr/bin/runemu.sh Executing /usr/bin/bash /usr/bin/start_azahar.sh /storage/roms/3ds/Crashmo (Kor).3ds 3ds +Could not open module param file '/sys/module/bifrost_kbase/parameters/large_page_conf' +/usr/bin/start_azahar.sh: line 221: 7388 Killed ${EMUPERF} /usr/bin/azahar "${1}" +runemu.sh: /usr/bin/runemu.sh Clearing screen +runemu.sh: /usr/bin/runemu.sh Restore system GPU performance mode (auto) +runemu.sh: /usr/bin/runemu.sh Restore active threads () +runemu.sh: /usr/bin/runemu.sh Checking errors: 0 +runemu.sh: /usr/bin/runemu.sh Cleaning up and exiting +runemu.sh: /usr/bin/runemu.sh Enabling BT +runemu.sh: /usr/bin/runemu.sh Clearing screen diff --git a/diagnostics/azahar/sway-outputs-20260718.json b/diagnostics/azahar/sway-outputs-20260718.json new file mode 100644 index 00000000000..cd7bd141bc6 --- /dev/null +++ b/diagnostics/azahar/sway-outputs-20260718.json @@ -0,0 +1,156 @@ +[ + { + "id": 4, + "type": "output", + "orientation": "none", + "percent": 0.5, + "urgent": false, + "marks": [], + "layout": "output", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 0, + "y": 0, + "width": 640, + "height": 480 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "DSI-2", + "window": null, + "nodes": [], + "floating_nodes": [], + "focus": [ + 5 + ], + "fullscreen_mode": 0, + "sticky": false, + "floating": null, + "scratchpad_state": null, + "primary": false, + "make": "Unknown", + "model": "Unknown", + "serial": "Unknown", + "modes": [ + { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + } + ], + "non_desktop": false, + "active": true, + "dpms": true, + "power": true, + "scale": 1.0, + "scale_filter": "nearest", + "transform": "normal", + "adaptive_sync_status": "disabled", + "current_workspace": "1", + "current_mode": { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + }, + "max_render_time": 0, + "allow_tearing": false, + "focused": true, + "subpixel_hinting": "unknown" + }, + { + "id": 3, + "type": "output", + "orientation": "none", + "percent": 0.5, + "urgent": false, + "marks": [], + "layout": "output", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 640, + "y": 0, + "width": 640, + "height": 480 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "DSI-1", + "window": null, + "nodes": [], + "floating_nodes": [], + "focus": [ + 6 + ], + "fullscreen_mode": 0, + "sticky": false, + "floating": null, + "scratchpad_state": null, + "primary": false, + "make": "Unknown", + "model": "Unknown", + "serial": "Unknown", + "modes": [ + { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + } + ], + "non_desktop": false, + "active": true, + "dpms": false, + "power": false, + "scale": 1.0, + "scale_filter": "nearest", + "transform": "normal", + "adaptive_sync_status": "disabled", + "current_workspace": "2", + "current_mode": { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + }, + "max_render_time": 0, + "allow_tearing": false, + "focused": false, + "subpixel_hinting": "unknown" + } +] diff --git a/diagnostics/azahar/sway-outputs-20260725.json b/diagnostics/azahar/sway-outputs-20260725.json new file mode 100644 index 00000000000..cd7bd141bc6 --- /dev/null +++ b/diagnostics/azahar/sway-outputs-20260725.json @@ -0,0 +1,156 @@ +[ + { + "id": 4, + "type": "output", + "orientation": "none", + "percent": 0.5, + "urgent": false, + "marks": [], + "layout": "output", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 0, + "y": 0, + "width": 640, + "height": 480 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "DSI-2", + "window": null, + "nodes": [], + "floating_nodes": [], + "focus": [ + 5 + ], + "fullscreen_mode": 0, + "sticky": false, + "floating": null, + "scratchpad_state": null, + "primary": false, + "make": "Unknown", + "model": "Unknown", + "serial": "Unknown", + "modes": [ + { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + } + ], + "non_desktop": false, + "active": true, + "dpms": true, + "power": true, + "scale": 1.0, + "scale_filter": "nearest", + "transform": "normal", + "adaptive_sync_status": "disabled", + "current_workspace": "1", + "current_mode": { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + }, + "max_render_time": 0, + "allow_tearing": false, + "focused": true, + "subpixel_hinting": "unknown" + }, + { + "id": 3, + "type": "output", + "orientation": "none", + "percent": 0.5, + "urgent": false, + "marks": [], + "layout": "output", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 640, + "y": 0, + "width": 640, + "height": 480 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "DSI-1", + "window": null, + "nodes": [], + "floating_nodes": [], + "focus": [ + 6 + ], + "fullscreen_mode": 0, + "sticky": false, + "floating": null, + "scratchpad_state": null, + "primary": false, + "make": "Unknown", + "model": "Unknown", + "serial": "Unknown", + "modes": [ + { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + } + ], + "non_desktop": false, + "active": true, + "dpms": false, + "power": false, + "scale": 1.0, + "scale_filter": "nearest", + "transform": "normal", + "adaptive_sync_status": "disabled", + "current_workspace": "2", + "current_mode": { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + }, + "max_render_time": 0, + "allow_tearing": false, + "focused": false, + "subpixel_hinting": "unknown" + } +] diff --git a/diagnostics/azahar/sway-outputs-20260726.json b/diagnostics/azahar/sway-outputs-20260726.json new file mode 100644 index 00000000000..cd7bd141bc6 --- /dev/null +++ b/diagnostics/azahar/sway-outputs-20260726.json @@ -0,0 +1,156 @@ +[ + { + "id": 4, + "type": "output", + "orientation": "none", + "percent": 0.5, + "urgent": false, + "marks": [], + "layout": "output", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 0, + "y": 0, + "width": 640, + "height": 480 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "DSI-2", + "window": null, + "nodes": [], + "floating_nodes": [], + "focus": [ + 5 + ], + "fullscreen_mode": 0, + "sticky": false, + "floating": null, + "scratchpad_state": null, + "primary": false, + "make": "Unknown", + "model": "Unknown", + "serial": "Unknown", + "modes": [ + { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + } + ], + "non_desktop": false, + "active": true, + "dpms": true, + "power": true, + "scale": 1.0, + "scale_filter": "nearest", + "transform": "normal", + "adaptive_sync_status": "disabled", + "current_workspace": "1", + "current_mode": { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + }, + "max_render_time": 0, + "allow_tearing": false, + "focused": true, + "subpixel_hinting": "unknown" + }, + { + "id": 3, + "type": "output", + "orientation": "none", + "percent": 0.5, + "urgent": false, + "marks": [], + "layout": "output", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 640, + "y": 0, + "width": 640, + "height": 480 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "DSI-1", + "window": null, + "nodes": [], + "floating_nodes": [], + "focus": [ + 6 + ], + "fullscreen_mode": 0, + "sticky": false, + "floating": null, + "scratchpad_state": null, + "primary": false, + "make": "Unknown", + "model": "Unknown", + "serial": "Unknown", + "modes": [ + { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + } + ], + "non_desktop": false, + "active": true, + "dpms": false, + "power": false, + "scale": 1.0, + "scale_filter": "nearest", + "transform": "normal", + "adaptive_sync_status": "disabled", + "current_workspace": "2", + "current_mode": { + "width": 640, + "height": 480, + "refresh": 60102, + "picture_aspect_ratio": "none" + }, + "max_render_time": 0, + "allow_tearing": false, + "focused": false, + "subpixel_hinting": "unknown" + } +] diff --git a/documentation/PER_DEVICE_DOCUMENTATION/AMD64/SUPPORTED_EMULATORS_AND_CORES.md b/documentation/PER_DEVICE_DOCUMENTATION/AMD64/SUPPORTED_EMULATORS_AND_CORES.md index 16c1bd8dcdb..3e2dcbf8b39 100644 --- a/documentation/PER_DEVICE_DOCUMENTATION/AMD64/SUPPORTED_EMULATORS_AND_CORES.md +++ b/documentation/PER_DEVICE_DOCUMENTATION/AMD64/SUPPORTED_EMULATORS_AND_CORES.md @@ -121,7 +121,7 @@ |SNK|Neo Geo Pocket (ngp)|1998|`ngp`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
**ares:** ares-sa
| |SNK|Neo Geo Pocket Color (ngpc)|1999|`ngpc`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
**ares:** ares-sa
| |Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** pcsx_rearmed (default)
**retroarch:** beetle_psx
**mednafen:** psx
**duckstation:** duckstation-sa
**retroarch:** swanstation
| -|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**yaps2:** yaps2-sa (default)
| +|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**armsx2:** armsx2-sa (default)
| |Sony|PlayStation Portable (psp)|2004|`psp`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| |Sony|PlayStation Vita (psvita)|2011|`psvita`|.pkg .psvita .zip|**vita3k:** vita3k-sa (default)
| |Sony|PSP Minis (pspminis)|2004|`pspminis`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| diff --git a/documentation/PER_DEVICE_DOCUMENTATION/S922X/SUPPORTED_EMULATORS_AND_CORES.md b/documentation/PER_DEVICE_DOCUMENTATION/S922X/SUPPORTED_EMULATORS_AND_CORES.md index e94ec8315b1..2d750ea0bbe 100644 --- a/documentation/PER_DEVICE_DOCUMENTATION/S922X/SUPPORTED_EMULATORS_AND_CORES.md +++ b/documentation/PER_DEVICE_DOCUMENTATION/S922X/SUPPORTED_EMULATORS_AND_CORES.md @@ -118,7 +118,7 @@ |SNK|Neo Geo Pocket (ngp)|1998|`ngp`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
| |SNK|Neo Geo Pocket Color (ngpc)|1999|`ngpc`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
| |Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** pcsx_rearmed (default)
**retroarch:** beetle_psx
**retroarch:** duckstation
**duckstation:** duckstation-sa
**retroarch:** swanstation
| -|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**yaps2:** yaps2-sa
| +|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**armsx2:** armsx2-sa
| |Sony|PlayStation Portable (psp)|2004|`psp`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| |Sony|PlayStation Vita (psvita)|2011|`psvita`|.pkg .psvita .zip|**vita3k:** vita3k-sa (default)
| |Sony|PSP Minis (pspminis)|2004|`pspminis`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| diff --git a/documentation/PER_DEVICE_DOCUMENTATION/SM6115/SUPPORTED_EMULATORS_AND_CORES.md b/documentation/PER_DEVICE_DOCUMENTATION/SM6115/SUPPORTED_EMULATORS_AND_CORES.md index 5e25bdbe074..911ac880683 100644 --- a/documentation/PER_DEVICE_DOCUMENTATION/SM6115/SUPPORTED_EMULATORS_AND_CORES.md +++ b/documentation/PER_DEVICE_DOCUMENTATION/SM6115/SUPPORTED_EMULATORS_AND_CORES.md @@ -119,7 +119,7 @@ |SNK|Neo Geo Pocket (ngp)|1998|`ngp`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
| |SNK|Neo Geo Pocket Color (ngpc)|1999|`ngpc`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
| |Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** pcsx_rearmed (default)
**retroarch:** pcsx_rearmed32
**retroarch:** beetle_psx
**mednafen:** psx
**retroarch:** duckstation
**duckstation:** duckstation-sa
**retroarch:** swanstation
| -|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**yaps2:** yaps2-sa
| +|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**armsx2:** armsx2-sa
| |Sony|PlayStation Portable (psp)|2004|`psp`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| |Sony|PlayStation Vita (psvita)|2011|`psvita`|.pkg .psvita .zip|**vita3k:** vita3k-sa (default)
| |Sony|PSP Minis (pspminis)|2004|`pspminis`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| diff --git a/documentation/PER_DEVICE_DOCUMENTATION/SM8250/SUPPORTED_EMULATORS_AND_CORES.md b/documentation/PER_DEVICE_DOCUMENTATION/SM8250/SUPPORTED_EMULATORS_AND_CORES.md index 6f01f63fd9a..7776402bd6d 100644 --- a/documentation/PER_DEVICE_DOCUMENTATION/SM8250/SUPPORTED_EMULATORS_AND_CORES.md +++ b/documentation/PER_DEVICE_DOCUMENTATION/SM8250/SUPPORTED_EMULATORS_AND_CORES.md @@ -123,7 +123,7 @@ |SNK|Neo Geo Pocket (ngp)|1998|`ngp`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
| |SNK|Neo Geo Pocket Color (ngpc)|1999|`ngpc`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
| |Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** pcsx_rearmed32 (default)
**retroarch:** pcsx_rearmed
**retroarch:** beetle_psx
**mednafen:** psx
**retroarch:** duckstation
**duckstation:** duckstation-sa
**retroarch:** swanstation
| -|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**yaps2:** yaps2-sa
| +|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**armsx2:** armsx2-sa
| |Sony|PlayStation 3 (ps3)|2006|`ps3`|.ps3 .psn .m3u|**rpcs3:** rpcs3-sa (default)
| |Sony|PlayStation Portable (psp)|2004|`psp`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| |Sony|PlayStation Vita (psvita)|2011|`psvita`|.pkg .psvita .zip|**vita3k:** vita3k-sa (default)
| diff --git a/documentation/PER_DEVICE_DOCUMENTATION/SM8550/SUPPORTED_EMULATORS_AND_CORES.md b/documentation/PER_DEVICE_DOCUMENTATION/SM8550/SUPPORTED_EMULATORS_AND_CORES.md index 2a8412fb6ae..3dda4ff5a76 100644 --- a/documentation/PER_DEVICE_DOCUMENTATION/SM8550/SUPPORTED_EMULATORS_AND_CORES.md +++ b/documentation/PER_DEVICE_DOCUMENTATION/SM8550/SUPPORTED_EMULATORS_AND_CORES.md @@ -124,7 +124,7 @@ |SNK|Neo Geo Pocket (ngp)|1998|`ngp`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
**ares:** ares-sa
| |SNK|Neo Geo Pocket Color (ngpc)|1999|`ngpc`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
**ares:** ares-sa
| |Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** pcsx_rearmed32 (default)
**retroarch:** pcsx_rearmed
**retroarch:** beetle_psx
**mednafen:** psx
**retroarch:** duckstation
**duckstation:** duckstation-sa
**retroarch:** swanstation
| -|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**yaps2:** yaps2-sa
**armsx2:** armsx2-sa
| +|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**armsx2:** armsx2-sa
| |Sony|PlayStation 3 (ps3)|2006|`ps3`|.ps3 .psn .m3u .iso|**rpcs3:** rpcs3-sa (default)
| |Sony|PlayStation Portable (psp)|2004|`psp`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| |Sony|PlayStation Vita (psvita)|2011|`psvita`|.pkg .psvita .zip|**vita3k:** vita3k-sa (default)
| diff --git a/documentation/PER_DEVICE_DOCUMENTATION/SM8650/SUPPORTED_EMULATORS_AND_CORES.md b/documentation/PER_DEVICE_DOCUMENTATION/SM8650/SUPPORTED_EMULATORS_AND_CORES.md index 2e6b3ace0c4..7a5824a2cdb 100644 --- a/documentation/PER_DEVICE_DOCUMENTATION/SM8650/SUPPORTED_EMULATORS_AND_CORES.md +++ b/documentation/PER_DEVICE_DOCUMENTATION/SM8650/SUPPORTED_EMULATORS_AND_CORES.md @@ -123,7 +123,7 @@ |SNK|Neo Geo Pocket (ngp)|1998|`ngp`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
**ares:** ares-sa
| |SNK|Neo Geo Pocket Color (ngpc)|1999|`ngpc`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
**ares:** ares-sa
| |Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** pcsx_rearmed (default)
**retroarch:** beetle_psx
**mednafen:** psx
**retroarch:** duckstation
**duckstation:** duckstation-sa
**retroarch:** swanstation
| -|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**yaps2:** yaps2-sa
| +|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**armsx2:** armsx2-sa
| |Sony|PlayStation 3 (ps3)|2006|`ps3`|.ps3 .psn .m3u|**rpcs3:** rpcs3-sa (default)
| |Sony|PlayStation Portable (psp)|2004|`psp`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| |Sony|PlayStation Vita (psvita)|2011|`psvita`|.pkg .psvita .zip|**vita3k:** vita3k-sa (default)
| diff --git a/documentation/PER_DEVICE_DOCUMENTATION/SM8750/SUPPORTED_EMULATORS_AND_CORES.md b/documentation/PER_DEVICE_DOCUMENTATION/SM8750/SUPPORTED_EMULATORS_AND_CORES.md index 2e6b3ace0c4..7a5824a2cdb 100644 --- a/documentation/PER_DEVICE_DOCUMENTATION/SM8750/SUPPORTED_EMULATORS_AND_CORES.md +++ b/documentation/PER_DEVICE_DOCUMENTATION/SM8750/SUPPORTED_EMULATORS_AND_CORES.md @@ -123,7 +123,7 @@ |SNK|Neo Geo Pocket (ngp)|1998|`ngp`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
**ares:** ares-sa
| |SNK|Neo Geo Pocket Color (ngpc)|1999|`ngpc`|.ngp .ngc .zip .7z|**retroarch:** beetle_ngp (default)
**retroarch:** race
**mednafen:** ngp
**ares:** ares-sa
| |Sony|PlayStation (psx)|1994|`psx`|.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd .chd .iso|**retroarch:** pcsx_rearmed (default)
**retroarch:** beetle_psx
**mednafen:** psx
**retroarch:** duckstation
**duckstation:** duckstation-sa
**retroarch:** swanstation
| -|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**yaps2:** yaps2-sa
| +|Sony|PlayStation 2 (ps2)|2000|`ps2`|.iso .mdf .nrg .bin .img .dump .gz .cso .chd|**aethersx2:** aethersx2-sa (default)
**armsx2:** armsx2-sa
| |Sony|PlayStation 3 (ps3)|2006|`ps3`|.ps3 .psn .m3u|**rpcs3:** rpcs3-sa (default)
| |Sony|PlayStation Portable (psp)|2004|`psp`|.iso .cso .pbp .chd|**ppsspp:** ppsspp-sa (default)
**retroarch:** ppsspp
| |Sony|PlayStation Vita (psvita)|2011|`psvita`|.pkg .psvita .zip|**vita3k:** vita3k-sa (default)
| diff --git a/log.txt b/log.txt new file mode 100644 index 00000000000..08a5bc4a317 --- /dev/null +++ b/log.txt @@ -0,0 +1,1214 @@ +wineserver: NTSync up and running! +xkbregistry: ERROR: Entity: line 26: parser error : Content error in the external subset +xkbregistry: ERROR: +xkbregistry: ERROR: ^ +xkbregistry: ERROR: Failed to load DTD +xkbregistry: ERROR: XML error: failed to validate document at /usr/share/X11/xkb/rules/evdev.xml +[2026-07-28 19:54:46.061] [MANGOHUD] [info] [cpu.cpp:636] hwmon: using input: /sys/class/hwmon/hwmon19/temp1_input +xkbregistry: ERROR: Entity: line 26: parser error : Content error in the external subset +xkbregistry: ERROR: +xkbregistry: ERROR: ^ +xkbregistry: ERROR: Failed to load DTD +xkbregistry: ERROR: XML error: failed to validate document at /usr/share/X11/xkb/rules/evdev.xml +warn: D3D11CreateDevice: Unsupported driver type 3, Flags 0 +info: Game: Octopath_Traveler2-Win64-Shipping.exe +info: DXVK: v3.0.2 +info: Build: x86_64 gcc 16.1.0 +info: Vulkan: Found vkGetInstanceProcAddr in winevulkan.dll @ 0x6ffffb0f7f80 +info: Extension providers: +info: Platform WSI +info: OpenVR +info: OpenVR: could not open registry key, status 2 +info: OpenVR: Failed to locate module +info: OpenXR +info: Enabled instance extensions: +info: VK_KHR_get_surface_capabilities2 +info: VK_KHR_surface +info: VK_KHR_surface_maintenance1 +info: VK_KHR_win32_surface +[2026-07-28 19:54:52.347] [MANGOHUD] [info] [cpu.cpp:636] hwmon: using input: /sys/class/hwmon/hwmon19/temp1_input +info: Found device: Turnip Adreno (TM) 740 (turnip Mesa driver 26.2.0) +info: Creating device: +info: Creating device: +info: Turnip Adreno (TM) 740: +info: Driver : turnip Mesa driver 26.2.0 +info: Queues: +info: Graphics : (0, 0) +info: Transfer : (0, 0) +info: Sparse : (0, 0) +info: Memory: +info: Heap 0: 8.39 GiB (DEVICE_LOCAL) +info: Budget: 7.45 GiB +info: Type 0: DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT +info: Type 1: DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT | HOST_CACHED +info: Type 2: DEVICE_LOCAL | HOST_VISIBLE | HOST_CACHED +info: Type 3: DEVICE_LOCAL | LAZILY_ALLOCATED +info: Enabled extensions: +info: VK_EXT_attachment_feedback_loop_layout +info: VK_EXT_border_color_swizzle +info: VK_EXT_conservative_rasterization +info: VK_EXT_custom_border_color +info: VK_EXT_depth_clip_enable +info: VK_EXT_dynamic_rendering_unused_attachments +info: VK_EXT_extended_dynamic_state3 +info: VK_EXT_graphics_pipeline_library +info: VK_EXT_hdr_metadata +info: VK_EXT_line_rasterization +info: VK_EXT_multi_draw +info: VK_EXT_non_seamless_cube_map +info: VK_EXT_robustness2 +info: VK_EXT_sample_locations +info: VK_EXT_shader_module_identifier +info: VK_EXT_shader_stencil_export +info: VK_EXT_transform_feedback +info: VK_EXT_vertex_attribute_divisor +info: VK_KHR_dynamic_rendering_local_read +info: VK_KHR_external_memory_win32 +info: VK_KHR_external_semaphore_win32 +info: VK_KHR_load_store_op_none +info: VK_KHR_maintenance5 +info: VK_KHR_maintenance6 +info: VK_KHR_maintenance7 +info: VK_KHR_maintenance8 +info: VK_KHR_maintenance9 +info: VK_KHR_pipeline_library +info: VK_KHR_present_id +info: VK_KHR_present_wait +info: VK_KHR_shader_float_controls2 +info: VK_KHR_shader_subgroup_uniform_control_flow +info: VK_KHR_swapchain +info: VK_KHR_swapchain_maintenance1 +info: VK_KHR_swapchain_mutable_format +info: VK_KHR_unified_image_layouts +info: VK_KHR_win32_keyed_mutex +info: Enabled features: +info: depthBiasClamp : 1 +info: depthBounds : 1 +info: depthClamp : 1 +info: drawIndirectFirstInstance : 1 +info: dualSrcBlend : 1 +info: fillModeNonSolid : 1 +info: fragmentStoresAndAtomics : 1 +info: fullDrawIndexUint32 : 1 +info: geometryShader : 1 +info: imageCubeArray : 1 +info: independentBlend : 1 +info: largePoints : 1 +info: logicOp : 1 +info: multiDrawIndirect : 1 +info: multiViewport : 1 +info: occlusionQueryPrecise : 1 +info: pipelineStatisticsQuery : 1 +info: robustBufferAccess : 1 +info: sampleRateShading : 1 +info: samplerAnisotropy : 1 +info: shaderClipDistance : 1 +info: shaderCullDistance : 1 +info: shaderFloat64 : 0 +info: shaderImageGatherExtended : 1 +info: shaderInt16 : 1 +info: shaderInt64 : 1 +info: shaderUniformBufferArrayDynamicIndexing : 1 +info: shaderSampledImageArrayDynamicIndexing : 1 +info: shaderStorageBufferArrayDynamicIndexing : 1 +info: shaderStorageImageArrayDynamicIndexing : 1 +info: sparseBinding : 0 +info: sparseResidencyBuffer : 0 +info: sparseResidencyImage2D : 0 +info: sparseResidencyImage3D : 0 +info: sparseResidency2Samples : 0 +info: sparseResidency4Samples : 0 +info: sparseResidency8Samples : 0 +info: sparseResidency16Samples : 0 +info: sparseResidencyAliased : 0 +info: shaderResourceResidency : 1 +info: shaderResourceMinLod : 1 +info: tessellationShader : 1 +info: textureCompressionBC : 1 +info: variableMultisampleRate : 1 +info: vertexPipelineStoresAndAtomics : 1 +info: wideLines : 1 +info: shaderDrawParameters : 1 +info: storageBuffer16BitAccess : 1 +info: storagePushConstant16 : 0 +info: bufferDeviceAddress : 1 +info: descriptorIndexing : 1 +info: storageBuffer8BitAccess : 1 +info: storagePushConstant8 : 0 +info: shaderUniformTexelBufferArrayDynamicIndexing : 1 +info: shaderStorageTexelBufferArrayDynamicIndexing : 1 +info: shaderUniformBufferArrayNonUniformIndexing : 1 +info: shaderSampledImageArrayNonUniformIndexing : 1 +info: shaderStorageBufferArrayNonUniformIndexing : 1 +info: shaderStorageImageArrayNonUniformIndexing : 1 +info: shaderUniformTexelBufferArrayNonUniformIndexing : 1 +info: shaderStorageTexelBufferArrayNonUniformIndexing : 1 +info: descriptorBindingSampledImageUpdateAfterBind : 1 +info: descriptorBindingUpdateUnusedWhilePending : 1 +info: descriptorBindingPartiallyBound : 1 +info: drawIndirectCount : 1 +info: hostQueryReset : 1 +info: runtimeDescriptorArray : 1 +info: samplerFilterMinmax : 1 +info: samplerMirrorClampToEdge : 1 +info: scalarBlockLayout : 1 +info: shaderFloat16 : 1 +info: shaderInt8 : 1 +info: shaderOutputViewportIndex : 1 +info: shaderOutputLayer : 1 +info: timelineSemaphore : 1 +info: uniformBufferStandardLayout : 1 +info: vulkanMemoryModel : 1 +info: inlineUniformBlock : 1 +info: computeFullSubgroups : 1 +info: dynamicRendering : 1 +info: maintenance4 : 1 +info: robustImageAccess : 0 +info: pipelineCreationCacheControl : 1 +info: shaderDemoteToHelperInvocation : 1 +info: shaderZeroInitializeWorkgroupMemory : 1 +info: subgroupSizeControl : 1 +info: synchronization2 : 1 +info: VK_EXT_attachment_feedback_loop_layout: +info: attachmentFeedbackLoopLayout : 1 +info: VK_EXT_border_color_swizzle: +info: borderColorSwizzle : 1 +info: borderColorSwizzleFromImage : 1 +info: VK_EXT_conservative_rasterization: +info: extConservativeRasterization : 1 +info: VK_EXT_custom_border_color: +info: customBorderColors : 1 +info: customBorderColorWithoutFormat : 1 +info: VK_EXT_depth_clip_enable: +info: depthClipEnable : 1 +info: VK_EXT_depth_bias_control: +info: depthBiasControl : 0 +info: leastRepresentableValueForceUnormRepresentation : 0 +info: floatRepresentation : 0 +info: depthBiasExact : 0 +info: VK_EXT_descriptor_buffer: +info: descriptorBuffer : 0 +info: VK_EXT_descriptor_heap: +info: descriptorHeap : 0 +info: VK_EXT_dynamic_rendering_unused_attachments: +info: dynamicRenderingUnusedAttachments : 1 +info: VK_EXT_extended_dynamic_state3: +info: extendedDynamicState3AlphaToCoverageEnable : 1 +info: extendedDynamicState3DepthClipEnable : 1 +info: extendedDynamicState3RasterizationSamples : 1 +info: extendedDynamicState3SampleMask : 1 +info: extendedDynamicState3LineRasterizationMode : 1 +info: extendedDynamicState3SampleLocationsEnable : 1 +info: VK_EXT_fragment_shader_interlock: +info: fragmentShaderSampleInterlock : 0 +info: fragmentShaderPixelInterlock : 0 +info: VK_EXT_full_screen_exclusive: +info: extFullScreenExclusive : 0 +info: VK_EXT_graphics_pipeline_library: +info: graphicsPipelineLibrary : 1 +info: VK_EXT_hdr_metadata: +info: extHdrMetadata : 1 +info: VK_EXT_line_rasterization: +info: rectangularLines : 1 +info: smoothLines : 0 +info: VK_EXT_memory_budget: +info: extMemoryBudget : 1 +info: VK_EXT_memory_priority: +info: memoryPriority : 0 +info: VK_EXT_multi_draw: +info: multiDraw : 1 +info: VK_EXT_non_seamless_cube_map: +info: nonSeamlessCubeMap : 1 +info: VK_EXT_pageable_device_local_memory: +info: pageableDeviceLocalMemory : 0 +info: VK_EXT_robustness2: +info: robustBufferAccess2 : 1 +info: robustImageAccess2 : 1 +info: nullDescriptor : 1 +info: VK_EXT_sample_locations: +info: extSampleLocations : 1 +info: VK_EXT_shader_module_identifier: +info: shaderModuleIdentifier : 1 +info: VK_EXT_shader_stencil_export: +info: extShaderStencilExport : 1 +info: VK_EXT_swapchain_colorspace: +info: extSwapchainColorSpace : 0 +info: VK_EXT_swapchain_maintenance1: +info: swapchainMaintenance1 : 0 +info: VK_EXT_transform_feedback: +info: transformFeedback : 1 +info: geometryStreams : 1 +info: VK_EXT_vertex_attribute_divisor: +info: vertexAttributeInstanceRateDivisor : 1 +info: vertexAttributeInstanceRateZeroDivisor : 1 +info: VK_KHR_device_fault: +info: deviceFault : 0 +info: deviceFaultVendorBinary : 0 +info: VK_KHR_dynamic_rendering_local_read: +info: dynamicRenderingLocalRead : 1 +info: VK_KHR_external_memory_win32: +info: khrExternalMemoryWin32 : 1 +info: VK_KHR_external_semaphore_win32: +info: khrExternalSemaphoreWin32 : 1 +info: VK_KHR_load_store_op_none: +info: khrLoadStoreOpNone : 1 +info: VK_KHR_maintenance5: +info: maintenance5 : 1 +info: VK_KHR_maintenance6: +info: maintenance6 : 1 +info: VK_KHR_maintenance7: +info: maintenance7 : 1 +info: VK_KHR_maintenance8: +info: maintenance8 : 1 +info: VK_KHR_maintenance9: +info: maintenance9 : 1 +info: VK_KHR_maintenance10: +info: maintenance10 : 0 +info: VK_KHR_maintenance11: +info: maintenance11 : 0 +info: VK_KHR_pipeline_library: +info: khrPipelineLibrary : 1 +info: VK_KHR_present_id: +info: presentId : 1 +info: VK_KHR_present_id2: +info: presentId2 : 0 +info: VK_KHR_present_wait: +info: presentWait : 1 +info: VK_KHR_present_wait2: +info: presentWait2 : 0 +info: VK_KHR_shader_float_controls2: +info: shaderFloatControls2 : 1 +info: VK_KHR_shader_subgroup_uniform_control_flow: +info: shaderSubgroupUniformControlFlow : 1 +info: VK_KHR_shader_untyped_pointers: +info: shaderUntypedPointers : 0 +info: VK_KHR_swapchain: +info: khrSwapchain : 1 +info: VK_KHR_swapchain_maintenance1: +info: swapchainMaintenance1 : 1 +info: VK_KHR_swapchain_mutable_format: +info: khrSwapchainMutableFormat : 1 +info: VK_KHR_unified_image_layouts: +info: unifiedImageLayouts : 1 +info: VK_KHR_win32_keyed_mutex: +info: khrWin32KeyedMutex : 1 +info: VK_AMD_buffer_marker: +info: amdBufferMarker : 0 +info: VK_NV_device_diagnostic_checkpoints: +info: nvDeviceDiagnosticCheckpoints : 0 +info: VK_NV_low_latency2: +info: nvLowLatency2 : 0 +info: VK_NV_raw_access_chains: +info: shaderRawAccessChains : 0 +info: VK_NVX_binary_import: +info: nvxBinaryImport : 0 +info: VK_NVX_image_view_handle: +info: nvxImageViewHandle : 0 +info: Turnip Adreno (TM) 740: +info: Driver : turnip Mesa driver 26.2.0 +info: Queues: +info: Graphics : (0, 0) +info: Transfer : (0, 0) +info: Sparse : (0, 0) +info: Memory: +info: Heap 0: 8.39 GiB (DEVICE_LOCAL) +info: Budget: 7.45 GiB +info: Type 0: DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT +info: Type 1: DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT | HOST_CACHED +info: Type 2: DEVICE_LOCAL | HOST_VISIBLE | HOST_CACHED +info: Type 3: DEVICE_LOCAL | LAZILY_ALLOCATED +info: Enabled extensions: +info: VK_EXT_attachment_feedback_loop_layout +info: VK_EXT_border_color_swizzle +info: VK_EXT_conservative_rasterization +info: VK_EXT_custom_border_color +info: VK_EXT_depth_clip_enable +info: VK_EXT_dynamic_rendering_unused_attachments +info: VK_EXT_extended_dynamic_state3 +info: VK_EXT_graphics_pipeline_library +info: VK_EXT_hdr_metadata +info: VK_EXT_line_rasterization +info: VK_EXT_multi_draw +info: VK_EXT_non_seamless_cube_map +info: VK_EXT_robustness2 +info: VK_EXT_sample_locations +info: VK_EXT_shader_module_identifier +info: VK_EXT_shader_stencil_export +info: VK_EXT_transform_feedback +info: VK_EXT_vertex_attribute_divisor +info: VK_KHR_dynamic_rendering_local_read +info: VK_KHR_external_memory_win32 +info: VK_KHR_external_semaphore_win32 +info: VK_KHR_load_store_op_none +info: VK_KHR_maintenance5 +info: VK_KHR_maintenance6 +info: VK_KHR_maintenance7 +info: VK_KHR_maintenance8 +info: VK_KHR_maintenance9 +info: VK_KHR_pipeline_library +info: VK_KHR_present_id +info: VK_KHR_present_wait +info: VK_KHR_shader_float_controls2 +info: VK_KHR_shader_subgroup_uniform_control_flow +info: VK_KHR_swapchain +info: VK_KHR_swapchain_maintenance1 +info: VK_KHR_swapchain_mutable_format +info: VK_KHR_unified_image_layouts +info: VK_KHR_win32_keyed_mutex +info: Enabled features: +info: depthBiasClamp : 1 +info: depthBounds : 1 +info: depthClamp : 1 +info: drawIndirectFirstInstance : 1 +info: dualSrcBlend : 1 +info: fillModeNonSolid : 1 +info: fragmentStoresAndAtomics : 1 +info: fullDrawIndexUint32 : 1 +info: geometryShader : 1 +info: imageCubeArray : 1 +info: independentBlend : 1 +info: largePoints : 1 +info: logicOp : 1 +info: multiDrawIndirect : 1 +info: multiViewport : 1 +info: occlusionQueryPrecise : 1 +info: pipelineStatisticsQuery : 1 +info: robustBufferAccess : 1 +info: sampleRateShading : 1 +info: samplerAnisotropy : 1 +info: shaderClipDistance : 1 +info: shaderCullDistance : 1 +info: shaderFloat64 : 0 +info: shaderImageGatherExtended : 1 +info: shaderInt16 : 1 +info: shaderInt64 : 1 +info: shaderUniformBufferArrayDynamicIndexing : 1 +info: shaderSampledImageArrayDynamicIndexing : 1 +info: shaderStorageBufferArrayDynamicIndexing : 1 +info: shaderStorageImageArrayDynamicIndexing : 1 +info: sparseBinding : 0 +info: sparseResidencyBuffer : 0 +info: sparseResidencyImage2D : 0 +info: sparseResidencyImage3D : 0 +info: sparseResidency2Samples : 0 +info: sparseResidency4Samples : 0 +info: sparseResidency8Samples : 0 +info: sparseResidency16Samples : 0 +info: sparseResidencyAliased : 0 +info: shaderResourceResidency : 1 +info: shaderResourceMinLod : 1 +info: tessellationShader : 1 +info: textureCompressionBC : 1 +info: variableMultisampleRate : 1 +info: vertexPipelineStoresAndAtomics : 1 +info: wideLines : 1 +info: shaderDrawParameters : 1 +info: storageBuffer16BitAccess : 1 +info: storagePushConstant16 : 0 +info: bufferDeviceAddress : 1 +info: descriptorIndexing : 1 +info: storageBuffer8BitAccess : 1 +info: storagePushConstant8 : 0 +info: shaderUniformTexelBufferArrayDynamicIndexing : 1 +info: shaderStorageTexelBufferArrayDynamicIndexing : 1 +info: shaderUniformBufferArrayNonUniformIndexing : 1 +info: shaderSampledImageArrayNonUniformIndexing : 1 +info: shaderStorageBufferArrayNonUniformIndexing : 1 +info: shaderStorageImageArrayNonUniformIndexing : 1 +info: shaderUniformTexelBufferArrayNonUniformIndexing : 1 +info: shaderStorageTexelBufferArrayNonUniformIndexing : 1 +info: descriptorBindingSampledImageUpdateAfterBind : 1 +info: descriptorBindingUpdateUnusedWhilePending : 1 +info: descriptorBindingPartiallyBound : 1 +info: drawIndirectCount : 1 +info: hostQueryReset : 1 +info: runtimeDescriptorArray : 1 +info: samplerFilterMinmax : 1 +info: samplerMirrorClampToEdge : 1 +info: scalarBlockLayout : 1 +info: shaderFloat16 : 1 +info: shaderInt8 : 1 +info: shaderOutputViewportIndex : 1 +info: shaderOutputLayer : 1 +info: timelineSemaphore : 1 +info: uniformBufferStandardLayout : 1 +info: vulkanMemoryModel : 1 +info: inlineUniformBlock : 1 +info: computeFullSubgroups : 1 +info: dynamicRendering : 1 +info: maintenance4 : 1 +info: robustImageAccess : 0 +info: pipelineCreationCacheControl : 1 +info: shaderDemoteToHelperInvocation : 1 +info: shaderZeroInitializeWorkgroupMemory : 1 +info: subgroupSizeControl : 1 +info: synchronization2 : 1 +info: VK_EXT_attachment_feedback_loop_layout: +info: attachmentFeedbackLoopLayout : 1 +info: VK_EXT_border_color_swizzle: +info: borderColorSwizzle : 1 +info: borderColorSwizzleFromImage : 1 +info: VK_EXT_conservative_rasterization: +info: extConservativeRasterization : 1 +info: VK_EXT_custom_border_color: +info: customBorderColors : 1 +info: customBorderColorWithoutFormat : 1 +info: VK_EXT_depth_clip_enable: +info: depthClipEnable : 1 +info: VK_EXT_depth_bias_control: +info: depthBiasControl : 0 +info: leastRepresentableValueForceUnormRepresentation : 0 +info: floatRepresentation : 0 +info: depthBiasExact : 0 +info: VK_EXT_descriptor_buffer: +info: descriptorBuffer : 0 +info: VK_EXT_descriptor_heap: +info: descriptorHeap : 0 +info: VK_EXT_dynamic_rendering_unused_attachments: +info: dynamicRenderingUnusedAttachments : 1 +info: VK_EXT_extended_dynamic_state3: +info: extendedDynamicState3AlphaToCoverageEnable : 1 +info: extendedDynamicState3DepthClipEnable : 1 +info: extendedDynamicState3RasterizationSamples : 1 +info: extendedDynamicState3SampleMask : 1 +info: extendedDynamicState3LineRasterizationMode : 1 +info: extendedDynamicState3SampleLocationsEnable : 1 +info: VK_EXT_fragment_shader_interlock: +info: fragmentShaderSampleInterlock : 0 +info: fragmentShaderPixelInterlock : 0 +info: VK_EXT_full_screen_exclusive: +info: extFullScreenExclusive : 0 +info: VK_EXT_graphics_pipeline_library: +info: graphicsPipelineLibrary : 1 +info: VK_EXT_hdr_metadata: +info: extHdrMetadata : 1 +info: VK_EXT_line_rasterization: +info: rectangularLines : 1 +info: smoothLines : 0 +info: VK_EXT_memory_budget: +info: extMemoryBudget : 1 +info: VK_EXT_memory_priority: +info: memoryPriority : 0 +info: VK_EXT_multi_draw: +info: multiDraw : 1 +info: VK_EXT_non_seamless_cube_map: +info: nonSeamlessCubeMap : 1 +info: VK_EXT_pageable_device_local_memory: +info: pageableDeviceLocalMemory : 0 +info: VK_EXT_robustness2: +info: robustBufferAccess2 : 1 +info: robustImageAccess2 : 1 +info: nullDescriptor : 1 +info: VK_EXT_sample_locations: +info: extSampleLocations : 1 +info: VK_EXT_shader_module_identifier: +info: shaderModuleIdentifier : 1 +info: VK_EXT_shader_stencil_export: +info: extShaderStencilExport : 1 +info: VK_EXT_swapchain_colorspace: +info: extSwapchainColorSpace : 0 +info: VK_EXT_swapchain_maintenance1: +info: swapchainMaintenance1 : 0 +info: VK_EXT_transform_feedback: +info: transformFeedback : 1 +info: geometryStreams : 1 +info: VK_EXT_vertex_attribute_divisor: +info: vertexAttributeInstanceRateDivisor : 1 +info: vertexAttributeInstanceRateZeroDivisor : 1 +info: VK_KHR_device_fault: +info: deviceFault : 0 +info: deviceFaultVendorBinary : 0 +info: VK_KHR_dynamic_rendering_local_read: +info: dynamicRenderingLocalRead : 1 +info: VK_KHR_external_memory_win32: +info: khrExternalMemoryWin32 : 1 +info: VK_KHR_external_semaphore_win32: +info: khrExternalSemaphoreWin32 : 1 +info: VK_KHR_load_store_op_none: +info: khrLoadStoreOpNone : 1 +info: VK_KHR_maintenance5: +info: maintenance5 : 1 +info: VK_KHR_maintenance6: +info: maintenance6 : 1 +info: VK_KHR_maintenance7: +info: maintenance7 : 1 +info: VK_KHR_maintenance8: +info: maintenance8 : 1 +info: VK_KHR_maintenance9: +info: maintenance9 : 1 +info: VK_KHR_maintenance10: +info: maintenance10 : 0 +info: VK_KHR_maintenance11: +info: maintenance11 : 0 +info: VK_KHR_pipeline_library: +info: khrPipelineLibrary : 1 +info: VK_KHR_present_id: +info: presentId : 1 +info: VK_KHR_present_id2: +info: presentId2 : 0 +info: VK_KHR_present_wait: +info: presentWait : 1 +info: VK_KHR_present_wait2: +info: presentWait2 : 0 +info: VK_KHR_shader_float_controls2: +info: shaderFloatControls2 : 1 +info: VK_KHR_shader_subgroup_uniform_control_flow: +info: shaderSubgroupUniformControlFlow : 1 +info: VK_KHR_shader_untyped_pointers: +info: shaderUntypedPointers : 0 +info: VK_KHR_swapchain: +info: khrSwapchain : 1 +info: VK_KHR_swapchain_maintenance1: +info: swapchainMaintenance1 : 1 +info: VK_KHR_swapchain_mutable_format: +info: khrSwapchainMutableFormat : 1 +info: VK_KHR_unified_image_layouts: +info: unifiedImageLayouts : 1 +info: VK_KHR_win32_keyed_mutex: +info: khrWin32KeyedMutex : 1 +info: VK_AMD_buffer_marker: +info: amdBufferMarker : 0 +info: VK_NV_device_diagnostic_checkpoints: +info: nvDeviceDiagnosticCheckpoints : 0 +info: VK_NV_low_latency2: +info: nvLowLatency2 : 0 +info: VK_NV_raw_access_chains: +info: shaderRawAccessChains : 0 +info: VK_NVX_binary_import: +info: nvxBinaryImport : 0 +info: VK_NVX_image_view_handle: +info: nvxImageViewHandle : 0 +info: Memory type mask for buffer resources: 0x7, usage: 0x219ff +info: Memory type mask for buffer resources: 0x7, usage: 0x219ff +info: Graphics pipeline libraries supported +info: Graphics pipeline libraries supported +info: Binding model: Legacy +info: Binding model: Legacy +info: D3D11InternalCreateDevice: Maximum supported feature level: D3D_FEATURE_LEVEL_11_1 +info: D3D11InternalCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0 +info: D3D11InternalCreateDevice: Maximum supported feature level: D3D_FEATURE_LEVEL_11_1 +info: D3D11InternalCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0 +warn: D3D11DXGIDevice::QueryInterface: Unknown interface query +warn: 0ec870a6-5d7e-4c22-8cfc-5baae07616ed +err: readMonitorEdidFromKey: Failed to get EDID reg key size +err: DXGI: Failed to parse display metadata + colorimetry info, using blank. +info: Creating device: +info: Turnip Adreno (TM) 740: +info: Driver : turnip Mesa driver 26.2.0 +info: Queues: +info: Graphics : (0, 0) +info: Transfer : (0, 0) +info: Sparse : (0, 0) +info: Memory: +info: Heap 0: 8.39 GiB (DEVICE_LOCAL) +info: Budget: 7.41 GiB +info: Type 0: DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT +info: Type 1: DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT | HOST_CACHED +info: Type 2: DEVICE_LOCAL | HOST_VISIBLE | HOST_CACHED +info: Type 3: DEVICE_LOCAL | LAZILY_ALLOCATED +info: Enabled extensions: +info: VK_EXT_attachment_feedback_loop_layout +info: VK_EXT_border_color_swizzle +info: VK_EXT_conservative_rasterization +info: VK_EXT_custom_border_color +info: VK_EXT_depth_clip_enable +info: VK_EXT_dynamic_rendering_unused_attachments +info: VK_EXT_extended_dynamic_state3 +info: VK_EXT_graphics_pipeline_library +info: VK_EXT_hdr_metadata +info: VK_EXT_line_rasterization +info: VK_EXT_multi_draw +info: VK_EXT_non_seamless_cube_map +info: VK_EXT_robustness2 +info: VK_EXT_sample_locations +info: VK_EXT_shader_module_identifier +info: VK_EXT_shader_stencil_export +info: VK_EXT_transform_feedback +info: VK_EXT_vertex_attribute_divisor +info: VK_KHR_dynamic_rendering_local_read +info: VK_KHR_external_memory_win32 +info: VK_KHR_external_semaphore_win32 +info: VK_KHR_load_store_op_none +info: VK_KHR_maintenance5 +info: VK_KHR_maintenance6 +info: VK_KHR_maintenance7 +info: VK_KHR_maintenance8 +info: VK_KHR_maintenance9 +info: VK_KHR_pipeline_library +info: VK_KHR_present_id +info: VK_KHR_present_wait +info: VK_KHR_shader_float_controls2 +info: VK_KHR_shader_subgroup_uniform_control_flow +info: VK_KHR_swapchain +info: VK_KHR_swapchain_maintenance1 +info: VK_KHR_swapchain_mutable_format +info: VK_KHR_unified_image_layouts +info: VK_KHR_win32_keyed_mutex +info: Enabled features: +info: depthBiasClamp : 1 +info: depthBounds : 1 +info: depthClamp : 1 +info: drawIndirectFirstInstance : 1 +info: dualSrcBlend : 1 +info: fillModeNonSolid : 1 +info: fragmentStoresAndAtomics : 1 +info: fullDrawIndexUint32 : 1 +info: geometryShader : 1 +info: imageCubeArray : 1 +info: independentBlend : 1 +info: largePoints : 1 +info: logicOp : 1 +info: multiDrawIndirect : 1 +info: multiViewport : 1 +info: occlusionQueryPrecise : 1 +info: pipelineStatisticsQuery : 1 +info: robustBufferAccess : 1 +info: sampleRateShading : 1 +info: samplerAnisotropy : 1 +info: shaderClipDistance : 1 +info: shaderCullDistance : 1 +info: shaderFloat64 : 0 +info: shaderImageGatherExtended : 1 +info: shaderInt16 : 1 +info: shaderInt64 : 1 +info: shaderUniformBufferArrayDynamicIndexing : 1 +info: shaderSampledImageArrayDynamicIndexing : 1 +info: shaderStorageBufferArrayDynamicIndexing : 1 +info: shaderStorageImageArrayDynamicIndexing : 1 +info: sparseBinding : 0 +info: sparseResidencyBuffer : 0 +info: sparseResidencyImage2D : 0 +info: sparseResidencyImage3D : 0 +info: sparseResidency2Samples : 0 +info: sparseResidency4Samples : 0 +info: sparseResidency8Samples : 0 +info: sparseResidency16Samples : 0 +info: sparseResidencyAliased : 0 +info: shaderResourceResidency : 1 +info: shaderResourceMinLod : 1 +info: tessellationShader : 1 +info: textureCompressionBC : 1 +info: variableMultisampleRate : 1 +info: vertexPipelineStoresAndAtomics : 1 +info: wideLines : 1 +info: shaderDrawParameters : 1 +info: storageBuffer16BitAccess : 1 +info: storagePushConstant16 : 0 +info: bufferDeviceAddress : 1 +info: descriptorIndexing : 1 +info: storageBuffer8BitAccess : 1 +info: storagePushConstant8 : 0 +info: shaderUniformTexelBufferArrayDynamicIndexing : 1 +info: shaderStorageTexelBufferArrayDynamicIndexing : 1 +info: shaderUniformBufferArrayNonUniformIndexing : 1 +info: shaderSampledImageArrayNonUniformIndexing : 1 +info: shaderStorageBufferArrayNonUniformIndexing : 1 +info: shaderStorageImageArrayNonUniformIndexing : 1 +info: shaderUniformTexelBufferArrayNonUniformIndexing : 1 +info: shaderStorageTexelBufferArrayNonUniformIndexing : 1 +info: descriptorBindingSampledImageUpdateAfterBind : 1 +info: descriptorBindingUpdateUnusedWhilePending : 1 +info: descriptorBindingPartiallyBound : 1 +info: drawIndirectCount : 1 +info: hostQueryReset : 1 +info: runtimeDescriptorArray : 1 +info: samplerFilterMinmax : 1 +info: samplerMirrorClampToEdge : 1 +info: scalarBlockLayout : 1 +info: shaderFloat16 : 1 +info: shaderInt8 : 1 +info: shaderOutputViewportIndex : 1 +info: shaderOutputLayer : 1 +info: timelineSemaphore : 1 +info: uniformBufferStandardLayout : 1 +info: vulkanMemoryModel : 1 +info: inlineUniformBlock : 1 +info: computeFullSubgroups : 1 +info: dynamicRendering : 1 +info: maintenance4 : 1 +info: robustImageAccess : 0 +info: pipelineCreationCacheControl : 1 +info: shaderDemoteToHelperInvocation : 1 +info: shaderZeroInitializeWorkgroupMemory : 1 +info: subgroupSizeControl : 1 +info: synchronization2 : 1 +info: VK_EXT_attachment_feedback_loop_layout: +info: attachmentFeedbackLoopLayout : 1 +info: VK_EXT_border_color_swizzle: +info: borderColorSwizzle : 1 +info: borderColorSwizzleFromImage : 1 +info: VK_EXT_conservative_rasterization: +info: extConservativeRasterization : 1 +info: VK_EXT_custom_border_color: +info: customBorderColors : 1 +info: customBorderColorWithoutFormat : 1 +info: VK_EXT_depth_clip_enable: +info: depthClipEnable : 1 +info: VK_EXT_depth_bias_control: +info: depthBiasControl : 0 +info: leastRepresentableValueForceUnormRepresentation : 0 +info: floatRepresentation : 0 +info: depthBiasExact : 0 +info: VK_EXT_descriptor_buffer: +info: descriptorBuffer : 0 +info: VK_EXT_descriptor_heap: +info: descriptorHeap : 0 +info: VK_EXT_dynamic_rendering_unused_attachments: +info: dynamicRenderingUnusedAttachments : 1 +info: VK_EXT_extended_dynamic_state3: +info: extendedDynamicState3AlphaToCoverageEnable : 1 +info: extendedDynamicState3DepthClipEnable : 1 +info: extendedDynamicState3RasterizationSamples : 1 +info: extendedDynamicState3SampleMask : 1 +info: extendedDynamicState3LineRasterizationMode : 1 +info: extendedDynamicState3SampleLocationsEnable : 1 +info: VK_EXT_fragment_shader_interlock: +info: fragmentShaderSampleInterlock : 0 +info: fragmentShaderPixelInterlock : 0 +info: VK_EXT_full_screen_exclusive: +info: extFullScreenExclusive : 0 +info: VK_EXT_graphics_pipeline_library: +info: graphicsPipelineLibrary : 1 +info: VK_EXT_hdr_metadata: +info: extHdrMetadata : 1 +info: VK_EXT_line_rasterization: +info: rectangularLines : 1 +info: smoothLines : 0 +info: VK_EXT_memory_budget: +info: extMemoryBudget : 1 +info: VK_EXT_memory_priority: +info: memoryPriority : 0 +info: VK_EXT_multi_draw: +info: multiDraw : 1 +info: VK_EXT_non_seamless_cube_map: +info: nonSeamlessCubeMap : 1 +info: VK_EXT_pageable_device_local_memory: +info: pageableDeviceLocalMemory : 0 +info: VK_EXT_robustness2: +info: robustBufferAccess2 : 1 +info: robustImageAccess2 : 1 +info: nullDescriptor : 1 +info: VK_EXT_sample_locations: +info: extSampleLocations : 1 +info: VK_EXT_shader_module_identifier: +info: shaderModuleIdentifier : 1 +info: VK_EXT_shader_stencil_export: +info: extShaderStencilExport : 1 +info: VK_EXT_swapchain_colorspace: +info: extSwapchainColorSpace : 0 +info: VK_EXT_swapchain_maintenance1: +info: swapchainMaintenance1 : 0 +info: VK_EXT_transform_feedback: +info: transformFeedback : 1 +info: geometryStreams : 1 +info: VK_EXT_vertex_attribute_divisor: +info: vertexAttributeInstanceRateDivisor : 1 +info: vertexAttributeInstanceRateZeroDivisor : 1 +info: VK_KHR_device_fault: +info: deviceFault : 0 +info: deviceFaultVendorBinary : 0 +info: VK_KHR_dynamic_rendering_local_read: +info: dynamicRenderingLocalRead : 1 +info: VK_KHR_external_memory_win32: +info: khrExternalMemoryWin32 : 1 +info: VK_KHR_external_semaphore_win32: +info: khrExternalSemaphoreWin32 : 1 +info: VK_KHR_load_store_op_none: +info: khrLoadStoreOpNone : 1 +info: VK_KHR_maintenance5: +info: maintenance5 : 1 +info: VK_KHR_maintenance6: +info: maintenance6 : 1 +info: VK_KHR_maintenance7: +info: maintenance7 : 1 +info: VK_KHR_maintenance8: +info: maintenance8 : 1 +info: VK_KHR_maintenance9: +info: maintenance9 : 1 +info: VK_KHR_maintenance10: +info: maintenance10 : 0 +info: VK_KHR_maintenance11: +info: maintenance11 : 0 +info: VK_KHR_pipeline_library: +info: khrPipelineLibrary : 1 +info: VK_KHR_present_id: +info: presentId : 1 +info: VK_KHR_present_id2: +info: presentId2 : 0 +info: VK_KHR_present_wait: +info: presentWait : 1 +info: VK_KHR_present_wait2: +info: presentWait2 : 0 +info: VK_KHR_shader_float_controls2: +info: shaderFloatControls2 : 1 +info: VK_KHR_shader_subgroup_uniform_control_flow: +info: shaderSubgroupUniformControlFlow : 1 +info: VK_KHR_shader_untyped_pointers: +info: shaderUntypedPointers : 0 +info: VK_KHR_swapchain: +info: khrSwapchain : 1 +info: VK_KHR_swapchain_maintenance1: +info: swapchainMaintenance1 : 1 +info: VK_KHR_swapchain_mutable_format: +info: khrSwapchainMutableFormat : 1 +info: VK_KHR_unified_image_layouts: +info: unifiedImageLayouts : 1 +info: VK_KHR_win32_keyed_mutex: +info: khrWin32KeyedMutex : 1 +info: VK_AMD_buffer_marker: +info: amdBufferMarker : 0 +info: VK_NV_device_diagnostic_checkpoints: +info: nvDeviceDiagnosticCheckpoints : 0 +info: VK_NV_low_latency2: +info: nvLowLatency2 : 0 +info: VK_NV_raw_access_chains: +info: shaderRawAccessChains : 0 +info: VK_NVX_binary_import: +info: nvxBinaryImport : 0 +info: VK_NVX_image_view_handle: +info: nvxImageViewHandle : 0 +info: Memory type mask for buffer resources: 0x7, usage: 0x219ff +info: Graphics pipeline libraries supported +info: Binding model: Legacy +info: D3D11InternalCreateDevice: Maximum supported feature level: D3D_FEATURE_LEVEL_11_1 +info: D3D11InternalCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0 +warn: D3D11DXGIDevice::QueryInterface: Unknown interface query +warn: a7aa6116-9c8d-4bba-9083-b4d816b71b78 +warn: D3D11DXGIDevice::QueryInterface: Unknown interface query +warn: ccffef16-7b69-468f-bce3-cd953369a39a +info: Game: Octopath_Traveler2-Win64-Shipping.exe +info: DXVK: v3.0.2 +info: Build: x86_64 gcc 16.1.0 +info: Vulkan: Found vkGetInstanceProcAddr in winevulkan.dll @ 0x6ffffb0f7f80 +info: Extension providers: +info: Platform WSI +info: OpenVR +info: OpenVR: could not open registry key, status 2 +info: OpenVR: Failed to locate module +info: OpenXR +info: Enabled instance extensions: +info: VK_KHR_get_surface_capabilities2 +info: VK_KHR_surface +info: VK_KHR_surface_maintenance1 +info: VK_KHR_win32_surface +info: Found device: Turnip Adreno (TM) 740 (turnip Mesa driver 26.2.0) +info: D3D9: Detected nonclassical vendor ID: 0x5143 +info: D3D9: Hiding actual GPU, reporting: +info: vendor ID: 0x1002 +info: device ID: 0x73df +info: device description: AMD Radeon RX 6700 XT +info: D3D9: VK_FORMAT_D16_UNORM_S8_UINT -> VK_FORMAT_D24_UNORM_S8_UINT +info: Process set as DPI aware +info: Creating device: +info: Turnip Adreno (TM) 740: +info: Driver : turnip Mesa driver 26.2.0 +info: Queues: +info: Graphics : (0, 0) +info: Transfer : (0, 0) +info: Sparse : (0, 0) +info: Memory: +info: Heap 0: 8.39 GiB (DEVICE_LOCAL) +info: Budget: 7.64 GiB +info: Type 0: DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT +info: Type 1: DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT | HOST_CACHED +info: Type 2: DEVICE_LOCAL | HOST_VISIBLE | HOST_CACHED +info: Type 3: DEVICE_LOCAL | LAZILY_ALLOCATED +info: Enabled extensions: +info: VK_EXT_attachment_feedback_loop_layout +info: VK_EXT_border_color_swizzle +info: VK_EXT_conservative_rasterization +info: VK_EXT_custom_border_color +info: VK_EXT_depth_clip_enable +info: VK_EXT_dynamic_rendering_unused_attachments +info: VK_EXT_extended_dynamic_state3 +info: VK_EXT_graphics_pipeline_library +info: VK_EXT_hdr_metadata +info: VK_EXT_line_rasterization +info: VK_EXT_multi_draw +info: VK_EXT_non_seamless_cube_map +info: VK_EXT_robustness2 +info: VK_EXT_sample_locations +info: VK_EXT_shader_module_identifier +info: VK_EXT_shader_stencil_export +info: VK_EXT_transform_feedback +info: VK_EXT_vertex_attribute_divisor +info: VK_KHR_dynamic_rendering_local_read +info: VK_KHR_external_memory_win32 +info: VK_KHR_external_semaphore_win32 +info: VK_KHR_load_store_op_none +info: VK_KHR_maintenance5 +info: VK_KHR_maintenance6 +info: VK_KHR_maintenance7 +info: VK_KHR_maintenance8 +info: VK_KHR_maintenance9 +info: VK_KHR_pipeline_library +info: VK_KHR_present_id +info: VK_KHR_present_wait +info: VK_KHR_shader_float_controls2 +info: VK_KHR_shader_subgroup_uniform_control_flow +info: VK_KHR_swapchain +info: VK_KHR_swapchain_maintenance1 +info: VK_KHR_swapchain_mutable_format +info: VK_KHR_unified_image_layouts +info: VK_KHR_win32_keyed_mutex +info: Enabled features: +info: depthBiasClamp : 1 +info: depthBounds : 1 +info: depthClamp : 1 +info: drawIndirectFirstInstance : 1 +info: dualSrcBlend : 1 +info: fillModeNonSolid : 1 +info: fragmentStoresAndAtomics : 1 +info: fullDrawIndexUint32 : 1 +info: geometryShader : 1 +info: imageCubeArray : 1 +info: independentBlend : 1 +info: largePoints : 1 +info: logicOp : 1 +info: multiDrawIndirect : 1 +info: multiViewport : 1 +info: occlusionQueryPrecise : 1 +info: pipelineStatisticsQuery : 1 +info: robustBufferAccess : 1 +info: sampleRateShading : 1 +info: samplerAnisotropy : 1 +info: shaderClipDistance : 1 +info: shaderCullDistance : 1 +info: shaderFloat64 : 0 +info: shaderImageGatherExtended : 1 +info: shaderInt16 : 1 +info: shaderInt64 : 1 +info: shaderUniformBufferArrayDynamicIndexing : 1 +info: shaderSampledImageArrayDynamicIndexing : 1 +info: shaderStorageBufferArrayDynamicIndexing : 1 +info: shaderStorageImageArrayDynamicIndexing : 1 +info: sparseBinding : 0 +info: sparseResidencyBuffer : 0 +info: sparseResidencyImage2D : 0 +info: sparseResidencyImage3D : 0 +info: sparseResidency2Samples : 0 +info: sparseResidency4Samples : 0 +info: sparseResidency8Samples : 0 +info: sparseResidency16Samples : 0 +info: sparseResidencyAliased : 0 +info: shaderResourceResidency : 1 +info: shaderResourceMinLod : 1 +info: tessellationShader : 1 +info: textureCompressionBC : 1 +info: variableMultisampleRate : 1 +info: vertexPipelineStoresAndAtomics : 1 +info: wideLines : 1 +info: shaderDrawParameters : 1 +info: storageBuffer16BitAccess : 1 +info: storagePushConstant16 : 0 +info: bufferDeviceAddress : 1 +info: descriptorIndexing : 1 +info: storageBuffer8BitAccess : 1 +info: storagePushConstant8 : 0 +info: shaderUniformTexelBufferArrayDynamicIndexing : 1 +info: shaderStorageTexelBufferArrayDynamicIndexing : 1 +info: shaderUniformBufferArrayNonUniformIndexing : 1 +info: shaderSampledImageArrayNonUniformIndexing : 1 +info: shaderStorageBufferArrayNonUniformIndexing : 1 +info: shaderStorageImageArrayNonUniformIndexing : 1 +info: shaderUniformTexelBufferArrayNonUniformIndexing : 1 +info: shaderStorageTexelBufferArrayNonUniformIndexing : 1 +info: descriptorBindingSampledImageUpdateAfterBind : 1 +info: descriptorBindingUpdateUnusedWhilePending : 1 +info: descriptorBindingPartiallyBound : 1 +info: drawIndirectCount : 1 +info: hostQueryReset : 1 +info: runtimeDescriptorArray : 1 +info: samplerFilterMinmax : 1 +info: samplerMirrorClampToEdge : 1 +info: scalarBlockLayout : 1 +info: shaderFloat16 : 1 +info: shaderInt8 : 1 +info: shaderOutputViewportIndex : 1 +info: shaderOutputLayer : 1 +info: timelineSemaphore : 1 +info: uniformBufferStandardLayout : 1 +info: vulkanMemoryModel : 1 +info: inlineUniformBlock : 1 +info: computeFullSubgroups : 1 +info: dynamicRendering : 1 +info: maintenance4 : 1 +info: robustImageAccess : 0 +info: pipelineCreationCacheControl : 1 +info: shaderDemoteToHelperInvocation : 1 +info: shaderZeroInitializeWorkgroupMemory : 1 +info: subgroupSizeControl : 1 +info: synchronization2 : 1 +info: VK_EXT_attachment_feedback_loop_layout: +info: attachmentFeedbackLoopLayout : 1 +info: VK_EXT_border_color_swizzle: +info: borderColorSwizzle : 1 +info: borderColorSwizzleFromImage : 1 +info: VK_EXT_conservative_rasterization: +info: extConservativeRasterization : 1 +info: VK_EXT_custom_border_color: +info: customBorderColors : 1 +info: customBorderColorWithoutFormat : 1 +info: VK_EXT_depth_clip_enable: +info: depthClipEnable : 1 +info: VK_EXT_depth_bias_control: +info: depthBiasControl : 0 +info: leastRepresentableValueForceUnormRepresentation : 0 +info: floatRepresentation : 0 +info: depthBiasExact : 0 +info: VK_EXT_descriptor_buffer: +info: descriptorBuffer : 0 +info: VK_EXT_descriptor_heap: +info: descriptorHeap : 0 +info: VK_EXT_dynamic_rendering_unused_attachments: +info: dynamicRenderingUnusedAttachments : 1 +info: VK_EXT_extended_dynamic_state3: +info: extendedDynamicState3AlphaToCoverageEnable : 1 +info: extendedDynamicState3DepthClipEnable : 1 +info: extendedDynamicState3RasterizationSamples : 1 +info: extendedDynamicState3SampleMask : 1 +info: extendedDynamicState3LineRasterizationMode : 1 +info: extendedDynamicState3SampleLocationsEnable : 1 +info: VK_EXT_fragment_shader_interlock: +info: fragmentShaderSampleInterlock : 0 +info: fragmentShaderPixelInterlock : 0 +info: VK_EXT_full_screen_exclusive: +info: extFullScreenExclusive : 0 +info: VK_EXT_graphics_pipeline_library: +info: graphicsPipelineLibrary : 1 +info: VK_EXT_hdr_metadata: +info: extHdrMetadata : 1 +info: VK_EXT_line_rasterization: +info: rectangularLines : 1 +info: smoothLines : 0 +info: VK_EXT_memory_budget: +info: extMemoryBudget : 1 +info: VK_EXT_memory_priority: +info: memoryPriority : 0 +info: VK_EXT_multi_draw: +info: multiDraw : 1 +info: VK_EXT_non_seamless_cube_map: +info: nonSeamlessCubeMap : 1 +info: VK_EXT_pageable_device_local_memory: +info: pageableDeviceLocalMemory : 0 +info: VK_EXT_robustness2: +info: robustBufferAccess2 : 1 +info: robustImageAccess2 : 1 +info: nullDescriptor : 1 +info: VK_EXT_sample_locations: +info: extSampleLocations : 1 +info: VK_EXT_shader_module_identifier: +info: shaderModuleIdentifier : 1 +info: VK_EXT_shader_stencil_export: +info: extShaderStencilExport : 1 +info: VK_EXT_swapchain_colorspace: +info: extSwapchainColorSpace : 0 +info: VK_EXT_swapchain_maintenance1: +info: swapchainMaintenance1 : 0 +info: VK_EXT_transform_feedback: +info: transformFeedback : 1 +info: geometryStreams : 1 +info: VK_EXT_vertex_attribute_divisor: +info: vertexAttributeInstanceRateDivisor : 1 +info: vertexAttributeInstanceRateZeroDivisor : 1 +info: VK_KHR_device_fault: +info: deviceFault : 0 +info: deviceFaultVendorBinary : 0 +info: VK_KHR_dynamic_rendering_local_read: +info: dynamicRenderingLocalRead : 1 +info: VK_KHR_external_memory_win32: +info: khrExternalMemoryWin32 : 1 +info: VK_KHR_external_semaphore_win32: +info: khrExternalSemaphoreWin32 : 1 +info: VK_KHR_load_store_op_none: +info: khrLoadStoreOpNone : 1 +info: VK_KHR_maintenance5: +info: maintenance5 : 1 +info: VK_KHR_maintenance6: +info: maintenance6 : 1 +info: VK_KHR_maintenance7: +info: maintenance7 : 1 +info: VK_KHR_maintenance8: +info: maintenance8 : 1 +info: VK_KHR_maintenance9: +info: maintenance9 : 1 +info: VK_KHR_maintenance10: +info: maintenance10 : 0 +info: VK_KHR_maintenance11: +info: maintenance11 : 0 +info: VK_KHR_pipeline_library: +info: khrPipelineLibrary : 1 +info: VK_KHR_present_id: +info: presentId : 1 +info: VK_KHR_present_id2: +info: presentId2 : 0 +info: VK_KHR_present_wait: +info: presentWait : 1 +info: VK_KHR_present_wait2: +info: presentWait2 : 0 +info: VK_KHR_shader_float_controls2: +info: shaderFloatControls2 : 1 +info: VK_KHR_shader_subgroup_uniform_control_flow: +info: shaderSubgroupUniformControlFlow : 1 +info: VK_KHR_shader_untyped_pointers: +info: shaderUntypedPointers : 0 +info: VK_KHR_swapchain: +info: khrSwapchain : 1 +info: VK_KHR_swapchain_maintenance1: +info: swapchainMaintenance1 : 1 +info: VK_KHR_swapchain_mutable_format: +info: khrSwapchainMutableFormat : 1 +info: VK_KHR_unified_image_layouts: +info: unifiedImageLayouts : 1 +info: VK_KHR_win32_keyed_mutex: +info: khrWin32KeyedMutex : 1 +info: VK_AMD_buffer_marker: +info: amdBufferMarker : 0 +info: VK_NV_device_diagnostic_checkpoints: +info: nvDeviceDiagnosticCheckpoints : 0 +info: VK_NV_low_latency2: +info: nvLowLatency2 : 0 +info: VK_NV_raw_access_chains: +info: shaderRawAccessChains : 0 +info: VK_NVX_binary_import: +info: nvxBinaryImport : 0 +info: VK_NVX_image_view_handle: +info: nvxImageViewHandle : 0 +info: Memory type mask for buffer resources: 0x7, usage: 0x219ff +info: Graphics pipeline libraries supported +info: Binding model: Legacy +info: D3D9DeviceEx::ResetSwapChain: +info: Requested Presentation Parameters +info: - Width: 1 +info: - Height: 1 +info: - Format: D3D9Format::Unknown +info: - Auto Depth Stencil: false +info: ^ Format: D3D9Format::Unknown +info: - Windowed: true +info: - Swap effect: 1 +warn: DXGI: MakeWindowAssociation: Ignoring flags +info: Presenter: Actual swapchain properties: +info: Format: VK_FORMAT_R16G16B16A16_UNORM +info: Color space: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR +info: Present mode: VK_PRESENT_MODE_FIFO_KHR (dynamic: no) +info: Buffer size: 1080x1920 +info: Image count: 4 +info: Setting display mode: 1050x1680@60 +info: Setting display mode: 1050x1680@60 +info: Created cache file: C:\users\root\AppData\Local\dxvk\9b4aaba677876925.dxvk.bin +info: DXVK: Using 8 compiler threads +info: Presenter: Got VK_SUBOPTIMAL_KHR, recreating swapchain +info: Presenter: Actual swapchain properties: +info: Format: VK_FORMAT_R16G16B16A16_UNORM +info: Color space: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR +info: Present mode: VK_PRESENT_MODE_FIFO_KHR (dynamic: no) +info: Buffer size: 1050x1680 +info: Image count: 4 +info: Presenter: Actual swapchain properties: +info: Format: VK_FORMAT_R16G16B16A16_UNORM +info: Color space: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR +info: Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR (dynamic: no) +info: Buffer size: 1050x1680 +info: Image count: 4 +Terminated box64 wine "./Octopath_Traveler2/Binaries/Win64/$EXEC" +/roms/ports/PortMaster/funcs.txt: line 153: 12809 Killed $GPTOKEYB "$EXEC" diff --git a/projects/ROCKNIX/config.xml b/projects/ROCKNIX/config.xml index a8e638aefc1..a85c61a7155 100644 --- a/projects/ROCKNIX/config.xml +++ b/projects/ROCKNIX/config.xml @@ -133,5 +133,6 @@ cq8725s-ayn-odin3 + sm8750-konkr-pf-elite diff --git a/projects/ROCKNIX/devices/H700/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/H700/linux/linux.aarch64.conf index 57bb3d333e8..553cd8f097c 100644 --- a/projects/ROCKNIX/devices/H700/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/H700/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y diff --git a/projects/ROCKNIX/devices/RK3326/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/RK3326/linux/linux.aarch64.conf index 216c96871b3..f0e877ad520 100644 --- a/projects/ROCKNIX/devices/RK3326/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/RK3326/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_CC_CAN_LINK=y CONFIG_CC_CAN_LINK_STATIC=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y @@ -5167,6 +5167,8 @@ CONFIG_ARM_SMMU_V3=y # end of Qualcomm SoC drivers CONFIG_ROCKCHIP_GRF=y +CONFIG_ROCKCHIP_CPUINFO=y +CONFIG_ROCKCHIP_PM_CONFIG=y CONFIG_ROCKCHIP_IODOMAIN=y # CONFIG_SOC_TI is not set diff --git a/projects/ROCKNIX/devices/RK3399/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/RK3399/linux/linux.aarch64.conf index 314ef069364..5004eb12a1f 100644 --- a/projects/ROCKNIX/devices/RK3399/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/RK3399/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y diff --git a/projects/ROCKNIX/devices/RK3566/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/RK3566/linux/linux.aarch64.conf index 20f41cda93e..f840728e7ad 100644 --- a/projects/ROCKNIX/devices/RK3566/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/RK3566/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y diff --git a/projects/ROCKNIX/devices/RK3576/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/RK3576/linux/linux.aarch64.conf index 5eb98f493fb..f6480271f22 100644 --- a/projects/ROCKNIX/devices/RK3576/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/RK3576/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y diff --git a/projects/ROCKNIX/devices/S922X/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/S922X/linux/linux.aarch64.conf index f376d7b610d..30a8f1681cc 100644 --- a/projects/ROCKNIX/devices/S922X/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/S922X/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y diff --git a/projects/ROCKNIX/devices/SM6115/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/SM6115/linux/linux.aarch64.conf index 80c6eeeb0f2..afe098c8006 100644 --- a/projects/ROCKNIX/devices/SM6115/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/SM6115/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_RUSTC_LLVM_MAJOR_VERSION=22 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y diff --git a/projects/ROCKNIX/devices/SM8250/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/SM8250/linux/linux.aarch64.conf index 8b17f42f06d..014d49baae3 100644 --- a/projects/ROCKNIX/devices/SM8250/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/SM8250/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_RUSTC_LLVM_MAJOR_VERSION=22 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y diff --git a/projects/ROCKNIX/devices/SM8550/filesystem/usr/share/inputplumber/capability_maps/ayn_mcu.yaml b/projects/ROCKNIX/devices/SM8550/filesystem/usr/share/inputplumber/capability_maps/ayn_mcu.yaml index 3d7ba3e02a4..7fcc3407644 100644 --- a/projects/ROCKNIX/devices/SM8550/filesystem/usr/share/inputplumber/capability_maps/ayn_mcu.yaml +++ b/projects/ROCKNIX/devices/SM8550/filesystem/usr/share/inputplumber/capability_maps/ayn_mcu.yaml @@ -151,7 +151,7 @@ mapping: value_type: button target_event: gamepad: - button: RightPaddle1 + button: RightPaddle2 - name: Left Paddle source_events: @@ -161,7 +161,7 @@ mapping: value_type: button target_event: gamepad: - button: LeftPaddle1 + button: LeftPaddle2 - name: Right Stick source_events: diff --git a/projects/ROCKNIX/devices/SM8550/filesystem/usr/share/inputplumber/devices/02-ayn-controller.yaml b/projects/ROCKNIX/devices/SM8550/filesystem/usr/share/inputplumber/devices/02-ayn-controller.yaml index 5aa28d31ab0..836e9adf637 100644 --- a/projects/ROCKNIX/devices/SM8550/filesystem/usr/share/inputplumber/devices/02-ayn-controller.yaml +++ b/projects/ROCKNIX/devices/SM8550/filesystem/usr/share/inputplumber/devices/02-ayn-controller.yaml @@ -62,6 +62,17 @@ source_devices: handler: event* capability_map_id: ayn_mcu + # AYN Odin 2 back buttons (M1/M2): a separate gpio-keys device from the + # Odin 2 dts emitting BTN_Z (M1) / BTN_C (M2). Matched by name because + # its phys_path is shared with the other gpio-keys node. The ayn_mcu map + # turns them into Left/RightPaddle2, which the ds5-edge target emits as + # the Edge's real back-lever buttons. + - group: gamepad + evdev: + name: gpio-keys-paddles + handler: event* + capability_map_id: ayn_mcu + # Optional configuration for the composite device options: # If true, InputPlumber will automatically try to manage the input device. If @@ -69,7 +80,10 @@ options: # external service enables management of the device. Defaults to 'false' auto_manage: true -# The target input device(s) to emulate by default +# The target input device(s) to emulate by default. ds5-edge is the DualSense +# variant with back paddles, so the Odin 2's physical back buttons can be +# emitted as the Edge's real removable back-lever buttons (see ayn_mcu.yaml; +# decoded by the hid-playstation Edge support in patches/mainline/0006). target_devices: - ds5 - keyboard diff --git a/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-ayn-odin2.dts b/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-ayn-odin2.dts index f3b7d4599b4..94263836f1b 100644 --- a/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-ayn-odin2.dts +++ b/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-ayn-odin2.dts @@ -322,3 +322,44 @@ &spk_amp_r { firmware-name = "qcom/sm8550/ayn/odin2/aw883xx_acf.bin"; }; + +&tlmm { + paddle_keys_default: paddle-keys-default-state { + pins = "gpio57", "gpio58"; + function = "gpio"; + bias-pull-up; + drive-strength = <2>; + }; +}; + +/* + * AYN Odin 2 has two extra back buttons (M1, M2) on the lower back of + * the device. They are plain active-low SoC TLMM GPIOs (M1 = GPIO_57, + * M2 = GPIO_58), not on the gamepad MCU UART and not ADC (despite AYN's + * Android "adckey"/keydetect.ko naming). Expose them as a gpio-keys + * device emitting BTN_Z (M1) / BTN_C (M2); ROCKNIX's InputPlumber map + * (ayn_mcu.yaml) routes BTN_Z -> LeftPaddle2 and BTN_C -> RightPaddle2. + * RE'd from the AYN Android keydetect driver (gpio_request 358/359 = + * TLMM base 301 + offsets 57/58), same scheme as the AYN Odin 3. + */ +/ { + gpio-keys-paddles { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&paddle_keys_default>; + + key-paddle-m1 { + label = "Back Paddle M1"; + linux,code = ; + gpios = <&tlmm 57 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + }; + + key-paddle-m2 { + label = "Back Paddle M2"; + linux,code = ; + gpios = <&tlmm 58 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + }; + }; +}; diff --git a/projects/ROCKNIX/devices/SM8550/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/SM8550/linux/linux.aarch64.conf index e7b3b4a9f05..b172975406f 100644 --- a/projects/ROCKNIX/devices/SM8550/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/SM8550/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_RUSTC_LLVM_MAJOR_VERSION=22 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y diff --git a/projects/ROCKNIX/devices/SM8650/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/SM8650/linux/linux.aarch64.conf index 10f7040d7ba..1d0e4e025c7 100644 --- a/projects/ROCKNIX/devices/SM8650/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/SM8650/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_RUSTC_LLVM_MAJOR_VERSION=22 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y diff --git a/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/KONKR/PocketFitElite/HiFi.conf b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/KONKR/PocketFitElite/HiFi.conf new file mode 100644 index 00000000000..3b7a0cc7464 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/KONKR/PocketFitElite/HiFi.conf @@ -0,0 +1,78 @@ +# HiFi use case for the KONKR Pocket FIT Elite (SM8750) +# +# Two things differ from the AYN Odin3 profile this is derived from: +# +# * "Headphones" is defined once, on PlaybackPCM hw:${CardId},1 -- the +# WCD939x HPH path. (The Odin3 profile defines it twice, the second time +# on ,0, which is the MI2S/speaker PCM; ALSA keeps the last definition.) +# +# * The HPH path is switched to PCM (HiFi) mode, matching stock Android. In +# the default PDM mode the codec's legacy PDM receive path puts a constant +# hiss on the 3.5mm jack; in PCM mode the stream rides SoundWire port 9 as +# 384 kHz PCM and the codec runs its own interpolator/compander, which is +# silent. Needs device patches 0072 (lpass-rx-macro), 0073 (wcd939x) and +# 0074 (soundwire qcom PCM port format enable), plus qcom,pcm-ports-mask +# on &swr1 in the board DTS. +# +# Ordering matters: the HPH and COMP switches connect their SoundWire +# ports when set, so the PCM mode flags have to be in place before the +# wcd939x enable sequence brings those switches up -- hence the explicit +# sequence here rather than only the shared includes. + +SectionVerb { + EnableSequence [ + cset "name='SECONDARY_MI2S_RX Audio Mixer MultiMedia1' 1" + cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1" + cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1" + ] + + Include.wcde.File "/codecs/wcd939x/DefaultEnableSeq.conf" + + Value { + TQ "HiFi" + } +} + +SectionDevice."Speaker" { + Comment "Speaker playback" + + Value { + PlaybackChannels 2 + PlaybackPriority 100 + PlaybackPCM "hw:${CardId},0" + PlaybackMixer "default:${CardId}" + } +} + +SectionDevice."Headphones" { + Comment "Headphones playback" + + # rx-macro routing first, then the PCM mode flags, then the wcd939x + # bring-up (which is what actually connects the HPH SoundWire ports). + Include.rxmhpe.File "/codecs/qcom-lpass/rx-macro/HeadphoneEnableSeq.conf" + + EnableSequence [ + cset "name='HPH PCM Switch' 1" + cset "name='RX_HPH PCM Switch' 1" + ] + + Include.wcdhpe.File "/codecs/wcd939x/HeadphoneEnableSeq.conf" + + Include.wcdhpd.File "/codecs/wcd939x/HeadphoneDisableSeq.conf" + Include.rxmhpd.File "/codecs/qcom-lpass/rx-macro/HeadphoneDisableSeq.conf" + + DisableSequence [ + cset "name='HPH PCM Switch' 0" + cset "name='RX_HPH PCM Switch' 0" + ] + + Value { + PlaybackChannels 2 + PlaybackPriority 200 + PlaybackPCM "hw:${CardId},1" + PlaybackMixer "default:${CardId}" + PlaybackMixerElem "HP Digital" + JackControl "Headphone Jack" + JackHWMute "Speaker" + } +} diff --git a/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/KONKR/PocketFitElite/KONKR-PocketFitElite.conf b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/KONKR/PocketFitElite/KONKR-PocketFitElite.conf new file mode 100644 index 00000000000..e8431cd4002 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/KONKR/PocketFitElite/KONKR-PocketFitElite.conf @@ -0,0 +1,33 @@ +# Use case configuration for the KONKR Pocket FIT Elite (SM8750) +# +# Derived from the AYN Odin3 profile (same SoC, same WCD939x codec); the +# card-level setup is identical, so only HiFi.conf diverges. + +Syntax 4 + +SectionUseCase."HiFi" { + File "/KONKR/PocketFitElite/HiFi.conf" + Comment "HiFi quality Music." +} + +BootSequence [ + cset "name='RX_RX0 Digital Volume' 84" + cset "name='RX_RX1 Digital Volume' 84" + cset "name='HPHL Volume' 20" + cset "name='HPHR Volume' 20" + cset "name='ADC2 Volume' 10" +] + +LibraryConfig.remap.Config { + + ctl.default.map { + "name='HP Volume'" { + "name='HPHL Volume'".vindex.0 0 + "name='HPHR Volume'".vindex.1 0 + } + } +} + +Include.card-init.File "/lib/card-init.conf" +Include.ctl-remap.File "/lib/ctl-remap.conf" +Include.wcd-init.File "/codecs/wcd939x/init.conf" diff --git a/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/conf.d/sm8750/SM8750-KONKR.conf b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/conf.d/sm8750/SM8750-KONKR.conf new file mode 120000 index 00000000000..a65165e2475 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/alsa/ucm2/conf.d/sm8750/SM8750-KONKR.conf @@ -0,0 +1 @@ +../../KONKR/PocketFitElite/KONKR-PocketFitElite.conf \ No newline at end of file diff --git a/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/capability_maps/konkr_gamepad.yaml b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/capability_maps/konkr_gamepad.yaml new file mode 100644 index 00000000000..31a6485227e --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/capability_maps/konkr_gamepad.yaml @@ -0,0 +1,18 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v2.json +version: 2 +kind: CapabilityMap +name: KONKR Gamepad Mapping +id: konkr_gamepad + +# The SPI gamepad's front-top-left button is BTN_MODE in hardware; the KONKR +# UART button is the device's Guide instead (konkr_sysbtn.yaml), so route +# this one to a bindable hotkey. Everything else passes through untouched. +mapping: + - name: Front-top-left (KeyF3) + source_events: + - evdev: + event_type: KEY + event_code: BTN_MODE + value_type: button + target_event: + keyboard: KeyF3 diff --git a/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/capability_maps/konkr_sysbtn.yaml b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/capability_maps/konkr_sysbtn.yaml new file mode 100644 index 00000000000..cfaed66cff1 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/capability_maps/konkr_sysbtn.yaml @@ -0,0 +1,64 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v2.json +version: 2 +kind: CapabilityMap +name: KONKR System Buttons Mapping +id: konkr_sysbtn + +# The konkr_sysbtn kernel serdev driver reads the AYANEO MCU UART and emits the +# device's "system" buttons as BTN_TRIGGER_HAPPY1..5. +# +# KONKR -> Guide. The two extra shoulder buttons become the DualSense Edge's +# back-lever buttons, which is the only pair of spare gamepad-class buttons the +# ds5-edge target offers. The remaining two front buttons have no gamepad +# equivalent, so they go to keyboard F-keys and are bindable as hotkeys. +# +# The device also has two physical back buttons, but the MCU emits nothing for +# them (see the key_lc_back/key_rc_back sysfs attributes on the serdev device). +mapping: + - name: Front-bottom-right (KeyF1) + source_events: + - evdev: + event_type: KEY + event_code: BTN_TRIGGER_HAPPY1 + value_type: button + target_event: + keyboard: KeyF1 + + - name: KONKR (Guide) + source_events: + - evdev: + event_type: KEY + event_code: BTN_TRIGGER_HAPPY2 + value_type: button + target_event: + gamepad: + button: Guide + + - name: Left extra shoulder (LeftPaddle2) + source_events: + - evdev: + event_type: KEY + event_code: BTN_TRIGGER_HAPPY3 + value_type: button + target_event: + gamepad: + button: LeftPaddle2 + + - name: Right extra shoulder (RightPaddle2) + source_events: + - evdev: + event_type: KEY + event_code: BTN_TRIGGER_HAPPY4 + value_type: button + target_event: + gamepad: + button: RightPaddle2 + + - name: Front-top-right (KeyF2) + source_events: + - evdev: + event_type: KEY + event_code: BTN_TRIGGER_HAPPY5 + value_type: button + target_event: + keyboard: KeyF2 diff --git a/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/devices/01-ayn-controller.yaml b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/devices/01-ayn-controller.yaml index 5167c140018..25460753c35 100644 --- a/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/devices/01-ayn-controller.yaml +++ b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/devices/01-ayn-controller.yaml @@ -53,5 +53,5 @@ options: # emitted as the Edge's real removable back-lever buttons (see ayn_mcu.yaml; # decoded by the hid-playstation Edge support in patches/mainline/0006). target_devices: - - ds5-edge + - ds5 - keyboard diff --git a/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/devices/50-konkr_pf_elite.yaml b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/devices/50-konkr_pf_elite.yaml new file mode 100644 index 00000000000..e56f4ab8601 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/devices/50-konkr_pf_elite.yaml @@ -0,0 +1,47 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/composite_device_v1.json +version: 1 +kind: CompositeDevice +name: KONKR Pocket FIT Elite + +# Compose this device's two input sources into one virtual controller: +# - the AYANEO MCU SPI gamepad (kernel mcu_joystick driver, patch 0058) +# - the 5 "system" buttons (KONKR/Home/menu/grips) from the konkr_sysbtn +# kernel serdev driver, which reads them off the MCU UART (patch 0069) +# so applications see a single standard pad instead of two devices. +matches: + - udev: + sys_path: /sys/firmware/devicetree/base + attributes: + - name: model + value: KONKR Pocket FIT Elite + +single_source: false + +source_devices: + # Main gamepad: standard evdev layout (BTN_SOUTH.. + ABS sticks/triggers/hat), + # so InputPlumber's built-in evdev translation handles it (no capability map). + - group: gamepad + evdev: + name: AYANEO MCU Gamepad + handler: event* + capability_map_id: konkr_gamepad + # System buttons: non-standard, remapped via the capability map below. + - group: gamepad + evdev: + name: KONKR System Buttons + handler: event* + capability_map_id: konkr_sysbtn + +options: + auto_manage: true + +# ds5-edge (DualSense Edge) rather than plain ds5, matching the AYN Odin 3 on +# this same platform: the Edge is the DualSense variant with back paddles, so +# this device's grip buttons can be emitted as real gamepad buttons instead of +# keyboard keys. NOT deck-uhid (hidraw-only: ES/SDL only enumerate evdev pads). +# The keyboard target stays for the remaining auxiliary buttons, which have no +# gamepad equivalent and are useful as bindable hotkeys (see the capability +# maps). +target_devices: + - ds5 + - keyboard diff --git a/projects/ROCKNIX/devices/SM8750/linux/dts/qcom/sm8750-konkr-pf-elite.dts b/projects/ROCKNIX/devices/SM8750/linux/dts/qcom/sm8750-konkr-pf-elite.dts new file mode 100644 index 00000000000..eba9f434318 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/linux/dts/qcom/sm8750-konkr-pf-elite.dts @@ -0,0 +1,1701 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * KONKR Pocket FIT Elite (Snapdragon 8 Elite / SM8750) โ€” ROCKNIX board DTS + * + * Several nodes are derived from the in-tree AYN Odin 3 + * (cq8725s-ayn-common.dtsi), which shares the SM8750 platform. Nodes that are + * not yet hardware-verified on this board are flagged inline with TODO. + * + * Copyright (c) 2026 Patrick Hennig + */ + +/dts-v1/; + +#include +#include +#include +#include +#include +#include +#include "sm8750.dtsi" +#include "pm8550.dtsi" +#define PMK8550VE_SID 8 +#include "pm8550ve.dtsi" +#include "pmih0108.dtsi" +#include "pmk8550.dtsi" +#include "sm8750-pmics.dtsi" + +/ { + model = "KONKR Pocket FIT Elite"; /* must match the quirks dir name exactly */ + compatible = "konkr,pocket-fit-elite", "qcom,sm8750"; /* real SM8750 "sun" (not CQ8725S) */ + chassis-type = "handheld"; + + /* + * required for ABL dtb selection ROCKNIX appends ALL SM8750 + * board dtbs into one boot image; the ABL picks by qcom,msm-id + board-id. + * Mirrored verbatim from the stock fdt so it matches this hardware exactly. + * SoC IDs 0x26a(618)/0x27f(639) = SM8750 "sun" โ€” distinct from the Odin 3's + * CQ8725S (706), so the two boards never collide. WITHOUT this, a konkr + * device may boot the Odin 3 dtb. (Odin 3 dtb must likewise carry msm-id + * 706.) + */ + qcom,msm-id = <0x100026a 0x20000>, <0x27f 0x10000>, <0x26a 0x10000>, + <0x27f 0x20000>, <0x26a 0x20000>, <0x100027f 0x10000>, + <0x100026a 0x10000>, <0x100027f 0x20000>; + qcom,board-id = <0x2000b 0x0>; + + aliases { + serial0 = &uart7; /* TODO: confirm debug UART pad (ROCKNIX DEBUG_TTY=/dev/ttyMSM0) */ + }; + + chosen { + stdout-path = "serial0:115200n8"; + + }; + + /* + * Board fixed clocks. sm8750.dtsi references &xo_board, + * &sleep_clk, &bi_tcxo_div2, &bi_tcxo_ao_div2 and expects the board to + * provide them. Required for the tree to resolve. + */ + clocks { + xo_board: xo-board { + compatible = "fixed-clock"; + clock-frequency = <76800000>; + #clock-cells = <0>; + }; + + sleep_clk: sleep-clk { + compatible = "fixed-clock"; + clock-frequency = <32000>; + #clock-cells = <0>; + }; + + bi_tcxo_div2: bi-tcxo-div2-clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-mult = <1>; + clock-div = <2>; + }; + + bi_tcxo_ao_div2: bi-tcxo-ao-div2-clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; + clocks = <&rpmhcc RPMH_CXO_CLK_A>; + clock-mult = <1>; + clock-div = <2>; + }; + }; + + /* + * VPH_PWR rail that feeds the PMICs. Required by the + * apps_rsc regulator block below. + */ + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + regulator-always-on; + regulator-boot-on; + }; + + /* Buttons: gpio-keys transcribed from the konkr stock fdt + * gpio_keys node. Volume-up is on pm8550 gpio6 (matches the SM8650 Konkr); + * Volume-DOWN comes from the PMIC resin (&pon_resin below). linux,codes + * are the stock values. + * The stock node ALSO declared AYA(126)/Equal(127)/Left-C(129)/ + * Right-C(128) โ€” those four are stale carried-over config: 0 IRQ edges + * even on stock Android, and the stock pads sit at func0 pull-up doing + * nothing. Removed; the extra physical buttons are MCU-side and surface + * through the konkr_sysbtn UART driver (patch 0069) instead. */ + gpio-keys { + compatible = "gpio-keys"; + /* pull-ups for the remaining TLMM key pins (stock tlmm_key/turbo_key + * states) โ€” without them the active-low keys float dead. */ + pinctrl-0 = <&volume_up_n &tlmm_key_default &turbo_key_default>; + pinctrl-names = "default"; + + key-volume-up { + label = "Volume Up"; + linux,code = ; + gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + wakeup-source; + }; + key-rc2 { + label = "Right-C2"; + linux,code = <0x36>; /* stock 0x36 */ + gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + }; + key-mode-standard { + label = "Mode-Standard"; + linux,code = <0x190>; /* stock 0x190 */ + gpios = <&tlmm 106 GPIO_ACTIVE_LOW>; + }; + key-mode-2 { + label = "Mode-2"; + linux,code = <0x18e>; /* stock 0x18e */ + gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; + }; + key-mode-performance { + label = "Mode-Performance"; + linux,code = <0x191>; /* stock 0x191 */ + gpios = <&tlmm 108 GPIO_ACTIVE_LOW>; + }; + }; + + /* Fan: pwm-fan driven by the pm8550 LPG PWM (channel 3, 50us), + * powered through a fan_vdd(TLMM110)->fan_pwr(TLMM111) regulator chain, + * tach feedback on TLMM67. Transcribed from the konkr stock fdt + modeled + * on the working SM8650 Konkr (G3) fan node. CONFIG_SENSORS_PWM_FAN=m and + * CONFIG_LEDS_QCOM_LPG=y are already enabled in the SM8750 config. */ + fan: fan { + compatible = "pwm-fan"; + pwms = <&pm8550_pwm 3 50000>; + fan-supply = <&fan_pwr>; + #cooling-cells = <2>; + cooling-levels = <0 64 128 255>; /* stock 0/0x40/0x80/0xff */ + interrupts-extended = <&tlmm 67 IRQ_TYPE_EDGE_FALLING>; + pinctrl-0 = <&fan_int>, <&pwm_fan_ctrl_active>; + pinctrl-1 = <&pwm_fan_ctrl_sleep>; + pinctrl-names = "default", "sleep"; + }; + + fan_pwr: fan-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "fan_pwr"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&tlmm 111 GPIO_ACTIVE_HIGH>; + enable-active-high; + vin-supply = <&fan_vdd>; + pinctrl-0 = <&fan_pwr_pins>; + pinctrl-names = "default"; + }; + + fan_vdd: fan-vdd-regulator { + compatible = "regulator-fixed"; + regulator-name = "fan_vdd"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; + enable-active-high; + vin-supply = <&vph_pwr>; + pinctrl-0 = <&fan_vdd_pins>; + pinctrl-names = "default"; + }; + + /* + * USB-C role/orientation via pmic-glink. Verify the + * orientation GPIO for this board. + */ + pmic-glink { + compatible = "qcom,sm8750-pmic-glink", "qcom,sm8550-pmic-glink", "qcom,pmic-glink"; + #address-cells = <1>; + #size-cells = <0>; + orientation-gpios = <&tlmm 61 GPIO_ACTIVE_HIGH>; /* TODO: verify with a flipped cable */ + + connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + pmic_glink_hs_in: endpoint { + remote-endpoint = <&usb_dwc3_hs>; + }; + }; + port@1 { + reg = <1>; + pmic_glink_ss_in: endpoint { + remote-endpoint = <&usb_dp_qmpphy_out>; + }; + }; + /* SBU โ†’ WCD939x USBSS analog-audio Type-C switch + * (headphone path); needs the now-working Type-C connector. */ + port@2 { + reg = <2>; + pmic_glink_sbu: endpoint { + remote-endpoint = <&wcd_usbss_sbu_mux>; + }; + }; + }; + }; + }; +}; + +/* + * cont_splash region. EVIDENCE-DRIVEN (not a crash-guess): the ABL debug log + * says "Splash region not found in device tree, powering down the display and + * controller" at kernel hand-off โ€” i.e. without this the bootloader blanks the + * panel before the kernel runs, leaving us no on-screen output. Adding it (a) + * keeps the display alive so simpledrm/fbcon can render the kernel console on + * the panel = our console without a UART, and (b) matches both the stock fdt + * (splash_region@0xfc800000, label cont_splash_region) and the working SM8650 + * AYANEO devices. Address/size mirrored verbatim from the stock dump. + * + * Other reserved-memory was initially inherited unchanged from sm8750.dtsi; + * after the display was ELIMINATED as the crash cause (mdss-disabled isolation + * boot still hit EDL), the remaining stock-vs-mainline map divergences are + * transcribed below โ€” verbatim stock values, the whole divergence rather + * than a subset. + */ +/* sm8750.dtsi leaves /reserved-memory unlabeled, so reference it by path. + * + * No cont_splash region. A `splash_region`/`cont_splash_region` (0xfc800000) + * keeps the panel lit for a simpledrm console, but with the real drm/msm + * driver that region triggers the + * CONTINUOUS-SPLASH HANDOFF: dpu assumes the bootloader left the display clocked + * and reaches in to read its registers โ†’ if ABL didn't truly leave it clocked, + * an unclocked-register access โ†’ AHB hang โ†’ secure watchdog reset = exactly the + * crash at the first MDSS register touch. The working + * Odin 3 has NO splash region (clean COLD bring-up). So drop it โ†’ drm/msm does a + * cold bring-up like the Odin 3. */ +&{/reserved-memory} { + + /* Stock-only gap-filler reservations, copied + * verbatim from the live stock fdt (incl. the unit-address-less names): + * - lost_reg_mem fills gpu_micro_code(end 0x9b09c000) โ†’ spss@9b0a0000 + * - lost_reg_mem2 fills q6_cdsp_dtb(end 0x9eb80000) โ†’ soccp@9ec00000 */ + lost_reg_mem { + reg = <0x0 0x9b09c000 0x0 0x4000>; + no-map; + }; + lost_reg_mem2 { + reg = <0x0 0x9eb80000 0x0 0x80000>; + no-map; + }; +}; + +/* Stock fences 18M for the hypervisor + * (gunyah_hyp_region@80000000, reg 0x80000000+0x1200000 โ€” flush against + * cpucp@81200000) and has NO separate cpusys_vm node; mainline sm8750.dtsi + * declares 14M + a 256K cpusys_vm at 0x80e00000, leaving 0x80e40000-0x81200000 + * unreserved. Transcribe the stock layout: grow gunyah to 18M, delete the + * cpusys_vm node it absorbs (mainline window 0x80e40000-0x81200000 verified + * empty, so no overlap; cpusys_vm_mem label is referenced nowhere). */ +&gunyah_hyp_mem { + reg = <0x0 0x80000000 0x0 0x1200000>; +}; +/delete-node/ &cpusys_vm_mem; + +&apps_rsc { + regulators-0 { + compatible = "qcom,pm8550-rpmh-regulators"; + + vdd-bob1-supply = <&vph_pwr>; + vdd-bob2-supply = <&vph_pwr>; + vdd-l1-l4-l10-supply = <&vreg_s3g_1p8>; + vdd-l2-l13-l14-supply = <&vreg_bob1>; + vdd-l3-supply = <&vreg_s7i_1p2>; + vdd-l5-l16-supply = <&vreg_bob1>; + vdd-l6-l7-supply = <&vreg_bob1>; + vdd-l8-l9-supply = <&vreg_bob1>; + vdd-l11-supply = <&vreg_s7i_1p2>; + vdd-l12-supply = <&vreg_s3g_1p8>; + vdd-l15-supply = <&vreg_s3g_1p8>; + vdd-l17-supply = <&vreg_bob2>; + + qcom,pmic-id = "b"; + + vreg_bob1: bob1 { + regulator-name = "vreg_bob1"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <4000000>; + regulator-initial-mode = ; + }; + + vreg_bob2: bob2 { + regulator-name = "vreg_bob2"; + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + }; + + vreg_l1b_1p8: ldo1 { + regulator-name = "vreg_l1b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l2b_3p0: ldo2 { + regulator-name = "vreg_l2b_3p0"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3048000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l4b_1p8: ldo4 { + regulator-name = "vreg_l4b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l5b_3p1: ldo5 { + regulator-name = "vreg_l5b_3p1"; + regulator-min-microvolt = <3100000>; + regulator-max-microvolt = <3148000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l6b_1p8: ldo6 { + regulator-name = "vreg_l6b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l7b_1p8: ldo7 { + regulator-name = "vreg_l7b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + + }; + + vreg_l8b_1p8: ldo8 { + regulator-name = "vreg_l8b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l9b_2p9: ldo9 { + regulator-name = "vreg_l9b_2p9"; + regulator-min-microvolt = <2960000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l10b_1p8: ldo10 { + regulator-name = "vreg_l10b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l11b_1p0: ldo11 { + regulator-name = "vreg_l11b_1p0"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1100000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l12b_1p8: ldo12 { + regulator-name = "vreg_l12b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l13b_3p0: ldo13 { + regulator-name = "vreg_l13b_3p0"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l14b_3p2: ldo14 { + regulator-name = "vreg_l14b_3p2"; + regulator-min-microvolt = <3200000>; + regulator-max-microvolt = <3200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l15b_1p8: ldo15 { + regulator-name = "vreg_l15b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l16b_2p8: ldo16 { + regulator-name = "vreg_l16b_2p8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l17b_2p5: ldo17 { + regulator-name = "vreg_l17b_2p5"; + regulator-min-microvolt = <2504000>; + regulator-max-microvolt = <2504000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-1 { + compatible = "qcom,pm8550ve-rpmh-regulators"; + + vdd-l1-supply = <&vreg_s7i_1p2>; + vdd-l2-supply = <&vreg_s1d_0p97>; + vdd-l3-supply = <&vreg_s1d_0p97>; + vdd-s1-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + + qcom,pmic-id = "d"; + + vreg_s1d_0p97: smps1 { + regulator-name = "vreg_s1d_0p97"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <1100000>; + regulator-initial-mode = ; + }; + + vreg_s3d_1p2: smps3 { + regulator-name = "vreg_s3d_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1300000>; + regulator-initial-mode = ; + }; + + vreg_s4d_0p85: smps4 { + regulator-name = "vreg_s4d_0p85"; + regulator-min-microvolt = <852000>; + regulator-max-microvolt = <1036000>; + regulator-initial-mode = ; + }; + + vreg_l1d_1p2: ldo1 { + regulator-name = "vreg_l1d_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l2d_0p88: ldo2 { + regulator-name = "vreg_l2d_0p88"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <912000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l3d_0p88: ldo3 { + regulator-name = "vreg_l3d_0p88"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <920000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-2 { + compatible = "qcom,pm8550ve-rpmh-regulators"; + + vdd-l1-supply = <&vreg_s1d_0p97>; + vdd-l2-supply = <&vreg_s7i_1p2>; + vdd-l3-supply = <&vreg_s3g_1p8>; + vdd-s5-supply = <&vph_pwr>; + + qcom,pmic-id = "f"; + + vreg_s5f_0p85: smps5 { + regulator-name = "vreg_s5f_0p85"; + regulator-min-microvolt = <852000>; + regulator-max-microvolt = <1000000>; + regulator-initial-mode = ; + }; + + vreg_l1f_0p88: ldo1 { + regulator-name = "vreg_l1f_0p88"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <920000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l2f_1p2: ldo2 { + regulator-name = "vreg_l2f_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l3f_1p8: ldo3 { + regulator-name = "vreg_l3f_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + }; + + regulators-3 { + compatible = "qcom,pm8550ve-rpmh-regulators"; + + vdd-l1-supply = <&vreg_s1d_0p97>; + vdd-l2-supply = <&vreg_s3g_1p8>; + vdd-l3-supply = <&vreg_s7i_1p2>; + vdd-s1-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + + qcom,pmic-id = "g"; + + vreg_s1g_0p5: smps1 { + regulator-name = "vreg_s1g_0p5"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <700000>; + regulator-initial-mode = ; + }; + + vreg_s3g_1p8: smps3 { + regulator-name = "vreg_s3g_1p8"; + regulator-min-microvolt = <1856000>; + regulator-max-microvolt = <2000000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_s4g_0p75: smps4 { + regulator-name = "vreg_s4g_0p75"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <900000>; + regulator-initial-mode = ; + }; + + vreg_l1g_0p91: ldo1 { + regulator-name = "vreg_l1g_0p91"; + regulator-min-microvolt = <912000>; + regulator-max-microvolt = <936000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l2g_1p8: ldo2 { + regulator-name = "vreg_l2g_1p8"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1860000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l3g_1p2: ldo3 { + regulator-name = "vreg_l3g_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1256000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-4 { + compatible = "qcom,pm8550ve-rpmh-regulators"; + + vdd-l1-supply = <&vreg_s7i_1p2>; + vdd-l2-supply = <&vreg_s7i_1p2>; + vdd-l3-supply = <&vreg_s1d_0p97>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + + qcom,pmic-id = "i"; + + vreg_s7i_1p2: smps7 { + regulator-name = "vreg_s7i_1p2"; + regulator-min-microvolt = <1224000>; + regulator-max-microvolt = <1340000>; + regulator-initial-mode = ; + }; + + vreg_s8i_0p9: smps8 { + regulator-name = "vreg_s8i_0p9"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <972000>; + regulator-initial-mode = ; + }; + + vreg_l1i_1p2: ldo1 { + regulator-name = "vreg_l1i_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l2i_1p2: ldo2 { + regulator-name = "vreg_l2i_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l3i_0p88: ldo3 { + regulator-name = "vreg_l3i_0p88"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <912000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-5 { + compatible = "qcom,pm8550vs-rpmh-regulators"; + + vdd-l1-supply = <&vreg_s1d_0p97>; + vdd-l2-supply = <&vreg_s7i_1p2>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + + qcom,pmic-id = "j"; + + vreg_s2j_1p1: smps2 { + regulator-name = "vreg_s2j_1p1"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1100000>; + regulator-initial-mode = ; + }; + + vreg_s3j_1p1: smps3 { + regulator-name = "vreg_s3j_1p1"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1100000>; + regulator-initial-mode = ; + }; + + vreg_l1j_0p91: ldo1 { + regulator-name = "vreg_l1j_0p91"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <920000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l2j_1p2: ldo2 { + regulator-name = "vreg_l2j_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; +}; + +/* ===================================================================== * + * Display โ€” DSI panel "ar14 1080p 144hz" (same family as sm8650-konkr-pf) + * Values below were derived from the stock device tree unless noted. + * ===================================================================== */ + +&mdss { + status = "okay"; +}; + +&mdss_dp0 { /* USB-C DisplayPort out */ + status = "okay"; +}; + +&mdss_dsi0 { + vdda-supply = <&vreg_l3g_1p2>; /* DSI ctrl analog */ + status = "okay"; + + panel@0 { + compatible = "ayaneo,ar14-144hz"; /* panel-ar14-144hz, patch 0055: 1080x1920, 144/120/90/60 Hz, DSC 8bpp v1.1 */ + reg = <0>; + + /* Panel pinctrl โ€” present in BOTH working refs (Odin 3 SM8750 + + * SM8650 Konkr), absent here. Copied verbatim from the working Odin 3 + * (same SoC, same reset pin TLMM98, same mdp_vsync pad gpio86). */ + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&disp0_reset_n_active>, <&mdp_vsync_active>; + pinctrl-1 = <&disp0_reset_n_suspend>, <&mdp_vsync_suspend>; + + vddio-supply = <&vreg_l12b_1p8>; /* panel vddio -> L12B 1.8V */ + vdd-supply = <&vreg_l11b_1p0>; /* panel vdd -> L11B 1.0-1.1V */ + vci-supply = <&vreg_l13b_3p0>; /* panel vci -> L13B 3.0V */ + avdd-supply = <&sgm3804>; /* panel avdd/tvdd -> SGM3804 ~5.2V boost */ + + reset-gpios = <&tlmm 98 GPIO_ACTIVE_LOW>; /* reset = TLMM98, seq high10ms/low10ms/high55ms */ + backlight = <&aw99706_bl>; /* external backlight (see i2c below) */ + + rotation = <90>; /* portrait panel mounted at 90 degrees in a landscape device */ + + port { + panel0_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; +}; + +&mdss_dsi0_out { + remote-endpoint = <&panel0_in>; + data-lanes = <0 1 2 3>; /* 4-lane DSI */ +}; + +&mdss_dsi0_phy { + vdds-supply = <&vreg_l3i_0p88>; /* DSI PHY */ + status = "okay"; +}; + +/* ===================================================================== * + * I2C: panel AVDD bias (SGM3804) + backlight (AW99706) + * both on stock qupv3_2 geni i2c@880000 = mainline &i2c8 + * (geniqup@8c0000 / i2c@880000 is labelled i2c8 in sm8750.dtsi). + * ===================================================================== */ +/* qupv3_2 (the QUP wrapper i2c8 lives under) is status="disabled" in + * sm8750.dtsi, so enabling the i2c8 child alone is not enough: without the + * parent wrapper the bus never probes โ†’ SGM3804 (panel avdd) + AW99706 + * (backlight) never appear โ†’ panel-ar14 defers on 'avdd' โ†’ no display + * (`ae94000.dsi.0 panel-ar14-144hz: Failed to get supply 'avdd'`). The + * Odin 3 enables &qupv3_2 too. */ +&qupv3_2 { + status = "okay"; + + /* AYANEO MCU/EC UART on geni SE5 @894000 ("ttyHS1" on stock Android). + * Mainline only defines SE5 as i2c13/spi13; the KONKR wires it as a 2-wire + * UART (115200 8N1) to the MCU: RX = KONKR/Home/menu/grip "system" buttons + * (byte-x8 + 64 02 frames), TX = analog-stick RGB (F7 01 R G B .. ED). + * reg/IRQ/clock identical to i2c13; pins/func from the stock fdt + * (qup2_se5: gpio22 TX, gpio23 RX). */ + uart_mcu: serial@894000 { + compatible = "qcom,geni-uart"; + reg = <0x0 0x00894000 0x0 0x4000>; + interrupts = ; + clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>; + clock-names = "se"; + interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS + &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "qup-core", "qup-config"; + pinctrl-0 = <&qup_uart_mcu_default>; + pinctrl-names = "default"; + status = "okay"; + + /* serdev client: konkr_sysbtn binds here, consumes the tty + * (no /dev/ttyHS* for this SE once it does). */ + mcu { + compatible = "konkr,pf-elite-mcu"; + }; + }; +}; + +/* GENI GPI DMA controllers โ€” geni_i2c on some SEs has the FIFO interface + * disabled by the SE firmware and then REQUIRES a GPI channel (defers forever + * with "Failed to get tx DMA ch" otherwise; &i2c15, the second speaker-amp + * bus, lists &gpi_dma2 dmas). Same enable as the working Odin3 (0046). */ +&gpi_dma1 { + status = "okay"; +}; + +&gpi_dma2 { + status = "okay"; +}; + +/* Gamepad โ€” AYANEO SPI MCU on qupv3_1 SE1 (spi@a84000 = mainline &spi1). + * Stock driver is tc_mcu_joystick.ko (compatible "mcu,joystick"); replaced by a + * clean-room mainline reimplementation (drivers/input/joystick/mcu_joystick.c, + * patch 0058). The MCU exposes the pad as 16-bit regs 0x8080-0x8088 (header + * "AYANEO" + key/x/y/z/rz/trigger). Pins transcribed from the stock Android fdt: + * power=TLMM125, en=TLMM92, irq=TLMM47; the SE's SPI personality, so &i2c1 stays off. */ +&qupv3_1 { + status = "okay"; +}; + +&spi1 { + status = "okay"; + + joystick@0 { + compatible = "mcu,joystick"; + reg = <0>; + spi-max-frequency = <5000000>; + /* MCU logic rail = pm_v8i_l2 = pmih0108 ldoi2 (1.2V); already defined + * as vreg_l2i_1p2 in regulators-4. Without this the rail is never + * enabled and the MCU never drives the SPI bus (all-zero reads). */ + vdd-supply = <&vreg_l2i_1p2>; + /* IRQ derived from the gpiod (driver gpiod_to_irq): the line must be + * a plain GPIO so the driver can drive it input during the MCU boot, + * per the stock power-on dance. */ + irq-gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>; + power-gpios = <&tlmm 125 GPIO_ACTIVE_HIGH>; + en-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; + /* Stock timing: gpio47 pull-DOWN during MCU power-on ("default" = + * the stock suspend config), pull-UP ("active") selected by the + * driver after en+50ms, before the 600 ms MCU boot wait. */ + pinctrl-names = "default", "active"; + pinctrl-0 = <&mcu_joystick_suspend>; + pinctrl-1 = <&mcu_joystick_active>; + }; +}; + +/* Touchscreen = Chipone TDDI (touch half of the display driver IC; powered + * by the panel rails, no separate supplies โ€” matches the stock node having + * none). On stock it sits on i2c bus 4 addr 0x48, IRQ TLMM 162 (edge), + * driver "chipone-tddi" = the Chipone CTS family (chipone_tddi_mmi on Moto, + * GPL source exists); no ICNL firmware blob on /vendor, so the firmware is + * panel-resident and the driver (patch 0061) stays lean. + * Stock node: /soc/qcom,qupv3_1_geni_se@ac0000/i2c@a90000/chipone_tddi@48 + * (= mainline &i2c4), rst=TLMM161, x/y=1080/1920, pinctrl default=int + * input-pull-up, sleep=output-low. Node is inert until the driver lands + * (port plan: vendor_dlkm .ko modinfo for chip model + Moto GPL CTS source). + * VERIFY at port time: reset polarity, IRQ edge. */ +&i2c4 { + clock-frequency = <400000>; + status = "okay"; + + touchscreen@48 { + compatible = "chipone-tddi"; + reg = <0x48>; + interrupt-parent = <&tlmm>; + interrupts = <162 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&tlmm 161 GPIO_ACTIVE_LOW>; + touchscreen-size-x = <1080>; + touchscreen-size-y = <1920>; + /* The panel is a portrait phone display mounted at 90ยฐ in a + * landscape device; the compositor already rotates (swaps x/y) for + * both display and touch. On device: native-X maps to device-Y and + * was inverted; native-Y maps to device-X and was correct. So invert + * native-X only (no swap โ€” the compositor owns the rotation). */ + touchscreen-inverted-x; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&ts_int_default>; + pinctrl-1 = <&ts_int_sleep>; + }; +}; + +&i2c8 { /* i2c@880000 โ€” the panel/backlight bus */ + clock-frequency = <400000>; + status = "okay"; + + /* Panel AVDD boost/bias โ€” same chip as sm8650-konkr-pf */ + sgm3804: regulator@3e { + compatible = "sgmicro,sgm3804"; + reg = <0x3e>; + regulator-name = "panel-avdd"; + /* mainline sgm3804-regulator.c is FIXED 5.0V (n_voltages=1, + * min_uV=5000000); demanding 5.2V exact made regulator registration + * fail (-EINVAL). 5.0V matches the driver + the working SM8650 Konkr. */ + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + /* SGM3804 dual-rail enables, transcribed from the stock fdt: + * bias-enp-gpio = gpio56, bias-enn-gpio = gpio57 (both active-high). + * The driver's reset_gpio[0]/[1] map to these. TLMM163 is a different + * pin (the panel-power master, see &tlmm), not an SGM3804 enable. */ + reset-gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>, /* ENP (positive rail) */ + <&tlmm 57 GPIO_ACTIVE_HIGH>; /* ENN (negative rail) */ + status = "okay"; + }; + + /* + * Backlight โ€” DIFFERS from sm8650-konkr (which uses silergy,sy7758). + * Driver IS in mainline 7.0.10: drivers/video/backlight/aw99706.c + * (CONFIG_BACKLIGHT_AW99706 โ€” enable it in linux.aarch64.conf). + * All tuning values below are โ€” mapped from the stock node's + * downstream aw,* props to the mainline awinic,* binding. + */ + aw99706_bl: backlight@76 { + compatible = "awinic,aw99706"; /* reg 0x76 */ + reg = <0x76>; + enable-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>; /* HWEN = stock aw,hwen-gpio tlmm164 */ + max-brightness = <4095>; /* 12-bit (stock aw,max-brightness was 1024 โ€” tunable) */ + default-brightness = <2047>; + awinic,dim-mode = <1>; /* DC mode (stock aw,dim-mode=1) */ + awinic,sw-freq-hz = <750000>; /* stock aw,sw-freq=750(kHz) */ + awinic,sw-ilmt-microamp = <3000000>; /* stock aw,sw-ilmt=3000000 */ + awinic,iled-max-microamp = <7000>; /* = stock CFG2 ILED_MAX=0x04 (read live off the + * Android device's working AW99706). A value of 20000 + * (=CFG2 0x1e) over-drove the string โ†’ FLAG fault (0x08) โ†’ + * protection shutdown โ†’ dark. 7000ยตA โ†’ (7000-5000)/500=4. */ + awinic,uvlo-thres-microvolt = <2200000>; /* stock aw,uvlosel=2200(mV) */ + awinic,ramp-ctl = <2>; /* stock aw,ramp-ctr=2 (medium filter) */ + status = "okay"; + }; + + /* Speaker amp (see the &i2c15 comment for the details). + * Probe-verified on hardware: 0x35 = AW88261 chip id 0x2113. The + * stock fdt also declares 0x34 here (sound-channel 0) but the chip is + * NOT POPULATED (chipid read -6 / NAK) โ€” quad-design leftover, node + * dropped. */ + spk_amp_2: speaker-amp@35 { + compatible = "awinic,aw88261"; + reg = <0x35>; + firmware-name = "qcom/sm8750/konkr/pfe/aw88261_acf.bin"; + #sound-dai-cells = <1>; + awinic,audio-channel = <2>; /* stock sound-channel = 2 */ + awinic,sync-flag; + sound-name-prefix = "SPK2"; + }; +}; + +/* ===================================================================== * + * GPU + * ===================================================================== */ +/* GPU + GMU (Adreno 830 / gen8). Both are needed for a UI: a display-only + * path leaves fb0 unmapped ("framebuffer is not in virtual address space"). + * Firmware: qcom/gen80000_{gmu.bin,sqe.fw,aqe.fw} + qcom/sm8750 zap. */ +&gpu { + status = "okay"; +}; + +&gmu { + status = "okay"; +}; + +&gpu_zap_shader { + /* The SM8750 zap is signed with Qualcomm's generic SecTools test key, + * not per-OEM: this board's blob and the shared qcom/sm8750 one have + * byte-identical ELF and hash-table segments and the same signer, so + * they differ only in signature bytes. Use the shared blob. */ + firmware-name = "qcom/sm8750/gen80000_zap.mbn"; +}; + +/* ===================================================================== * + * Storage (UFS) โ€” required to boot + * ===================================================================== */ +&ufs_mem_hc { + status = "okay"; + + /* Supplies transcribed from the konkr stock fdt (matched by rail + * voltage to the mainline PMIC labels): vcc = pm_humu_l17 (2.504V), + * vccq = pm_v8d_l1 (1.2V). vdd-hba is the GCC_UFS_PHY_GDSC power-domain + * already wired in sm8750.dtsi. Without these the ufs-qcom probe fails + * its mandatory regulator_get() and the device never enumerates. */ + vcc-supply = <&vreg_l17b_2p5>; + vcc-max-microamp = <1300000>; + vccq-supply = <&vreg_l1d_1p2>; + vccq-max-microamp = <1200000>; + + /* UFS device reset (active-low) on the dedicated tlmm "ufs_reset" pad + * (offset 215, the pin after the GPIO range). Without it the eUFS is + * held in POR reset -> DME_LINKSTARTUP times out (link startup -110). */ + reset-gpios = <&tlmm 215 GPIO_ACTIVE_LOW>; +}; + +&ufs_mem_phy { + status = "okay"; + + /* vdda-phy = pm_v6j_l1 (0.88V), vdda-pll = pm_v8g_l3 (1.2V). */ + vdda-phy-supply = <&vreg_l1j_0p91>; + vdda-pll-supply = <&vreg_l3g_1p2>; +}; + +/* ===================================================================== * + * SD card (sdhc_2 / mmc@8804000) โ€” REQUIRED to boot: ROCKNIX boots from + * the microSD (the bootloader's update.sh keys on /dev/mmcblk*), so the + * kernel needs this controller up to find+mount its SYSTEM rootfs. + * Values transcribed from the konkr's stock fdt (sdhci@8804000: cd-gpio + * TLMM55 active-low, vdd=L9 ~2.95V, vdd-io=L8 1.8-2.96V, bus-width 4, + * no-sdio/no-mmc) โ€” and they match the Odin 3 (0046) rail-for-rail. + * ===================================================================== */ +&tlmm { + /* Without this the kernel resets the SoC inside the sm8750-tlmm + * probe (f100000.pinctrl), confirmed by a named probe-start in the EDL dump. + * Cause: mainline sm8750.dtsi declares NO gpio-reserved-ranges, so the pinctrl + * driver touches GPIOs that THIS device's secure firmware (TZ/XPU) has locked + * โ†’ access violation โ†’ secure reset (no kernel oops). The konkr's own stock + * fdt reserves them: qcom,gpios-reserved = <0x28 0x29 0x2a 0x2b 0x4a> = + * GPIOs 40,41,42,43,74. Transcribe to the mainline property so the OS skips + * them. */ + gpio-reserved-ranges = <40 4>, <74 1>; + + /* MCU UART (geni SE5, 2-wire): TX gpio22, RX gpio23 */ + qup_uart_mcu_default: qup-uart-mcu-default-state { + pins = "gpio22", "gpio23"; + function = "qup2_se5"; + drive-strength = <2>; + bias-disable; + }; + + /* Panel-power master enable. The stock panel node declares + * qcom,platform-en-gpio = <0x26 0xa3 0x0> = TLMM163, the panel-power MASTER + * enable; the SM8650 Konkr (same ar14 panel, working) holds its equivalent + * pin output-high via the panel_pwr_active pinctrl. Nothing in our DT drives + * 163, so the panel-power rail (which feeds the AW99706 backlight VIN) only + * survives on the bootloader default and collapses early in boot โ†’ the + * AW99706 answers its chip-id once at probe (~0.7s) then goes permanently + * unreachable (NAK), and the backlight never lights. Hog 163 output-high so + * it is asserted at gpiochip registration โ€” before any driver probe โ€” and + * stays up for the life of the system (panel is always on for a handheld). */ + panel_en_hog: panel-en-hog { + gpio-hog; + gpios = <163 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "panel-power-en"; + }; + + sdc2_card_det_n: sd-card-det-n-state { + pins = "gpio55"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + /* Display panel pinctrl โ€” verbatim from the working Odin 3 (same SoC). + * reset = gpio98 (= our panel reset-gpios); TE/vsync = gpio86 (mdp_vsync). */ + disp0_reset_n_active: disp0-reset-n-active-state { + pins = "gpio98"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + disp0_reset_n_suspend: disp0-reset-n-suspend-state { + pins = "gpio98"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + mdp_vsync_active: mdp-vsync-active-state { + pins = "gpio86"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + mdp_vsync_suspend: mdp-vsync-suspend-state { + pins = "gpio86"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + /* Gamepad: stock mcu_joystick pinctrl, verbatim from the stock + * fdt: "active" = gpio47 (MCU irq) bias-pull-up drive 8, "suspend" = + * pull-down drive 2. Stock does NOT select a state at probe (lookup only) โ€” + * the power-on dance selects ACTIVE between en+50 ms and the 600 ms MCU boot + * wait. So the "default" state (auto-applied at probe, i.e. during power-on) + * must be the SUSPEND config, and the driver selects "active" mid-dance. */ + mcu_joystick_active: mcu-joystick-active-state { + pins = "gpio47"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + mcu_joystick_suspend: mcu-joystick-suspend-state { + pins = "gpio47"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + /* Touch: Chipone TDDI int line; stock states verbatim: + * default = ts_int_input_pull_up, sleep = ts_int_output_low. */ + ts_int_default: ts-int-default-state { + pins = "gpio162"; + function = "gpio"; + drive-strength = <2>; + input-enable; + bias-pull-up; + }; + ts_int_sleep: ts-int-sleep-state { + pins = "gpio162"; + function = "gpio"; + drive-strength = <2>; + output-low; + }; + + /* Speaker I2S pads: SECONDARY MI2S + * on plain TLMM pads, identical to the AYN Odin3 โ€” pinctrl-sm8750.c: + * i2s1_sck=gpio121, i2s1_data0=gpio122, i2s1_ws=gpio123, + * i2s1_data1=gpio124 (NB ws/data1 ordering differs from i2s0). + * Stock Android's idle-vs-playing pad dump: these four flip + * func0 โ†’ func1(i2s1) drive-8 no-pull exactly while the aw882xx amps + * play; the PAL speaker backend is "MI2S-LPAIF-RX-SECONDARY". + * Config below = the stock playing state verbatim. */ + mi2s1_active: mi2s1-active-state { + sck-pins { + pins = "gpio121"; + function = "i2s1_sck"; + drive-strength = <8>; + bias-disable; + }; + + data0-pins { + pins = "gpio122"; + function = "i2s1_data0"; + drive-strength = <8>; + bias-disable; + }; + + ws-pins { + pins = "gpio123"; + function = "i2s1_ws"; + drive-strength = <8>; + bias-disable; + }; + + data1-pins { + pins = "gpio124"; + function = "i2s1_data1"; + drive-strength = <8>; + bias-disable; + }; + }; + + /* [keys] The stock gpio_keys holds ALL its TLMM pins bias-pull-up (the keys + * short to GND, ACTIVE_LOW): tlmm_key_default = gpio2,126-129, + * turbo_key_default = gpio106-108 (verbatim, minus the deprecated + * input-enable โ€” gpio-keys sets the direction itself). Without the pull-ups + * the lines float and no key ever registers an edge. */ + /* gpio126-129 are deliberately NOT in the key pull-ups: they are dead as + * keys (0 IRQ edges on stock, and stock parks them at func0 pull-up) โ€” + * see the gpio-keys comment. */ + tlmm_key_default: tlmm-key-default-state { + pins = "gpio2"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + turbo_key_default: turbo-key-default-state { + pins = "gpio106", "gpio107", "gpio108"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + /* Fan: tach input (gpio67) + the two fan-power enable pads. */ + fan_int: fan-int-state { + pins = "gpio67"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + fan_pwr_pins: fan-pwr-state { + pins = "gpio111"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + fan_vdd_pins: fan-vdd-state { + pins = "gpio110"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; +}; + +/* Fan PWM pad + volume-up pad on the pm8550 PMIC GPIOs. */ +&pm8550_gpios { + volume_up_n: volume-up-n-state { + pins = "gpio6"; + function = "normal"; + bias-pull-up; + input-enable; + power-source = <1>; + }; + + /* PWM-fan pad, transcribed verbatim from the stock Android fdt + * (pm8550@1/pinctrl@8800/pwm_fan_ctrl): gpio9 func1, power-source = 1, + * drive-strength LOW (=3), output-low active / output-high sleep โ€” BOTH + * states are func1 in stock โ€” "normal" for the sleep state, or a different + * power-source, is wrong. Stock ALSO sets qcom,invert = <1>, but mainline + * qcom-spmi-gpio has no such property and leds-qcom-lpg rejects inverted + * PWM polarity (lpg_pwm_apply: -EINVAL), so the inversion cannot be + * expressed declaratively โ€” polarity is verified empirically by the fan + * sweep test, and patched into a driver only if the sweep proves it wrong. */ + pwm_fan_ctrl_active: pwm-fan-ctrl-active-state { + pins = "gpio9"; + function = "func1"; + output-low; + bias-disable; + power-source = <1>; + qcom,drive-strength = ; + }; + + pwm_fan_ctrl_sleep: pwm-fan-ctrl-sleep-state { + pins = "gpio9"; + function = "func1"; + output-high; + bias-disable; + power-source = <1>; + qcom,drive-strength = ; + }; +}; + +/* Enable the PMIC LPG PWM so the fan's pwms=<&pm8550_pwm 3 ...> has a + * provider. Disabled in mainline pm8550.dtsi; leds-qcom-lpg (CONFIG_LEDS_QCOM_LPG=y) + * binds on the qcom,pm8350c-pwm compat and registers the pwmchip โ€” 4 channels, + * ch3 = fan @ 50000ns, both confirmed against the stock Android fdt + * (pwms = <0x661 0x3 0xc350>). Without this the pwm-fan driver defers forever + * ("Could not get PWM"). Matches the SM8650 Konkr G3. */ +&pm8550_pwm { + status = "okay"; +}; + +/* Power/volume keys. PMIC PON: power button + resin = Volume Down + * (Volume Up is the gpio-key above). Mirrors the Odin 3 / SM8650 Konkr. */ +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = ; + status = "okay"; +}; + +&sdhc_2 { + cd-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>; + + vmmc-supply = <&vreg_l9b_2p9>; + vqmmc-supply = <&vreg_l8b_1p8>; + + no-sdio; + no-mmc; + + pinctrl-0 = <&sdc2_default &sdc2_card_det_n>; + pinctrl-1 = <&sdc2_sleep &sdc2_card_det_n>; + pinctrl-names = "default", "sleep"; + + status = "okay"; +}; + +/* ===================================================================== * + * USB + * ===================================================================== */ +&usb { + status = "okay"; +}; + +&usb_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + +&usb_dp_qmpphy_out { + remote-endpoint = <&pmic_glink_ss_in>; +}; + +/* eUSB2 repeater (pmih0108 PMIC, pmic@7 phy@fd00) โ€” the M31 eUSB2 PHY + * needs it (`failed to get repeater` โ†’ dwc3 deferred forever otherwise). Supplies + * + link transcribed from the Odin3 SM8750 twin (cq8725s 0046). */ +&pmih0108_eusb2_repeater { + vdd18-supply = <&vreg_l15b_1p8>; + vdd3-supply = <&vreg_l5b_3p1>; + status = "okay"; +}; + +&usb_hsphy { + /* m31-eusb2-phy driver wants "vdd"/"vdda12" (NOT vdda-pll); + the + * repeater phandle. Verbatim from Odin3 0046. */ + vdd-supply = <&vreg_l2d_0p88>; + vdda12-supply = <&vreg_l3g_1p2>; + phys = <&pmih0108_eusb2_repeater>; + status = "okay"; +}; + +/* WCD939x USBSS โ€” Type-C analog-audio/orientation switch that routes + * the 3.5mm/USB-C headset (HPHL/HPHR/MIC/GND) to the WCD codec. The headphone + * path runs through this; it attaches to the Type-C connector's SBU port + * (see the eUSB2 repeater above). Node verbatim from the Odin3 twin + * (cq8725s 0046); reset on tlmm152 (same board family). */ +&i2c3 { + clock-frequency = <400000>; + status = "okay"; + + wcd_usbss: typec-mux@e { + compatible = "qcom,wcd9395-usbss", "qcom,wcd9390-usbss"; + reg = <0xe>; + + vdd-supply = <&vreg_l15b_1p8>; + reset-gpios = <&tlmm 152 GPIO_ACTIVE_HIGH>; + + mode-switch; + orientation-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + wcd_usbss_sbu_mux: endpoint { + remote-endpoint = <&pmic_glink_sbu>; + }; + }; + + port@1 { + reg = <1>; + wcd_usbss_headset_out: endpoint { + }; + }; + }; + }; +}; + +&usb_dp_qmpphy { + vdda-phy-supply = <&vreg_l3g_1p2>; + vdda-pll-supply = <&vreg_l2d_0p88>; + + status = "okay"; +}; + +/* ===================================================================== * + * Audio (LPASS / WCD939x + AW88261) + WiFi/BT (WCN7860), transcribed from + * the Odin 3 cq8725s-ayn-common (same SM8750 AYN platform). KONKR + * divergences: the stock spk-amp reset GPIOs (128/126) collide with this + * board's gpio-keys, so they are omitted; the cq8725s-local pinctrl states + * (i2s1_default / wlan_en) are omitted too (the GPIOs still drive). The + * firmware (adsp/cdsp mbn, ath12k WCN7860) ships with the image. + * ===================================================================== */ +/ { + wcd939x: audio-codec { + compatible = "qcom,wcd9395-codec", "qcom,wcd9390-codec"; + /* + * The integrated 3.5mm jack's HP lines run through the WCD939x + * USBSS analog switch. Point MBHC at it so it can route the + * switch to audio on mechanical insert (no Type-C event fires + * for the dedicated jack). See patch 0063. + */ + qcom,usbss = <&wcd_usbss>; + qcom,micbias1-microvolt = <1800000>; + qcom,micbias2-microvolt = <1800000>; + qcom,micbias3-microvolt = <1800000>; + qcom,micbias4-microvolt = <1800000>; + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; + qcom,mbhc-headset-vthreshold-microvolt = <1700000>; + qcom,mbhc-headphone-vthreshold-microvolt = <50000>; + /* + * Jack switch type = normally-closed (hphl_swh/gnd_swh=0), + * matching the stock fdt (qcom,msm-mbhc-{gnd,hphl}-swh = <0>). + * mainline wcd-mbhc-v2 defaults to normally-OPEN (swh=true) when + * these are absent โ€” which inverts mechanical-insert detection on + * this board, leaving the jack stuck "LINEOUT inserted" even + * unplugged (Elect-Insert IRQ never fires, headphones never route). + */ + qcom,hphl-jack-type-normally-closed; + qcom,ground-jack-type-normally-closed; + qcom,rx-device = <&wcd_rx>; + qcom,tx-device = <&wcd_tx>; + reset-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; + vdd-buck-supply = <&vreg_l15b_1p8>; + vdd-rxtx-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l15b_1p8>; + vdd-mic-bias-supply = <&vreg_bob1>; + vdd-px-supply = <&vreg_l2i_1p2>; + #sound-dai-cells = <1>; + }; + + sound { + compatible = "qcom,sm8750-sndcard", "qcom,sm8450-sndcard"; + /* The speakers are on SECONDARY MI2S, as on the Odin3: the stock PAL + * config (resourcemanager_sun_qrd_sku2.xml) routes + * PAL_DEVICE_OUT_SPEAKER to back_end "MI2S-LPAIF-RX-SECONDARY", and + * the playing-state pad dump shows TLMM 121-124 muxed i2s1 while the + * amps play. A SEC "pll lock fail" here means no MI2S IBIT is enabled + * (patch 0060). + * NB the vendor aw-rx-port-id 0x1006 "QUAT" is the amp driver's own + * protection-path bookkeeping, not the PAL route; QUAT intf 3 is + * DSP-rejected; PRIMARY streams but to TLMM i2s0 pads 126-129 that + * stock leaves unmuxed = connected to nothing. */ + clocks = <&q6prmcc LPASS_CLK_ID_SEC_MI2S_IBIT LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + clock-names = "i2s_clk"; + assigned-clocks = <&q6prmcc LPASS_CLK_ID_SEC_MI2S_IBIT LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + assigned-clock-rates = <1536000>; + model = "SM8750-KONKR"; + audio-routing = "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "AMIC2", "MIC BIAS2", + "TX SWR_INPUT1", "ADC2_OUTPUT"; + + /* Speaker I2S pads: SEC MI2S = TLMM i2s1 (gpio121-124, see + * &tlmm mi2s1_active). Plain TLMM pads โ€” no conflict with the WCD + * SoundWire buses (those live on the LPASS LPI pads, untouched; + * the pad dump confirms LPI 0-5 stay swr during speaker playback). */ + pinctrl-0 = <&mi2s1_active>; + pinctrl-names = "default"; + + /* + * Speaker amps: AW88261 on &i2c8 + &i2c15. Probe results on + * hardware: 0x35 on BOTH buses = chip id 0x2113; the 0x34 + * positions NAK (-6) = unpopulated quad-design leftovers (stereo + * device). Both live amps are in the codec list. + * Link/stream name must match the SEC cpu dai stream name + * ("Secondary MI2S Playback", q6dsp-lpass-ports.c) โ€” the shipped + * topology binds its BE widget by that name. + */ + spk-i2s-dai-link { + link-name = "Secondary MI2S Playback"; + cpu { sound-dai = <&q6apmbedai SECONDARY_MI2S_RX>; }; + codec { sound-dai = <&spk_amp_2 0>, <&spk_amp_3 0>; }; + platform { sound-dai = <&q6apm>; }; + }; + + /* The speaker bus is TLMM i2s1 (121-124), so there is no + * MI2S-vs-SoundWire LPI pad conflict: the LPI pads 0-5 stay swr + * during speaker playback. */ + wcd-playback-dai-link { + link-name = "WCD Playback"; + codec { sound-dai = <&wcd939x 0>, <&swr1 0>, <&lpass_rxmacro 0>; }; + cpu { sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>; }; + platform { sound-dai = <&q6apm>; }; + }; + + wcd-capture-dai-link { + link-name = "WCD Capture"; + codec { sound-dai = <&wcd939x 1>, <&swr2 0>, <&lpass_txmacro 0>; }; + cpu { sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>; }; + platform { sound-dai = <&q6apm>; }; + }; + }; + + wcn7860-pmu { + compatible = "qcom,wcn7860-pmu"; + wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>; + bt-enable-gpios = <&pm8550ve_f_gpios 3 GPIO_ACTIVE_HIGH>; + vddio-supply = <&vreg_l3f_1p8>; + vddio1p2-supply = <&vreg_l2f_1p2>; + vddaon-supply = <&vreg_s4d_0p85>; + vdddig-supply = <&vreg_s5f_0p85>; + vddrfa1p2-supply = <&vreg_s7i_1p2>; + vddrfa1p8-supply = <&vreg_s3g_1p8>; + clocks = <&rpmhcc RPMH_RF_CLK1>; + + regulators { + vreg_pmu_rfa_cmn: ldo0 { regulator-name = "vreg_pmu_rfa_cmn"; }; + vreg_pmu_aon_0p59: ldo1 { regulator-name = "vreg_pmu_aon_0p59"; }; + vreg_pmu_wlcx_0p8: ldo2 { regulator-name = "vreg_pmu_wlcx_0p8"; }; + vreg_pmu_wlmx_0p85: ldo3 { regulator-name = "vreg_pmu_wlmx_0p85"; }; + vreg_pmu_btcmx_0p85: ldo4 { regulator-name = "vreg_pmu_btcmx_0p85"; }; + vreg_pmu_rfa_0p8: ldo5 { regulator-name = "vreg_pmu_rfa_0p8"; }; + vreg_pmu_rfa_1p2: ldo6 { regulator-name = "vreg_pmu_rfa_1p2"; }; + vreg_pmu_rfa_1p8: ldo7 { regulator-name = "vreg_pmu_rfa_1p8"; }; + vreg_pmu_pcie_0p9: ldo8 { regulator-name = "vreg_pmu_pcie_0p9"; }; + vreg_pmu_pcie_1p8: ldo9 { regulator-name = "vreg_pmu_pcie_1p8"; }; + }; + }; +}; + +/* Speaker amps โ€” Awinic AW88261 (chip-id 0x2113 read live off the bus), NOT + * the Odin3's aw88166, and NOT on &i2c5: stock i2c5 carries the USB + * redriver/chargers/FM radio only. The Odin3 0046 amp addresses match but its + * bus does not, and probing them on i2c5 yields GPI "Error in Transaction" + * NAKs. Stock fdt defines FOUR aw882xx_smartpa nodes: + * i2c@880000 (= &i2c8): 0x34 sound-channel 0, 0x35 sound-channel 2 + * i2c@89c000 (= &i2c15): 0x34 sound-channel 1, 0x35 sound-channel 3 + * Live i2cdetect on the booted device: i2c8 0x35 ACKs (chip-id 0x2113 โœ“); + * i2c8 0x34 NAKs โ€” population unknown (quad layout may be partially stuffed). + * All four stock positions are declared; the probe results decide the final + * dai-link codec list. No reset gpio in stock (matches driver's optional one). + * firmware-name points the driver at the device-namespaced cal blob instead + * of its "aw88261_acf.bin" default, so the file does not sit in the firmware + * root where any other AW88261 board would collide with it. Built into the + * kernel via CONFIG_EXTRA_FIRMWARE (package.mk), same mechanism as the konkr + * zap: no SYSTEM/rootfs dependency at probe time. */ +&i2c15 { + clock-frequency = <400000>; + status = "okay"; + + /* Stock also declares 0x34 here (sound-channel 1) โ€” NOT POPULATED + * (probe NAK), node dropped like i2c8's 0x34. */ + spk_amp_3: speaker-amp@35 { + compatible = "awinic,aw88261"; + reg = <0x35>; + firmware-name = "qcom/sm8750/konkr/pfe/aw88261_acf.bin"; + #sound-dai-cells = <1>; + awinic,audio-channel = <3>; /* stock sound-channel = 3 */ + awinic,sync-flag; + sound-name-prefix = "SPK3"; + }; +}; + +&swr1 { + status = "okay"; + + /* Master port 9 carries the WCD939x HIFI_PCM headphone stream (384 kHz + * PCM), so the controller needs its per-port PCM format enable set for + * it. Inert unless the HPH PCM mode kcontrols are enabled. */ + qcom,pcm-ports-mask = <0x200>; + + wcd_rx: codec@0,4 { + compatible = "sdw20217010e00"; + reg = <0 4>; + qcom,rx-port-mapping = <1 2 3 4 5 9>; + }; +}; + +&swr2 { + status = "okay"; + + wcd_tx: codec@0,3 { + compatible = "sdw20217010e00"; + reg = <0 3>; + qcom,tx-port-mapping = <2 2 3 4>; + }; +}; + +&lpass_vamacro { + qcom,dmic-sample-rate = <4800000>; +}; + +&pcie0 { + pinctrl-0 = <&pcie0_default_state>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pcie0_phy { + vdda-phy-supply = <&vreg_l1f_0p88>; + vdda-pll-supply = <&vreg_l3g_1p2>; + status = "okay"; +}; + +&pcieport0 { + wake-gpios = <&tlmm 104 GPIO_ACTIVE_HIGH>; + reset-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>; + + wifi@0 { + compatible = "pci17cb,110e"; + reg = <0x10000 0x0 0x0 0x0 0x0>; + vddrfacmn-supply = <&vreg_pmu_rfa_cmn>; + vddaon-supply = <&vreg_pmu_aon_0p59>; + vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; + vddwlmx-supply = <&vreg_pmu_wlmx_0p85>; + vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>; + vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>; + vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>; + vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>; + }; +}; + +&uart14 { + /* + * Add the CTS/RTS pins for HW flow control. sm8750.dtsi wires uart14 + * with only the TX/RX group (unlike sm8550/sm8650 which include + * qup_uart14_cts_rts), so the WCN7860 BT UART runs at 3.2 Mbaud with no + * flow control -> RX overruns -> QCA IBS desync + frame-reassembly + * errors -> scans fail. Wiring CTS/RTS makes the link reliable. + */ + pinctrl-0 = <&qup_uart14_default>, <&qup_uart14_cts_rts>; + pinctrl-names = "default"; + status = "okay"; + + bluetooth { + compatible = "qcom,wcn7860-bt"; + vddrfacmn-supply = <&vreg_pmu_rfa_cmn>; + vddaon-supply = <&vreg_pmu_aon_0p59>; + vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; + vddwlmx-supply = <&vreg_pmu_wlmx_0p85>; + vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>; + vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>; + max-speed = <3200000>; + /* stock BD_ADDR F0:74:E4:8D:15:6D (little-endian); else qca generates one */ + local-bd-address = [ 6D 15 8D E4 74 F0 ]; + }; +}; + +/* Settable wall clock. The pmk8550 RTC counter is write-protected, so + * rtc-pm8xxx persists a settable time by storing a signed offset in a PMIC + * SDAM nvmem cell. With no "offset" cell wired up, pm8xxx_rtc_update_offset() + * returns -ENODEV, every RTC_SET_TIME fails and the clock stays at its + * power-on epoch across boots. Spare SDAM scratch at 0xbc, clear of + * reboot_reason@48; the SDAM is in the PMIC always-on domain, so the offset + * persists. Same wiring the pmk8280-based boards use. + * + * Done here rather than in the shared pmk8550.dtsi so the other SM8750 board + * that includes it is untouched -- that dtsi is mainline's, and this belongs + * upstream rather than in a device patch. */ +&pmk8550_sdam_2 { + rtc_offset: rtc-offset@bc { + reg = <0xbc 0x4>; + }; +}; + +&pmk8550_rtc { + nvmem-cells = <&rtc_offset>; + nvmem-cell-names = "offset"; +}; + +&remoteproc_adsp { + firmware-name = "qcom/sm8750/konkr/pfe/adsp.mbn", + "qcom/sm8750/konkr/pfe/adsp_dtb.mbn"; + status = "okay"; +}; + +&remoteproc_cdsp { + firmware-name = "qcom/sm8750/konkr/pfe/cdsp.mbn", + "qcom/sm8750/konkr/pfe/cdsp_dtb.mbn"; + status = "okay"; +}; diff --git a/projects/ROCKNIX/devices/SM8750/linux/linux.aarch64.conf b/projects/ROCKNIX/devices/SM8750/linux/linux.aarch64.conf index d26efd7587b..83a3caee860 100644 --- a/projects/ROCKNIX/devices/SM8750/linux/linux.aarch64.conf +++ b/projects/ROCKNIX/devices/SM8750/linux/linux.aarch64.conf @@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=24400 CONFIG_LLD_VERSION=0 -CONFIG_RUSTC_VERSION=109601 -CONFIG_RUSTC_LLVM_VERSION=220102 +CONFIG_RUSTC_VERSION=109701 +CONFIG_RUSTC_LLVM_VERSION=220106 CONFIG_RUSTC_LLVM_MAJOR_VERSION=22 CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y @@ -2826,6 +2826,7 @@ CONFIG_JOYSTICK_RSINPUT=m # CONFIG_JOYSTICK_FSIA6B is not set # CONFIG_JOYSTICK_SENSEHAT is not set # CONFIG_JOYSTICK_SEESAW is not set +CONFIG_JOYSTICK_MCU=y # CONFIG_INPUT_TABLET is not set CONFIG_INPUT_TOUCHSCREEN=y # CONFIG_TOUCHSCREEN_ADS7846 is not set @@ -2839,6 +2840,7 @@ CONFIG_INPUT_TOUCHSCREEN=y # CONFIG_TOUCHSCREEN_BU21029 is not set # CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set # CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set +CONFIG_TOUCHSCREEN_CHIPONE_TDDI=y # CONFIG_TOUCHSCREEN_CY8CTMA140 is not set # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set # CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set @@ -2941,6 +2943,7 @@ CONFIG_INPUT_PWM_VIBRA=m # CONFIG_INPUT_DRV260X_HAPTICS is not set # CONFIG_INPUT_DRV2665_HAPTICS is not set # CONFIG_INPUT_DRV2667_HAPTICS is not set +CONFIG_INPUT_KONKR_SYSBTN=y CONFIG_RMI4_CORE=y CONFIG_RMI4_I2C=y # CONFIG_RMI4_SPI is not set @@ -4078,6 +4081,7 @@ CONFIG_REGULATOR_QCOM_USB_VBUS=y # CONFIG_REGULATOR_RTMV20 is not set # CONFIG_REGULATOR_RTQ6752 is not set # CONFIG_REGULATOR_RTQ2208 is not set +CONFIG_REGULATOR_SGM3804=y # CONFIG_REGULATOR_SLG51000 is not set # CONFIG_REGULATOR_SY8106A is not set # CONFIG_REGULATOR_SY8824X is not set @@ -4460,6 +4464,7 @@ CONFIG_DRM_PANEL=y # Display Panels # # CONFIG_DRM_PANEL_ABT_Y030XX067A is not set +CONFIG_DRM_PANEL_AR14=y # CONFIG_DRM_PANEL_ARM_VERSATILE is not set # CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set # CONFIG_DRM_PANEL_AUO_A030JTN01 is not set @@ -4684,7 +4689,7 @@ CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y # # CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_AW99706 is not set +CONFIG_BACKLIGHT_AW99706=y # CONFIG_BACKLIGHT_KTD253 is not set # CONFIG_BACKLIGHT_KTD2801 is not set # CONFIG_BACKLIGHT_KTZ8866 is not set @@ -5076,7 +5081,7 @@ CONFIG_SND_SOC_I2C_AND_SPI=y CONFIG_SND_SOC_AW88395_LIB=y CONFIG_SND_SOC_AW88395=y CONFIG_SND_SOC_AW88166=y -# CONFIG_SND_SOC_AW88261 is not set +CONFIG_SND_SOC_AW88261=y # CONFIG_SND_SOC_AW88081 is not set # CONFIG_SND_SOC_AW87390 is not set # CONFIG_SND_SOC_AW88399 is not set diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0054-regulator-add-sgm3804-i2c-regulator-for-panel-power-.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0054-regulator-add-sgm3804-i2c-regulator-for-panel-power-.patch new file mode 100644 index 00000000000..cbdb7129ef6 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0054-regulator-add-sgm3804-i2c-regulator-for-panel-power-.patch @@ -0,0 +1,210 @@ +From e05ed5ba9b2d6d6dd579f318768aa9aeb0441141 Mon Sep 17 00:00:00 2001 +From: Philippe Simons +Date: Sat, 5 Jul 2025 23:02:03 +0200 +Subject: [PATCH] regulator: add sgm3804 i2c regulator for panel power + management. + +--- + drivers/regulator/Kconfig | 6 + + drivers/regulator/Makefile | 1 + + drivers/regulator/sgm3804-regulator.c | 175 ++++++++++++++++++++++++++ + 3 files changed, 182 insertions(+) + create mode 100644 drivers/regulator/sgm3804-regulator.c + +diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig +index 05e32d764028..631a0ad98724 100644 +--- a/drivers/regulator/Kconfig ++++ b/drivers/regulator/Kconfig +@@ -1353,6 +1353,12 @@ config REGULATOR_SC2731 + This driver provides support for the voltage regulators on the + SC2731 PMIC. + ++config REGULATOR_SGM3804 ++ tristate "SGMicro sgm3804 voltage regulator" ++ depends on I2C && OF ++ help ++ This driver supports SGMicro sgm3804 voltage regulator. ++ + config REGULATOR_SKY81452 + tristate "Skyworks Solutions SKY81452 voltage regulator" + depends on MFD_SKY81452 +diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile +index 524e026c0273..8b6925a159a3 100644 +--- a/drivers/regulator/Makefile ++++ b/drivers/regulator/Makefile +@@ -158,6 +158,7 @@ obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o + obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o + obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o + obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o ++obj-$(CONFIG_REGULATOR_SGM3804) += sgm3804-regulator.o + obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o + obj-$(CONFIG_REGULATOR_SLG51000) += slg51000-regulator.o + obj-$(CONFIG_REGULATOR_STM32_BOOSTER) += stm32-booster.o +diff --git a/drivers/regulator/sgm3804-regulator.c b/drivers/regulator/sgm3804-regulator.c +new file mode 100644 +index 0000000..5e7eac930 +--- /dev/null ++++ b/drivers/regulator/sgm3804-regulator.c +@@ -0,0 +1,162 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * SGMicro SGM3804 panel-bias regulator (fixed +5 V boost over I2C). ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define SGM3804_FIXED_UV 5000000 /* fixed 5 V panel-bias output */ ++ ++struct sgm3804_data { ++ struct regmap *regmap; ++ struct gpio_desc *reset_gpio[2]; ++ bool enabled; ++}; ++ ++static const struct regmap_config sgm3804_regmap_config = { ++ .reg_bits = 8, ++ .val_bits = 8, ++ .max_register = 0x03, ++}; ++ ++static int sgm3804_enable(struct regulator_dev *rdev) ++{ ++ struct sgm3804_data *data = rdev_get_drvdata(rdev); ++ struct regmap *regmap = data->regmap; ++ int ret = 0; ++ ++ /* drive the reset/enable line(s) high to bring the chip up */ ++ if (data->reset_gpio[0]) ++ gpiod_set_value_cansleep(data->reset_gpio[0], 1); ++ if (data->reset_gpio[1]) ++ gpiod_set_value_cansleep(data->reset_gpio[1], 1); ++ ++ /* vendor power-on sequence: program both rails and enable the output */ ++ ret |= regmap_write(regmap, 0x00, 0x0c); ++ ret |= regmap_write(regmap, 0x01, 0x0c); ++ ret |= regmap_write(regmap, 0x03, 0x03); ++ if (ret) { ++ dev_err(rdev->dev.parent, "failed to enable SGM3804 regulator\n"); ++ return ret; ++ } ++ ++ data->enabled = true; ++ return 0; ++} ++ ++static int sgm3804_disable(struct regulator_dev *rdev) ++{ ++ struct sgm3804_data *data = rdev_get_drvdata(rdev); ++ ++ if (data->reset_gpio[0]) ++ gpiod_set_value_cansleep(data->reset_gpio[0], 0); ++ if (data->reset_gpio[1]) ++ gpiod_set_value_cansleep(data->reset_gpio[1], 0); ++ ++ data->enabled = false; ++ return 0; ++} ++ ++static int sgm3804_is_enabled(struct regulator_dev *rdev) ++{ ++ struct sgm3804_data *data = rdev_get_drvdata(rdev); ++ ++ return data->enabled; ++} ++ ++static int sgm3804_get_voltage(struct regulator_dev *rdev) ++{ ++ return SGM3804_FIXED_UV; ++} ++ ++static const struct regulator_ops sgm3804_ops = { ++ .enable = sgm3804_enable, ++ .disable = sgm3804_disable, ++ .is_enabled = sgm3804_is_enabled, ++ .get_voltage = sgm3804_get_voltage, ++}; ++ ++static const struct regulator_desc sgm3804_reg = { ++ .name = "SGM3804", ++ .id = 0, ++ .ops = &sgm3804_ops, ++ .type = REGULATOR_VOLTAGE, ++ .n_voltages = 1, ++ .min_uV = SGM3804_FIXED_UV, ++ .owner = THIS_MODULE, ++}; ++ ++static int sgm3804_i2c_probe(struct i2c_client *i2c) ++{ ++ struct device *dev = &i2c->dev; ++ struct regulator_config config = { }; ++ struct regulator_dev *rdev; ++ struct sgm3804_data *data; ++ ++ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); ++ if (!data) ++ return -ENOMEM; ++ ++ data->regmap = devm_regmap_init_i2c(i2c, &sgm3804_regmap_config); ++ if (IS_ERR(data->regmap)) ++ return dev_err_probe(dev, PTR_ERR(data->regmap), "failed to init regmap\n"); ++ ++ /* first reset GPIO is required; the second is optional */ ++ data->reset_gpio[0] = devm_gpiod_get_index(dev, "reset", 0, GPIOD_OUT_HIGH); ++ if (IS_ERR(data->reset_gpio[0])) ++ return dev_err_probe(dev, PTR_ERR(data->reset_gpio[0]), ++ "failed to get first reset GPIO\n"); ++ ++ data->reset_gpio[1] = devm_gpiod_get_index_optional(dev, "reset", 1, GPIOD_OUT_HIGH); ++ if (IS_ERR(data->reset_gpio[1])) ++ return dev_err_probe(dev, PTR_ERR(data->reset_gpio[1]), ++ "failed to get second reset GPIO\n"); ++ ++ config.dev = dev; ++ config.regmap = data->regmap; ++ config.driver_data = data; ++ config.of_node = dev->of_node; ++ config.init_data = of_get_regulator_init_data(dev, dev->of_node, &sgm3804_reg); ++ if (!config.init_data) ++ return -ENOMEM; ++ ++ rdev = devm_regulator_register(dev, &sgm3804_reg, &config); ++ if (IS_ERR(rdev)) ++ return dev_err_probe(dev, PTR_ERR(rdev), "failed to register SGM3804 regulator\n"); ++ ++ return 0; ++} ++ ++static const struct i2c_device_id sgm3804_i2c_id[] = { ++ { "sgm3804" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, sgm3804_i2c_id); ++ ++static const struct of_device_id sgm3804_i2c_of_match[] = { ++ { .compatible = "sgmicro,sgm3804" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, sgm3804_i2c_of_match); ++ ++static struct i2c_driver sgm3804_regulator_driver = { ++ .driver = { ++ .name = "sgm3804", ++ .probe_type = PROBE_PREFER_ASYNCHRONOUS, ++ .of_match_table = sgm3804_i2c_of_match, ++ }, ++ .probe = sgm3804_i2c_probe, ++ .id_table = sgm3804_i2c_id, ++}; ++ ++module_i2c_driver(sgm3804_regulator_driver); ++ ++MODULE_DESCRIPTION("SGMicro SGM3804 regulator driver"); ++MODULE_AUTHOR("Kancy Joe "); ++MODULE_LICENSE("GPL"); diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0055-gpu-drm-panel-add-pocket-fit-panel.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0055-gpu-drm-panel-add-pocket-fit-panel.patch new file mode 100644 index 00000000000..d3e221cdeb1 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0055-gpu-drm-panel-add-pocket-fit-panel.patch @@ -0,0 +1,604 @@ +From e11cdc595000c10d3b1195ac98974c86777b3a01 Mon Sep 17 00:00:00 2001 +From: Philippe Simons +Date: Tue, 13 Jan 2026 20:48:26 +0100 +Subject: [PATCH] gpu:drm:panel:add pocket fit panel + +--- + drivers/gpu/drm/panel/Kconfig | 13 + + drivers/gpu/drm/panel/Makefile | 1 + + drivers/gpu/drm/panel/panel-ar14-144hz.c | 481 +++++++++++++++++++++++ + 3 files changed, 495 insertions(+) + create mode 100644 drivers/gpu/drm/panel/panel-ar14-144hz.c + +diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig +index 407c5f6a268b..6481e0100061 100644 +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -17,6 +17,19 @@ config DRM_PANEL_ABT_Y030XX067A + Y030XX067A 320x480 3.0" panel as found in the YLM RG-280M, RG-300 + and RG-99 handheld gaming consoles. + ++config DRM_PANEL_AR14 ++ tristate "Ayaneo Pocket FIT panel driver" ++ depends on OF ++ depends on DRM_MIPI_DSI ++ depends on BACKLIGHT_CLASS_DEVICE ++ select VIDEOMODE_HELPERS ++ help ++ Say Y here if you want to enable support for Ayaneo Pocket FIT ++ 1080x1920 144Hz video mode display panels. These panels are ++ used in Ayaneo handheld gaming devices. ++ ++ To compile this driver as a module, choose M here. ++ + config DRM_PANEL_ARM_VERSATILE + tristate "ARM Versatile panel driver" + depends on OF +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile +index 3615a761b44f..5ae127482f10 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -1,5 +1,6 @@ + # SPDX-License-Identifier: GPL-2.0 + obj-$(CONFIG_DRM_PANEL_ABT_Y030XX067A) += panel-abt-y030xx067a.o ++obj-$(CONFIG_DRM_PANEL_AR14) += panel-ar14-144hz.o + obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o + obj-$(CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596) += panel-asus-z00t-tm5p5-n35596.o + obj-$(CONFIG_DRM_PANEL_AUO_A030JTN01) += panel-auo-a030jtn01.o +diff --git a/drivers/gpu/drm/panel/panel-ar14-144hz.c b/drivers/gpu/drm/panel/panel-ar14-144hz.c +new file mode 100644 +index 000000000000..0685888ab89f +--- /dev/null ++++ b/drivers/gpu/drm/panel/panel-ar14-144hz.c +@@ -0,0 +1,551 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++// Copyright (c) 2026 Philippe Simons ++// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree: ++// Copyright (c) 2013, The Linux Foundation. All rights reserved. ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++struct panel_ar14_144hz { ++ struct drm_panel panel; ++ struct mipi_dsi_device *dsi; ++ struct drm_dsc_config dsc; ++ ++ struct gpio_desc *reset_gpio; ++ struct regulator_bulk_data *supplies; ++ enum drm_panel_orientation orientation; ++}; ++ ++static const struct regulator_bulk_data ar14_supplies[] = { ++ { .supply = "vddio" }, ++ { .supply = "vci" }, ++ { .supply = "vdd" }, ++ { .supply = "avdd" }, ++}; ++ ++static inline ++struct panel_ar14_144hz *to_panel_ar14_144hz(struct drm_panel *panel) ++{ ++ return container_of(panel, struct panel_ar14_144hz, panel); ++} ++ ++static void panel_ar14_144hz_reset(struct panel_ar14_144hz *ctx) ++{ ++ gpiod_set_value_cansleep(ctx->reset_gpio, 1); ++ usleep_range(10000, 11000); ++ gpiod_set_value_cansleep(ctx->reset_gpio, 0); ++ usleep_range(10000, 11000); ++ gpiod_set_value_cansleep(ctx->reset_gpio, 0); ++ msleep(55); ++} ++ ++static int panel_ar14_144hz_on(struct panel_ar14_144hz *ctx) ++{ ++ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; ++ ++ ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM; ++ ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0x99, 0x22, 0x0c); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x9d, ++ 0x00, 0x00, 0x04, 0x1c, 0x22, 0x3a, 0x40, ++ 0x58); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb2, ++ 0x07, 0x06, 0x05, 0x04, 0x22, 0x22, 0x05, ++ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x01, 0x6e, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x05, ++ 0x10, 0x20, 0x11, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb3, ++ 0x70, 0x03, 0x01, 0x01, 0x81, 0x02, 0x00, ++ 0x00, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x03, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x03, ++ 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb4, ++ 0x31, 0x01, 0x01, 0x01, 0x01, 0x81, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x03, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x03, ++ 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb6, ++ 0x1c, 0x1c, 0x1d, 0x1d, 0x1e, 0x1e, 0x82, ++ 0x3a, 0x3a, 0x82, 0xc0, 0x82, 0x00, 0x82, ++ 0x05, 0x00, 0x0d, 0x0f, 0x11, 0x13, 0x82, ++ 0xec, 0x82, 0xed, 0xfc, 0x08, 0x00, 0x00, ++ 0x00, 0x00, 0x3c, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb7, ++ 0x1c, 0x1c, 0x1d, 0x1d, 0x1e, 0x1e, 0x82, ++ 0x3a, 0x3a, 0x82, 0xc0, 0x82, 0x00, 0x82, ++ 0x04, 0x00, 0x0c, 0x0e, 0x10, 0x12, 0x82, ++ 0xec, 0x82, 0xed, 0xfc, 0x08, 0x00, 0x00, ++ 0x00, 0x00, 0x3c, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb8, ++ 0x03, 0x01, 0x03, 0x83, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb9, ++ 0x12, 0x33, 0x21, 0x12, 0x33, 0x21, 0x12, ++ 0x33, 0x21, 0x12, 0x33, 0x21, 0x12, 0x33, ++ 0x21, 0x12, 0x33, 0x21, 0x12, 0x33, 0x21, ++ 0x12, 0x33, 0x21, 0x00, 0x00, 0x0f, 0x00, ++ 0x00, 0x00, 0x00, 0x02); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xba, ++ 0x00, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, ++ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbb, ++ 0x01, 0x02, 0x03, 0x0a, 0x04, 0x13, 0x14, ++ 0x12, 0x16, 0x5c, 0x00, 0x15, 0x16, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbc, ++ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xff, ++ 0xf8, 0x0b, 0x11, 0x50, 0x5c, 0x55, 0x99, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbd, ++ 0xa1, 0xa2, 0x52, 0x2e, 0x00, 0x8f); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbe, ++ 0x23, 0x13, 0x0b, 0x0a, 0x43, 0x35, 0x33, ++ 0x32, 0x14, 0x00, 0x00, 0x3a, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc0, ++ 0x40, 0x93, 0xff, 0xff, 0xff, 0x3f, 0xff, ++ 0x00, 0xff, 0x00, 0xcc, 0x04, 0x12, 0x35, ++ 0x67, 0x89, 0xa0, 0xff, 0xff, 0xf0, 0x0b, ++ 0xeb); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc1, ++ 0x00, 0x00, 0x20, 0x26, 0xc0, 0x04, 0x20, ++ 0x20, 0x04, 0x80, 0x17, 0x24, 0x50, 0x00, ++ 0x10, 0x07, 0x11, 0x84, 0xa0, 0x00, 0x93, ++ 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc3, ++ 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x1d, ++ 0x1c, 0x1c, 0x22, 0x22, 0x22, 0x00, 0xff, ++ 0x40, 0x4d, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, ++ 0x2a, 0x2a, 0x2a, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc4, ++ 0x0c, 0x97, 0xa8, 0x29, 0xc0, 0x3c, 0x01, ++ 0xa0, 0x00, 0x0a, 0x26, 0x48, 0x91, 0xb3, ++ 0x75, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc5, ++ 0x02, 0x45, 0xc8, 0x40, 0x78, 0x04, 0x02, ++ 0x02, 0x08, 0x04, 0x14, 0x42, 0x05, 0x03, ++ 0x01, 0x20, 0x0d, 0x0a, 0x05, 0x12, 0x80, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc6, ++ 0x66, 0x13, 0x28, 0x46, 0x46, 0x28, 0x3f, ++ 0x02, 0x0d, 0x0d, 0x06, 0x00, 0x37, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x99, ++ 0x91, 0xbf, 0x00, 0x3f, 0x00, 0x7a, 0x00, ++ 0x30, 0x22, 0x01, 0xa2, 0x00, 0xba, 0x00, ++ 0x24, 0x05, 0x24, 0x05, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x9a, ++ 0x11, 0x80, 0x00, 0x00, 0xff, 0x00, 0x0a, ++ 0x00, 0x17, 0x00, 0x22, 0x6a, 0x00, 0xb9, ++ 0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc2, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc7, ++ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, ++ 0x77, 0x20, 0x77, 0x77, 0x77, 0x77, 0x77, ++ 0x77, 0x77, 0x77, 0x20, 0x43, 0x00, 0x01, ++ 0xff, 0xff, 0x40, 0xdc, 0xdc, 0x00); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x80, ++ 0xff, 0xf6, 0xe8, 0xde, 0xd6, 0xcf, 0xc8, ++ 0xc3, 0xbe, 0xae, 0xa2, 0x98, 0x90, 0x89, ++ 0x83, 0x78, 0x6f, 0x67, 0x69, 0x69, 0x57, ++ 0x50, 0x48, 0x3e, 0x39, 0x34, 0x2d, 0x25, ++ 0x1c, 0x11, 0x0f, 0x0d); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x81, ++ 0xff, 0xf6, 0xe8, 0xde, 0xd6, 0xcf, 0xc8, ++ 0xc3, 0xbe, 0xae, 0xa2, 0x98, 0x90, 0x89, ++ 0x83, 0x78, 0x6f, 0x67, 0x69, 0x69, 0x57, ++ 0x50, 0x48, 0x3e, 0x39, 0x34, 0x2d, 0x25, ++ 0x1c, 0x11, 0x0f, 0x0d); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x82, ++ 0xff, 0xf6, 0xe8, 0xde, 0xd6, 0xcf, 0xc8, ++ 0xc3, 0xbe, 0xae, 0xa2, 0x98, 0x90, 0x89, ++ 0x83, 0x78, 0x6f, 0x67, 0x69, 0x69, 0x57, ++ 0x50, 0x48, 0x3e, 0x39, 0x34, 0x2d, 0x25, ++ 0x1c, 0x11, 0x0f, 0x0d); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x83, ++ 0x0b, 0x0b, 0x08, 0x06, 0x02, 0x00, 0x00, ++ 0x0b, 0x08, 0x06, 0x02, 0x00, 0x00, 0x0b, ++ 0x08, 0x06, 0x02, 0x00, 0x00, 0x0b, 0x08, ++ 0x06, 0x02, 0x00, 0x00, 0x0b, 0x08, 0x06, ++ 0x02, 0x00, 0x00, 0x0b); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x84, ++ 0x08, 0x06, 0x02, 0x00, 0x00, 0x2e, 0x0d, ++ 0xab, 0xa6, 0x4a, 0x83, 0xcb, 0xe1, 0x7b, ++ 0x42, 0xe0, 0xda, 0xba, 0x64, 0xa8, 0x3c, ++ 0xbe, 0x17, 0xb4, 0x2e, 0x0d, 0xab, 0xa6, ++ 0x4a, 0x83, 0xcb, 0xe1); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x85, ++ 0x7b, 0x42, 0xe0, 0xda, 0xba, 0x64, 0xa8, ++ 0x3c, 0xbe, 0x17, 0xb4, 0x2e, 0x0d, 0xab, ++ 0xa6, 0x4a, 0x83, 0xcb, 0xe1, 0x7b, 0x42, ++ 0xe0, 0xda, 0xba, 0x64, 0xa8, 0x3c, 0xbe, ++ 0x17, 0xb4); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x86, ++ 0xff, 0xf6, 0xe8, 0xde, 0xd6, 0xcf, 0xc8, ++ 0xc3, 0xbe, 0xae, 0xa2, 0x98, 0x90, 0x89, ++ 0x83, 0x78, 0x6f, 0x67, 0x54, 0x54, 0x57, ++ 0x50, 0x48, 0x3e, 0x39, 0x34, 0x2d, 0x25, ++ 0x1c, 0x11, 0x0f, 0x0d); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x87, ++ 0xff, 0xf6, 0xe8, 0xde, 0xd6, 0xcf, 0xc8, ++ 0xc3, 0xbe, 0xae, 0xa2, 0x98, 0x90, 0x89, ++ 0x83, 0x78, 0x6f, 0x67, 0x54, 0x54, 0x57, ++ 0x50, 0x48, 0x3e, 0x39, 0x34, 0x2d, 0x25, ++ 0x1c, 0x11, 0x0f, 0x0d); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x8b, ++ 0xff, 0xf6, 0xe8, 0xde, 0xd6, 0xcf, 0xc8, ++ 0xc3, 0xbe, 0xae, 0xa2, 0x98, 0x90, 0x89, ++ 0x83, 0x78, 0x6f, 0x67, 0x54, 0x54, 0x57, ++ 0x50, 0x48, 0x3e, 0x39, 0x34, 0x2d, 0x25, ++ 0x1c, 0x11, 0x0f, 0x0d); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xd0, ++ 0x0c, 0x23, 0x18, 0x00, 0x00, 0x00, 0x80, ++ 0x0c, 0xdf, 0x0f, 0x40, 0x00, 0x08, 0x18); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x70, ++ 0x41, 0x12, 0x00, 0x05, 0x00, 0x5a, 0x00, ++ 0x6f, 0x00, 0x77, 0x00, 0x31, 0x02, 0x00, ++ 0x20); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x71, ++ 0x12, 0x00, 0x00, 0x89, 0x30, 0x80, 0x07, ++ 0x80, 0x04, 0x38, 0x00, 0x08, 0x02, 0x1c, ++ 0x02, 0x1c, 0x02, 0x00, 0x02, 0x0e, 0x00, ++ 0x20, 0x00, 0xbb, 0x00, 0x07, 0x00, 0x0c, ++ 0x0d, 0xb7, 0x0c, 0xb7); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x72, ++ 0x18, 0x00, 0x10, 0xf0, 0x03, 0x0c, 0x20, ++ 0x00, 0x06, 0x0b, 0x0b, 0x33, 0x0e, 0x1c, ++ 0x2a, 0x38, 0x46, 0x54, 0x62, 0x69, 0x70, ++ 0x77, 0x79, 0x7b, 0x7d, 0x7e, 0x01, 0x02, ++ 0x01, 0x00, 0x09, 0x40); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x73, ++ 0x09, 0xbe, 0x19, 0xfc, 0x19, 0xfa, 0x19, ++ 0xf8, 0x1a, 0x38, 0x1a, 0x78, 0x1a, 0xb6, ++ 0x2a, 0xb6, 0x2a, 0xf4, 0x2a, 0xf4, 0x4b, ++ 0x34, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00); ++ mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x91, 0xf0, 0x00); ++ mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx); ++ mipi_dsi_msleep(&dsi_ctx, 120); ++ mipi_dsi_dcs_set_display_on_multi(&dsi_ctx); ++ mipi_dsi_msleep(&dsi_ctx, 50); ++ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xac, 0x05); ++ ++ return dsi_ctx.accum_err; ++} ++ ++static int panel_ar14_144hz_off(struct panel_ar14_144hz *ctx) ++{ ++ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; ++ ++ ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; ++ ++ mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); ++ mipi_dsi_msleep(&dsi_ctx, 50); ++ mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); ++ mipi_dsi_msleep(&dsi_ctx, 150); ++ ++ return dsi_ctx.accum_err; ++} ++ ++static int panel_ar14_144hz_prepare(struct drm_panel *panel) ++{ ++ struct panel_ar14_144hz *ctx = to_panel_ar14_144hz(panel); ++ struct device *dev = &ctx->dsi->dev; ++ struct drm_dsc_picture_parameter_set pps; ++ int ret; ++ ++ ret = regulator_bulk_enable(ARRAY_SIZE(ar14_supplies), ctx->supplies); ++ if (ret < 0) ++ return ret; ++ ++ panel_ar14_144hz_reset(ctx); ++ ++ ret = panel_ar14_144hz_on(ctx); ++ if (ret < 0) { ++ dev_err(dev, "Failed to initialize panel: %d\n", ret); ++ gpiod_set_value_cansleep(ctx->reset_gpio, 1); ++ return ret; ++ } ++ ++ drm_dsc_pps_payload_pack(&pps, &ctx->dsc); ++ ++ ret = mipi_dsi_picture_parameter_set(ctx->dsi, &pps); ++ if (ret < 0) { ++ dev_err(panel->dev, "failed to transmit PPS: %d\n", ret); ++ return ret; ++ } ++ ++ ret = mipi_dsi_compression_mode(ctx->dsi, true); ++ if (ret < 0) { ++ dev_err(dev, "failed to enable compression mode: %d\n", ret); ++ return ret; ++ } ++ ++ msleep(28); /* TODO: Is this panel-dependent? */ ++ ++ return 0; ++} ++ ++static int panel_ar14_144hz_unprepare(struct drm_panel *panel) ++{ ++ struct panel_ar14_144hz *ctx = to_panel_ar14_144hz(panel); ++ struct device *dev = &ctx->dsi->dev; ++ int ret; ++ ++ ret = panel_ar14_144hz_off(ctx); ++ if (ret < 0) ++ dev_err(dev, "Failed to un-initialize panel: %d\n", ret); ++ ++ gpiod_set_value_cansleep(ctx->reset_gpio, 1); ++ regulator_bulk_disable(ARRAY_SIZE(ar14_supplies), ctx->supplies); ++ ++ return 0; ++} ++ ++/* ++ * The vendor panel config declares ONE base timing (144 Hz) plus ++ * qcom,dsi-supported-dfps-list = <144 120 90 60> with ++ * dfps_immediate_porch_mode_vfp: lower refresh rates run the SAME pixel ++ * clock with a stretched vertical front porch. The modes below mirror ++ * that scheme (constant clock, VFP-only changes), 144 Hz preferred. ++ */ ++static const struct drm_display_mode panel_ar14_144hz_modes[] = { ++ { /* 144 Hz โ€” the vendor base timing */ ++ .clock = (1080 + 32 + 4 + 32) * (1920 + 38 + 4 + 32) * 144 / 1000, ++ .hdisplay = 1080, ++ .hsync_start = 1080 + 32, ++ .hsync_end = 1080 + 32 + 4, ++ .htotal = 1080 + 32 + 4 + 32, ++ .vdisplay = 1920, ++ .vsync_start = 1920 + 38, ++ .vsync_end = 1920 + 38 + 4, ++ .vtotal = 1920 + 38 + 4 + 32, ++ .width_mm = 74, ++ .height_mm = 132, ++ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, ++ }, ++ { /* 120 Hz โ€” VFP stretched, same pixel clock */ ++ .clock = (1080 + 32 + 4 + 32) * (1920 + 38 + 4 + 32) * 144 / 1000, ++ .hdisplay = 1080, ++ .hsync_start = 1080 + 32, ++ .hsync_end = 1080 + 32 + 4, ++ .htotal = 1080 + 32 + 4 + 32, ++ .vdisplay = 1920, ++ .vsync_start = 1920 + 437, ++ .vsync_end = 1920 + 437 + 4, ++ .vtotal = 1920 + 437 + 4 + 32, ++ .width_mm = 74, ++ .height_mm = 132, ++ .type = DRM_MODE_TYPE_DRIVER, ++ }, ++ { /* 90 Hz โ€” VFP stretched, same pixel clock */ ++ .clock = (1080 + 32 + 4 + 32) * (1920 + 38 + 4 + 32) * 144 / 1000, ++ .hdisplay = 1080, ++ .hsync_start = 1080 + 32, ++ .hsync_end = 1080 + 32 + 4, ++ .htotal = 1080 + 32 + 4 + 32, ++ .vdisplay = 1920, ++ .vsync_start = 1920 + 1234, ++ .vsync_end = 1920 + 1234 + 4, ++ .vtotal = 1920 + 1234 + 4 + 32, ++ .width_mm = 74, ++ .height_mm = 132, ++ .type = DRM_MODE_TYPE_DRIVER, ++ }, ++ { /* 60 Hz โ€” VFP stretched, same pixel clock */ ++ .clock = (1080 + 32 + 4 + 32) * (1920 + 38 + 4 + 32) * 144 / 1000, ++ .hdisplay = 1080, ++ .hsync_start = 1080 + 32, ++ .hsync_end = 1080 + 32 + 4, ++ .htotal = 1080 + 32 + 4 + 32, ++ .vdisplay = 1920, ++ .vsync_start = 1920 + 2830, ++ .vsync_end = 1920 + 2830 + 4, ++ .vtotal = 1920 + 2830 + 4 + 32, ++ .width_mm = 74, ++ .height_mm = 132, ++ .type = DRM_MODE_TYPE_DRIVER, ++ }, ++}; ++ ++static enum drm_panel_orientation panel_ar14_144hz_get_orientation(struct drm_panel *panel) ++{ ++ struct panel_ar14_144hz *ctx = to_panel_ar14_144hz(panel); ++ ++ return ctx->orientation; ++} ++ ++static int panel_ar14_144hz_get_modes(struct drm_panel *panel, ++ struct drm_connector *connector) ++{ ++ unsigned int i; ++ int count = 0; ++ ++ for (i = 0; i < ARRAY_SIZE(panel_ar14_144hz_modes); i++) { ++ struct drm_display_mode *mode; ++ ++ mode = drm_mode_duplicate(connector->dev, ++ &panel_ar14_144hz_modes[i]); ++ if (!mode) ++ return count; ++ ++ drm_mode_set_name(mode); ++ drm_mode_probed_add(connector, mode); ++ count++; ++ } ++ ++ connector->display_info.width_mm = panel_ar14_144hz_modes[0].width_mm; ++ connector->display_info.height_mm = panel_ar14_144hz_modes[0].height_mm; ++ ++ return count; ++} ++ ++static const struct drm_panel_funcs panel_ar14_144hz_panel_funcs = { ++ .prepare = panel_ar14_144hz_prepare, ++ .unprepare = panel_ar14_144hz_unprepare, ++ .get_modes = panel_ar14_144hz_get_modes, ++ .get_orientation = panel_ar14_144hz_get_orientation, ++}; ++ ++static int panel_ar14_144hz_probe(struct mipi_dsi_device *dsi) ++{ ++ struct device *dev = &dsi->dev; ++ struct panel_ar14_144hz *ctx; ++ int ret; ++ ++ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); ++ if (!ctx) ++ return -ENOMEM; ++ ++ ret = devm_regulator_bulk_get_const(&dsi->dev, ++ ARRAY_SIZE(ar14_supplies), ++ ar14_supplies, &ctx->supplies); ++ if (ret < 0) ++ return ret; ++ ++ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); ++ if (IS_ERR(ctx->reset_gpio)) ++ return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), ++ "Failed to get reset-gpios\n"); ++ ++ ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation); ++ if (ret < 0) { ++ dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret); ++ return ret; ++ } ++ ++ ctx->dsi = dsi; ++ mipi_dsi_set_drvdata(dsi, ctx); ++ ++ dsi->lanes = 4; ++ dsi->format = MIPI_DSI_FMT_RGB888; ++ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | ++ MIPI_DSI_CLOCK_NON_CONTINUOUS; ++ ++ drm_panel_init(&ctx->panel, dev, &panel_ar14_144hz_panel_funcs, ++ DRM_MODE_CONNECTOR_DSI); ++ ctx->panel.prepare_prev_first = true; ++ ++ ret = drm_panel_of_backlight(&ctx->panel); ++ if (ret) ++ return dev_err_probe(dev, ret, "Failed to get backlight\n"); ++ ++ drm_panel_add(&ctx->panel); ++ ++ /* This panel only supports DSC; unconditionally enable it */ ++ dsi->dsc = &ctx->dsc; ++ ++ ctx->dsc.dsc_version_major = 1; ++ ctx->dsc.dsc_version_minor = 1; ++ ++ /* TODO: Pass slice_per_pkt = 2 */ ++ ctx->dsc.slice_height = 8; ++ ctx->dsc.slice_width = 540; ++ /* ++ * TODO: hdisplay should be read from the selected mode once ++ * it is passed back to drm_panel (in prepare?) ++ */ ++ WARN_ON(1080 % ctx->dsc.slice_width); ++ ctx->dsc.slice_count = 1080 / ctx->dsc.slice_width; ++ ctx->dsc.bits_per_component = 8; ++ ctx->dsc.bits_per_pixel = 8 << 4; /* 4 fractional bits */ ++ ctx->dsc.block_pred_enable = true; ++ ++ ret = mipi_dsi_attach(dsi); ++ if (ret < 0) { ++ drm_panel_remove(&ctx->panel); ++ return dev_err_probe(dev, ret, "Failed to attach to DSI host\n"); ++ } ++ ++ return 0; ++} ++ ++static void panel_ar14_144hz_remove(struct mipi_dsi_device *dsi) ++{ ++ struct panel_ar14_144hz *ctx = mipi_dsi_get_drvdata(dsi); ++ int ret; ++ ++ ret = mipi_dsi_detach(dsi); ++ if (ret < 0) ++ dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); ++ ++ drm_panel_remove(&ctx->panel); ++} ++ ++static const struct of_device_id panel_ar14_144hz_of_match[] = { ++ { .compatible = "ayaneo,ar14-144hz" }, ++ { /* sentinel */ } ++}; ++MODULE_DEVICE_TABLE(of, panel_ar14_144hz_of_match); ++ ++static struct mipi_dsi_driver panel_ar14_144hz_driver = { ++ .probe = panel_ar14_144hz_probe, ++ .remove = panel_ar14_144hz_remove, ++ .driver = { ++ .name = "panel-ar14-144hz", ++ .of_match_table = panel_ar14_144hz_of_match, ++ }, ++}; ++module_mipi_dsi_driver(panel_ar14_144hz_driver); ++ ++MODULE_AUTHOR("ROCKNIX"); ++MODULE_DESCRIPTION("DRM driver for ar14 1080p 144hz video mode dsi panel"); ++MODULE_LICENSE("GPL"); diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0056-backlight-aw99706-enable-hwen-before-chip-id-read.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0056-backlight-aw99706-enable-hwen-before-chip-id-read.patch new file mode 100644 index 00000000000..555cc41ed03 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0056-backlight-aw99706-enable-hwen-before-chip-id-read.patch @@ -0,0 +1,40 @@ +From: ROCKNIX +Date: Thu, 4 Jun 2026 00:00:00 +0000 +Subject: [PATCH] backlight: aw99706: assert HWEN before reading chip id + +The probe read the chip id before getting/asserting the HWEN enable GPIO, +so on boards where the bootloader leaves the chip powered down the read NAKs +(-ENXIO -> 'Unknown chip id 0xfffffffa') and probe fails. Enable HWEN first. +--- +diff --git a/drivers/video/backlight/aw99706.c b/drivers/video/backlight/aw99706.c +index 938f352..49528f3 100644 +--- a/drivers/video/backlight/aw99706.c ++++ b/drivers/video/backlight/aw99706.c +@@ -384,6 +384,15 @@ static int aw99706_probe(struct i2c_client *client) + return dev_err_probe(dev, PTR_ERR(aw->regmap), + "Failed to init regmap\n"); + ++ /* Enable the chip (HWEN) BEFORE reading its ID: the AW99706 is powered ++ * down at boot, so an early I2C read NAKs ("Unknown chip id 0xfffffffa"). ++ * Get the enable GPIO asserted and give the chip a moment to come up. */ ++ aw->hwen_gpio = devm_gpiod_get(aw->dev, "enable", GPIOD_OUT_HIGH); ++ if (IS_ERR(aw->hwen_gpio)) ++ return dev_err_probe(dev, PTR_ERR(aw->hwen_gpio), ++ "Failed to get enable gpio\n"); ++ usleep_range(1000, 2000); ++ + ret = aw99706_chip_id_read(aw); + if (ret != AW99706_ID) + return dev_err_probe(dev, -ENODEV, +@@ -391,11 +400,6 @@ static int aw99706_probe(struct i2c_client *client) + + aw99706_dt_parse(aw, &props); + +- aw->hwen_gpio = devm_gpiod_get(aw->dev, "enable", GPIOD_OUT_LOW); +- if (IS_ERR(aw->hwen_gpio)) +- return dev_err_probe(dev, PTR_ERR(aw->hwen_gpio), +- "Failed to get enable gpio\n"); +- + ret = aw99706_hw_init(aw); + if (ret < 0) + return dev_err_probe(dev, ret, diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0057-backlight-aw99706-konkr-cfg7.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0057-backlight-aw99706-konkr-cfg7.patch new file mode 100644 index 00000000000..6fe8fbca2a4 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0057-backlight-aw99706-konkr-cfg7.patch @@ -0,0 +1,25 @@ +From: ROCKNIX +Date: Thu, 4 Jun 2026 00:00:00 +0000 +Subject: [PATCH] backlight: aw99706: write CFG7=0x05 for the KONKR panel + +The KONKR Pocket FIT Elite panel needs CFG7 = 0x05 (read live off the stock +vendor driver's working config); mainline leaves CFG7 at its POR value 0x04 +and the backlight never illuminates. Apply it at the end of hw_init. +--- +--- a/drivers/video/backlight/aw99706.c ++++ b/drivers/video/backlight/aw99706.c +@@ -290,6 +290,14 @@ + } + } + ++ /* [konkr] Match the stock vendor config: CFG7 = 0x05 (mainline leaves it ++ * at POR 0x04). Read live off the working Android AW99706 โ€” it is the only ++ * config register the stock driver sets that this driver doesn't, and with ++ * it at POR the panel backlight stays dark. */ ++ ret = aw99706_i2c_write(aw, AW99706_CFG7_REG, 0x05); ++ if (ret < 0) ++ return ret; ++ + return 0; + } + diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0058-input-joystick-add-ayaneo-mcu-joystick.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0058-input-joystick-add-ayaneo-mcu-joystick.patch new file mode 100644 index 00000000000..035a9135896 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0058-input-joystick-add-ayaneo-mcu-joystick.patch @@ -0,0 +1,715 @@ +From: ROCKNIX +Date: Thu, 5 Jun 2026 00:00:00 +0000 +Subject: [PATCH] input: joystick: add AYANEO SPI MCU gamepad driver + +--- +diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig +index 0da3c0f44..edfdad333 100644 +--- a/drivers/input/joystick/Kconfig ++++ b/drivers/input/joystick/Kconfig +@@ -426,4 +426,15 @@ + To compile this driver as a module, choose M here: the module will be + called adafruit-seesaw. + ++config JOYSTICK_MCU ++ tristate "AYANEO SPI MCU gamepad" ++ depends on SPI ++ help ++ Driver for the AYANEO MCU-based gamepad on Qualcomm SM8750 ++ handhelds (KONKR Pocket FIT Elite etc.), attached over SPI with a ++ 16-bit register protocol. Provides the analog sticks, D-pad and ++ buttons. ++ ++ To compile as a module choose M: the module is called mcu_joystick. ++ + endif +diff --git a/drivers/input/joystick/Makefile b/drivers/input/joystick/Makefile +index 3de503e29..3b7688cda 100644 +--- a/drivers/input/joystick/Makefile ++++ b/drivers/input/joystick/Makefile +@@ -42,3 +42,4 @@ + obj-$(CONFIG_JOYSTICK_WALKERA0701) += walkera0701.o + obj-$(CONFIG_JOYSTICK_XPAD) += xpad.o + obj-$(CONFIG_JOYSTICK_ZHENHUA) += zhenhua.o ++obj-$(CONFIG_JOYSTICK_MCU) += mcu_joystick.o +diff --git a/drivers/input/joystick/mcu_joystick.c b/drivers/input/joystick/mcu_joystick.c +new file mode 100644 +index 0000000..f66adc811 +--- /dev/null ++++ b/drivers/input/joystick/mcu_joystick.c +@@ -0,0 +1,675 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * AYANEO SPI MCU gamepad driver (KONKR Pocket FIT Elite / AYN AYANEO SM8750 family) ++ * ++ * Clean-room reimplementation of the stock vendor module `tc_mcu_joystick.ko` ++ * (GPL, author "whale xiao"), reverse-engineered from its disassembly. The MCU ++ * exposes the controller over SPI as a bank of 16-bit registers: ++ * ++ * reg 0x8080..0x8082 : frame header magic, ASCII "AYANEO" ++ * (0x4159 'AY', 0x414e 'AN', 0x454f 'EO') ++ * reg 0x8083 : key (16-bit button bitmap) ++ * reg 0x8084 : x (left stick X) ++ * reg 0x8085 : y (left stick Y) ++ * reg 0x8086 : z (right stick X) ++ * reg 0x8087 : rz (right stick Y) ++ * reg 0x8088 : trigger (analog triggers) ++ * ++ * Each register access is a 16-bit-word SPI transfer (the stock "w16r16" ++ * primitive): one spi_sync message per word (own CS), bits_per_word=16 with ++ * NATIVE-endian u16 buffers (the SPI core transmits >8-bit words MSB-first ++ * from CPU-native memory; the stock driver passes plain u16 arrays), ~20 us ++ * between words (stock default delay). Words with bit15 clear are COMMANDS ++ * (rx discarded): 0x7000|rate sets the irq rate, 0x7f01 is the per-frame ++ * keepalive/ACK. ++ * ++ * IMPORTANT (confirmed on stock Android via dmesg โ€” "Head check: 0x000000" ++ * on a WORKING system): the MCU returns ZEROS until the init commands have ++ * been sent. The init header read failing is NORMAL; the commands must be ++ * sent unconditionally, after which the polled data frames carry the ++ * "AYANEO" magic and validate. The stock data frame reads the 6 data regs ++ * FIRST and the 3 header regs LAST (0x8083..0x8088, 0x8080..0x8082); frames ++ * whose header doesn't validate are discarded, not reported. ++ * An IRQ on irq-gpio signals a fresh frame; we also poll as a fallback. ++ * ++ * The Y/RY axis inversion and the trigger split are decoded from the stock ++ * xpad_irq_handler's input_event calls and verified against stock Android ++ * getevent. The key-bit -> BTN_* map was measured per-button on hardware ++ * (the stock-disasm bit grouping was ++ * wrong): bits 0-3 A/B/X/Y, bits 4-7 dpad U/D/L/R, bits 8-9 L1/R1, ++ * bits 10-11 L3/R3, bits 12-13 START/SELECT, bit 14 the "back" extra ++ * (-> BTN_MODE/guide), bit 15 unused. The device's other extra buttons ++ * (KONKR, L4/R4, rear paddles, ...) set NO MCU bit here โ€” they arrive over ++ * the separate MCU UART and are handled by the konkr_sysbtn driver. ++ * ++ * If the MCU stops answering (header gone โ€” e.g. when an unacknowledged ++ * read races the poll stream), the poll path auto-recovers: ++ * release all inputs, re-send the init commands, and after repeated ++ * failures redo the full power-on dance. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define MCU_REG_HEADER 0x8080 /* first of 3 header regs */ ++#define MCU_REG_KEY 0x8083 ++#define MCU_REG_X 0x8084 ++#define MCU_REG_Y 0x8085 ++#define MCU_REG_Z 0x8086 ++#define MCU_REG_RZ 0x8087 ++#define MCU_REG_TRIGGER 0x8088 ++#define MCU_NREGS 9 /* 0x8080..0x8088 */ ++ ++#define MCU_HDR0 0x4159 /* "AY" */ ++#define MCU_HDR1 0x414e /* "AN" */ ++#define MCU_HDR2 0x454f /* "EO" */ ++ ++#define MCU_CMD_IRQ_RATE 0x7000 /* | rate byte (0 outside irq mode) */ ++#define MCU_CMD_START 0x7f01 /* per-frame keepalive/ACK (stock sends ++ * it after EVERY poll read, plus once ++ * at power-up) */ ++ ++/* ++ * Rumble: the stock driver's ff path writes the (u16>>8) strong/weak FF ++ * magnitudes to two 7-bit write registers (a write word = (reg << 8) | val, ++ * bit15 clear; cf. the keepalive 0x7f01 = write reg 0x7f val 0x01). ++ * Reversed from tc_mcu_joystick.ko mcu_joystick_ff_play/report_work. ++ */ ++#define MCU_REG_RUMBLE_STRONG 0x60 ++#define MCU_REG_RUMBLE_WEAK 0x61 ++#define MCU_WRITE_WORD(reg, val) ((((reg) & 0x7f) << 8) | ((val) & 0xff)) ++ ++#define MCU_XFER_GAP_US 20 /* stock inter-word delay (probe sets 0x14) */ ++ ++/* stock xpad_set_up_abs: sticks are SIGNED s16 centered at 0 (so all-zero ++ * data at rest is NORMAL); triggers are two u8s packed into the 16-bit ++ * trigger reg, 0..255 each */ ++#define MCU_AXIS_MIN (-32768) ++#define MCU_AXIS_MAX 32767 ++#define MCU_AXIS_FUZZ 16 ++#define MCU_AXIS_FLAT 128 ++#define MCU_TRIG_MAX 255 ++ ++#define MCU_POLL_MS 16 /* ~60 Hz fallback poll (only when the IRQ is quiet) */ ++#define MCU_IRQ_OK_MS 50 /* if the IRQ delivered a frame within this ++ * window it is healthy; the fallback poll ++ * then skips its redundant SPI read and ++ * only re-arms as a wedge watchdog */ ++ ++#define MCU_DEAD_FRAMES 30 /* consecutive bad poll frames (~0.5 s) ++ * before declaring the MCU wedged */ ++#define MCU_REINITS_BEFORE_DANCE 3 /* command re-sends before a full ++ * power cycle */ ++ ++/* key bitmap -> input event. Map measured per-button on hardware (not ++ * derived from the stock disassembly, whose bit grouping turned out wrong). */ ++struct mcu_btn { ++ u8 bit; ++ u16 code; ++}; ++ ++static const struct mcu_btn mcu_btn_map[] = { ++ { 0, BTN_SOUTH }, /* 0x130, A */ ++ { 1, BTN_EAST }, /* 0x131, B */ ++ { 2, BTN_NORTH }, /* 0x133, X */ ++ { 3, BTN_WEST }, /* 0x134, Y */ ++ { 8, BTN_TL }, /* 0x136, L1 */ ++ { 9, BTN_TR }, /* 0x137, R1 */ ++ { 10, BTN_THUMBL }, /* 0x13d, L3 */ ++ { 11, BTN_THUMBR }, /* 0x13e, R3 */ ++ { 12, BTN_START }, /* 0x13b */ ++ { 13, BTN_SELECT }, /* 0x13a */ ++ { 14, BTN_MODE }, /* 0x13c, "back" extra -> guide */ ++}; ++ ++/* dpad bits -> HAT axes (measured) */ ++#define MCU_DPAD_UP BIT(4) ++#define MCU_DPAD_DOWN BIT(5) ++#define MCU_DPAD_LEFT BIT(6) ++#define MCU_DPAD_RIGHT BIT(7) ++ ++struct mcu_joystick { ++ struct spi_device *spi; ++ struct input_dev *input; ++ struct gpio_desc *power_gpio; ++ struct gpio_desc *en_gpio; ++ struct gpio_desc *irq_gpio; ++ struct regulator *vdd; ++ struct pinctrl *pctl; ++ struct pinctrl_state *pctl_active; ++ struct mutex io_lock; ++ struct delayed_work poll_work; ++ struct work_struct ff_work; /* rumble: deferred SPI write (play is atomic) */ ++ u8 ff_strong; ++ u8 ff_weak; ++ int irq; ++ unsigned long last_irq_frame; /* jiffies of the last frame read by mcu_irq */ ++ unsigned int bad_frames; ++ unsigned int reinit_fails; ++ bool dead; ++}; ++ ++/* ++ * One 16-bit word on the wire with its own CS assertion (the stock driver ++ * issues one spi_sync message per word): bits_per_word=16 with native-endian ++ * u16 buffers, exactly like the stock w16r16_seq. ++ */ ++static int mcu_xfer_word(struct mcu_joystick *mcu, u16 tx, u16 *rx) ++{ ++ u16 txw = tx, rxw = 0; ++ struct spi_transfer xfer = { ++ .tx_buf = &txw, ++ .rx_buf = &rxw, ++ .len = 2, ++ .bits_per_word = 16, ++ }; ++ int ret; ++ ++ ret = spi_sync_transfer(mcu->spi, &xfer, 1); ++ if (rx) ++ *rx = rxw; ++ return ret; ++} ++ ++/* ++ * Read a register sequence. The MCU uses a PIPELINED full-duplex protocol ++ * (reverse-engineered from the stock w16r16_seq): each 16-bit transfer writes ++ * the next register address on MOSI while clocking the PREVIOUS register's ++ * value in on MISO. So N registers take N+1 transfers, each its own CS with a ++ * ~20 us gap; out[i] is the value read on transfer i+1. ++ */ ++static int mcu_read_seq(struct mcu_joystick *mcu, const u16 *addrs, ++ u16 *out, int n) ++{ ++ int i, ret = 0; ++ ++ mutex_lock(&mcu->io_lock); ++ for (i = 0; i <= n; i++) { ++ u16 rx; ++ ++ ret = mcu_xfer_word(mcu, i < n ? addrs[i] : 0, &rx); ++ if (ret) ++ break; ++ if (i > 0) ++ out[i - 1] = rx; ++ usleep_range(MCU_XFER_GAP_US, MCU_XFER_GAP_US + 2); ++ } ++ mutex_unlock(&mcu->io_lock); ++ return ret; ++} ++ ++/* ++ * Stock read_data frame layout: the 6 data regs FIRST, the 3 header regs ++ * LAST. regs[0..5] = key,x,y,z,rz,trigger; regs[6..8] = "AYANEO" header. ++ */ ++static const u16 mcu_frame_addrs[MCU_NREGS] = { ++ MCU_REG_KEY, MCU_REG_X, MCU_REG_Y, MCU_REG_Z, MCU_REG_RZ, ++ MCU_REG_TRIGGER, ++ MCU_REG_HEADER, MCU_REG_HEADER + 1, MCU_REG_HEADER + 2, ++}; ++ ++#define MCU_FRAME_KEY 0 ++#define MCU_FRAME_X 1 ++#define MCU_FRAME_Y 2 ++#define MCU_FRAME_Z 3 ++#define MCU_FRAME_RZ 4 ++#define MCU_FRAME_TRIG 5 ++#define MCU_FRAME_HDR 6 ++ ++static int mcu_read_frame(struct mcu_joystick *mcu, u16 regs[MCU_NREGS]) ++{ ++ return mcu_read_seq(mcu, mcu_frame_addrs, regs, MCU_NREGS); ++} ++ ++static bool mcu_frame_hdr_ok(const u16 regs[MCU_NREGS]) ++{ ++ return regs[MCU_FRAME_HDR] == MCU_HDR0 && ++ regs[MCU_FRAME_HDR + 1] == MCU_HDR1 && ++ regs[MCU_FRAME_HDR + 2] == MCU_HDR2; ++} ++ ++/* command word (bit15 clear): single transfer, response discarded */ ++static int mcu_write_word(struct mcu_joystick *mcu, u16 word) ++{ ++ int ret; ++ ++ mutex_lock(&mcu->io_lock); ++ ret = mcu_xfer_word(mcu, word, NULL); ++ mutex_unlock(&mcu->io_lock); ++ return ret; ++} ++ ++/* ++ * Rumble. input_ff_create_memless calls the play callback from a softirq ++ * (the ff-memless timer), so it cannot sleep โ€” stash the magnitudes and defer ++ * the SPI writes to a work item. The MCU takes two write registers: 0x60 = ++ * strong, 0x61 = weak (each the u16 FF magnitude scaled to its high byte). ++ */ ++static void mcu_ff_work(struct work_struct *work) ++{ ++ struct mcu_joystick *mcu = container_of(work, struct mcu_joystick, ff_work); ++ ++ mcu_write_word(mcu, MCU_WRITE_WORD(MCU_REG_RUMBLE_STRONG, mcu->ff_strong)); ++ mcu_write_word(mcu, MCU_WRITE_WORD(MCU_REG_RUMBLE_WEAK, mcu->ff_weak)); ++} ++ ++static int mcu_ff_play(struct input_dev *in, void *data, struct ff_effect *eff) ++{ ++ struct mcu_joystick *mcu = data; ++ ++ if (eff->type != FF_RUMBLE) ++ return 0; ++ ++ mcu->ff_strong = eff->u.rumble.strong_magnitude >> 8; ++ mcu->ff_weak = eff->u.rumble.weak_magnitude >> 8; ++ schedule_work(&mcu->ff_work); ++ return 0; ++} ++ ++/* stock init order: irq-rate command (rate 0 outside irq mode), then the ++ * 0x7f01 "go"; data regs only update once these have been sent */ ++static void mcu_send_init_cmds(struct mcu_joystick *mcu) ++{ ++ mcu_write_word(mcu, MCU_CMD_IRQ_RATE); ++ mcu_write_word(mcu, MCU_CMD_START); ++} ++ ++/* ++ * Power-on sequence, transcribed from the stock mcu_joystick_power() "on" ++ * path (disasm): power(125)=1 โ†’ 2-3 ms โ†’ en(92)=1 โ†’ 50 ms โ†’ ++ * pinctrl_select_state(ACTIVE) [gpio47 pull-up] โ†’ irq(47) direction_input โ†’ ++ * msleep(600) [MCU boot]. Entered with power/en driven LOW for 100 ms first ++ * so a warm or wedged MCU gets a real power cycle. ++ */ ++static void mcu_power_dance(struct mcu_joystick *mcu) ++{ ++ gpiod_set_value_cansleep(mcu->en_gpio, 0); ++ gpiod_set_value_cansleep(mcu->power_gpio, 0); ++ msleep(100); ++ gpiod_set_value_cansleep(mcu->power_gpio, 1); ++ usleep_range(2000, 3000); ++ gpiod_set_value_cansleep(mcu->en_gpio, 1); ++ usleep_range(50000, 51000); ++ if (mcu->pctl_active && ++ pinctrl_select_state(mcu->pctl, mcu->pctl_active)) ++ dev_warn(&mcu->spi->dev, "failed to select active pinctrl\n"); ++ gpiod_direction_input(mcu->irq_gpio); ++ msleep(600); ++} ++ ++static void mcu_report(struct mcu_joystick *mcu, const u16 regs[MCU_NREGS]) ++{ ++ struct input_dev *in = mcu->input; ++ u16 key = regs[MCU_FRAME_KEY]; ++ int i; ++ ++ /* stock: X/RX as-is, Y/RY bitwise-inverted (mvn + sxth) */ ++ input_report_abs(in, ABS_X, (s16)regs[MCU_FRAME_X]); ++ input_report_abs(in, ABS_Y, (s16)~regs[MCU_FRAME_Y]); ++ input_report_abs(in, ABS_RX, (s16)regs[MCU_FRAME_Z]); ++ input_report_abs(in, ABS_RY, (s16)~regs[MCU_FRAME_RZ]); ++ /* trigger reg: low byte = left (ABS_Z), high byte = right (ABS_RZ); ++ * stock also reports digital TL2/TR2 at full deflection */ ++ input_report_abs(in, ABS_Z, regs[MCU_FRAME_TRIG] & 0xff); ++ input_report_abs(in, ABS_RZ, regs[MCU_FRAME_TRIG] >> 8); ++ input_report_key(in, BTN_TL2, (regs[MCU_FRAME_TRIG] & 0xff) == 0xff); ++ input_report_key(in, BTN_TR2, (regs[MCU_FRAME_TRIG] >> 8) == 0xff); ++ ++ for (i = 0; i < ARRAY_SIZE(mcu_btn_map); i++) ++ input_report_key(in, mcu_btn_map[i].code, ++ !!(key & BIT(mcu_btn_map[i].bit))); ++ ++ input_report_abs(in, ABS_HAT0X, ++ !!(key & MCU_DPAD_RIGHT) - !!(key & MCU_DPAD_LEFT)); ++ input_report_abs(in, ABS_HAT0Y, ++ !!(key & MCU_DPAD_DOWN) - !!(key & MCU_DPAD_UP)); ++ ++ input_sync(in); ++} ++ ++/* release everything โ€” a wedged MCU otherwise leaves the last state (e.g. a ++ * held dpad direction) latched in evdev forever */ ++static void mcu_report_idle(struct mcu_joystick *mcu) ++{ ++ struct input_dev *in = mcu->input; ++ int i; ++ ++ input_report_abs(in, ABS_X, 0); ++ input_report_abs(in, ABS_Y, 0); ++ input_report_abs(in, ABS_RX, 0); ++ input_report_abs(in, ABS_RY, 0); ++ input_report_abs(in, ABS_Z, 0); ++ input_report_abs(in, ABS_RZ, 0); ++ input_report_abs(in, ABS_HAT0X, 0); ++ input_report_abs(in, ABS_HAT0Y, 0); ++ input_report_key(in, BTN_TL2, 0); ++ input_report_key(in, BTN_TR2, 0); ++ for (i = 0; i < ARRAY_SIZE(mcu_btn_map); i++) ++ input_report_key(in, mcu_btn_map[i].code, 0); ++ input_sync(in); ++} ++ ++/* returns true if the frame header validated */ ++static bool mcu_poll_once(struct mcu_joystick *mcu) ++{ ++ u16 regs[MCU_NREGS]; ++ ++ if (mcu_read_frame(mcu, regs)) ++ return false; ++ ++ /* ++ * The stock poll loop sends 0x7f01 after EVERY frame read (disasm: ++ * poll_work_handler = read_data โ†’ w16r16({0x7f01},1) โ†’ report โ†’ requeue) ++ * โ€” it is a per-frame keepalive/ACK, not a one-time "go". Without it ++ * the MCU keeps answering the header but never updates the data regs. ++ */ ++ mcu_write_word(mcu, MCU_CMD_START); ++ ++ /* stock read_data: discard frames without the header magic */ ++ if (!mcu_frame_hdr_ok(regs)) { ++ dev_dbg(&mcu->spi->dev, "head check failed: %04x %04x %04x\n", ++ regs[MCU_FRAME_HDR], regs[MCU_FRAME_HDR + 1], ++ regs[MCU_FRAME_HDR + 2]); ++ return false; ++ } ++ ++ mcu_report(mcu, regs); ++ return true; ++} ++ ++static irqreturn_t mcu_irq(int irq, void *data) ++{ ++ struct mcu_joystick *mcu = data; ++ ++ if (mcu_poll_once(mcu)) ++ mcu->last_irq_frame = jiffies; ++ return IRQ_HANDLED; ++} ++ ++static void mcu_poll_work(struct work_struct *work) ++{ ++ struct mcu_joystick *mcu = ++ container_of(work, struct mcu_joystick, poll_work.work); ++ ++ /* ++ * The MCU free-runs its frame IRQ at ~250 Hz; while it is delivering ++ * frames, mcu_irq already reads each frame and sends the per-frame ++ * keepalive, so a poll read here is pure duplicate SPI traffic (and the ++ * extra keepalive even pokes the MCU for more frames). Skip the read ++ * while the IRQ is healthy and just re-arm as a wedge watchdog; only ++ * fall back to active polling once the IRQ has gone quiet. ++ */ ++ if (mcu->irq > 0 && ++ time_before(jiffies, mcu->last_irq_frame + msecs_to_jiffies(MCU_IRQ_OK_MS))) { ++ schedule_delayed_work(&mcu->poll_work, msecs_to_jiffies(MCU_IRQ_OK_MS)); ++ return; ++ } ++ ++ if (mcu_poll_once(mcu)) { ++ mcu->bad_frames = 0; ++ mcu->reinit_fails = 0; ++ if (mcu->dead) { ++ mcu->dead = false; ++ dev_info(&mcu->spi->dev, "MCU recovered\n"); ++ } ++ } else if (++mcu->bad_frames >= MCU_DEAD_FRAMES) { ++ /* ++ * Sustained header loss: the MCU wedged or rebooted (it ++ * answers zeros until re-initialized). Recover instead of ++ * discarding frames forever with stale input state latched. ++ */ ++ mcu->bad_frames = 0; ++ if (!mcu->dead) { ++ mcu->dead = true; ++ mcu_report_idle(mcu); ++ } ++ if (mcu->reinit_fails++ < MCU_REINITS_BEFORE_DANCE) { ++ dev_warn_ratelimited(&mcu->spi->dev, ++ "MCU silent; re-sending init commands (%u)\n", ++ mcu->reinit_fails); ++ mcu_send_init_cmds(mcu); ++ } else { ++ dev_warn_ratelimited(&mcu->spi->dev, ++ "MCU still silent; full power cycle\n"); ++ mcu_power_dance(mcu); ++ mcu_send_init_cmds(mcu); ++ mcu->reinit_fails = 0; ++ } ++ } ++ schedule_delayed_work(&mcu->poll_work, msecs_to_jiffies(MCU_POLL_MS)); ++} ++ ++static int mcu_joystick_probe(struct spi_device *spi) ++{ ++ struct device *dev = &spi->dev; ++ struct mcu_joystick *mcu; ++ struct input_dev *in; ++ u16 regs[MCU_NREGS]; ++ int i, ret; ++ ++ mcu = devm_kzalloc(dev, sizeof(*mcu), GFP_KERNEL); ++ if (!mcu) ++ return -ENOMEM; ++ ++ mcu->spi = spi; ++ mutex_init(&mcu->io_lock); ++ spi_set_drvdata(spi, mcu); ++ ++ /* ++ * The MCU runs in SPI mode 3 (CPOL=1/CPHA=1) โ€” confirmed from the stock ++ * tc_mcu_joystick.ko (probe: `str w8,[spi,#0x3c0]` with w8=3 = spi->mode, ++ * right before spi_setup). The first cut used MODE_0. ++ */ ++ spi->mode = SPI_MODE_3; ++ spi->bits_per_word = 16; ++ ret = spi_setup(spi); ++ if (ret) ++ return dev_err_probe(dev, ret, "spi_setup failed\n"); ++ ++ mcu->vdd = devm_regulator_get_optional(dev, "vdd"); ++ if (IS_ERR(mcu->vdd)) { ++ if (PTR_ERR(mcu->vdd) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; ++ mcu->vdd = NULL; ++ } ++ if (mcu->vdd) { ++ ret = regulator_enable(mcu->vdd); ++ if (ret) ++ return dev_err_probe(dev, ret, "vdd enable failed\n"); ++ } ++ ++ mcu->power_gpio = devm_gpiod_get_optional(dev, "power", GPIOD_OUT_LOW); ++ if (IS_ERR(mcu->power_gpio)) ++ return PTR_ERR(mcu->power_gpio); ++ mcu->en_gpio = devm_gpiod_get_optional(dev, "en", GPIOD_OUT_LOW); ++ if (IS_ERR(mcu->en_gpio)) ++ return PTR_ERR(mcu->en_gpio); ++ mcu->irq_gpio = devm_gpiod_get(dev, "irq", GPIOD_IN); ++ if (IS_ERR(mcu->irq_gpio)) ++ return dev_err_probe(dev, PTR_ERR(mcu->irq_gpio), "irq gpio\n"); ++ ++ /* ++ * At probe the stock only LOOKS UP its pinctrl states โ€” gpio47 stays ++ * in the reset-ish pull-down ("suspend") config until the power dance ++ * selects ACTIVE; our DT "default" state mirrors that. ++ */ ++ mcu->pctl = devm_pinctrl_get(dev); ++ if (IS_ERR(mcu->pctl)) ++ mcu->pctl = NULL; ++ if (mcu->pctl) { ++ mcu->pctl_active = pinctrl_lookup_state(mcu->pctl, "active"); ++ if (IS_ERR(mcu->pctl_active)) ++ mcu->pctl_active = NULL; ++ } ++ ++ mcu_power_dance(mcu); ++ ++ in = devm_input_allocate_device(dev); ++ if (!in) ++ return -ENOMEM; ++ mcu->input = in; ++ in->name = "AYANEO MCU Gamepad"; ++ in->phys = "mcu-joystick/input0"; ++ in->id.bustype = BUS_SPI; ++ in->dev.parent = dev; ++ ++ input_set_abs_params(in, ABS_X, MCU_AXIS_MIN, MCU_AXIS_MAX, MCU_AXIS_FUZZ, MCU_AXIS_FLAT); ++ input_set_abs_params(in, ABS_Y, MCU_AXIS_MIN, MCU_AXIS_MAX, MCU_AXIS_FUZZ, MCU_AXIS_FLAT); ++ input_set_abs_params(in, ABS_RX, MCU_AXIS_MIN, MCU_AXIS_MAX, MCU_AXIS_FUZZ, MCU_AXIS_FLAT); ++ input_set_abs_params(in, ABS_RY, MCU_AXIS_MIN, MCU_AXIS_MAX, MCU_AXIS_FUZZ, MCU_AXIS_FLAT); ++ input_set_abs_params(in, ABS_Z, 0, MCU_TRIG_MAX, 0, 0); ++ input_set_abs_params(in, ABS_RZ, 0, MCU_TRIG_MAX, 0, 0); ++ input_set_abs_params(in, ABS_HAT0X, -1, 1, 0, 0); ++ input_set_abs_params(in, ABS_HAT0Y, -1, 1, 0, 0); ++ for (i = 0; i < ARRAY_SIZE(mcu_btn_map); i++) ++ input_set_capability(in, EV_KEY, mcu_btn_map[i].code); ++ input_set_capability(in, EV_KEY, BTN_TL2); ++ input_set_capability(in, EV_KEY, BTN_TR2); ++ ++ /* rumble (FF_RUMBLE via the memless core; play deferred to ff_work) */ ++ INIT_WORK(&mcu->ff_work, mcu_ff_work); ++ input_set_capability(in, EV_FF, FF_RUMBLE); ++ ret = input_ff_create_memless(in, mcu, mcu_ff_play); ++ if (ret) ++ return dev_err_probe(dev, ret, "ff create failed\n"); ++ ++ ret = input_register_device(in); ++ if (ret) ++ return dev_err_probe(dev, ret, "input register failed\n"); ++ ++ /* ++ * Stock init order (power_work_handler): header read (INFORMATIONAL โ€” ++ * the working stock system logs "Head check: 0x000000" here, the MCU ++ * returns zeros until the commands below are sent) โ†’ irq-rate command ++ * (rate 0 outside irq mode) โ†’ the 0x7f01 "go" command โ†’ start polling. ++ * Do NOT gate anything on the pre-command header value. ++ */ ++ { ++ static const u16 hdr_addrs[3] = { ++ MCU_REG_HEADER, MCU_REG_HEADER + 1, MCU_REG_HEADER + 2, ++ }; ++ u16 hdr[3] = {}; ++ ++ ret = mcu_read_seq(mcu, hdr_addrs, hdr, 3); ++ dev_dbg(dev, "init head check (ret=%d): %04x %04x %04x (zeros are normal pre-command)\n", ++ ret, hdr[0], hdr[1], hdr[2]); ++ } ++ mcu_send_init_cmds(mcu); ++ ++ /* one full frame post-command */ ++ ret = mcu_read_frame(mcu, regs); ++ dev_dbg(dev, "post-init frame (ret=%d): key %04x xy %04x %04x zrz %04x %04x trig %04x | hdr %04x %04x %04x%s\n", ++ ret, regs[MCU_FRAME_KEY], regs[MCU_FRAME_X], regs[MCU_FRAME_Y], ++ regs[MCU_FRAME_Z], regs[MCU_FRAME_RZ], regs[MCU_FRAME_TRIG], ++ regs[MCU_FRAME_HDR], regs[MCU_FRAME_HDR + 1], ++ regs[MCU_FRAME_HDR + 2], ++ (!ret && mcu_frame_hdr_ok(regs)) ? " (AYANEO OK!)" : ""); ++ ++ mcu->irq = gpiod_to_irq(mcu->irq_gpio); ++ if (mcu->irq > 0) { ++ ret = devm_request_threaded_irq(dev, mcu->irq, NULL, mcu_irq, ++ IRQF_TRIGGER_FALLING | IRQF_ONESHOT, ++ "mcu-joystick", mcu); ++ if (ret) ++ return dev_err_probe(dev, ret, "irq request failed\n"); ++ } ++ ++ /* poll fallback (and primary path if no irq wired); also the recovery ++ * watchdog โ€” it re-inits a silent MCU */ ++ INIT_DELAYED_WORK(&mcu->poll_work, mcu_poll_work); ++ schedule_delayed_work(&mcu->poll_work, msecs_to_jiffies(MCU_POLL_MS)); ++ ++ return 0; ++} ++ ++static void mcu_joystick_remove(struct spi_device *spi) ++{ ++ struct mcu_joystick *mcu = spi_get_drvdata(spi); ++ ++ cancel_delayed_work_sync(&mcu->poll_work); ++ if (mcu->vdd) ++ regulator_disable(mcu->vdd); ++} ++ ++/* ++ * Without these ops the poll/watchdog work keeps running into the suspended ++ * SPI controller ("Attempted to sync while suspend"), thrashing init commands ++ * and full power cycles against a dead bus for the whole suspend window, and ++ * the gamepad only comes back if the watchdog happens to win afterwards. ++ */ ++static int mcu_joystick_suspend(struct device *dev) ++{ ++ struct mcu_joystick *mcu = spi_get_drvdata(to_spi_device(dev)); ++ ++ if (mcu->irq > 0) ++ disable_irq(mcu->irq); ++ cancel_delayed_work_sync(&mcu->poll_work); ++ cancel_work_sync(&mcu->ff_work); ++ ++ /* stop any running rumble and release latched input state */ ++ mcu_write_word(mcu, MCU_WRITE_WORD(MCU_REG_RUMBLE_STRONG, 0)); ++ mcu_write_word(mcu, MCU_WRITE_WORD(MCU_REG_RUMBLE_WEAK, 0)); ++ mcu_report_idle(mcu); ++ ++ return 0; ++} ++ ++static int mcu_joystick_resume(struct device *dev) ++{ ++ struct mcu_joystick *mcu = spi_get_drvdata(to_spi_device(dev)); ++ u16 regs[MCU_NREGS]; ++ ++ /* ++ * Vendor resume recipe: re-send the irq-rate + start commands. If the ++ * MCU lost power across the suspend it answers zeros โ€” give it the ++ * full power-on sequence then. ++ */ ++ mcu_send_init_cmds(mcu); ++ if (mcu_read_frame(mcu, regs) || !mcu_frame_hdr_ok(regs)) { ++ dev_info(dev, "resume: MCU silent after init cmds, power cycling\n"); ++ mcu_power_dance(mcu); ++ mcu_send_init_cmds(mcu); ++ } ++ ++ mcu->bad_frames = 0; ++ mcu->reinit_fails = 0; ++ ++ if (mcu->irq > 0) ++ enable_irq(mcu->irq); ++ schedule_delayed_work(&mcu->poll_work, msecs_to_jiffies(MCU_POLL_MS)); ++ ++ return 0; ++} ++ ++static DEFINE_SIMPLE_DEV_PM_OPS(mcu_joystick_pm_ops, mcu_joystick_suspend, ++ mcu_joystick_resume); ++ ++static const struct of_device_id mcu_joystick_of_match[] = { ++ { .compatible = "mcu,joystick" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, mcu_joystick_of_match); ++ ++static struct spi_driver mcu_joystick_driver = { ++ .driver = { ++ .name = "mcu-joystick", ++ .of_match_table = mcu_joystick_of_match, ++ .pm = pm_sleep_ptr(&mcu_joystick_pm_ops), ++ }, ++ .probe = mcu_joystick_probe, ++ .remove = mcu_joystick_remove, ++}; ++module_spi_driver(mcu_joystick_driver); ++ ++MODULE_DESCRIPTION("AYANEO SPI MCU gamepad driver"); ++MODULE_LICENSE("GPL"); diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0059-ASoC-aw88395-lib-skip-monitor-sections-in-V1-ACF-parse.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0059-ASoC-aw88395-lib-skip-monitor-sections-in-V1-ACF-parse.patch new file mode 100644 index 00000000000..245ed6d139a --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0059-ASoC-aw88395-lib-skip-monitor-sections-in-V1-ACF-parse.patch @@ -0,0 +1,34 @@ +ASoC: aw88395: lib: skip monitor sections when parsing V1 ACF headers + +Vendor-tool-generated ACF firmware files routinely carry an +ACF_SEC_TYPE_MONITOR section per device. The V1 header scene-count +pass already excludes monitor sections, but the parse pass iterates +every DDE matching the device and aw_dev_parse_data_by_sec_type_v1() +fails the whole parse with "unsupported SEC_TYPE [10]" when it +reaches one. The V0 path skips monitor sections explicitly; make the +V1 path do the same. Seen with the AW88261 ACF shipped on the KONKR +Pocket FIT Elite. + +diff --git a/sound/soc/codecs/aw88395/aw88395_lib.c b/sound/soc/codecs/aw88395/aw88395_lib.c +index 056adbc..a2325dd 100644 +--- a/sound/soc/codecs/aw88395/aw88395_lib.c ++++ b/sound/soc/codecs/aw88395/aw88395_lib.c +@@ -863,6 +863,18 @@ static int aw_dev_parse_data_by_sec_type_v1(struct aw_device *aw_dev, + prof_info->prof_desc[*cur_scene_id].id = cfg_dde->dev_profile; + (*cur_scene_id)++; + break; ++ case ACF_SEC_TYPE_MONITOR: ++ /* ++ * Monitor configuration is not implemented for V1 ACF ++ * headers, but vendor-tool-generated ACF files routinely ++ * carry a monitor section per device. The scene-count pass ++ * (aw_get_dev_scene_count_v1() / ++ * aw_get_default_scene_count_v1()) already excludes monitor ++ * sections, so skip them here too instead of failing the ++ * whole parse. ++ */ ++ dev_dbg(aw_dev->dev, "skip monitor section"); ++ break; + default: + dev_err(aw_dev->dev, "unsupported SEC_TYPE [%d]", cfg_dde->data_type); + return -EINVAL; diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0060-ASoC-qcom-sc8280xp-enable-MI2S-bit-clock-on-BE-startup.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0060-ASoC-qcom-sc8280xp-enable-MI2S-bit-clock-on-BE-startup.patch new file mode 100644 index 00000000000..85e3499d609 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0060-ASoC-qcom-sc8280xp-enable-MI2S-bit-clock-on-BE-startup.patch @@ -0,0 +1,106 @@ +ASoC: qcom: sc8280xp: enable the MI2S bit clock around MI2S streams + +Cards served by this driver can carry MI2S BE dai-links (the AYN Odin3 +and KONKR Pocket FIT Elite route their speaker amps over MI2S), but +unlike sc7280/sdm845 the driver never enables the MI2S bit clock: the +BE streams, yet IBIT stays at enable_count 0, no BCLK leaves the SoC +and BCLK-slaved amps (aw88261: "check pll lock fail, cannot start") +never power up. Take the card-level "i2s_clk" (optional, NULL-safe - +boards without the property are unaffected) and prepare/enable it +around MI2S BE startup/shutdown, refcounted across the MI2S links. + +diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c +index 7925aa3..ffb405f 100644 +--- a/sound/soc/qcom/sc8280xp.c ++++ b/sound/soc/qcom/sc8280xp.c +@@ -2,6 +2,7 @@ + // Copyright (c) 2022, Linaro Limited + + #include ++#include + #include + #include + #include +@@ -21,6 +22,8 @@ struct sc8280xp_snd_data { + struct snd_soc_jack jack; + struct snd_soc_jack dp_jack[8]; + bool jack_setup; ++ struct clk *i2s_clk; ++ int mi2s_clk_count; + }; + + static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) +@@ -114,9 +117,59 @@ static int sc8280xp_snd_hw_free(struct snd_pcm_substream *substream) + return qcom_snd_sdw_hw_free(substream, &data->stream_prepared[cpu_dai->id]); + } + ++static int sc8280xp_snd_startup(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); ++ struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); ++ struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); ++ int ret; ++ ++ switch (cpu_dai->id) { ++ case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX: ++ case QUINARY_MI2S_RX...QUINARY_MI2S_TX: ++ /* ++ * The MI2S bit clock (DT clock "i2s_clk", a q6prm clock) is ++ * not managed by the DSP graph: without an explicit enable ++ * the BE streams but no BCLK ever leaves the SoC and ++ * BCLK-slaved speaker amps cannot lock their PLL. ++ */ ++ if (++data->mi2s_clk_count == 1) { ++ ret = clk_prepare_enable(data->i2s_clk); ++ if (ret) { ++ data->mi2s_clk_count--; ++ return ret; ++ } ++ } ++ break; ++ default: ++ break; ++ } ++ ++ return qcom_snd_sdw_startup(substream); ++} ++ ++static void sc8280xp_snd_shutdown(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); ++ struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); ++ struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); ++ ++ switch (cpu_dai->id) { ++ case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX: ++ case QUINARY_MI2S_RX...QUINARY_MI2S_TX: ++ if (--data->mi2s_clk_count == 0) ++ clk_disable_unprepare(data->i2s_clk); ++ break; ++ default: ++ break; ++ } ++ ++ qcom_snd_sdw_shutdown(substream); ++} ++ + static const struct snd_soc_ops sc8280xp_be_ops = { +- .startup = qcom_snd_sdw_startup, +- .shutdown = qcom_snd_sdw_shutdown, ++ .startup = sc8280xp_snd_startup, ++ .shutdown = sc8280xp_snd_shutdown, + .hw_free = sc8280xp_snd_hw_free, + .prepare = sc8280xp_snd_prepare, + }; +@@ -158,6 +211,11 @@ static int sc8280xp_platform_probe(struct platform_device *pdev) + if (ret) + return ret; + ++ data->i2s_clk = devm_clk_get_optional(dev, "i2s_clk"); ++ if (IS_ERR(data->i2s_clk)) ++ return dev_err_probe(dev, PTR_ERR(data->i2s_clk), ++ "failed to get i2s_clk\n"); ++ + card->driver_name = of_device_get_match_data(dev); + sc8280xp_add_be_ops(card); + return devm_snd_soc_register_card(dev, card); diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0061-input-touchscreen-add-chipone-tddi.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0061-input-touchscreen-add-chipone-tddi.patch new file mode 100644 index 00000000000..e1ff4767617 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0061-input-touchscreen-add-chipone-tddi.patch @@ -0,0 +1,379 @@ +From: ROCKNIX +Date: Sat, 6 Jun 2026 00:00:00 +0000 +Subject: [PATCH] input: touchscreen: add Chipone ICNL99xx TDDI driver + +Lean driver for the Chipone ICNL99xx (TDDI) in-cell touch controller, as +found on the KONKR Pocket FIT Elite (ICNL9922C @ i2c4 0x48). The chip runs +resident firmware, so the driver only does normal-mode touch reporting. +Protocol ("TCS" command layer) reversed from the vendor chipone_tddi.ko. +pm: a PM notifier masks the IRQ at PM_SUSPEND_PREPARE and resets the +chip + unmasks at PM_POST_SUSPEND โ€” the panel (and the touch IC with it) +suspends before an i2c-client dev_pm_ops hook runs, so the INT glitch +already had the threaded handler stuck in a dead-bus I2C read (~1.7 s +GPI timeout) on every suspend entry. +--- +diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig +--- a/drivers/input/touchscreen/Kconfig ++++ b/drivers/input/touchscreen/Kconfig +@@ -210,6 +210,18 @@ + To compile this driver as a module, choose M here: the + module will be called chipone_icn8505. + ++config TOUCHSCREEN_CHIPONE_TDDI ++ tristate "Chipone ICNL99xx TDDI touchscreen controller" ++ depends on I2C ++ help ++ Say Y here if you have a Chipone ICNL99xx (e.g. ICNL9922C) TDDI ++ in-cell touchscreen, as found on the KONKR Pocket FIT Elite. ++ ++ If unsure, say N. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called chipone-tddi. ++ + config TOUCHSCREEN_CY8CTMA140 + tristate "cy8ctma140 touchscreen" + depends on I2C +diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile +--- a/drivers/input/touchscreen/Makefile ++++ b/drivers/input/touchscreen/Makefile +@@ -23,6 +23,7 @@ + obj-$(CONFIG_TOUCHSCREEN_BU21029) += bu21029_ts.o + obj-$(CONFIG_TOUCHSCREEN_CHIPONE_ICN8318) += chipone_icn8318.o + obj-$(CONFIG_TOUCHSCREEN_CHIPONE_ICN8505) += chipone_icn8505.o ++obj-$(CONFIG_TOUCHSCREEN_CHIPONE_TDDI) += chipone-tddi.o + obj-$(CONFIG_TOUCHSCREEN_CY8CTMA140) += cy8ctma140.o + obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110) += cy8ctmg110_ts.o + obj-$(CONFIG_TOUCHSCREEN_CYTTSP_CORE) += cyttsp_core.o +diff --git a/drivers/input/touchscreen/chipone-tddi.c b/drivers/input/touchscreen/chipone-tddi.c +new file mode 100644 +--- /dev/null ++++ b/drivers/input/touchscreen/chipone-tddi.c +@@ -0,0 +1,327 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Chipone ICNL99xx (TDDI) touchscreen driver โ€” lean mainline port. ++ * ++ * Target: KONKR Pocket FIT Elite, panel touch IC = ICNL9922C on i2c4 @ 0x48, ++ * IRQ TLMM 162 (falling edge), reset TLMM 161 (active-low). The controller ++ * runs resident firmware (no host firmware download), so this driver only ++ * does normal-mode touch reporting โ€” no flashing / factory-test paths. ++ * ++ * Protocol reversed from the stock vendor module chipone_tddi.ko v3.4.7 ++ * ("TCS" command layer) + the public ICNT8xxx CTS source (reporting/struct): ++ * ++ * TCS read transaction (cts_tcs_read in the vendor .ko): ++ * - build a 6-byte command header: ++ * [cmd_lo, cmd_hi, len_lo, len_hi, checksum, 0x01] ++ * checksum = ~(cmd_lo + cmd_hi + len_lo + len_hi) & 0xff ++ * - I2C write the 6 header bytes to addr 0x48 ++ * - I2C read `len` payload bytes back ++ * The "touch info" command is 0x4103, payload length 117 (0x75). The first ++ * bytes of the payload are { u8 vkey_state; u8 num_msg; msgs[]; } where each ++ * msg is 7 bytes { u8 id; __le16 x; __le16 y; u8 pressure; u8 event; } โ€” ++ * identical to the public cts_device_touch_msg layout (confirmed against the ++ * .ko's cts_plat_process_touch_msg disassembly: stride 7, x@+1, y@+3, ++ * pressure@+5, event@+6, standard MT-B reporting). ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define CTS_TCS_CMD_TOUCH_INFO 0x4103 ++#define CTS_TCS_CMD_FW_VER 0x4005 ++#define CTS_TCS_HDR_FLAG BIT(14) /* cmd carries a packet header */ ++ ++#define CTS_TOUCH_INFO_LEN 117 /* 0x75, from cts_tcs_get_touchinfo */ ++#define CTS_MAX_TOUCH 10 ++ ++/* offsets within the touch-info payload */ ++#define CTS_TI_NUM_MSG 1 ++#define CTS_TI_MSGS 2 ++#define CTS_MSG_STRIDE 7 ++#define CTS_MSG_ID 0 ++#define CTS_MSG_X 1 /* __le16 */ ++#define CTS_MSG_Y 3 /* __le16 */ ++#define CTS_MSG_PRESSURE 5 ++#define CTS_MSG_EVENT 6 ++ ++/* msg event codes */ ++#define CTS_EV_NONE 0 ++#define CTS_EV_DOWN 1 ++#define CTS_EV_MOVE 2 ++#define CTS_EV_STAY 3 ++#define CTS_EV_UP 4 ++ ++struct chipone_tddi { ++ struct i2c_client *client; ++ struct input_dev *input; ++ struct gpio_desc *reset_gpio; ++ struct touchscreen_properties props; ++ struct notifier_block pm_nb; ++}; ++ ++/* ++ * One TCS read: write the 6-byte command header, then read `len` payload ++ * bytes. Mirrors cts_tcs_read() in the vendor module. ++ */ ++static int chipone_tcs_read(struct chipone_tddi *cts, u16 cmd, ++ u8 *buf, size_t len) ++{ ++ u8 hdr[6]; ++ u8 cmd_lo = cmd & 0xff; ++ u8 cmd_hi = (cmd >> 8) & 0xff; ++ u8 len_lo = len & 0xff; ++ u8 len_hi = (len >> 8) & 0xff; ++ struct i2c_msg msgs[2] = { ++ { ++ .addr = cts->client->addr, ++ .flags = 0, ++ .len = sizeof(hdr), ++ .buf = hdr, ++ }, ++ { ++ .addr = cts->client->addr, ++ .flags = I2C_M_RD, ++ .len = len, ++ .buf = buf, ++ }, ++ }; ++ int ret; ++ ++ int tries; ++ ++ hdr[0] = cmd_lo; ++ hdr[1] = cmd_hi; ++ hdr[2] = len_lo; ++ hdr[3] = len_hi; ++ hdr[4] = (u8)~(cmd_lo + cmd_hi + len_lo + len_hi); ++ hdr[5] = 0x01; ++ ++ /* ++ * The chip NAKs (-EIO) if polled while its report buffer is being ++ * updated, and is not ready immediately after reset. The vendor driver ++ * retries the transfer 3x with a delay; mirror that โ€” but only for ++ * NAKs. Controller-level failures (-ETIMEDOUT with the IC unpowered, ++ * e.g. panel off) cost ~2.5 s per attempt and never recover. ++ */ ++ for (tries = 0; tries < 3; tries++) { ++ ret = i2c_transfer(cts->client->adapter, msgs, ++ ARRAY_SIZE(msgs)); ++ if (ret == ARRAY_SIZE(msgs)) ++ return 0; ++ if (ret < 0 && ret != -EIO) ++ return ret; ++ usleep_range(5000, 6000); ++ } ++ ++ return ret < 0 ? ret : -EIO; ++} ++ ++static void chipone_report_touch(struct chipone_tddi *cts, const u8 *info) ++{ ++ struct input_dev *input = cts->input; ++ unsigned int num = info[CTS_TI_NUM_MSG]; ++ unsigned int i; ++ int contacts = 0; ++ ++ if (num > CTS_MAX_TOUCH) ++ num = CTS_MAX_TOUCH; ++ ++ for (i = 0; i < num; i++) { ++ const u8 *m = info + CTS_TI_MSGS + i * CTS_MSG_STRIDE; ++ u8 id = m[CTS_MSG_ID]; ++ u8 event = m[CTS_MSG_EVENT]; ++ bool down = event != CTS_EV_UP && event != CTS_EV_NONE; ++ u16 x, y; ++ ++ if (id >= CTS_MAX_TOUCH) ++ continue; ++ ++ input_mt_slot(input, id); ++ input_mt_report_slot_state(input, MT_TOOL_FINGER, down); ++ if (!down) ++ continue; ++ ++ contacts++; ++ x = get_unaligned_le16(&m[CTS_MSG_X]); ++ y = get_unaligned_le16(&m[CTS_MSG_Y]); ++ touchscreen_report_pos(input, &cts->props, x, y, true); ++ input_report_abs(input, ABS_MT_PRESSURE, m[CTS_MSG_PRESSURE]); ++ input_report_abs(input, ABS_MT_TOUCH_MAJOR, m[CTS_MSG_PRESSURE]); ++ } ++ ++ input_mt_sync_frame(input); ++ input_report_key(input, BTN_TOUCH, contacts > 0); ++ input_sync(input); ++} ++ ++static irqreturn_t chipone_tddi_irq(int irq, void *dev_id) ++{ ++ struct chipone_tddi *cts = dev_id; ++ u8 info[CTS_TOUCH_INFO_LEN]; ++ int ret; ++ ++ ret = chipone_tcs_read(cts, CTS_TCS_CMD_TOUCH_INFO, ++ info, sizeof(info)); ++ if (ret) { ++ dev_err_ratelimited(&cts->client->dev, ++ "touch-info read failed: %d\n", ret); ++ return IRQ_HANDLED; ++ } ++ ++ chipone_report_touch(cts, info); ++ return IRQ_HANDLED; ++} ++ ++static void chipone_tddi_reset(struct chipone_tddi *cts) ++{ ++ if (!cts->reset_gpio) ++ return; ++ ++ gpiod_set_value_cansleep(cts->reset_gpio, 1); ++ usleep_range(1000, 2000); ++ gpiod_set_value_cansleep(cts->reset_gpio, 0); ++ /* firmware boot time before the chip answers on I2C */ ++ msleep(50); ++} ++ ++/* ++ * TDDI: the touch IC is part of the display driver IC and powers down with ++ * the panel. Once the DRM side suspends, the INT line glitches and any I2C ++ * transfer just times out at the controller (~1.7 s, plus a failed GPI ++ * CH STOP). The panel suspends BEFORE an i2c-client dev_pm_ops suspend ++ * hook would run, so masking the IRQ there is too late โ€” the glitch has ++ * already launched the threaded handler into the dead-bus read, and ++ * disable_irq() then waits out the timeout, stalling every suspend entry. ++ * Mask at PM_SUSPEND_PREPARE instead (panel still on, nothing in flight) ++ * and re-init at PM_POST_SUSPEND (panel guaranteed back up). ++ */ ++static int chipone_pm_notify(struct notifier_block *nb, unsigned long action, ++ void *data) ++{ ++ struct chipone_tddi *cts = container_of(nb, struct chipone_tddi, pm_nb); ++ ++ switch (action) { ++ case PM_SUSPEND_PREPARE: ++ disable_irq(cts->client->irq); ++ break; ++ case PM_POST_SUSPEND: ++ chipone_tddi_reset(cts); ++ enable_irq(cts->client->irq); ++ break; ++ } ++ ++ return NOTIFY_DONE; ++} ++ ++static void chipone_unregister_pm_notifier(void *data) ++{ ++ struct chipone_tddi *cts = data; ++ ++ unregister_pm_notifier(&cts->pm_nb); ++} ++ ++static int chipone_tddi_probe(struct i2c_client *client) ++{ ++ struct device *dev = &client->dev; ++ struct chipone_tddi *cts; ++ u8 fw_ver[4]; ++ int ret; ++ ++ cts = devm_kzalloc(dev, sizeof(*cts), GFP_KERNEL); ++ if (!cts) ++ return -ENOMEM; ++ ++ cts->client = client; ++ i2c_set_clientdata(client, cts); ++ ++ cts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); ++ if (IS_ERR(cts->reset_gpio)) ++ return dev_err_probe(dev, PTR_ERR(cts->reset_gpio), ++ "failed to get reset gpio\n"); ++ ++ chipone_tddi_reset(cts); ++ ++ /* ++ * Sanity probe: read the firmware version (TCS cmd 0x4005, 4-byte ++ * payload to match the vendor module's checksum/length). Non-fatal โ€” ++ * the touch-info IRQ path is what matters and we don't want a strict ++ * sanity read to block bring-up. ++ */ ++ ret = chipone_tcs_read(cts, CTS_TCS_CMD_FW_VER, fw_ver, sizeof(fw_ver)); ++ if (ret) ++ dev_warn(dev, "fw-version read failed (%d), continuing\n", ret); ++ else ++ dev_info(dev, "ICNL99xx TDDI touch, fw 0x%04x\n", ++ get_unaligned_le16(fw_ver)); ++ ++ cts->input = devm_input_allocate_device(dev); ++ if (!cts->input) ++ return -ENOMEM; ++ ++ cts->input->name = "Chipone TDDI Touchscreen"; ++ cts->input->id.bustype = BUS_I2C; ++ ++ input_set_abs_params(cts->input, ABS_MT_POSITION_X, 0, 0, 0, 0); ++ input_set_abs_params(cts->input, ABS_MT_POSITION_Y, 0, 0, 0, 0); ++ input_set_abs_params(cts->input, ABS_MT_PRESSURE, 0, 255, 0, 0); ++ input_set_abs_params(cts->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); ++ ++ touchscreen_parse_properties(cts->input, true, &cts->props); ++ if (!cts->props.max_x || !cts->props.max_y) ++ return dev_err_probe(dev, -EINVAL, ++ "touchscreen-size-x/y missing\n"); ++ ++ ret = input_mt_init_slots(cts->input, CTS_MAX_TOUCH, ++ INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); ++ if (ret) ++ return dev_err_probe(dev, ret, "failed to init MT slots\n"); ++ ++ ret = devm_request_threaded_irq(dev, client->irq, NULL, ++ chipone_tddi_irq, IRQF_ONESHOT, ++ dev_name(dev), cts); ++ if (ret) ++ return dev_err_probe(dev, ret, "failed to request irq\n"); ++ ++ ret = input_register_device(cts->input); ++ if (ret) ++ return dev_err_probe(dev, ret, "failed to register input\n"); ++ ++ cts->pm_nb.notifier_call = chipone_pm_notify; ++ ret = register_pm_notifier(&cts->pm_nb); ++ if (ret) ++ return ret; ++ ++ return devm_add_action_or_reset(dev, chipone_unregister_pm_notifier, ++ cts); ++} ++ ++ ++static const struct of_device_id chipone_tddi_of_match[] = { ++ { .compatible = "chipone-tddi" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, chipone_tddi_of_match); ++ ++static struct i2c_driver chipone_tddi_driver = { ++ .driver = { ++ .name = "chipone-tddi", ++ .of_match_table = chipone_tddi_of_match, ++ }, ++ .probe = chipone_tddi_probe, ++}; ++module_i2c_driver(chipone_tddi_driver); ++ ++MODULE_DESCRIPTION("Chipone ICNL99xx TDDI touchscreen driver"); ++MODULE_LICENSE("GPL"); diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0062-backlight-aw99706-honor-blank-power-state.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0062-backlight-aw99706-honor-blank-power-state.patch new file mode 100644 index 00000000000..973f049da4d --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0062-backlight-aw99706-honor-blank-power-state.patch @@ -0,0 +1,29 @@ +From: ROCKNIX +Date: Sat, 6 Jun 2026 00:00:00 +0000 +Subject: [PATCH] backlight: aw99706: honor blank/power state in update_status + +aw99706_bl_update_status() programmed bl->props.brightness directly, +ignoring the backlight power/blank state. As a result writing bl_power=4 +(FB_BLANK_POWERDOWN) or a fbblank/suspend did not turn the LED off โ€” the +backlight stayed lit. Use backlight_get_brightness(), which returns 0 when +the device is blanked/powered-down, so userspace display-off works (e.g. +ROCKNIX fake-suspend backlight_off writes bl_power=4). +--- +--- a/drivers/video/backlight/aw99706.c ++++ b/drivers/video/backlight/aw99706.c +@@ -343,7 +343,14 @@ static int aw99706_bl_update_status(struct backlight_device *bl) + { + struct aw99706_device *aw = bl_get_data(bl); + +- return aw99706_update_brightness(aw, bl->props.brightness); ++ /* ++ * Use backlight_get_brightness() so the LED follows the blank/power ++ * state (FB_BLANK_POWERDOWN, BL_CORE_SUSPENDED, fbblank) and not just ++ * props.brightness. Without this, writing bl_power=4 is a no-op and ++ * userspace display-off (e.g. ROCKNIX fake-suspend backlight_off) never ++ * turns the backlight off. ++ */ ++ return aw99706_update_brightness(aw, backlight_get_brightness(bl)); + } + + static const struct backlight_ops aw99706_bl_ops = { diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0063-ASoC-wcd939x-route-usbss-on-integrated-jack-insert.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0063-ASoC-wcd939x-route-usbss-on-integrated-jack-insert.patch new file mode 100644 index 00000000000..671868e5e70 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0063-ASoC-wcd939x-route-usbss-on-integrated-jack-insert.patch @@ -0,0 +1,160 @@ +From: KONKR Pocket FIT Elite port +Subject: [PATCH] ASoC: wcd939x: route USBSS to audio on integrated-jack insert + +On boards with a dedicated 3.5mm jack wired through the WCD939x USBSS +analog switch, the jack is found by the MBHC mechanical path and produces +no Type-C connector event, so the switch is never put in audio mode and +HPHL/HPHR float -> MBHC reports a ground/mic swap. Add an mbhc_cb hook the +codec uses (via a qcom,usbss phandle) to route the switch to audio on +insert and back on removal, reusing the USBSS audio FSM path. +--- +--- a/drivers/usb/typec/mux/wcd939x-usbss.c ++++ b/drivers/usb/typec/mux/wcd939x-usbss.c +@@ -752,6 +752,36 @@ + typec_mux_put(usbss->codec); + } + ++/* ++ * wcd939x_usbss_audio_config - drive the analog switch into (or out of) ++ * audio-accessory routing on behalf of the WCD codec's MBHC. ++ * ++ * On boards with an *integrated* 3.5mm jack wired through this switch, the jack ++ * is detected by the codec's MBHC mechanical path and produces no Type-C ++ * connector event, so the normal connector -> mux_set(AUDIO) routing never ++ * runs. Until the switch is in audio mode the codec's HPHL/HPHR sense lines ++ * float and MBHC mis-classifies the plug as a ground/mic swap. The codec calls ++ * this on insert/removal so the same routing the connector would have applied ++ * is in place before MBHC measures the plug. @dev is this USBSS i2c device. ++ */ ++int wcd939x_usbss_audio_config(struct device *dev, bool enable) ++{ ++ struct wcd939x_usbss *usbss = dev ? dev_get_drvdata(dev) : NULL; ++ int ret; ++ ++ if (!usbss) ++ return -ENODEV; ++ ++ mutex_lock(&usbss->lock); ++ usbss->mode = enable ? TYPEC_MODE_AUDIO : TYPEC_STATE_SAFE; ++ usbss->svid = 0; ++ ret = wcd939x_usbss_set(usbss); ++ mutex_unlock(&usbss->lock); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(wcd939x_usbss_audio_config); ++ + static const struct i2c_device_id wcd939x_usbss_table[] = { + { "wcd9390-usbss" }, + { } +--- a/sound/soc/codecs/wcd-mbhc-v2.h ++++ b/sound/soc/codecs/wcd-mbhc-v2.h +@@ -265,6 +265,13 @@ + bool (*mbhc_get_moisture_status)(struct snd_soc_component *component); + void (*mbhc_moisture_polling_ctrl)(struct snd_soc_component *component, bool enable); + void (*mbhc_moisture_detect_en)(struct snd_soc_component *component, bool enable); ++ /* ++ * Route an external analog switch (e.g. WCD939x USBSS) into/out of ++ * audio-accessory mode when an integrated jack is detected via the ++ * mechanical path. Optional; only set on boards whose HP lines are ++ * wired through such a switch. ++ */ ++ void (*mbhc_ext_switch_ctrl)(struct snd_soc_component *component, bool enable); + }; + + #if IS_ENABLED(CONFIG_SND_SOC_WCD_MBHC) +--- a/sound/soc/codecs/wcd-mbhc-v2.c ++++ b/sound/soc/codecs/wcd-mbhc-v2.c +@@ -535,11 +535,21 @@ + if (detection_type) { + if (mbhc->current_plug != MBHC_PLUG_TYPE_NONE) + goto exit; ++ /* ++ * Route the external analog switch (if any) into audio mode so ++ * an integrated jack presents a real HPHL/HPHR load to plug ++ * detection instead of floating (which reads as a gnd/mic swap). ++ */ ++ if (mbhc->mbhc_cb->mbhc_ext_switch_ctrl) ++ mbhc->mbhc_cb->mbhc_ext_switch_ctrl(component, true); + /* Make sure MASTER_BIAS_CTL is enabled */ + mbhc->mbhc_cb->mbhc_bias(component, true); + mbhc->is_btn_press = false; + wcd_mbhc_adc_detect_plug_type(mbhc); + } else { ++ /* Jack removed: take the external analog switch out of audio. */ ++ if (mbhc->mbhc_cb->mbhc_ext_switch_ctrl) ++ mbhc->mbhc_cb->mbhc_ext_switch_ctrl(component, false); + /* Disable HW FSM */ + wcd_mbhc_write_field(mbhc, WCD_MBHC_FSM_EN, 0); + wcd_mbhc_write_field(mbhc, WCD_MBHC_BTN_ISRC_CTL, 0); +--- a/sound/soc/codecs/wcd939x.c ++++ b/sound/soc/codecs/wcd939x.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -187,6 +188,8 @@ + unsigned long typec_mode; + struct typec_switch *typec_switch; + #endif /* CONFIG_TYPEC */ ++ /* external analog switch (WCD939x USBSS) for an integrated jack */ ++ struct device *usbss_dev; + /* mbhc module */ + struct wcd_mbhc *wcd_mbhc; + struct wcd_mbhc_config mbhc_cfg; +@@ -2411,8 +2414,27 @@ + enable); + } + ++/* Provided by the WCD939x USBSS analog-switch driver (built-in). */ ++int wcd939x_usbss_audio_config(struct device *dev, bool enable); ++ ++/* ++ * Route the WCD939x USBSS into/out of audio-accessory mode when the MBHC ++ * detects an integrated 3.5mm jack via the mechanical path. Without it the ++ * jack's HPHL/HPHR lines float through the switch and MBHC reports a gnd/mic ++ * swap. No-op on boards without a USBSS (usbss_dev == NULL). ++ */ ++static void wcd939x_mbhc_ext_switch_ctrl(struct snd_soc_component *component, ++ bool enable) ++{ ++ struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); ++ ++ if (wcd939x->usbss_dev) ++ wcd939x_usbss_audio_config(wcd939x->usbss_dev, enable); ++} ++ + static const struct wcd_mbhc_cb mbhc_cb = { + .clk_setup = wcd939x_mbhc_clk_setup, ++ .mbhc_ext_switch_ctrl = wcd939x_mbhc_ext_switch_ctrl, + .mbhc_bias = wcd939x_mbhc_mbhc_bias_control, + .set_btn_thr = wcd939x_mbhc_program_btn_thr, + .micbias_enable_status = wcd939x_mbhc_micb_en_status, +@@ -3224,6 +3246,23 @@ + } + #endif /* CONFIG_TYPEC */ + ++ /* ++ * If an external analog switch (WCD939x USBSS) carries the HP lines to ++ * an integrated jack, grab its device so MBHC can route it on insert. ++ */ ++ { ++ struct device_node *usbss_np; ++ struct i2c_client *usbss_client; ++ ++ usbss_np = of_parse_phandle(dev->of_node, "qcom,usbss", 0); ++ if (usbss_np) { ++ usbss_client = of_find_i2c_device_by_node(usbss_np); ++ of_node_put(usbss_np); ++ if (usbss_client) ++ wcd939x->usbss_dev = &usbss_client->dev; ++ } ++ } ++ + return 0; + } + diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0064-ASoC-wcd-mbhc-clear-stale-jack-report-on-mechanical-removal.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0064-ASoC-wcd-mbhc-clear-stale-jack-report-on-mechanical-removal.patch new file mode 100644 index 00000000000..0c7074fd5f8 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0064-ASoC-wcd-mbhc-clear-stale-jack-report-on-mechanical-removal.patch @@ -0,0 +1,69 @@ +From: KONKR Pocket FIT Elite port +Subject: [PATCH] ASoC: wcd-mbhc-v2: clear stale jack report on mechanical removal + +The mechanical-detection removal path only reports a jack removal when +mbhc->current_plug names a known plug type. On boards with an integrated +3.5mm jack wired through an analog switch (WCD939x USBSS, see the +"route USBSS on integrated-jack insert" change), the ADC plug-type +detection can desync and leave current_plug == MBHC_PLUG_TYPE_NONE -- or +classify the plug as a gnd/mic swap -- while hph_status still holds the +SND_JACK_HEADPHONE bit from the insertion report. + +When that happens the swch IRQ handler takes one of the "goto exit" paths +without reporting removal, so the "Headphone Jack" control stays latched +at "inserted" with nothing physically plugged in. Userspace (PipeWire) +then keeps routing to the headphone path and mutes the speaker forever. + +Mechanical detection is the physical ground truth that the jack is out. +Funnel the NONE / gnd-mic-swap / default removal paths through a new +report_removed label that force-clears a stale hph_status and reports a +clean removal, so the speaker route returns on unplug. +--- +--- a/sound/soc/codecs/wcd-mbhc-v2.c ++++ b/sound/soc/codecs/wcd-mbhc-v2.c +@@ -556,7 +556,7 @@ + mbhc->extn_cable_hph_rem = false; + + if (mbhc->current_plug == MBHC_PLUG_TYPE_NONE) +- goto exit; ++ goto report_removed; + + mbhc->is_btn_press = false; + switch (mbhc->current_plug) { +@@ -573,17 +573,34 @@ + break; + case MBHC_PLUG_TYPE_GND_MIC_SWAP: + dev_err(mbhc->dev, "Ground and Mic Swapped on plug\n"); +- goto exit; ++ goto report_removed; + default: + dev_err(mbhc->dev, "Invalid current plug: %d\n", + mbhc->current_plug); +- goto exit; ++ goto report_removed; + } + disable_irq_nosync(mbhc->intr_ids->mbhc_hs_rem_intr); + disable_irq_nosync(mbhc->intr_ids->mbhc_hs_ins_intr); + wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_DETECTION_TYPE, 1); + wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC, 0); + wcd_mbhc_report_plug(mbhc, 0, jack_type); ++ goto exit; ++ ++ report_removed: ++ /* ++ * Mechanical detection is the physical ground truth that the ++ * jack is out. On boards with an integrated jack wired behind an ++ * analog switch (e.g. WCD939x USBSS) the ADC plug-type path can ++ * desync and leave current_plug == NONE (or a gnd/mic-swap ++ * error) while hph_status still holds the headphone bit -- which ++ * freezes the "Headphone Jack" control at "inserted", so ++ * userspace keeps the speaker muted forever. Force a clean ++ * removal report so the speaker route comes back. ++ */ ++ if (mbhc->hph_status) { ++ mbhc->hph_status = 0; ++ snd_soc_jack_report(mbhc->jack, 0, WCD_MBHC_JACK_MASK); ++ } + } + + exit: diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0066-scsi-ufs-ufs-qcom-add-sm8750-compatible.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0066-scsi-ufs-ufs-qcom-add-sm8750-compatible.patch new file mode 100644 index 00000000000..b6a546b8bae --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0066-scsi-ufs-ufs-qcom-add-sm8750-compatible.patch @@ -0,0 +1,18 @@ +From: KONKR Pocket FIT Elite port +Subject: [PATCH] scsi: ufs: ufs-qcom: add SM8750 controller compatible + +The SM8750 UFS host controller (hw_ver 6.1.0) otherwise falls through to +the generic "qcom,ufshc" match with no drvdata. Match +"qcom,sm8750-ufshc" to ufs_qcom_sm8550_drvdata (as SM8650 does) so it +picks up UFSHCD_QUIRK_BROKEN_LSDBS_CAP and no_phy_retention. +--- +--- a/drivers/ufs/host/ufs-qcom.c ++++ b/drivers/ufs/host/ufs-qcom.c +@@ -2426,6 +2426,7 @@ static const struct of_device_id ufs_qcom_of_match[] __maybe_unused = { + { .compatible = "qcom,ufshc" }, + { .compatible = "qcom,sm8550-ufshc", .data = &ufs_qcom_sm8550_drvdata }, + { .compatible = "qcom,sm8650-ufshc", .data = &ufs_qcom_sm8550_drvdata }, ++ { .compatible = "qcom,sm8750-ufshc", .data = &ufs_qcom_sm8550_drvdata }, + { .compatible = "qcom,sa8255p-ufshc", .data = &ufs_qcom_sa8255p_drvdata }, + {}, + }; diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0069-input-misc-add-konkr-sysbtn-MCU-system-buttons.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0069-input-misc-add-konkr-sysbtn-MCU-system-buttons.patch new file mode 100644 index 00000000000..425c581a559 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0069-input-misc-add-konkr-sysbtn-MCU-system-buttons.patch @@ -0,0 +1,550 @@ +input: misc: add KONKR Pocket FIT Elite MCU system-button driver + +serdev client for the MCU UART (geni SE5 @894000): sends the enable frame +the MCU requires before it streams, decodes the byte-x8 button events into +a real input device "KONKR System Buttons" (BTN_TRIGGER_HAPPY1..5), and +exposes the analog-stick RGB as a multicolor LED ("konkr:rgb:joysticks", +F7 01 R G B frames). Resends the enable frame on system resume. +sysfs key_{lc,rc}_{shoulder,back}: GET/SET_KEY_CFG remap of the grip and +shoulder-2 buttons over the same UART (" ", MCU-persisted). +pm: a PM notifier blanks the stick LEDs at PM_SUSPEND_PREPARE (the MCU +stays powered and would keep them lit) and re-enables + relights at +PM_POST_SUSPEND; all UART TX is inhibited in between โ€” a frame written +during the device-suspend window never drains ("Unable to drain +transmitter") and wedges the geni SE TX engine until reboot. + +--- +diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig +--- a/drivers/input/misc/Kconfig ++++ b/drivers/input/misc/Kconfig +@@ -1003,4 +1003,17 @@ + To compile this driver as a module, choose M here: the + module will be called stpmic1_onkey. + ++config INPUT_KONKR_SYSBTN ++ tristate "KONKR Pocket FIT Elite MCU system buttons" ++ depends on SERIAL_DEV_BUS ++ depends on LEDS_CLASS_MULTICOLOR ++ help ++ Driver for the MCU-attached "system" buttons (KONKR, Home, ++ Shoulder-2 pair, front-top-right) on the KONKR Pocket FIT Elite ++ handheld, delivered over a UART, and for the analog-stick RGB ++ lighting on the same link (exposed as a multicolor LED). ++ ++ To compile this driver as a module, choose M here: the ++ module will be called konkr_sysbtn. ++ + endif +diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile +--- a/drivers/input/misc/Makefile ++++ b/drivers/input/misc/Makefile +@@ -50,6 +50,7 @@ + obj-$(CONFIG_INPUT_IQS626A) += iqs626a.o + obj-$(CONFIG_INPUT_IQS7222) += iqs7222.o + obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o ++obj-$(CONFIG_INPUT_KONKR_SYSBTN) += konkr_sysbtn.o + obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o + obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o + obj-$(CONFIG_INPUT_MAX7360_ROTARY) += max7360-rotary.o +diff --git a/drivers/input/misc/konkr_sysbtn.c b/drivers/input/misc/konkr_sysbtn.c +--- /dev/null ++++ b/drivers/input/misc/konkr_sysbtn.c +@@ -0,0 +1,498 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * konkr_sysbtn - KONKR Pocket FIT Elite MCU UART client: the five "system" ++ * buttons as an input device, plus the analog-stick RGB as a multicolor LED. ++ * ++ * The handheld's MCU ("KR02") talks 115200 8N1 on the geni UART at 894000. ++ * Protocol (reverse-engineered from the vendor app, confirmed on hardware): ++ * ++ * - The MCU is silent after power-on until it receives the enable frame ++ * F7 00 00 00 00 00 00 00 00 00 ED; it then streams autonomously. ++ * - Button event: one byte repeated 8 times (followed by a constant "64 02" ++ * trailer). High nibble = button id 1..5, low nibble = 1 press, 0 release. ++ * These are the KONKR/Home/Shoulder-2-pair/front-top-right buttons, which ++ * are not part of the SPI gamepad. ++ * - Stick RGB (one zone, both sticks): F7 01 R G B 00 00 00 00 CK ED, ++ * CK = sum of bytes 1..8 (mod 256). The vendor app writes each frame ++ * 4 times, 40 ms apart; a single write occasionally gets dropped. ++ * ++ * The same UART carries the version frame (F7/E7 55 AA xx ED) and the ++ * controller-config protocols; none of those bytes form a valid 8-run, so ++ * the decoder ignores them. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define KONKR_BAUD 115200 ++#define KONKR_NBTN 5 ++#define KONKR_RXBUF_SZ 32 ++#define KONKR_RGB_REPEAT 4 ++#define KONKR_RGB_GAP_MS 40 ++ ++/* ++ * Remappable-button ("key config") protocol, same UART: raw 64-byte packets, ++ * no F7/E7 framing. Layout: [ck16 LE over data[58]] [0x3a = dataSize 58] ++ * [protoType] [button index LE] [data[58]]. For SET_KEY_CFG data[0] = ++ * (subFunc << 4) | mainFunc, data[1] = target code. The MCU replies ++ * 00 00 00 โ€” proto 7 echoed for a SET ack, ++ * proto 8 carrying the stored cfg for a GET. Factory-virgin configs read ++ * back as 0xff bytes. Confirmed on hardware 2026-06-11. ++ */ ++#define KONKR_CFG_PKT_SZ 64 ++#define KONKR_CFG_DATA_SZ 58 ++#define KONKR_CFG_GET 6 ++#define KONKR_CFG_SET 7 ++#define KONKR_CFG_GET_REPLY 8 ++#define KONKR_CFG_REPLY_MIN 8 /* 00 00 00 proto idx16 + 2 cfg bytes */ ++#define KONKR_CFG_REPLY_FULL 65 /* observed full reply length */ ++#define KONKR_CFG_TIMEOUT_MS 400 ++ ++static const u8 konkr_enable_frame[11] = { ++ 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xed ++}; ++ ++struct konkr_sysbtn { ++ struct serdev_device *serdev; ++ struct input_dev *input; ++ struct led_classdev_mc mc; ++ struct mc_subled subled[3]; ++ struct mutex tx_lock; /* serializes RGB frames vs enable resends */ ++ u8 rx[KONKR_RXBUF_SZ]; ++ int rxlen; ++ ++ /* one in-flight key-config exchange */ ++ struct mutex cfg_lock; ++ struct completion cfg_done; ++ spinlock_t cfg_rx_lock; ++ bool cfg_pending; ++ u8 cfg_reply[KONKR_CFG_REPLY_FULL + 16]; ++ int cfg_reply_len; ++ ++ /* last RGB written, to blank the (MCU-powered) LEDs across suspend */ ++ u8 last_rgb[3]; ++ bool rgb_valid; ++ ++ /* ++ * TX is forbidden from PM_SUSPEND_PREPARE to PM_POST_SUSPEND: a frame ++ * written during the device-suspend window sits undrained in the geni ++ * SE ("Unable to drain transmitter") and leaves its TX engine wedged ++ * until reboot โ€” even a controller unbind/rebind doesn't recover it. ++ */ ++ struct notifier_block pm_nb; ++ bool tx_inhibited; /* under tx_lock */ ++}; ++ ++static void konkr_send_enable(struct konkr_sysbtn *kb) ++{ ++ int i; ++ ++ mutex_lock(&kb->tx_lock); ++ if (kb->tx_inhibited) ++ goto out; ++ for (i = 0; i < 3; i++) { ++ serdev_device_write_buf(kb->serdev, konkr_enable_frame, ++ sizeof(konkr_enable_frame)); ++ msleep(50); ++ } ++out: ++ mutex_unlock(&kb->tx_lock); ++} ++ ++/* a button byte has high nibble = id 1..5, low nibble = 1 down / 0 up */ ++static bool konkr_valid_btn(u8 b) ++{ ++ u8 hi = b >> 4, lo = b & 0xf; ++ ++ return hi >= 1 && hi <= KONKR_NBTN && lo <= 1; ++} ++ ++static size_t konkr_receive_buf(struct serdev_device *serdev, const u8 *data, ++ size_t count) ++{ ++ struct konkr_sysbtn *kb = serdev_device_get_drvdata(serdev); ++ size_t i; ++ ++ /* feed a pending key-config exchange (button runs cannot appear in a ++ * cfg reply: their hi nibble 1..5 never matches the 00/ff reply bytes, ++ * so double-routing every byte is harmless) */ ++ spin_lock(&kb->cfg_rx_lock); ++ if (kb->cfg_pending) { ++ int room = sizeof(kb->cfg_reply) - kb->cfg_reply_len; ++ int take = min_t(int, room, count); ++ ++ memcpy(kb->cfg_reply + kb->cfg_reply_len, data, take); ++ kb->cfg_reply_len += take; ++ if (kb->cfg_reply_len >= KONKR_CFG_REPLY_FULL) { ++ kb->cfg_pending = false; ++ complete(&kb->cfg_done); ++ } ++ } ++ spin_unlock(&kb->cfg_rx_lock); ++ ++ for (i = 0; i < count; i++) { ++ const u8 *run; ++ int j; ++ ++ if (kb->rxlen == KONKR_RXBUF_SZ) { ++ kb->rxlen--; ++ memmove(kb->rx, kb->rx + 1, kb->rxlen); ++ } ++ kb->rx[kb->rxlen++] = data[i]; ++ ++ /* a button event is 8 identical valid bytes ending here */ ++ if (kb->rxlen < 8) ++ continue; ++ run = kb->rx + kb->rxlen - 8; ++ if (!konkr_valid_btn(run[0])) ++ continue; ++ for (j = 1; j < 8 && run[j] == run[0]; j++) ++ ; ++ if (j < 8) ++ continue; ++ ++ input_report_key(kb->input, ++ BTN_TRIGGER_HAPPY1 + (run[0] >> 4) - 1, ++ run[0] & 0x1); ++ input_sync(kb->input); ++ kb->rxlen = 0; ++ } ++ ++ return count; ++} ++ ++static const struct serdev_device_ops konkr_serdev_ops = { ++ .receive_buf = konkr_receive_buf, ++ .write_wakeup = serdev_device_write_wakeup, ++}; ++ ++static void konkr_send_rgb(struct konkr_sysbtn *kb, u8 r, u8 g, u8 b) ++{ ++ u8 frame[11] = { 0xf7, 0x01, r, g, b }; ++ unsigned int sum = 0; ++ int i; ++ ++ frame[10] = 0xed; ++ for (i = 1; i <= 8; i++) ++ sum += frame[i]; ++ frame[9] = sum & 0xff; ++ ++ mutex_lock(&kb->tx_lock); ++ if (kb->tx_inhibited) ++ goto out; ++ for (i = 0; i < KONKR_RGB_REPEAT; i++) { ++ serdev_device_write_buf(kb->serdev, frame, sizeof(frame)); ++ if (i < KONKR_RGB_REPEAT - 1) ++ msleep(KONKR_RGB_GAP_MS); ++ } ++out: ++ mutex_unlock(&kb->tx_lock); ++} ++ ++static int konkr_rgb_set(struct led_classdev *cdev, ++ enum led_brightness brightness) ++{ ++ struct led_classdev_mc *mc = lcdev_to_mccdev(cdev); ++ struct konkr_sysbtn *kb = container_of(mc, struct konkr_sysbtn, mc); ++ ++ led_mc_calc_color_components(mc, brightness); ++ kb->last_rgb[0] = mc->subled_info[0].brightness; ++ kb->last_rgb[1] = mc->subled_info[1].brightness; ++ kb->last_rgb[2] = mc->subled_info[2].brightness; ++ kb->rgb_valid = true; ++ konkr_send_rgb(kb, kb->last_rgb[0], kb->last_rgb[1], kb->last_rgb[2]); ++ ++ return 0; ++} ++ ++/* ++ * One key-config exchange: build + send the 64-byte packet, wait for the ++ * reply, scan it for the 00 00 00 signature (button events ++ * may interleave). For GET the two cfg bytes follow the signature. ++ */ ++static int konkr_cfg_xchg(struct konkr_sysbtn *kb, u8 proto, u16 index, ++ const u8 *cfg2, u8 reply_cfg[2]) ++{ ++ u8 pkt[KONKR_CFG_PKT_SZ] = {}; ++ u8 want = (proto == KONKR_CFG_GET) ? KONKR_CFG_GET_REPLY : proto; ++ u16 ck = 0; ++ int i, len, ret = -ETIMEDOUT; ++ ++ pkt[2] = KONKR_CFG_DATA_SZ; ++ pkt[3] = proto; ++ pkt[4] = index & 0xff; ++ pkt[5] = index >> 8; ++ if (cfg2) { ++ pkt[6] = cfg2[0]; ++ pkt[7] = cfg2[1]; ++ } ++ for (i = 6; i < KONKR_CFG_PKT_SZ; i++) ++ ck += pkt[i]; ++ pkt[0] = ck & 0xff; ++ pkt[1] = ck >> 8; ++ ++ mutex_lock(&kb->cfg_lock); ++ ++ spin_lock(&kb->cfg_rx_lock); ++ kb->cfg_reply_len = 0; ++ kb->cfg_pending = true; ++ reinit_completion(&kb->cfg_done); ++ spin_unlock(&kb->cfg_rx_lock); ++ ++ mutex_lock(&kb->tx_lock); ++ if (kb->tx_inhibited) { ++ mutex_unlock(&kb->tx_lock); ++ spin_lock(&kb->cfg_rx_lock); ++ kb->cfg_pending = false; ++ spin_unlock(&kb->cfg_rx_lock); ++ mutex_unlock(&kb->cfg_lock); ++ return -EBUSY; ++ } ++ serdev_device_write_buf(kb->serdev, pkt, sizeof(pkt)); ++ mutex_unlock(&kb->tx_lock); ++ ++ wait_for_completion_timeout(&kb->cfg_done, ++ msecs_to_jiffies(KONKR_CFG_TIMEOUT_MS)); ++ ++ spin_lock(&kb->cfg_rx_lock); ++ kb->cfg_pending = false; ++ len = kb->cfg_reply_len; ++ spin_unlock(&kb->cfg_rx_lock); ++ ++ for (i = 0; i + KONKR_CFG_REPLY_MIN <= len; i++) { ++ const u8 *r = kb->cfg_reply + i; ++ ++ if (r[0] == 0 && r[1] == 0 && r[2] == 0 && r[3] == want && ++ r[4] == (index & 0xff) && r[5] == (index >> 8)) { ++ if (reply_cfg) { ++ reply_cfg[0] = r[6]; ++ reply_cfg[1] = r[7]; ++ } ++ ret = 0; ++ break; ++ } ++ } ++ ++ mutex_unlock(&kb->cfg_lock); ++ return ret; ++} ++ ++/* ++ * sysfs: one attr per remappable button. Read: " " ++ * (255 255 = factory-virgin, MCU-internal default mapping). Write the same ++ * two values: funcbyte = (subFunc << 4) | mainFunc (0 none / 1 joystick / ++ * 2 keyboard / 3 mouse), target = JoystickFunctionType code 0..24 ++ * (1 A, 2 B, 3 X, 4 Y, 5 SE, 6 ST, 7-10 dpad, 11/12 LB/RB, 13/14 thumb, ++ * 15/16 LT/RT, 17-24 stick dirs). The MCU persists across power cycles. ++ * NB: keyboard/mouse funcs are stored but inert in gamepad host mode. ++ */ ++static ssize_t konkr_key_show_common(struct device *dev, char *buf, u16 index) ++{ ++ struct konkr_sysbtn *kb = dev_get_drvdata(dev); ++ u8 cfg[2]; ++ int ret; ++ ++ ret = konkr_cfg_xchg(kb, KONKR_CFG_GET, index, NULL, cfg); ++ if (ret) ++ return ret; ++ return sysfs_emit(buf, "%u %u\n", cfg[0], cfg[1]); ++} ++ ++static ssize_t konkr_key_store_common(struct device *dev, const char *buf, ++ size_t count, u16 index) ++{ ++ struct konkr_sysbtn *kb = dev_get_drvdata(dev); ++ unsigned int func, target; ++ u8 cfg[2]; ++ int ret; ++ ++ if (sscanf(buf, "%u %u", &func, &target) != 2 || ++ func > 255 || target > 255) ++ return -EINVAL; ++ cfg[0] = func; ++ cfg[1] = target; ++ ++ ret = konkr_cfg_xchg(kb, KONKR_CFG_SET, index, cfg, NULL); ++ if (ret) ++ return ret; ++ return count; ++} ++ ++#define KONKR_KEY_ATTR(_name, _idx) \ ++static ssize_t _name##_show(struct device *dev, \ ++ struct device_attribute *a, char *buf) \ ++{ \ ++ return konkr_key_show_common(dev, buf, _idx); \ ++} \ ++static ssize_t _name##_store(struct device *dev, \ ++ struct device_attribute *a, \ ++ const char *buf, size_t count) \ ++{ \ ++ return konkr_key_store_common(dev, buf, count, _idx); \ ++} \ ++static DEVICE_ATTR_RW(_name) ++ ++KONKR_KEY_ATTR(key_lc_shoulder, 16); ++KONKR_KEY_ATTR(key_rc_shoulder, 17); ++KONKR_KEY_ATTR(key_lc_back, 18); ++KONKR_KEY_ATTR(key_rc_back, 19); ++ ++static struct attribute *konkr_attrs[] = { ++ &dev_attr_key_lc_shoulder.attr, ++ &dev_attr_key_rc_shoulder.attr, ++ &dev_attr_key_lc_back.attr, ++ &dev_attr_key_rc_back.attr, ++ NULL ++}; ++ATTRIBUTE_GROUPS(konkr); ++ ++/* ++ * Suspend/resume runs through a PM notifier, NOT dev_pm_ops: both hooks ++ * transmit to the MCU, and any geni UART TX during the device-suspend ++ * window is fatal (the frame never drains and the SE TX engine stays ++ * wedged after resume, surviving even a controller unbind/rebind; the ++ * fabric is already quiescing then โ€” chipone's I2C suspend read fails ++ * the same way). PREPARE/POST run with the system fully alive. ++ */ ++static int konkr_pm_notify(struct notifier_block *nb, unsigned long action, ++ void *data) ++{ ++ struct konkr_sysbtn *kb = container_of(nb, struct konkr_sysbtn, pm_nb); ++ ++ switch (action) { ++ case PM_SUSPEND_PREPARE: ++ /* the MCU stays powered in suspend and would keep the stick ++ * LEDs lit; drain fully so nothing sits in the SE over suspend */ ++ konkr_send_rgb(kb, 0, 0, 0); ++ serdev_device_wait_until_sent(kb->serdev, ++ msecs_to_jiffies(100)); ++ mutex_lock(&kb->tx_lock); ++ kb->tx_inhibited = true; ++ mutex_unlock(&kb->tx_lock); ++ break; ++ case PM_POST_SUSPEND: ++ mutex_lock(&kb->tx_lock); ++ kb->tx_inhibited = false; ++ mutex_unlock(&kb->tx_lock); ++ ++ /* harmless if the MCU kept power; required if it lost it */ ++ konkr_send_enable(kb); ++ ++ /* relight the sticks as they were before suspend; if we never ++ * set them (pre-suspend state unknown) leave the blank */ ++ if (kb->rgb_valid) ++ konkr_send_rgb(kb, kb->last_rgb[0], kb->last_rgb[1], ++ kb->last_rgb[2]); ++ break; ++ } ++ ++ return NOTIFY_DONE; ++} ++ ++static void konkr_unregister_pm_notifier(void *data) ++{ ++ struct konkr_sysbtn *kb = data; ++ ++ unregister_pm_notifier(&kb->pm_nb); ++} ++ ++static int konkr_sysbtn_probe(struct serdev_device *serdev) ++{ ++ struct device *dev = &serdev->dev; ++ struct konkr_sysbtn *kb; ++ struct led_classdev *cdev; ++ int error; ++ int i; ++ ++ kb = devm_kzalloc(dev, sizeof(*kb), GFP_KERNEL); ++ if (!kb) ++ return -ENOMEM; ++ ++ kb->serdev = serdev; ++ mutex_init(&kb->tx_lock); ++ mutex_init(&kb->cfg_lock); ++ spin_lock_init(&kb->cfg_rx_lock); ++ init_completion(&kb->cfg_done); ++ serdev_device_set_drvdata(serdev, kb); ++ ++ kb->input = devm_input_allocate_device(dev); ++ if (!kb->input) ++ return -ENOMEM; ++ ++ kb->input->name = "KONKR System Buttons"; ++ kb->input->phys = "konkr-mcu/input0"; ++ kb->input->id.bustype = BUS_HOST; ++ kb->input->id.vendor = 0xa7a0; ++ kb->input->id.product = 0x0001; ++ kb->input->id.version = 0x0001; ++ for (i = 0; i < KONKR_NBTN; i++) ++ input_set_capability(kb->input, EV_KEY, ++ BTN_TRIGGER_HAPPY1 + i); ++ ++ error = input_register_device(kb->input); ++ if (error) ++ return error; ++ ++ kb->subled[0].color_index = LED_COLOR_ID_RED; ++ kb->subled[1].color_index = LED_COLOR_ID_GREEN; ++ kb->subled[2].color_index = LED_COLOR_ID_BLUE; ++ for (i = 0; i < 3; i++) ++ kb->subled[i].intensity = 255; ++ kb->mc.subled_info = kb->subled; ++ kb->mc.num_colors = 3; ++ cdev = &kb->mc.led_cdev; ++ cdev->name = "konkr:rgb:joysticks"; ++ cdev->max_brightness = 255; ++ cdev->brightness_set_blocking = konkr_rgb_set; ++ ++ error = devm_led_classdev_multicolor_register(dev, &kb->mc); ++ if (error) ++ return error; ++ ++ serdev_device_set_client_ops(serdev, &konkr_serdev_ops); ++ error = devm_serdev_device_open(dev, serdev); ++ if (error) ++ return error; ++ ++ serdev_device_set_baudrate(serdev, KONKR_BAUD); ++ serdev_device_set_flow_control(serdev, false); ++ error = serdev_device_set_parity(serdev, SERDEV_PARITY_NONE); ++ if (error) ++ return error; ++ ++ konkr_send_enable(kb); ++ ++ kb->pm_nb.notifier_call = konkr_pm_notify; ++ error = register_pm_notifier(&kb->pm_nb); ++ if (error) ++ return error; ++ ++ return devm_add_action_or_reset(dev, konkr_unregister_pm_notifier, kb); ++} ++ ++ ++static const struct of_device_id konkr_sysbtn_of_match[] = { ++ { .compatible = "konkr,pf-elite-mcu" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, konkr_sysbtn_of_match); ++ ++static struct serdev_device_driver konkr_sysbtn_driver = { ++ .probe = konkr_sysbtn_probe, ++ .driver = { ++ .name = "konkr_sysbtn", ++ .of_match_table = konkr_sysbtn_of_match, ++ .dev_groups = konkr_groups, ++ }, ++}; ++module_serdev_device_driver(konkr_sysbtn_driver); ++ ++MODULE_DESCRIPTION("KONKR Pocket FIT Elite MCU system buttons and stick RGB"); ++MODULE_LICENSE("GPL"); diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0072-ASoC-lpass-rx-macro-add-HPH-PCM-mode.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0072-ASoC-lpass-rx-macro-add-HPH-PCM-mode.patch new file mode 100644 index 00000000000..1894731a3a1 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0072-ASoC-lpass-rx-macro-add-HPH-PCM-mode.patch @@ -0,0 +1,136 @@ +From: KONKR Pocket FIT Elite port +Subject: [PATCH] ASoC: lpass-rx-macro: add HPH PCM mode + +In HPH PCM ("HiFi") mode the WCD codec receives interpolated PCM over a +dedicated SoundWire port and runs interpolation, DC droop and compander +itself; the RX macro only keeps the main interpolator path running and +routes its output to the PCM tap (TOP_SWR_CTRL bit1, SoundWire clock +9.6 MHz). Add an is_pcm_enabled flag ("RX_HPH PCM Switch") that skips +the PDM-mode signal conditioning (compander coefficients, HD2, LUT +bypass, DC droop) and selects the PCM path, refcounted across the HPH +interpolators. Mirrors the vendor lpass-cdc rx-macro behavior. +--- +--- a/sound/soc/codecs/lpass-rx-macro.c 2026-05-23 13:09:44.000000000 +0200 ++++ b/sound/soc/codecs/lpass-rx-macro.c 2026-06-11 21:30:18.468959312 +0200 +@@ -657,6 +657,8 @@ + u16 bit_width[RX_MACRO_MAX_DAIS]; + int is_softclip_on; + int is_aux_hpf_on; ++ int is_pcm_enabled; ++ int pcm_select_users; + int softclip_clk_users; + struct lpass_macro *pds; + struct regmap *regmap; +@@ -2644,6 +2646,28 @@ + return 0; + } + ++static int rx_macro_hph_pcm_enable_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); ++ struct rx_macro *rx = snd_soc_component_get_drvdata(component); ++ ++ ucontrol->value.integer.value[0] = rx->is_pcm_enabled; ++ ++ return 0; ++} ++ ++static int rx_macro_hph_pcm_enable_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); ++ struct rx_macro *rx = snd_soc_component_get_drvdata(component); ++ ++ rx->is_pcm_enabled = ucontrol->value.integer.value[0]; ++ ++ return 0; ++} ++ + static int rx_macro_hphdelay_lutbypass(struct snd_soc_component *component, + struct rx_macro *rx, + u16 interp_idx, int event) +@@ -2715,16 +2739,30 @@ + CDC_RX_RXn_DSM_CLK_EN_MASK, 0x1); + snd_soc_component_update_bits(component, rx_cfg2_reg, + CDC_RX_RXn_HPF_CUT_FREQ_MASK, 0x03); +- rx_macro_load_compander_coeff(component, rx, interp_idx, event); +- if (rx->hph_hd2_mode) +- rx_macro_hd2_control(component, interp_idx, event); +- rx_macro_hphdelay_lutbypass(component, rx, interp_idx, event); +- rx_macro_config_compander(component, rx, interp_idx, event); ++ /* ++ * In HPH PCM mode the WCD codec owns interpolation, ++ * DC droop and compander; skip the PDM-mode signal ++ * conditioning here. ++ */ ++ if (!rx->is_pcm_enabled) { ++ rx_macro_load_compander_coeff(component, rx, interp_idx, event); ++ if (rx->hph_hd2_mode) ++ rx_macro_hd2_control(component, interp_idx, event); ++ rx_macro_hphdelay_lutbypass(component, rx, interp_idx, event); ++ rx_macro_config_compander(component, rx, interp_idx, event); ++ } + if (interp_idx == INTERP_AUX) { + rx_macro_config_softclip(component, rx, event); + rx_macro_config_aux_hpf(component, rx, event); + } + rx_macro_config_classh(component, rx, interp_idx, event); ++ /* select PCM path over SoundWire (swr clk 9.6 MHz) */ ++ if (rx->is_pcm_enabled && interp_idx != INTERP_AUX) { ++ if (rx->pcm_select_users++ == 0) ++ snd_soc_component_update_bits(component, ++ CDC_RX_TOP_SWR_CTRL, ++ BIT(1), BIT(1)); ++ } + } + rx->main_clk_users[interp_idx]++; + } +@@ -2736,6 +2774,14 @@ + /* Main path PGA mute enable */ + snd_soc_component_write_field(component, main_reg, + CDC_RX_PATH_PGA_MUTE_MASK, 0x1); ++ /* unselect PCM path over SoundWire */ ++ if (rx->is_pcm_enabled && interp_idx != INTERP_AUX) { ++ if (rx->pcm_select_users > 0 && ++ --rx->pcm_select_users == 0) ++ snd_soc_component_update_bits(component, ++ CDC_RX_TOP_SWR_CTRL, ++ BIT(1), 0); ++ } + /* Clk Disable */ + snd_soc_component_write_field(component, dsm_reg, + CDC_RX_RXn_DSM_CLK_EN_MASK, 0); +@@ -2753,14 +2799,18 @@ + snd_soc_component_update_bits(component, rx_cfg2_reg, + CDC_RX_RXn_HPF_CUT_FREQ_MASK, 0x00); + rx_macro_config_classh(component, rx, interp_idx, event); +- rx_macro_config_compander(component, rx, interp_idx, event); ++ if (!rx->is_pcm_enabled) { ++ rx_macro_config_compander(component, rx, interp_idx, event); ++ } + if (interp_idx == INTERP_AUX) { + rx_macro_config_softclip(component, rx, event); + rx_macro_config_aux_hpf(component, rx, event); + } +- rx_macro_hphdelay_lutbypass(component, rx, interp_idx, event); +- if (rx->hph_hd2_mode) +- rx_macro_hd2_control(component, interp_idx, event); ++ if (!rx->is_pcm_enabled) { ++ rx_macro_hphdelay_lutbypass(component, rx, interp_idx, event); ++ if (rx->hph_hd2_mode) ++ rx_macro_hd2_control(component, interp_idx, event); ++ } + } + } + +@@ -3024,6 +3074,9 @@ + SOC_SINGLE_EXT("RX_HPH HD2 Mode Switch", SND_SOC_NOPM, 0, 1, 0, + rx_macro_get_hph_hd2_mode, rx_macro_put_hph_hd2_mode), + ++ SOC_SINGLE_EXT("RX_HPH PCM Switch", SND_SOC_NOPM, 0, 1, 0, ++ rx_macro_hph_pcm_enable_get, rx_macro_hph_pcm_enable_put), ++ + SOC_ENUM_EXT("RX_HPH PWR Mode", rx_macro_hph_pwr_mode_enum, + rx_macro_get_hph_pwr_mode, rx_macro_put_hph_pwr_mode), + diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0073-ASoC-wcd939x-add-HPH-PCM-HiFi-mode.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0073-ASoC-wcd939x-add-HPH-PCM-HiFi-mode.patch new file mode 100644 index 00000000000..bce1af45126 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0073-ASoC-wcd939x-add-HPH-PCM-HiFi-mode.patch @@ -0,0 +1,531 @@ +From: KONKR Pocket FIT Elite port +Subject: [PATCH] ASoC: wcd939x: add HPH PCM (HiFi) mode + +The WCD9390/9395 support a PCM playback path for HPH ("later" per the +original driver submission, never implemented): the stream arrives as +384 kHz PCM on SoundWire port 6 (HIFI_PCM, already declared in +wcd939x-sdw) and the codec runs its own interpolator, DC droop filter +and analog compander instead of the legacy PDM receive path. On the +KONKR Pocket FIT Elite the PDM path produces a constant hiss on the +jack; the PCM path is what stock Android ships and is silent. + +Add an "HPH PCM Switch" kcontrol (kept ahead of the COMP/HPH switches: +alsa-state restore order matters). When enabled: +- HPHL/HPHR Switch connect HIFI_PCM_L/R (port 6) instead of HPH_L/R, + and the COMP gain port stays unused; +- DAC bring-up programs the analog compander (zone RMS per power mode, + clock + sync-reset pulse), crosstalk coefficients, gain source, and + keeps the RDAC chopper running; VNEG_CTRL_1/RDAC bias per vendor; +- PA bring-up programs the interpolator (INT_EN/DLY_ZN staged, DC droop + for 9.6 MHz), DAC rate select by mode, and forces PA power level 0b11 + (the 0b10 the class-H controller picks leaves a constant hiss); +- the PDM watchdog and its interrupts stay off (no PDM data to guard); +- symmetric teardown on power-down. + +Register values match a stock Android WCD9395 trace on this device. +Also set AUTO_DISABLE_DSD in E_CFG0 (stock runs 0x07). +--- +--- a/sound/soc/codecs/wcd939x.c 2026-06-11 21:30:18.467792000 +0200 ++++ b/sound/soc/codecs/wcd939x.c 2026-06-11 21:30:18.469036928 +0200 +@@ -211,6 +211,7 @@ + int ear_pdm_wd_int; + bool comp1_enable; + bool comp2_enable; ++ bool hph_pcm_enabled; + bool ldoh; + }; + +@@ -411,6 +412,7 @@ + + snd_soc_component_write(component, WCD939X_E_CFG0, + WCD939X_CFG0_IDLE_STEREO | ++ WCD939X_CFG0_AUTO_DISABLE_DSD | + WCD939X_CFG0_AUTO_DISABLE_ANC); + + return 0; +@@ -502,6 +504,165 @@ + return 0; + } + ++/* ++ * HPH PCM ("HiFi") mode: the HPH stream arrives as PCM samples on SoundWire ++ * port 6 (HIFI_PCM) and the codec runs its own interpolator, DC droop filter ++ * and analog compander, replacing the legacy PDM receive path. Vendor ++ * hph_pcm_enabled behavior; register values match the stock WCD9395 trace ++ * (SoundWire clock fixed at 9.6 MHz on this platform). ++ */ ++static void wcd939x_hph_pcm_pre_dac(struct snd_soc_component *component, ++ bool hphr) ++{ ++ struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); ++ bool comp_en = hphr ? wcd939x->comp2_enable : wcd939x->comp1_enable; ++ u16 comp_base = hphr ? WCD939X_R_CTL0 : WCD939X_COMPANDER_HPHL_CTL0; ++ u16 sec_base = hphr ? WCD939X_RX_TOP_HPHR_PATH_SEC0 : ++ WCD939X_RX_TOP_HPHL_PATH_SEC0; ++ ++ /* ++ * PCM mode keeps the RDAC chopper running (stock 0x30d9 = 0x80); ++ * set it explicitly in case a PDM-mode bring-up cleared it earlier. ++ */ ++ snd_soc_component_write_field(component, WCD939X_HPH_RDAC_CLK_CTL1, ++ WCD939X_RDAC_CLK_CTL1_OPAMP_CHOP_CLK_EN, ++ true); ++ ++ if (wcd939x->hph_mode == CLS_H_ULP) { ++ snd_soc_component_write_field(component, WCD939X_HPH_REFBUFF_UHQA_CTL, ++ WCD939X_REFBUFF_UHQA_CTL_REFBUFP_IOUT_CTL, 1); ++ snd_soc_component_write_field(component, WCD939X_HPH_REFBUFF_UHQA_CTL, ++ WCD939X_REFBUFF_UHQA_CTL_REFBUFN_IOUT_CTL, 1); ++ } ++ ++ if (!comp_en) { ++ /* compander bypassed, gain from register */ ++ if (hphr) ++ snd_soc_component_write_field(component, WCD939X_HPH_R_EN, ++ WCD939X_R_EN_GAIN_SOURCE_SEL, true); ++ else ++ snd_soc_component_write_field(component, WCD939X_HPH_L_EN, ++ WCD939X_L_EN_GAIN_SOURCE_SEL, true); ++ return; ++ } ++ ++ /* compander zone RMS thresholds + path gain per power mode */ ++ if (wcd939x->hph_mode == CLS_H_ULP) { ++ snd_soc_component_write(component, comp_base + 12, 0x21); ++ snd_soc_component_write(component, comp_base + 13, 0x30); ++ snd_soc_component_write(component, comp_base + 14, 0x3f); ++ snd_soc_component_write(component, comp_base + 15, 0x48); ++ snd_soc_component_write(component, comp_base + 17, 0x0c); ++ } else { ++ snd_soc_component_write(component, comp_base + 12, 0x1e); ++ snd_soc_component_write(component, comp_base + 13, 0x2a); ++ snd_soc_component_write(component, comp_base + 14, 0x36); ++ snd_soc_component_write(component, comp_base + 15, 0x3c); ++ snd_soc_component_write(component, comp_base + 17, 0x00); ++ } ++ ++ /* gain follows the compander */ ++ if (hphr) ++ snd_soc_component_write_field(component, WCD939X_HPH_R_EN, ++ WCD939X_R_EN_GAIN_SOURCE_SEL, false); ++ else ++ snd_soc_component_write_field(component, WCD939X_HPH_L_EN, ++ WCD939X_L_EN_GAIN_SOURCE_SEL, false); ++ ++ /* compander clock enable + sync-reset pulse */ ++ snd_soc_component_write(component, comp_base + 7, 0x00); ++ snd_soc_component_write(component, comp_base + 0, 0x61); ++ /* 250us sleep required as per HW sequence */ ++ usleep_range(250, 260); ++ snd_soc_component_write(component, comp_base + 0, 0x63); ++ snd_soc_component_write(component, comp_base + 0, 0x61); ++ ++ if (hphr) ++ snd_soc_component_write_field(component, WCD939X_DIGITAL_CDC_COMP_CTL_0, ++ WCD939X_CDC_COMP_CTL_0_HPHR_COMP_EN, true); ++ else ++ snd_soc_component_write_field(component, WCD939X_DIGITAL_CDC_COMP_CTL_0, ++ WCD939X_CDC_COMP_CTL_0_HPHL_COMP_EN, true); ++ ++ /* crosstalk coefficients (stock: scale 0x1f, sec2/3 0x11/0x4f) */ ++ snd_soc_component_write(component, sec_base + 0, 0x1f); ++ snd_soc_component_write(component, sec_base + 3, 0x4f); ++ snd_soc_component_write(component, sec_base + 2, 0x11); ++} ++ ++static void wcd939x_hph_pcm_post_dac(struct snd_soc_component *component) ++{ ++ struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); ++ ++ snd_soc_component_write_field(component, WCD939X_HPH_NEW_INT_TIMER1, ++ WCD939X_TIMER1_AUTOCHOP_TIMER_CTL_EN, false); ++ snd_soc_component_write(component, WCD939X_FLYBACK_VNEG_CTRL_1, 0xeb); ++ if (wcd939x->hph_mode == CLS_H_LOHIFI) ++ snd_soc_component_write(component, ++ WCD939X_RX_NEW_INT_HPH_RDAC_BIAS_LOHIFI, 0x52); ++ else ++ snd_soc_component_write(component, ++ WCD939X_RX_NEW_INT_HPH_RDAC_BIAS_LOHIFI, 0x64); ++} ++ ++static void wcd939x_hph_pcm_dac_teardown(struct snd_soc_component *component, ++ bool hphr) ++{ ++ u16 comp_base = hphr ? WCD939X_R_CTL0 : WCD939X_COMPANDER_HPHL_CTL0; ++ ++ /* disable both companders, whichever channel powers down first */ ++ snd_soc_component_update_bits(component, WCD939X_DIGITAL_CDC_COMP_CTL_0, ++ WCD939X_CDC_COMP_CTL_0_HPHL_COMP_EN | ++ WCD939X_CDC_COMP_CTL_0_HPHR_COMP_EN, 0); ++ ++ /* gain source back to register */ ++ snd_soc_component_write_field(component, WCD939X_HPH_L_EN, ++ WCD939X_L_EN_GAIN_SOURCE_SEL, true); ++ snd_soc_component_write_field(component, WCD939X_HPH_R_EN, ++ WCD939X_R_EN_GAIN_SOURCE_SEL, true); ++ ++ /* compander clock off, hold soft reset */ ++ snd_soc_component_update_bits(component, comp_base + 0, 0x03, 0x02); ++} ++ ++static void wcd939x_hph_pcm_pre_pa(struct snd_soc_component *component, ++ bool hphr) ++{ ++ struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); ++ u16 cfg0 = hphr ? WCD939X_RX_TOP_HPHR_PATH_CFG0 : WCD939X_RX_TOP_HPHL_PATH_CFG0; ++ u16 cfg1 = hphr ? WCD939X_RX_TOP_HPHR_PATH_CFG1 : WCD939X_RX_TOP_HPHL_PATH_CFG1; ++ ++ /* crosstalk enable for L and R */ ++ snd_soc_component_write(component, WCD939X_RX_TOP_PATH_CFG2, 0x0f); ++ /* DC droop coefficient for 9.6 MHz RX clock */ ++ snd_soc_component_write(component, cfg1, 0x03); ++ /* delay zero-notch enable, then interpolator enable (stock order) */ ++ if (hphr) { ++ snd_soc_component_write(component, cfg0, 0x02); ++ snd_soc_component_write(component, cfg0, 0x06); ++ } else { ++ snd_soc_component_write(component, cfg0, 0x01); ++ snd_soc_component_write(component, cfg0, 0x03); ++ } ++ ++ if (wcd939x->hph_mode == CLS_H_HIFI || wcd939x->hph_mode == CLS_AB_HIFI) ++ snd_soc_component_write_field(component, WCD939X_RX_TOP_TOP_CFG0, ++ WCD939X_TOP_CFG0_HPH_DAC_RATE_SEL, true); ++ else ++ snd_soc_component_write_field(component, WCD939X_RX_TOP_TOP_CFG0, ++ WCD939X_TOP_CFG0_HPH_DAC_RATE_SEL, false); ++} ++ ++static void wcd939x_hph_pcm_post_pa(struct snd_soc_component *component, ++ bool hphr) ++{ ++ u16 cfg0 = hphr ? WCD939X_RX_TOP_HPHR_PATH_CFG0 : WCD939X_RX_TOP_HPHL_PATH_CFG0; ++ u16 cfg1 = hphr ? WCD939X_RX_TOP_HPHR_PATH_CFG1 : WCD939X_RX_TOP_HPHL_PATH_CFG1; ++ ++ snd_soc_component_write(component, cfg0, 0x00); ++ snd_soc_component_write(component, cfg1, 0x00); ++} ++ + static int wcd939x_codec_hphl_dac_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, + int event) +@@ -511,9 +672,12 @@ + + switch (event) { + case SND_SOC_DAPM_PRE_PMU: +- snd_soc_component_write_field(component, WCD939X_HPH_RDAC_CLK_CTL1, +- WCD939X_RDAC_CLK_CTL1_OPAMP_CHOP_CLK_EN, +- false); ++ if (wcd939x->hph_pcm_enabled) ++ wcd939x_hph_pcm_pre_dac(component, false); ++ else ++ snd_soc_component_write_field(component, WCD939X_HPH_RDAC_CLK_CTL1, ++ WCD939X_RDAC_CLK_CTL1_OPAMP_CHOP_CLK_EN, ++ false); + + snd_soc_component_write_field(component, WCD939X_DIGITAL_CDC_HPH_GAIN_CTL, + WCD939X_CDC_HPH_GAIN_CTL_HPHL_RX_EN, true); +@@ -521,7 +685,9 @@ + case SND_SOC_DAPM_POST_PMU: + snd_soc_component_write_field(component, WCD939X_HPH_NEW_INT_RDAC_HD2_CTL_L, + WCD939X_RDAC_HD2_CTL_L_HD2_RES_DIV_CTL_L, 0x1d); +- if (wcd939x->comp1_enable) { ++ if (wcd939x->hph_pcm_enabled) { ++ wcd939x_hph_pcm_post_dac(component); ++ } else if (wcd939x->comp1_enable) { + snd_soc_component_write_field(component, + WCD939X_DIGITAL_CDC_COMP_CTL_0, + WCD939X_CDC_COMP_CTL_0_HPHL_COMP_EN, +@@ -546,6 +712,8 @@ + } + break; + case SND_SOC_DAPM_POST_PMD: ++ if (wcd939x->hph_pcm_enabled) ++ wcd939x_hph_pcm_dac_teardown(component, false); + snd_soc_component_write_field(component, WCD939X_HPH_NEW_INT_RDAC_HD2_CTL_L, + WCD939X_RDAC_HD2_CTL_L_HD2_RES_DIV_CTL_L, 1); + snd_soc_component_write_field(component, WCD939X_DIGITAL_CDC_HPH_GAIN_CTL, +@@ -568,9 +736,12 @@ + + switch (event) { + case SND_SOC_DAPM_PRE_PMU: +- snd_soc_component_write_field(component, WCD939X_HPH_RDAC_CLK_CTL1, +- WCD939X_RDAC_CLK_CTL1_OPAMP_CHOP_CLK_EN, +- false); ++ if (wcd939x->hph_pcm_enabled) ++ wcd939x_hph_pcm_pre_dac(component, true); ++ else ++ snd_soc_component_write_field(component, WCD939X_HPH_RDAC_CLK_CTL1, ++ WCD939X_RDAC_CLK_CTL1_OPAMP_CHOP_CLK_EN, ++ false); + + snd_soc_component_write_field(component, WCD939X_DIGITAL_CDC_HPH_GAIN_CTL, + WCD939X_CDC_HPH_GAIN_CTL_HPHR_RX_EN, true); +@@ -578,7 +749,9 @@ + case SND_SOC_DAPM_POST_PMU: + snd_soc_component_write_field(component, WCD939X_HPH_NEW_INT_RDAC_HD2_CTL_R, + WCD939X_RDAC_HD2_CTL_R_HD2_RES_DIV_CTL_R, 0x1d); +- if (wcd939x->comp2_enable) { ++ if (wcd939x->hph_pcm_enabled) { ++ wcd939x_hph_pcm_post_dac(component); ++ } else if (wcd939x->comp2_enable) { + snd_soc_component_write_field(component, + WCD939X_DIGITAL_CDC_COMP_CTL_0, + WCD939X_CDC_COMP_CTL_0_HPHR_COMP_EN, +@@ -602,6 +775,8 @@ + } + break; + case SND_SOC_DAPM_POST_PMD: ++ if (wcd939x->hph_pcm_enabled) ++ wcd939x_hph_pcm_dac_teardown(component, true); + snd_soc_component_write_field(component, WCD939X_HPH_NEW_INT_RDAC_HD2_CTL_R, + WCD939X_RDAC_HD2_CTL_R_HD2_RES_DIV_CTL_R, 1); + snd_soc_component_write_field(component, WCD939X_DIGITAL_CDC_HPH_GAIN_CTL, +@@ -658,11 +833,15 @@ + snd_soc_component_write_field(component, WCD939X_LDOH_MODE, + WCD939X_MODE_LDOH_EN, true); + ++ if (wcd939x->hph_pcm_enabled) ++ wcd939x_hph_pcm_pre_pa(component, true); ++ + wcd_clsh_ctrl_set_state(wcd939x->clsh_info, WCD_CLSH_EVENT_PRE_DAC, + WCD_CLSH_STATE_HPHR, hph_mode); + wcd_clsh_set_hph_mode(wcd939x->clsh_info, CLS_H_HIFI); + +- if (hph_mode == CLS_H_LP || hph_mode == CLS_H_LOHIFI || hph_mode == CLS_H_ULP) ++ if (!wcd939x->hph_pcm_enabled && ++ (hph_mode == CLS_H_LP || hph_mode == CLS_H_LOHIFI || hph_mode == CLS_H_ULP)) + snd_soc_component_write_field(component, + WCD939X_HPH_REFBUFF_LP_CTL, + WCD939X_REFBUFF_LP_CTL_PREREF_FILT_BYPASS, true); +@@ -680,8 +859,10 @@ + usleep_range(2500, 2600); /* 2.5msec delay as per HW requirement */ + + set_bit(HPH_PA_DELAY, &wcd939x->status_mask); +- snd_soc_component_write_field(component, WCD939X_DIGITAL_PDM_WD_CTL1, +- WCD939X_PDM_WD_CTL1_PDM_WD_EN, 3); ++ /* PDM watchdog guards the PDM data path only */ ++ if (!wcd939x->hph_pcm_enabled) ++ snd_soc_component_write_field(component, WCD939X_DIGITAL_PDM_WD_CTL1, ++ WCD939X_PDM_WD_CTL1_PDM_WD_EN, 3); + break; + case SND_SOC_DAPM_POST_PMU: + /* +@@ -695,8 +876,9 @@ + else + usleep_range(7000, 7100); + +- if (hph_mode == CLS_H_LP || hph_mode == CLS_H_LOHIFI || +- hph_mode == CLS_H_ULP) ++ if (!wcd939x->hph_pcm_enabled && ++ (hph_mode == CLS_H_LP || hph_mode == CLS_H_LOHIFI || ++ hph_mode == CLS_H_ULP)) + snd_soc_component_write_field(component, + WCD939X_HPH_REFBUFF_LP_CTL, + WCD939X_REFBUFF_LP_CTL_PREREF_FILT_BYPASS, +@@ -711,10 +893,20 @@ + WCD939X_RX_SUPPLIES_REGULATOR_MODE, + true); + +- enable_irq(wcd939x->hphr_pdm_wd_int); ++ /* ++ * PCM mode: PA power level 0b11 as on stock; the 0b10 the ++ * class-H controller picks leaves a constant output hiss. ++ */ ++ if (wcd939x->hph_pcm_enabled) ++ snd_soc_component_write_field(component, WCD939X_ANA_HPH, ++ WCD939X_HPH_PWR_LEVEL, 3); ++ /* PDM watchdog interrupt for the PDM data path only */ ++ if (!wcd939x->hph_pcm_enabled) ++ enable_irq(wcd939x->hphr_pdm_wd_int); + break; + case SND_SOC_DAPM_PRE_PMD: +- disable_irq_nosync(wcd939x->hphr_pdm_wd_int); ++ if (!wcd939x->hph_pcm_enabled) ++ disable_irq_nosync(wcd939x->hphr_pdm_wd_int); + /* + * 7ms sleep is required if compander is enabled as per + * HW requirement. If compander is disabled, then +@@ -752,6 +944,8 @@ + WCD939X_HPH_HPHR_REF_ENABLE, false); + snd_soc_component_write_field(component, WCD939X_DIGITAL_PDM_WD_CTL1, + WCD939X_PDM_WD_CTL1_PDM_WD_EN, 0); ++ if (wcd939x->hph_pcm_enabled) ++ wcd939x_hph_pcm_post_pa(component, true); + + wcd_clsh_ctrl_set_state(wcd939x->clsh_info, WCD_CLSH_EVENT_POST_PA, + WCD_CLSH_STATE_HPHR, hph_mode); +@@ -780,11 +974,16 @@ + if (wcd939x->ldoh) + snd_soc_component_write_field(component, WCD939X_LDOH_MODE, + WCD939X_MODE_LDOH_EN, true); ++ ++ if (wcd939x->hph_pcm_enabled) ++ wcd939x_hph_pcm_pre_pa(component, false); ++ + wcd_clsh_ctrl_set_state(wcd939x->clsh_info, WCD_CLSH_EVENT_PRE_DAC, + WCD_CLSH_STATE_HPHL, hph_mode); + wcd_clsh_set_hph_mode(wcd939x->clsh_info, CLS_H_HIFI); + +- if (hph_mode == CLS_H_LP || hph_mode == CLS_H_LOHIFI || hph_mode == CLS_H_ULP) ++ if (!wcd939x->hph_pcm_enabled && ++ (hph_mode == CLS_H_LP || hph_mode == CLS_H_LOHIFI || hph_mode == CLS_H_ULP)) + snd_soc_component_write_field(component, + WCD939X_HPH_REFBUFF_LP_CTL, + WCD939X_REFBUFF_LP_CTL_PREREF_FILT_BYPASS, +@@ -803,8 +1002,10 @@ + usleep_range(2500, 2600); /* 2.5msec delay as per HW requirement */ + + set_bit(HPH_PA_DELAY, &wcd939x->status_mask); +- snd_soc_component_write_field(component, WCD939X_DIGITAL_PDM_WD_CTL0, +- WCD939X_PDM_WD_CTL0_PDM_WD_EN, 3); ++ /* PDM watchdog guards the PDM data path only */ ++ if (!wcd939x->hph_pcm_enabled) ++ snd_soc_component_write_field(component, WCD939X_DIGITAL_PDM_WD_CTL0, ++ WCD939X_PDM_WD_CTL0_PDM_WD_EN, 3); + break; + case SND_SOC_DAPM_POST_PMU: + /* +@@ -817,8 +1018,9 @@ + usleep_range(20000, 20100); + else + usleep_range(7000, 7100); +- if (hph_mode == CLS_H_LP || hph_mode == CLS_H_LOHIFI || +- hph_mode == CLS_H_ULP) ++ if (!wcd939x->hph_pcm_enabled && ++ (hph_mode == CLS_H_LP || hph_mode == CLS_H_LOHIFI || ++ hph_mode == CLS_H_ULP)) + snd_soc_component_write_field(component, + WCD939X_HPH_REFBUFF_LP_CTL, + WCD939X_REFBUFF_LP_CTL_PREREF_FILT_BYPASS, +@@ -832,10 +1034,20 @@ + snd_soc_component_write_field(component, WCD939X_ANA_RX_SUPPLIES, + WCD939X_RX_SUPPLIES_REGULATOR_MODE, + true); +- enable_irq(wcd939x->hphl_pdm_wd_int); ++ /* ++ * PCM mode: PA power level 0b11 as on stock; the 0b10 the ++ * class-H controller picks leaves a constant output hiss. ++ */ ++ if (wcd939x->hph_pcm_enabled) ++ snd_soc_component_write_field(component, WCD939X_ANA_HPH, ++ WCD939X_HPH_PWR_LEVEL, 3); ++ /* PDM watchdog interrupt for the PDM data path only */ ++ if (!wcd939x->hph_pcm_enabled) ++ enable_irq(wcd939x->hphl_pdm_wd_int); + break; + case SND_SOC_DAPM_PRE_PMD: +- disable_irq_nosync(wcd939x->hphl_pdm_wd_int); ++ if (!wcd939x->hph_pcm_enabled) ++ disable_irq_nosync(wcd939x->hphl_pdm_wd_int); + /* + * 7ms sleep is required if compander is enabled as per + * HW requirement. If compander is disabled, then +@@ -871,6 +1083,8 @@ + WCD939X_HPH_HPHL_REF_ENABLE, false); + snd_soc_component_write_field(component, WCD939X_DIGITAL_PDM_WD_CTL0, + WCD939X_PDM_WD_CTL0_PDM_WD_EN, 0); ++ if (wcd939x->hph_pcm_enabled) ++ wcd939x_hph_pcm_post_pa(component, false); + wcd_clsh_ctrl_set_state(wcd939x->clsh_info, WCD_CLSH_EVENT_POST_PA, + WCD_CLSH_STATE_HPHL, hph_mode); + if (wcd939x->ldoh) +@@ -1549,6 +1763,13 @@ + else + wcd939x->comp1_enable = value; + ++ /* ++ * In HPH PCM mode the compander runs inside the codec and the ++ * SoundWire COMP gain port stays unused. ++ */ ++ if (wcd939x->hph_pcm_enabled) ++ return 1; ++ + if (value) + wcd939x_connect_port(wcd, portidx, mc->reg, true); + else +@@ -1557,6 +1778,31 @@ + return 1; + } + ++static int wcd939x_hph_pcm_enable_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); ++ struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); ++ ++ ucontrol->value.integer.value[0] = wcd939x->hph_pcm_enabled ? 1 : 0; ++ ++ return 0; ++} ++ ++static int wcd939x_hph_pcm_enable_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); ++ struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); ++ ++ if (wcd939x->hph_pcm_enabled == !!ucontrol->value.integer.value[0]) ++ return 0; ++ ++ wcd939x->hph_pcm_enabled = !!ucontrol->value.integer.value[0]; ++ ++ return 1; ++} ++ + static int wcd939x_ldoh_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) + { +@@ -1795,7 +2041,17 @@ + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); + struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(comp); + struct wcd939x_sdw_priv *wcd = wcd939x->sdw_priv[mixer->shift]; +- unsigned int portidx = wcd->ch_info[mixer->reg].port_num; ++ unsigned int ch_id = mixer->reg; ++ unsigned int portidx; ++ ++ /* in HPH PCM mode the HPH stream rides the HIFI_PCM port */ ++ if (wcd939x->hph_pcm_enabled) { ++ if (ch_id == WCD939X_HPH_L) ++ ch_id = WCD939X_HIFI_PCM_L; ++ else if (ch_id == WCD939X_HPH_R) ++ ch_id = WCD939X_HIFI_PCM_R; ++ } ++ portidx = wcd->ch_info[ch_id].port_num; + + ucontrol->value.integer.value[0] = wcd->port_enable[portidx] ? 1 : 0; + +@@ -1822,11 +2078,21 @@ + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); + struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(comp); + struct wcd939x_sdw_priv *wcd = wcd939x->sdw_priv[mixer->shift]; +- unsigned int portidx = wcd->ch_info[mixer->reg].port_num; ++ unsigned int ch_id = mixer->reg; ++ unsigned int portidx; ++ ++ /* in HPH PCM mode the HPH stream rides the HIFI_PCM port */ ++ if (wcd939x->hph_pcm_enabled) { ++ if (ch_id == WCD939X_HPH_L) ++ ch_id = WCD939X_HIFI_PCM_L; ++ else if (ch_id == WCD939X_HPH_R) ++ ch_id = WCD939X_HIFI_PCM_R; ++ } ++ portidx = wcd->ch_info[ch_id].port_num; + + wcd->port_enable[portidx] = !!ucontrol->value.integer.value[0]; + +- wcd939x_connect_port(wcd, portidx, mixer->reg, wcd->port_enable[portidx]); ++ wcd939x_connect_port(wcd, portidx, ch_id, wcd->port_enable[portidx]); + + return 1; + } +@@ -2533,6 +2799,9 @@ + + static const struct snd_kcontrol_new wcd939x_snd_controls[] = { + /* RX Path */ ++ /* must stay ahead of the COMP/HPH switches: restore order matters */ ++ SOC_SINGLE_EXT("HPH PCM Switch", SND_SOC_NOPM, 0, 1, 0, ++ wcd939x_hph_pcm_enable_get, wcd939x_hph_pcm_enable_put), + SOC_SINGLE_EXT("HPHL_COMP Switch", WCD939X_COMP_L, 0, 1, 0, + wcd939x_get_compander, wcd939x_set_compander), + SOC_SINGLE_EXT("HPHR_COMP Switch", WCD939X_COMP_R, 1, 1, 0, diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0074-soundwire-qcom-PCM-data-port-format-enable.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0074-soundwire-qcom-PCM-data-port-format-enable.patch new file mode 100644 index 00000000000..2a24aefebdb --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0074-soundwire-qcom-PCM-data-port-format-enable.patch @@ -0,0 +1,81 @@ +From: KONKR Pocket FIT Elite port +Subject: [PATCH] soundwire: qcom: PCM data port format enable + +Data ports carrying PCM samples (e.g. the WCD939x HIFI_PCM headphone +port) need the controller's per-port PCM format enable +(SWRM_DOUT_DP_PCM_PORT_CTRL(n) = 0x1054 + 0x100*n, value 0x3) while +enabled, in addition to the transport parameters; PDM ports don't care, +which is why mainline never missed it. Vendor reference: +swr-mstr-ctrl.c swrm_pcm_port_config(). + +Take the set of PCM ports from an optional qcom,pcm-ports-mask DT +property, overridable via the pcm_ports_mask module parameter for +kernels whose DTB predates the property. Set-only: port_enable also +fires for the inactive bank's disable during bank switches and clearing +there would strip the format mid-stream. +--- +--- a/drivers/soundwire/qcom.c 2026-05-23 13:09:44.000000000 +0200 ++++ b/drivers/soundwire/qcom.c 2026-06-11 21:30:18.469610305 +0200 +@@ -111,6 +111,7 @@ + #define SWRM_DPn_PORT_HCTRL_BANK(offset, n, m) (offset + 0x100 * (n - 1) + 0x40 * m) + #define SWRM_DPn_BLOCK_CTRL3_BANK(offset, n, m) (offset + 0x100 * (n - 1) + 0x40 * m) + #define SWRM_DPn_SAMPLECTRL2_BANK(offset, n, m) (offset + 0x100 * (n - 1) + 0x40 * m) ++#define SWRM_DOUT_DP_PCM_PORT_CTRL(n) (0x1054 + 0x100 * n) + + #define SWR_V1_3_MSTR_MAX_REG_ADDR 0x1740 + #define SWR_V2_0_MSTR_MAX_REG_ADDR 0x50ac +@@ -209,6 +210,7 @@ + int nports; + int cols_index; + int rows_index; ++ u32 pcm_ports_mask; + unsigned long port_mask; + u32 intr_mask; + u8 rcmd_id; +@@ -1026,6 +1028,18 @@ + p_params->bps - 1); + } + ++/* ++ * Ports carrying PCM samples (e.g. the WCD939x HIFI_PCM headphone port) ++ * additionally need the controller's per-port PCM format enable ++ * (SWRM_DOUT_DP_PCM_PORT_CTRL) set; PDM ports don't care. Mainline has no ++ * binding for per-port stream type yet, so take the port set from an ++ * optional DT mask, overridable via module parameter for kernels whose DTB ++ * predates the property. ++ */ ++static uint pcm_ports_mask; ++module_param(pcm_ports_mask, uint, 0644); ++MODULE_PARM_DESC(pcm_ports_mask, "Bitmask of data ports carrying PCM (overrides qcom,pcm-ports-mask)"); ++ + static int qcom_swrm_transport_params(struct sdw_bus *bus, + struct sdw_transport_params *params, + enum sdw_reg_bank bank) +@@ -1121,6 +1135,18 @@ + else + val &= ~(0xff << SWRM_DP_PORT_CTRL_EN_CHAN_SHFT); + ++ /* ++ * Only set, never clear: port_enable also fires for the inactive ++ * bank's disable during bank switches and would strip the PCM format ++ * mid-stream. The register only affects PCM-mode ports, so a sticky ++ * 0x3 is harmless. ++ */ ++ if (((ctrl->pcm_ports_mask | pcm_ports_mask) & BIT(enable_ch->port_num)) && ++ enable_ch->enable) ++ ctrl->reg_write(ctrl, ++ SWRM_DOUT_DP_PCM_PORT_CTRL(enable_ch->port_num), ++ 0x3); ++ + return ctrl->reg_write(ctrl, reg, val); + } + +@@ -1434,6 +1460,8 @@ + ctrl->num_din_ports = val; + } + ++ of_property_read_u32(np, "qcom,pcm-ports-mask", &ctrl->pcm_ports_mask); ++ + ret = of_property_read_u32(np, "qcom,dout-ports", &val); + if (!ret) { /* only if present */ + if (val != ctrl->num_dout_ports) { diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0509-soc-qcom-pmic_glink_altmode-defer-until-mux-switch-ready.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0509-soc-qcom-pmic_glink_altmode-defer-until-mux-switch-ready.patch new file mode 100644 index 00000000000..0bf385ddb95 --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0509-soc-qcom-pmic_glink_altmode-defer-until-mux-switch-ready.patch @@ -0,0 +1,34 @@ +diff --git a/drivers/soc/qcom/pmic_glink_altmode.c b/drivers/soc/qcom/pmic_glink_altmode.c +--- a/drivers/soc/qcom/pmic_glink_altmode.c ++++ b/drivers/soc/qcom/pmic_glink_altmode.c +@@ -637,6 +637,17 @@ + "failed to acquire mode-switch for port: %d\n", + port); + } ++ /* ++ * A NULL mux means the connector's mode-switch supplier (e.g. the ++ * wcd_usbss SBU switch on I2C) has not registered yet โ€” defer and ++ * retry rather than run permanently without SBU/DP-AUX routing. ++ */ ++ if (!alt_port->typec_mux) { ++ fwnode_handle_put(fwnode); ++ return dev_err_probe(dev, -EPROBE_DEFER, ++ "mode-switch not registered yet for port: %d\n", ++ port); ++ } + + ret = devm_add_action_or_reset(dev, pmic_glink_altmode_put_mux, + alt_port->typec_mux); +@@ -667,6 +678,12 @@ + "failed to acquire orientation-switch for port: %d\n", + port); + } ++ if (!alt_port->typec_switch) { ++ fwnode_handle_put(fwnode); ++ return dev_err_probe(dev, -EPROBE_DEFER, ++ "orientation-switch not registered yet for port: %d\n", ++ port); ++ } + + ret = devm_add_action_or_reset(dev, pmic_glink_altmode_put_switch, + alt_port->typec_switch); diff --git a/projects/ROCKNIX/devices/SM8750/patches/linux/0602-ROCKNIX-odin3-rtc-persist-offset-sdam.patch b/projects/ROCKNIX/devices/SM8750/patches/linux/0602-ROCKNIX-odin3-rtc-persist-offset-sdam.patch new file mode 100644 index 00000000000..6c352eb234f --- /dev/null +++ b/projects/ROCKNIX/devices/SM8750/patches/linux/0602-ROCKNIX-odin3-rtc-persist-offset-sdam.patch @@ -0,0 +1,33 @@ +Subject: [PATCH] arm64: dts: qcom: cq8725s-ayn-common: SDAM RTC offset + +RTC regs are TZ-locked; rtc-pm8xxx stores wall-clock as an offset. +Android maintains that offset in userspace (time_daemon, persisted +to /persist), which ROCKNIX does not inherit, so the clock resets +to epoch every boot. + +Back it with an nvmem cell in the always-on PMK8550 SDAM at 0x72, +a free 4-byte slot below the ADSP-owned alarm-log at 0x76-0x7b, +verified on Odin 3 to survive cold power-off. +--- +diff --git a/arch/arm64/boot/dts/qcom/cq8725s-ayn-common.dtsi b/arch/arm64/boot/dts/qcom/cq8725s-ayn-common.dtsi +--- a/arch/arm64/boot/dts/qcom/cq8725s-ayn-common.dtsi ++++ b/arch/arm64/boot/dts/qcom/cq8725s-ayn-common.dtsi +@@ -1268,3 +1268,18 @@ + + status = "okay"; + }; ++ ++/* RTC regs are TZ-locked; persist the wall-clock offset in an SDAM ++ * nvmem cell (Android keeps it in userspace, not shared with us). ++ * 0x72 sits just below the ADSP-owned alarm-log at 0x76-0x7b. ++ */ ++&pmk8550_rtc { ++ nvmem-cells = <&rtc_offset>; ++ nvmem-cell-names = "offset"; ++}; ++ ++&pmk8550_sdam_2 { ++ rtc_offset: rtc-offset@72 { ++ reg = <0x72 0x4>; ++ }; ++}; diff --git a/projects/ROCKNIX/packages/devel/ncurses/package.mk b/projects/ROCKNIX/packages/devel/ncurses/package.mk index b1fdfacf00d..4024b292586 100644 --- a/projects/ROCKNIX/packages/devel/ncurses/package.mk +++ b/projects/ROCKNIX/packages/devel/ncurses/package.mk @@ -5,6 +5,7 @@ PKG_NAME="ncurses" PKG_VERSION="6.5" +PKG_SHA256="136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6" PKG_LICENSE="MIT" PKG_SITE="http://www.gnu.org/software/ncurses/" PKG_URL="http://invisible-mirror.net/archives/ncurses/ncurses-${PKG_VERSION}.tar.gz" diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/config/S922X/YAPS2/inis/PCSX2.ini b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/config/S922X/ARMSX2/inis/PCSX2.ini similarity index 99% rename from projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/config/S922X/YAPS2/inis/PCSX2.ini rename to projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/config/S922X/ARMSX2/inis/PCSX2.ini index 209f9508605..c66adf14918 100644 --- a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/config/S922X/YAPS2/inis/PCSX2.ini +++ b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/config/S922X/ARMSX2/inis/PCSX2.ini @@ -18,7 +18,7 @@ MainWindowState = AAAA/wAAAAD9AAAAAAAAAoAAAAKnAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAg [Folders] -Bios = /storage/roms/bios/yaps2 +Bios = /storage/roms/bios/armsx2 Snapshots = snaps Savestates = /storage/roms/savestates/ps2 MemoryCards = /storage/roms/ps2 diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/config/common/YAPS2/inis/secrets.ini b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/config/common/ARMSX2/inis/secrets.ini similarity index 100% rename from projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/config/common/YAPS2/inis/secrets.ini rename to projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/config/common/ARMSX2/inis/secrets.ini diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/config/inputplumber/YAPS2/inis/PCSX2.ini b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/config/inputplumber/ARMSX2/inis/PCSX2.ini similarity index 100% rename from projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/config/inputplumber/YAPS2/inis/PCSX2.ini rename to projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/config/inputplumber/ARMSX2/inis/PCSX2.ini diff --git a/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/package.mk b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/package.mk index 64e67303e7e..4cb69d54c7b 100644 --- a/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/package.mk +++ b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/package.mk @@ -2,20 +2,19 @@ # Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) PKG_NAME="armsx2-sa" -PKG_VERSION="0dbf7bd54b9f5945f5dfbcbb89c354f73ccccbae" # tag: 2.6.5.7 (260727) +PKG_VERSION="12a7e37682b5b54a9da27aa9ac6eb2e7cc923553" # tag: 2.6.2.2 (260731) PKG_ARCH="aarch64" PKG_LICENSE="GPL-3.0-or-later" PKG_SITE="https://github.com/ARMSX2/ARMSX2" PKG_URL="${PKG_SITE}.git" PKG_GIT_CLONE_BRANCH="master" GET_HANDLER_SUPPORT="git" -PKG_LONGDESC="ARMSX2 is a fork of PCSX2 with native ARM64 recompilers." -PKG_TOOLCHAIN="manual" -PKG_BUILD_FLAGS="speed" - +PKG_LONGDESC="ARMSX2 is a native ARM64 PlayStation 2 (PS2) emulator, a fork of PCSX2 that ports the EE/IOP/VU JIT recompilers to ARM64." PKG_DEPENDS_TARGET="toolchain llvm:host SDL3 libpng zlib libjpeg-turbo zstd lz4 libwebp freetype \ plutosvg curl libpcap ffmpeg libX11 libXext qt6 ecm shaderc rapidyaml \ kddockwidgets alsa-lib dbus ${VULKAN}" +PKG_TOOLCHAIN="manual" +PKG_BUILD_FLAGS="speed" if [ "${DISPLAYSERVER}" = "wl" ]; then PKG_DEPENDS_TARGET+=" wayland ${WINDOWMANAGER} xwayland xrandr libXi" @@ -27,41 +26,59 @@ elif [ "${OPENGLES_SUPPORT}" = "yes" ]; then PKG_DEPENDS_TARGET+=" ${OPENGLES}" fi -ARMSX2_CMAKE_OPTS=( - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON - -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON - -DENABLE_TESTS=OFF - -DENABLE_QT_UI=ON - -DENABLE_GSRUNNER=OFF - -DENABLE_SETCAP=OFF - -DUSE_BACKTRACE=OFF - -DUSE_VULKAN=ON - -DUSE_OPENGL=ON - -DDISABLE_ADVANCE_SIMD=ON - -DWAYLAND_API=ON - -DX11_API=ON - -DOVERRIDE_HOST_PAGE_SIZE=0x1000 - -DOVERRIDE_HOST_CACHE_LINE_SIZE=64 -) - PATCHES_URL="https://github.com/PCSX2/pcsx2_patches/releases/download/latest/patches.zip" -make_target() { - for _v in CFLAGS CXXFLAGS LDFLAGS; do - export ${_v}="$(echo ${!_v} | sed 's/-mabi=lp64//g; s/-mtune=[^ ]*//g')" - done +get_graphicdrivers +if listcontains "${GRAPHIC_DRIVERS}" "(panfrost)"; then + GRAPHICS_DRIVER="panfrost" +elif listcontains "${GRAPHIC_DRIVERS}" "(freedreno)"; then + GRAPHICS_DRIVER="freedreno" +fi - # LLVM bitcode generated by IPO must be linked with lld. Remove a global - # ROCKNIX linker selection before CMake appends it after *_FLAGS_INIT. - export LDFLAGS="$(echo ${LDFLAGS} | sed 's/-fuse-ld=[^ ]*//g')" +pre_configure_target() { + PCSX2_CMAKE_BASE=( + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF + -DLTO_PCSX2_CORE=ON + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON + -DUSE_VULKAN=ON + -DUSE_OPENGL=ON + -DUSE_BACKTRACE=OFF + -DENABLE_QT_UI=ON + -DENABLE_QT_DEBUGGER=OFF + -DWAYLAND_API=ON + -DX11_API=ON + -DCMAKE_LINKER_TYPE=LLD + -DOVERRIDE_HOST_PAGE_SIZE=0x1000 + -DOVERRIDE_HOST_CACHE_LINE_SIZE=64 + ) - # Some third-party configure steps invoke clang without inheriting - # CMAKE_*_COMPILER_TARGET, so keep the target triple in the environment too. - export CFLAGS="--target=${TARGET_NAME} ${CFLAGS}" - export CXXFLAGS="--target=${TARGET_NAME} ${CXXFLAGS}" - export LDFLAGS="--target=${TARGET_NAME} ${LDFLAGS}" + case ${DEVICE} in + RK3576) + PCSX2_CMAKE_BASE+=( + -DCMAKE_C_FLAGS=-march=armv8-a+crc+crypto + -DCMAKE_CXX_FLAGS=-march=armv8-a+crc+crypto + ) + ;; + esac + case ${TARGET_ARCH} in + aarch64) + for _v in CFLAGS CXXFLAGS LDFLAGS; do + export ${_v}="$(echo ${!_v} | sed 's/-march=[^ ]*//g; s/-mabi=lp64//g; s/-mtune=[^ ]*//g')" + done + ;; + x86_64) + for _v in CFLAGS CXXFLAGS LDFLAGS; do + export ${_v}="$(echo ${!_v} | sed 's/-mabi=lp64//g; s/-mtune=[^ ]*//g')" + done + ;; + esac + + export LDFLAGS="$(echo ${LDFLAGS} | sed 's/-fuse-ld=[^ ]*//g')" +} + +make_target() { mkdir -p "${PKG_BUILD}/.${TARGET_NAME}" cd "${PKG_BUILD}/.${TARGET_NAME}" @@ -96,7 +113,8 @@ make_target() { -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER - "${ARMSX2_CMAKE_OPTS[@]}" + -DLLVM_DIR="${TOOLCHAIN}/lib/cmake/llvm" + "${PCSX2_CMAKE_BASE[@]}" ) cmake "${tgt_opts[@]}" @@ -113,13 +131,20 @@ makeinstall_target() { cp -rf ${PKG_BUILD}/.${TARGET_NAME}/bin/* ${INSTALL}/usr/share/armsx2-sa mkdir -p ${INSTALL}/usr/config - cp -rf ${PKG_DIR}/config/ARMSX2 ${INSTALL}/usr/config + case ${DEVICE} in + S922X) + cp -rf ${PKG_DIR}/config/S922X/ARMSX2 ${INSTALL}/usr/config + ;; + *) + cp -rf ${PKG_DIR}/config/inputplumber/ARMSX2 ${INSTALL}/usr/config + ;; + esac } post_install() { - case ${DEVICE} in - SM*) - GRAPHICS="export MESA_LOADER_DRIVER_OVERRIDE=zink" + case ${GRAPHICS_DRIVER} in + panfrost) + GRAPHICS="export MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=330" ;; *) GRAPHICS="" diff --git a/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/patches/000-arm-cross-compile.patch b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/patches/000-fix-arm-compilation.patch similarity index 73% rename from projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/patches/000-arm-cross-compile.patch rename to projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/patches/000-fix-arm-compilation.patch index 3af2727ac56..bd15cf973c1 100644 --- a/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/patches/000-arm-cross-compile.patch +++ b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/patches/000-fix-arm-compilation.patch @@ -1,6 +1,6 @@ --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake -@@ -148,10 +148,21 @@ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64" OR "${CMAKE_SYSTEM_PROCESS +@@ -150,10 +150,26 @@ # If we're running on Linux, we need to detect the page/cache line size. # It could be a virtual machine with 4K pages, or 16K with Asahi. if(LINUX) @@ -9,6 +9,11 @@ - detect_cache_line_size() - list(APPEND PCSX2_DEFS OVERRIDE_HOST_CACHE_LINE_SIZE=${HOST_CACHE_LINE_SIZE}) + if(CMAKE_CROSSCOMPILING) ++ # try_run() can't execute target binaries on the build host during ++ # cross-compilation, so detect_page_size()/detect_cache_line_size() ++ # FATAL_ERROR here (they gate on CMAKE_CROSSCOMPILING). Fall back to the ++ # standard ARMv8 Linux values; override per-target if needed (e.g. 16K ++ # pages) via -DOVERRIDE_HOST_PAGE_SIZE= / -DOVERRIDE_HOST_CACHE_LINE_SIZE=. + if(NOT DEFINED OVERRIDE_HOST_PAGE_SIZE) + set(OVERRIDE_HOST_PAGE_SIZE 0x1000) + endif() diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/0000-set-version.patch b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/patches/0000-set-version.patch similarity index 100% rename from projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/0000-set-version.patch rename to projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/patches/0000-set-version.patch diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/scripts/cheevos_yaps2.sh b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/scripts/cheevos_armsx2.sh similarity index 67% rename from projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/scripts/cheevos_yaps2.sh rename to projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/scripts/cheevos_armsx2.sh index 6129320756f..951ace485ac 100644 --- a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/scripts/cheevos_yaps2.sh +++ b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/scripts/cheevos_armsx2.sh @@ -5,8 +5,8 @@ . /etc/profile -YAPS2_CFG="/storage/.config/YAPS2/inis/YAPS2.ini" -YAPS2_TOKEN="/storage/.config/YAPS2/inis/security.ini" +ARMSX2_CFG="/storage/.config/ARMSX2/inis/PCSX2.ini" +ARMSX2_TOKEN="/storage/.config/ARMSX2/inis/secrets.ini" LOG_FILE="/var/log/cheevos.log" # Extract username, password, token, if enabled, and hardcore mode from system.cfg @@ -29,7 +29,7 @@ unofficial=$(to_bool "${unofficial}") # Check if RetroAchievements are enabled in Emulation Station if [ ! ${enabled} = 1 ]; then echo "RetroAchievements are not enabled, please turn them on in Emulation Station." > ${LOG_FILE} - sed -i '/\[Achievements\]/,/^\s*$/s/Enabled =.*/Enabled = false/' ${YAPS2_CFG} + sed -i '/\[Achievements\]/,/^\s*$/s/Enabled =.*/Enabled = false/' ${ARMSX2_CFG} exit 1 fi @@ -40,50 +40,50 @@ if [ -z "${token}" ]; then fi # Update emulator config with RetroAchievements settings -zcheevos=$(grep -Fx "[Achievements]" ${YAPS2_CFG}) +zcheevos=$(grep -Fx "[Achievements]" ${ARMSX2_CFG}) datets=$(date +%s%N | cut -b1-13) if [ -z "${zcheevos}" ]; then - sed -i "\$a [Achievements]\nEnabled = true\nUsername = ${username}\nChallengeMode = ${hardcore}\nLoginTimestamp = ${datets}" ${YAPS2_CFG} - sed -i "\$a [Achievements]\nToken = ${token}" ${YAPS2_TOKEN} + sed -i "\$a [Achievements]\nEnabled = true\nUsername = ${username}\nChallengeMode = ${hardcore}\nLoginTimestamp = ${datets}" ${ARMSX2_CFG} + sed -i "\$a [Achievements]\nToken = ${token}" ${ARMSX2_TOKEN} else - sed -i '/\[Achievements\]/,/^\s*$/s/Enabled =.*/Enabled = true/' ${YAPS2_CFG} + sed -i '/\[Achievements\]/,/^\s*$/s/Enabled =.*/Enabled = true/' ${ARMSX2_CFG} - if ! grep -q "^Username = " ${YAPS2_CFG}; then - sed -i "/^\[Achievements\]/a Username = ${username}" ${YAPS2_CFG} + if ! grep -q "^Username = " ${ARMSX2_CFG}; then + sed -i "/^\[Achievements\]/a Username = ${username}" ${ARMSX2_CFG} else - sed -i "/^\[Achievements\]/,/^\[/{s/^Username = .*/Username = ${username}/;}" ${YAPS2_CFG} + sed -i "/^\[Achievements\]/,/^\[/{s/^Username = .*/Username = ${username}/;}" ${ARMSX2_CFG} fi - if ! grep -q "^Token = " ${YAPS2_CFG}; then - sed -i "/^\[Achievements\]/a Token = ${token}" ${YAPS2_TOKEN} + if ! grep -q "^Token = " ${ARMSX2_CFG}; then + sed -i "/^\[Achievements\]/a Token = ${token}" ${ARMSX2_TOKEN} else - sed -i "/^\[Achievements\]/,/^\[/{s/^Token = .*/Token = ${token}/;}" ${YAPS2_TOKEN} + sed -i "/^\[Achievements\]/,/^\[/{s/^Token = .*/Token = ${token}/;}" ${ARMSX2_TOKEN} fi - if ! grep -q "^ChallengeMode = " ${YAPS2_CFG}; then - sed -i "/^\[Achievements\]/a ChallengeMode = ${hardcore}" ${YAPS2_CFG} + if ! grep -q "^ChallengeMode = " ${ARMSX2_CFG}; then + sed -i "/^\[Achievements\]/a ChallengeMode = ${hardcore}" ${ARMSX2_CFG} else - sed -i "/^\[Achievements\]/,/^\[/{s/^ChallengeMode = .*/ChallengeMode = ${hardcore}/;}" ${YAPS2_CFG} + sed -i "/^\[Achievements\]/,/^\[/{s/^ChallengeMode = .*/ChallengeMode = ${hardcore}/;}" ${ARMSX2_CFG} fi - if ! grep -q "^EncoreMode = " ${YAPS2_CFG}; then - sed -i "/^\[Achievements\]/a EncoreMode = ${encore}" ${YAPS2_CFG} + if ! grep -q "^EncoreMode = " ${ARMSX2_CFG}; then + sed -i "/^\[Achievements\]/a EncoreMode = ${encore}" ${ARMSX2_CFG} else - sed -i "/^\[Achievements\]/,/^\[/{s/^EncoreMode = .*/EncoreMode = ${encore}/;}" ${YAPS2_CFG} + sed -i "/^\[Achievements\]/,/^\[/{s/^EncoreMode = .*/EncoreMode = ${encore}/;}" ${ARMSX2_CFG} fi - if ! grep -q "^LeaderboardNotifications = " ${YAPS2_CFG}; then - sed -i "/^\[Achievements\]/a LeaderboardNotifications = ${leaderboards}" ${YAPS2_CFG} + if ! grep -q "^LeaderboardNotifications = " ${ARMSX2_CFG}; then + sed -i "/^\[Achievements\]/a LeaderboardNotifications = ${leaderboards}" ${ARMSX2_CFG} else - sed -i "/^\[Achievements\]/,/^\[/{s/^LeaderboardNotifications = .*/LeaderboardNotifications = ${leaderboards}/;}" ${YAPS2_CFG} + sed -i "/^\[Achievements\]/,/^\[/{s/^LeaderboardNotifications = .*/LeaderboardNotifications = ${leaderboards}/;}" ${ARMSX2_CFG} fi - if ! grep -q "^UnofficialTestMode = " ${YAPS2_CFG}; then - sed -i "/^\[Achievements\]/a UnofficialTestMode = ${unofficial}" ${YAPS2_CFG} + if ! grep -q "^UnofficialTestMode = " ${ARMSX2_CFG}; then + sed -i "/^\[Achievements\]/a UnofficialTestMode = ${unofficial}" ${ARMSX2_CFG} else - sed -i "/^\[Achievements\]/,/^\[/{s/^UnofficialTestMode = .*/UnofficialTestMode = ${unofficial}/;}" ${YAPS2_CFG} + sed -i "/^\[Achievements\]/,/^\[/{s/^UnofficialTestMode = .*/UnofficialTestMode = ${unofficial}/;}" ${ARMSX2_CFG} fi - sed -i "/^\[Achievements\]/,/^\[/{s/^LoginTimestamp = .*/LoginTimestamp = ${datets}/;}" ${YAPS2_CFG} + sed -i "/^\[Achievements\]/,/^\[/{s/^LoginTimestamp = .*/LoginTimestamp = ${datets}/;}" ${ARMSX2_CFG} fi diff --git a/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/scripts/start_armsx2.sh b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/scripts/start_armsx2.sh index 8b5be1b990d..cc4fd0b1870 100644 --- a/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/scripts/start_armsx2.sh +++ b/projects/ROCKNIX/packages/emulators/standalone/armsx2-sa/scripts/start_armsx2.sh @@ -7,41 +7,37 @@ DATA_ROOT="/storage/.config/ARMSX2" mkdir -p "${DATA_ROOT}/inis" -if [ ! -f "${DATA_ROOT}/inis/PCSX2.ini" ] || \ - ! grep -q '^SettingsVersion = 1$' "${DATA_ROOT}/inis/PCSX2.ini"; then - cp -f /usr/config/ARMSX2/inis/PCSX2.ini "${DATA_ROOT}/inis/PCSX2.ini" + +if [ ! -f "${DATA_ROOT}/inis/PCSX2.ini" ]; then + cp -r /usr/config/ARMSX2/inis/PCSX2.ini "${DATA_ROOT}/inis/PCSX2.ini" +fi + +if [ ! -f "${DATA_ROOT}/inis/secrets.ini" ]; then + cp -r /usr/config/ARMSX2/inis/secrets.ini "${DATA_ROOT}/inis/secrets.ini" fi + mkdir -p /storage/roms/bios/ps2 mkdir -p /storage/roms/savestates/ps2 mkdir -p /storage/roms/ps2/textures sed -i '/^Textures =/c\Textures = /storage/roms/ps2/textures' "${DATA_ROOT}/inis/PCSX2.ini" -# Use Rocknix's curated SDL controller DB so device-specific mappings (e.g. -# "Retroid Pocket Gamepad" on Linux) override the upstream-only bundle ARMSX2 -# ships in resources/. SDLInputSource looks in DataRoot first. -ln -sf /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt "${DATA_ROOT}/game_controller_db.txt" - -# The Rocknix mapping for the RP5 swaps face buttons Nintendo-style so that -# SDL_SOUTH fires on the labeled-A button (east physical position). PCSX2's -# FullscreenUI menu draws the Sony Cross glyph for activate and expects it -# on SDL_SOUTH, so this Nintendo flip makes the on-screen prompt fire on -# the wrong physical button. Override with a position-correct mapping so -# that pressing the south-physical button (labeled B on the RP5) activates, -# matching the Cross glyph's positional meaning. -export SDL_GAMECONTROLLERCONFIG="0300f353202000000130000001000000,Retroid Pocket Gamepad,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b6,guide:b8,start:b7,dpleft:b13,dpdown:b12,dpright:b14,dpup:b11,leftshoulder:b4,lefttrigger:a6,rightshoulder:b5,righttrigger:a7,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,misc1:b15," - -# Mesa freedreno-classic-GL on Adreno can render -# long-lived RGBA8 textures as RGB hash noise after the first upload, while -# re-uploaded-each-frame textures are correct. Bisected to the GL backend: -# software GS is clean, dumped textures on disk are byte-perfect, and Turnip -# (Mesa Vulkan freedreno) renders correctly. Route GL through Zink so calls -# reach Turnip via Vulkan instead of the broken classic-GL path. Falls back -# silently to the default driver on devices without zink_dri.so. The package -# only enables this override for Snapdragon targets, not Mali devices. -@GRAPHICS@ +# Use Rocknix's curated SDL controller DB +ln -sf /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt "${DATA_ROOT}/game_controller_db.txt" 2>/dev/null +# EmulationStation Features GAME=$(echo "${1}" | sed "s#^/.*/##") PLATFORM=$(echo "${2}" | sed "s#^/.*/##") +ASPECT=$(get_setting aspect_ratio "${PLATFORM}" "${GAME}") +FILTER=$(get_setting bilinear_filtering "${PLATFORM}" "${GAME}") +FPS=$(get_setting show_fps "${PLATFORM}" "${GAME}") +RATE=$(get_setting ee_cycle_rate "${PLATFORM}" "${GAME}") +SKIP=$(get_setting ee_cycle_skip "${PLATFORM}" "${GAME}") +HWDOWNLOAD=$(get_setting hw_download_mode "${PLATFORM}" "${GAME}") +GRENDERER=$(get_setting graphics_backend "${PLATFORM}" "${GAME}") +IRES=$(get_setting internal_resolution "${PLATFORM}" "${GAME}") +VSYNC=$(get_setting vsync "${PLATFORM}" "${GAME}") +ENABLE_WIDESCREEN_PATCHES=$(get_setting enable_widescreen_patches "${PLATFORM}" "${GAME}") + CORES=$(get_setting "cores" "${PLATFORM}" "${GAME}") if [ "${CORES}" = "little" ]; then EMUPERF="${SLOW_CORES}" @@ -51,6 +47,61 @@ else unset EMUPERF fi +if [ "$ASPECT" = "0" ]; then + sed -i '/^AspectRatio =/c\AspectRatio = 4:3' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$ASPECT" = "1" ]; then + sed -i '/^AspectRatio =/c\AspectRatio = 16:9' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$ASPECT" = "2" ]; then + sed -i '/^AspectRatio =/c\AspectRatio = Stretch' "${DATA_ROOT}/inis/PCSX2.ini" +fi + +if [ "$FILTER" = "0" ]; then + sed -i '/^filter =/c\filter = 0' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$FILTER" = "1" ]; then + sed -i '/^filter =/c\filter = 1' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$FILTER" = "2" ]; then + sed -i '/^filter =/c\filter = 2' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$FILTER" = "3" ]; then + sed -i '/^filter =/c\filter = 3' "${DATA_ROOT}/inis/PCSX2.ini" +fi + +if [ "$GRENDERER" = "0" ]; then + sed -i '/^Renderer =/c\Renderer = -1' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$GRENDERER" = "1" ]; then + sed -i '/^Renderer =/c\Renderer = 12' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$GRENDERER" = "2" ]; then + sed -i '/^Renderer =/c\Renderer = 14' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$GRENDERER" = "3" ]; then + sed -i '/^Renderer =/c\Renderer = 13' "${DATA_ROOT}/inis/PCSX2.ini" +fi + +if [ "$IRES" > "0" ]; then + sed -i "/^upscale_multiplier =/c\upscale_multiplier = $IRES" "${DATA_ROOT}/inis/PCSX2.ini" +else + sed -i '/^upscale_multiplier =/c\upscale_multiplier = 1' "${DATA_ROOT}/inis/PCSX2.ini" +fi + +if [ "$FPS" = "false" ]; then + sed -i '/^OsdShowFPS =/c\OsdShowFPS = false' "${DATA_ROOT}/inis/PCSX2.ini" +elif [ "$FPS" = "true" ]; then + sed -i '/^OsdShowFPS =/c\OsdShowFPS = true' "${DATA_ROOT}/inis/PCSX2.ini" +fi + +if [ "$ENABLE_WIDESCREEN_PATCHES" = "true" ]; then + sed -i '/^EnableWideScreenPatches =/c\EnableWideScreenPatches = true' "${DATA_ROOT}/inis/PCSX2.ini" +else + sed -i '/^EnableWideScreenPatches =/c\EnableWideScreenPatches = false' "${DATA_ROOT}/inis/PCSX2.ini" +fi + +if [ -f /usr/bin/cheevos_armsx2.sh ]; then + /usr/bin/cheevos_armsx2.sh +fi + +@GRAPHICS@ + +export QT_QPA_PLATFORM=wayland +export SDL_AUDIODRIVER=pulseaudio + set_kill set "-9 armsx2-qt" ${EMUPERF} /usr/share/armsx2-sa/armsx2-qt \ -bigpicture \ diff --git a/projects/ROCKNIX/packages/emulators/standalone/eden-sa/package.mk b/projects/ROCKNIX/packages/emulators/standalone/eden-sa/package.mk index de7fe581bf3..1b5972ba28a 100644 --- a/projects/ROCKNIX/packages/emulators/standalone/eden-sa/package.mk +++ b/projects/ROCKNIX/packages/emulators/standalone/eden-sa/package.mk @@ -2,7 +2,7 @@ # Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX) PKG_NAME="eden-sa" -PKG_VERSION="35763563c77174445040ce2c64cf8819606a163f" # 260701 +PKG_VERSION="0d9d8064d786b2a44045a395e3a64e980ece9dcd" # 260725 PKG_LICENSE="GPLv2" PKG_DEPENDS_TARGET="toolchain llvm:host SDL3 boost libevdev libdrm ffmpeg zlib zstd alsa-lib qt6 libfmt" PKG_LONGDESC="Eden is a high-performance and easy-to-use emulator, tailored for enthusiasts and developers alike." diff --git a/projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/package.mk b/projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/package.mk new file mode 100644 index 00000000000..82a3c9bac09 --- /dev/null +++ b/projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/package.mk @@ -0,0 +1,216 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) + +PKG_NAME="sdoj-recomp-sa" +PKG_VERSION="814634c57982baf8a97cc94b8a000ca3c4419ecd" +PKG_LICENSE="GPLv3" +PKG_SITE="https://github.com/eandis/SDOJ-Recomp" +PKG_URL="${PKG_SITE}.git" +PKG_LONGDESC="DoDonPachi Saidaioujou Native Recompilation (ReXGlue)" +PKG_DEPENDS_TARGET="toolchain llvm:host SDL3 boost ffmpeg zlib zstd alsa-lib libfmt gtk3 xwayland" +PKG_TOOLCHAIN="manual" + +if [ "${VULKAN_SUPPORT}" = "yes" ]; then + PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers" +fi + +post_unpack_target() { + local REX_THIRDPARTY_CMAKE="${PKG_BUILD}/thirdparty/rexglue-sdk/thirdparty/CMakeLists.txt" + if [ -f "${REX_THIRDPARTY_CMAKE}" ]; then + sed -i 's/-march=armv8-a/-march=armv8-a -DCONFIG_PIC=1/g' "${REX_THIRDPARTY_CMAKE}" + sed -i 's/HAVE_AV_CONFIG_H/HAVE_AV_CONFIG_H\n CONFIG_PIC=1/g' "${REX_THIRDPARTY_CMAKE}" + sed -i 's/target_compile_options(libavcodec PRIVATE -w)/target_compile_options(libavcodec PRIVATE -w -fvisibility=hidden)/g' "${REX_THIRDPARTY_CMAKE}" + sed -i 's/target_compile_options(libavutil PRIVATE -w)/target_compile_options(libavutil PRIVATE -w -fvisibility=hidden)/g' "${REX_THIRDPARTY_CMAKE}" + fi + + # Disable shaderSignedZeroInfNanPreserveFloat32 on Mesa Turnip driver to avoid ir3 shader compilation bugs + local REX_VULKAN_DEV="${PKG_BUILD}/thirdparty/rexglue-sdk/src/ui/vulkan/vulkan_device.cpp" + if [ -f "${REX_VULKAN_DEV}" ] && ! grep -q "VK_DRIVER_ID_MESA_TURNIP.*shaderSignedZeroInfNanPreserveFloat32 = false" "${REX_VULKAN_DEV}"; then + sed -i 's/shaderSignedZeroInfNanPreserveFloat32);/shaderSignedZeroInfNanPreserveFloat32);\n if (properties_1_2_KHR_driver_properties.driverID == VK_DRIVER_ID_MESA_TURNIP) device->properties_.shaderSignedZeroInfNanPreserveFloat32 = false;/g' "${REX_VULKAN_DEV}" + fi + + local REX_VULKAN_CMD="${PKG_BUILD}/thirdparty/rexglue-sdk/src/graphics/vulkan/command_processor.cpp" + if [ -f "${REX_VULKAN_CMD}" ]; then + sed -i 's/REXGPU_DEBUG(/REXGPU_INFO(/g' "${REX_VULKAN_CMD}" + fi + + local REX_XBOXKRNL_VID="${PKG_BUILD}/thirdparty/rexglue-sdk/src/kernel/xboxkrnl/xboxkrnl_video.cpp" + if [ -f "${REX_XBOXKRNL_VID}" ]; then + sed -i 's/assert_true(\*frontbuffer_ptr == frontbuffer_virtual_address);/\/\/ assert_true/g' "${REX_XBOXKRNL_VID}" + sed -i 's/assert_true(frontbuffer_physical_address != UINT32_MAX);/\/\/ assert_true/g' "${REX_XBOXKRNL_VID}" + python3 <<-EOF +import re +from pathlib import Path + +path = Path('${REX_XBOXKRNL_VID}') +content = path.read_text() +content = re.sub( + r'\s*assert_true\(texture_format\s*==\s*' + r'rex::graphics::xenos::TextureFormat::k_8_8_8_8\s*\|\|\s*' + r'texture_format\s*==\s*' + r'rex::graphics::xenos::TextureFormat::k_2_10_10_10_AS_16_16_16_16\);', + '\n // Accept the guest-provided front-buffer format.', + content, +) +path.write_text(content) +EOF + fi + + local REX_UI_GTK="${PKG_BUILD}/thirdparty/rexglue-sdk/src/ui/window_gtk.cpp" + if [ -f "${REX_UI_GTK}" ] && ! grep -q "gtk_widget_set_app_paintable(drawing_area_, TRUE)" "${REX_UI_GTK}"; then + sed -i 's/gtk_widget_show_all(window_);/gtk_widget_set_double_buffered(drawing_area_, FALSE);\n gtk_widget_set_app_paintable(drawing_area_, TRUE);\n gtk_widget_show_all(window_);/g' "${REX_UI_GTK}" + fi + + local REX_UI_VULKAN_PRES="${PKG_BUILD}/thirdparty/rexglue-sdk/src/ui/vulkan/vulkan_presenter.cpp" + if [ -f "${REX_UI_VULKAN_PRES}" ]; then + sed -i 's/VulkanPresenter: The surface doesn\x27t support identity/\/\/ VulkanPresenter: rotate panel support/g' "${REX_UI_VULKAN_PRES}" + fi + + # Avoid a Turnip ir3 pipeline compilation hang caused by the NMin-based + # signed-zero test. Multiplication is safe here because only equality with + # zero is tested, and lets SDOJ finish creating its graphics pipelines. + local REX_SPIRV_ALU="${PKG_BUILD}/thirdparty/rexglue-sdk/src/graphics/pipeline/shader/spirv_translator_alu.cpp" + if [ -f "${REX_SPIRV_ALU}" ]; then + python3 <<-EOF + import re + from pathlib import Path + + path = Path('${REX_SPIRV_ALU}') + content = path.read_text() + content = re.sub( + r'createBinBuiltinCall\s*\(\s*([^,]+?)\s*,\s*ext_inst_glsl_std_450_\s*,\s*GLSLstd450NMin\s*,\s*([^,]+?)\s*,\s*([^)]+?)\s*\)', + lambda match: 'createBinOp(spv::OpFMul, ' + match.group(1).strip() + ', ' + match.group(2).strip() + ', ' + match.group(3).strip() + ')', + content, + flags=re.DOTALL, + ) + path.write_text(content) + EOF + fi + +} + +pre_configure_target() { + post_unpack_target +} + +make_target() { + local LLVM_BIN="${TOOLCHAIN}/bin" + local CPU_FLAGS="" + case "${DEVICE}" in + SM8250) + CPU_FLAGS="-march=armv8.2-a+crc+crypto -mtune=cortex-a77" + ;; + SM8550|SM8650|SM8750) + CPU_FLAGS="-mcpu=cortex-a78 -mtune=cortex-a78" + ;; + *) + if [ -n "${TARGET_CPU}" ] && [[ "${TARGET_CPU}" != *.* ]]; then + CPU_FLAGS="-mcpu=${TARGET_CPU}${TARGET_CPU_FLAGS}" + else + CPU_FLAGS="-march=armv8-a -mtune=generic" + fi + ;; + esac + + local OPT_FLAGS="-O3 -fPIC" + local FLAGS_CLEAN="s/-mabi=lp64//g; s/-mcpu=[^ ]*//g; s/-march=[^ ]*//g; s/-mtune=[^ ]*//g" + + for _v in CFLAGS CXXFLAGS ASMFLAGS; do + export ${_v}="$(echo ${!_v} | sed -e "$FLAGS_CLEAN") ${OPT_FLAGS} ${CPU_FLAGS}" + done + + export LDFLAGS="$(echo ${LDFLAGS} | sed -e "$FLAGS_CLEAN" -e 's/-fuse-ld=bfd/-fuse-ld=lld/g') -Wl,-Bsymbolic" + export SHARED_LDFLAGS="$(echo ${SHARED_LDFLAGS} | sed -e 's/-fuse-ld=bfd/-fuse-ld=lld/g') -Wl,-Bsymbolic" + + export AR="${LLVM_BIN}/llvm-ar" + export RANLIB="${LLVM_BIN}/llvm-ranlib" + export NM="${LLVM_BIN}/llvm-nm" + export CC="${LLVM_BIN}/clang" + export CXX="${LLVM_BIN}/clang++" + export LD="${LLVM_BIN}/ld.lld" + + post_unpack_target + + mkdir -p "${PKG_BUILD}/.${TARGET_NAME}" + cd "${PKG_BUILD}/.${TARGET_NAME}" + + local -a tgt_opts=( + -G Ninja + -S "${PKG_BUILD}" + -B "${PKG_BUILD}/.${TARGET_NAME}" + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=/usr + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DCMAKE_SYSTEM_NAME=Linux + -DCMAKE_SYSTEM_PROCESSOR=aarch64 + -DCMAKE_SYSROOT="${SYSROOT_PREFIX}" + -DCMAKE_FIND_ROOT_PATH="${SYSROOT_PREFIX}" + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY + -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY + + -DCMAKE_C_COMPILER="${LLVM_BIN}/clang" + -DCMAKE_C_COMPILER_TARGET=aarch64-rocknix-linux-gnu + -DCMAKE_CXX_COMPILER="${LLVM_BIN}/clang++" + -DCMAKE_CXX_COMPILER_TARGET=aarch64-rocknix-linux-gnu + -DCMAKE_ASM_COMPILER="${LLVM_BIN}/clang" + -DCMAKE_ASM_COMPILER_TARGET=aarch64-rocknix-linux-gnu + -DCMAKE_C_FLAGS="${CPU_FLAGS} ${OPT_FLAGS}" + -DCMAKE_CXX_FLAGS="${CPU_FLAGS} ${OPT_FLAGS}" + -DCMAKE_ASM_FLAGS="${CPU_FLAGS} ${OPT_FLAGS}" + + -DCMAKE_LINKER="${LLVM_BIN}/ld.lld" + -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" + -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld -Wl,-Bsymbolic" + -DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=lld -Wl,-Bsymbolic" + -DCMAKE_AR="${LLVM_BIN}/llvm-ar" + -DCMAKE_RANLIB="${LLVM_BIN}/llvm-ranlib" + -DCMAKE_NM="${LLVM_BIN}/llvm-nm" + ) + + cmake "${tgt_opts[@]}" || return 1 + + ninja -j$(nproc) || ninja +} + +makeinstall_target() { + mkdir -p ${INSTALL}/usr/bin + local SDOJ_PORT_DIR="${INSTALL}/storage/roms/ports/sdoj" + mkdir -p "${SDOJ_PORT_DIR}" + + if [ -f "${PKG_BUILD}/.${TARGET_NAME}/SDOJ-Recomp" ]; then + cp -v "${PKG_BUILD}/.${TARGET_NAME}/SDOJ-Recomp" "${SDOJ_PORT_DIR}/sdoj-recomp" + elif [ -f "${PKG_BUILD}/.${TARGET_NAME}/sdoj-recomp" ]; then + cp -v "${PKG_BUILD}/.${TARGET_NAME}/sdoj-recomp" "${SDOJ_PORT_DIR}/sdoj-recomp" + elif [ -f "${PKG_BUILD}/.${TARGET_NAME}/saidaioujou_recomp_tu1" ]; then + cp -v "${PKG_BUILD}/.${TARGET_NAME}/saidaioujou_recomp_tu1" "${SDOJ_PORT_DIR}/sdoj-recomp" + else + echo "Missing SDOJ executable in ${PKG_BUILD}/.${TARGET_NAME}" >&2 + return 1 + fi + + # Keep the executable and all private libraries together in the writable + # port directory (/roms is a symlink to /storage/roms on ROCKNIX). + find "${PKG_BUILD}/.${TARGET_NAME}" -maxdepth 1 -name "libsaidaioujou_recomp_tu1_*.so" \ + -exec cp -v {} "${SDOJ_PORT_DIR}/" \; + + # ReXGlue emits its runtime beside the SDK rather than in the target build + # directory. Both libraries are direct dependencies of the executable. + local REX_RUNTIME_DIR="${PKG_BUILD}/thirdparty/rexglue-sdk/out/linux-arm64" + for _library in librexruntime.so libTracyClient.so; do + if [ ! -f "${REX_RUNTIME_DIR}/${_library}" ]; then + echo "Missing required ReXGlue runtime: ${REX_RUNTIME_DIR}/${_library}" >&2 + return 1 + fi + cp -v "${REX_RUNTIME_DIR}/${_library}" "${SDOJ_PORT_DIR}/" + done + + chmod 755 "${SDOJ_PORT_DIR}/sdoj-recomp" + + if [ -d "${PKG_DIR}/scripts" ]; then + cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/ + fi + chmod 755 ${INSTALL}/usr/bin/* +} diff --git a/projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/scripts/start_sdoj_recomp.sh b/projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/scripts/start_sdoj_recomp.sh new file mode 100644 index 00000000000..a5eda483304 --- /dev/null +++ b/projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/scripts/start_sdoj_recomp.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) + +. /etc/profile +set_kill set "-9 sdoj-recomp" + +# Load gptokeyb support files +control-gen_init.sh +source /storage/.config/gptokeyb/control.ini +get_controls + +CONF_DIR="/storage/.config/sdoj-recomp" +ROMS_DIR="/storage/roms/ports/sdoj" + +mkdir -p "${CONF_DIR}" +mkdir -p "${CONF_DIR}/cache" +mkdir -p "${ROMS_DIR}" + +# Determine game data root directory +GAME_DATA="${ROMS_DIR}" +if [ -n "$1" ] && [ -d "$1" ]; then + GAME_DATA="$1" +elif [ -n "$1" ] && [ -f "$1" ]; then + GAME_DATA="$(dirname "$1")" +fi + +cd "${GAME_DATA}" + +# Build CLI arguments for ReXGlue / SDOJ Recomp +ARGS=("--game_data_root=${GAME_DATA}" "--user_data_root=${CONF_DIR}" "--cache_path=${CONF_DIR}/cache" "--vulkan_readback_resolve=false" "--vulkan_readback_memexport=false" "--vulkan_async_skip_incomplete_frames=false" "--vsync=false" "--render_target_path_vulkan=fbo" "--fullscreen") + +# Auto-detect Title Update (TU) directory if present +if [ -d "${GAME_DATA}/tu" ]; then + ARGS+=("--update_data_root=${GAME_DATA}/tu") +elif [ -d "${GAME_DATA}/TU" ]; then + ARGS+=("--update_data_root=${GAME_DATA}/TU") +elif [ -d "${GAME_DATA}/tu1" ]; then + ARGS+=("--update_data_root=${GAME_DATA}/TU1") +elif [ -d "${GAME_DATA}/TU1" ]; then + ARGS+=("--update_data_root=${GAME_DATA}/TU1") +elif [ -d "${ROMS_DIR}/tu" ]; then + ARGS+=("--update_data_root=${ROMS_DIR}/tu") +elif [ -d "${ROMS_DIR}/TU1" ]; then + ARGS+=("--update_data_root=${ROMS_DIR}/TU1") +fi + +# Determine which binary to run +if [ -x "${GAME_DATA}/sdoj-recomp" ]; then + SDOJ_BIN="${GAME_DATA}/sdoj-recomp" +elif [ -x "${GAME_DATA}/saidaioujou_recomp_tu1" ]; then + SDOJ_BIN="${GAME_DATA}/saidaioujou_recomp_tu1" +elif [ -x "${ROMS_DIR}/sdoj-recomp" ]; then + SDOJ_BIN="${ROMS_DIR}/sdoj-recomp" +else + echo "SDOJ executable not found in ${GAME_DATA} or ${ROMS_DIR}" >&2 + exit 1 +fi + +# Launch gptokeyb mapping if available +if [ -f "${CONF_DIR}/sdoj.gptk" ]; then + ${GPTOKEYB} sdoj-recomp -c "${CONF_DIR}/sdoj.gptk" & +elif [ -f "${ROMS_DIR}/sdoj.gptk" ]; then + ${GPTOKEYB} sdoj-recomp -c "${ROMS_DIR}/sdoj.gptk" & +fi + +export LD_LIBRARY_PATH="${GAME_DATA}:${ROMS_DIR}:/usr/lib:${LD_LIBRARY_PATH}" +export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/var/run/0-runtime-dir}" +export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-1}" +export DISPLAY="${DISPLAY:-:0}" +# ReXGlue currently exposes only the XCB Vulkan surface on GNU/Linux. Keep SDL +# on XWayland until its presenter supports creating native Wayland surfaces. +export SDL_VIDEODRIVER="x11" +export GDK_BACKEND="x11" + +if [ -S "/var/run/0-runtime-dir/sway-ipc.0.sock" ]; then + export SWAYSOCK="/var/run/0-runtime-dir/sway-ipc.0.sock" +fi + +( + # The binary may expose either an SDL app_id or an XWayland class depending + # on the selected video backend. Retry while the window is being created. + for _attempt in {1..20}; do + sleep 0.25 + if command -v swaymsg &>/dev/null && swaymsg -q get_tree &>/dev/null 2>&1; then + for _criteria in \ + '[app_id="(?i)^(sdoj-recomp|saidaioujou_recomp_tu1)$"]' \ + '[class="(?i)^(sdoj-recomp|saidaioujou_recomp_tu1)$"]'; do + swaymsg "${_criteria} focus" 2>/dev/null + swaymsg "${_criteria} fullscreen enable" 2>/dev/null + done + fi + + if swaymsg -t get_tree -r 2>/dev/null | grep -Eqi \ + '"(app_id|class)"[[:space:]]*:[[:space:]]*"(sdoj-recomp|saidaioujou_recomp_tu1)"'; then + break + fi + done +) & + +"${SDOJ_BIN}" "${ARGS[@]}" + +kill -9 $(pidof gptokeyb) 2>/dev/null diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/package.mk b/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/package.mk deleted file mode 100644 index 1598082e671..00000000000 --- a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/package.mk +++ /dev/null @@ -1,156 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2025-present ROCKNIX (https://github.com/ROCKNIX) - -PKG_NAME="yaps2-sa" -PKG_VERSION="76bba7ffd3c278221de8ad19a6fcddddb3692432" -PKG_LICENSE="GPLv3" -PKG_SITE="https://github.com/yaps2/yaps2" -PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz" -PKG_LONGDESC="yaps2 is an ARM64-focused PlayStation 2 (PS2) emulator, a fork of PCSX2." -PKG_DEPENDS_TARGET="toolchain llvm:host SDL3 libpng zlib libjpeg-turbo zstd lz4 libwebp freetype plutosvg curl libpcap ffmpeg libX11 libXext qt6 shaderc" -PKG_TOOLCHAIN="manual" -PKG_BUILD_FLAGS="speed" - -# Use the release asset, not the "latest" source archive. The source archive -# nests every pnach under "pcsx2_patches-latest/patches/", but PCSX2 looks -# patches up at the zip root as "_.pnach" (Patch.cpp: -# GetPnachTemplate has no directory prefix), so those never match. The release -# asset ships the pnach files flat at the root, as PCSX2 expects. -PATCHES_URL="https://github.com/PCSX2/pcsx2_patches/releases/download/latest/patches.zip" - -get_graphicdrivers - if listcontains "${GRAPHIC_DRIVERS}" "(panfrost)"; then - GRAPHICS_DRIVER="panfrost" - elif listcontains "${GRAPHIC_DRIVERS}" "(freedreno)"; then - GRAPHICS_DRIVER="freedreno" - fi - -pre_configure_target() { - PCSX2_CMAKE_BASE=( - -DCMAKE_BUILD_TYPE=Release - # Full-tree IPO stays off for Qt (not worth it)... - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF - # ...but stays on for just the recompiler/VU/EE/IOP core: - -DLTO_PCSX2_CORE=ON - -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON - -DUSE_VULKAN=ON - -DUSE_OPENGL=ON - -DUSE_BACKTRACE=OFF - -DENABLE_QT_UI=ON - -DENABLE_QT_DEBUGGER=OFF - -DWAYLAND_API=ON - -DX11_API=ON - -DCMAKE_LINKER_TYPE=LLD - ) - - # RK3576's Cortex-A72 is ARMv8.0-A and lacks LSE atomics; PCSX2's default - # -march=armv8.1-a emits LSE instructions that SIGILL on it. Current upstream - # honors an explicit -march in CMAKE_CXX_FLAGS and skips its ARMv8.1 default. - case ${DEVICE} in - RK3576) - PCSX2_CMAKE_BASE+=( - -DCMAKE_C_FLAGS=-march=armv8-a+crc+crypto - -DCMAKE_CXX_FLAGS=-march=armv8-a+crc+crypto - ) - ;; - esac - - case ${TARGET_ARCH} in - aarch64) - for _v in CFLAGS CXXFLAGS LDFLAGS; do - export ${_v}="$(echo ${!_v} | sed 's/-march=[^ ]*//g; s/-mabi=lp64//g; s/-mtune=[^ ]*//g')" - done - ;; - x86_64) - for _v in CFLAGS CXXFLAGS LDFLAGS; do - export ${_v}="$(echo ${!_v} | sed 's/-mabi=lp64//g; s/-mtune=[^ ]*//g')" - done - ;; - esac - - # LTO archives contain LLVM bitcode and must be linked with lld. ROCKNIX's - # global LDFLAGS may select bfd, which CMake appends after our *_FLAGS_INIT. - export LDFLAGS="$(echo ${LDFLAGS} | sed 's/-fuse-ld=[^ ]*//g')" -} - -make_target() { - mkdir -p "${PKG_BUILD}/.${TARGET_NAME}" - cd "${PKG_BUILD}/.${TARGET_NAME}" - - local -a tgt_opts=( - -G Ninja - -S "${PKG_BUILD}" - -B "${PKG_BUILD}/.${TARGET_NAME}" - -DCMAKE_INSTALL_PREFIX=/usr - -DCMAKE_MAKE_PROGRAM=ninja - -DCMAKE_C_COMPILER="${TOOLCHAIN}/bin/clang" - -DCMAKE_CXX_COMPILER="${TOOLCHAIN}/bin/clang++" - -DCMAKE_AR="${TOOLCHAIN}/bin/llvm-ar" - -DCMAKE_RANLIB="${TOOLCHAIN}/bin/llvm-ranlib" - -DCMAKE_NM="${TOOLCHAIN}/bin/llvm-nm" - -DCMAKE_OBJCOPY="${TOOLCHAIN}/bin/llvm-objcopy" - -DCMAKE_OBJDUMP="${TOOLCHAIN}/bin/llvm-objdump" - -DCMAKE_STRIP="${TOOLCHAIN}/bin/llvm-strip" - -DCMAKE_C_COMPILER_AR="${TOOLCHAIN}/bin/llvm-ar" - -DCMAKE_CXX_COMPILER_AR="${TOOLCHAIN}/bin/llvm-ar" - -DCMAKE_C_COMPILER_RANLIB="${TOOLCHAIN}/bin/llvm-ranlib" - -DCMAKE_CXX_COMPILER_RANLIB="${TOOLCHAIN}/bin/llvm-ranlib" - -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" - -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" - -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=${TARGET_ARCH} - -DCMAKE_C_COMPILER_TARGET=${TARGET_NAME} - -DCMAKE_CXX_COMPILER_TARGET=${TARGET_NAME} - -DCMAKE_SYSROOT="${SYSROOT_PREFIX}" - -DCMAKE_FIND_ROOT_PATH="${SYSROOT_PREFIX}" - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY - -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY - -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER - -DLLVM_DIR="${TOOLCHAIN}/lib/cmake/llvm" - -DCMAKE_AR="${TOOLCHAIN}/bin/llvm-ar" - -DCMAKE_RANLIB="${TOOLCHAIN}/bin/llvm-ranlib" - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER - "${PCSX2_CMAKE_BASE[@]}" - ) - cmake "${tgt_opts[@]}" - cmake --build "${PKG_BUILD}/.${TARGET_NAME}" - ninja install - wget -c -t 5 -O "bin/resources/patches.zip" ${PATCHES_URL} -} - -makeinstall_target() { - mkdir -p ${INSTALL}/usr/bin - cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin - chmod 755 ${INSTALL}/usr/bin/* - - mkdir -p ${INSTALL}/usr/share/yaps2-sa - cp -rf ${PKG_BUILD}/.${TARGET_NAME}/bin/* ${INSTALL}/usr/share/yaps2-sa - - mkdir -p ${INSTALL}/usr/config - cp -rf ${PKG_DIR}/config/common/YAPS2 ${INSTALL}/usr/config - - case ${DEVICE} in - S922X) - cp -rf ${PKG_DIR}/config/S922X/YAPS2 ${INSTALL}/usr/config - ;; - *) - cp -rf ${PKG_DIR}/config/inputplumber/YAPS2 ${INSTALL}/usr/config - ;; - esac -} - -post_install() { - case ${GRAPHICS_DRIVER} in - panfrost) - GRAPHICS="export MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=330" - ;; - *) - GRAPHICS="" - ;; - esac - - sed -e "s/@GRAPHICS@/${GRAPHICS}/g" \ - -i ${INSTALL}/usr/bin/start_yaps2.sh -} diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/000-fix-arm-compilation.patch b/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/000-fix-arm-compilation.patch deleted file mode 100644 index a2c58a350bd..00000000000 --- a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/000-fix-arm-compilation.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- a/cmake/BuildParameters.cmake -+++ b/cmake/BuildParameters.cmake -@@ -78,8 +78,8 @@ - #------------------------------------------------------------------------------- - # Select the architecture - #------------------------------------------------------------------------------- --if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "amd64" OR -- "${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "AMD64" OR "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64") -+if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64" OR -+ "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64" OR "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64") - # Multi-ISA only exists on x86. - option(DISABLE_ADVANCE_SIMD "Disable advance use of SIMD (SSE2+ & AVX)" OFF) - -@@ -105,12 +105,12 @@ - add_compile_options("-msse" "-msse2" "-msse4.1" "-mfxsr") - else() - # Can't use march=native on Apple Silicon. -- if(NOT APPLE OR "${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "x86_64") -+ if(NOT APPLE OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") - add_compile_options("-march=native") - endif() - endif() - endif() --elseif("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64" OR "${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "aarch64" OR -+elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64" OR - "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64") - message(STATUS "Building for Apple Silicon (ARM64).") - set(ARCH_ARM64 TRUE) -@@ -125,10 +125,27 @@ - # If we're running on Linux, we need to detect the page/cache line size. - # It could be a virtual machine with 4K pages, or 16K with Asahi. - if(LINUX) -- detect_page_size() -- list(APPEND PCSX2_DEFS OVERRIDE_HOST_PAGE_SIZE=${HOST_PAGE_SIZE}) -- detect_cache_line_size() -- list(APPEND PCSX2_DEFS OVERRIDE_HOST_CACHE_LINE_SIZE=${HOST_CACHE_LINE_SIZE}) -+ if(CMAKE_CROSSCOMPILING) -+ # try_run() can't execute target binaries on the build host -+ # during cross-compilation, so detect_page_size()/ -+ # detect_cache_line_size() can't work here. Fall back to the -+ # standard ARMv8 Linux values; override per-target if needed -+ # (e.g. 16K pages) via -DOVERRIDE_HOST_PAGE_SIZE=/ -+ # -DOVERRIDE_HOST_CACHE_LINE_SIZE=. -+ if(NOT DEFINED OVERRIDE_HOST_PAGE_SIZE) -+ set(OVERRIDE_HOST_PAGE_SIZE 0x1000) -+ endif() -+ if(NOT DEFINED OVERRIDE_HOST_CACHE_LINE_SIZE) -+ set(OVERRIDE_HOST_CACHE_LINE_SIZE 64) -+ endif() -+ list(APPEND PCSX2_DEFS OVERRIDE_HOST_PAGE_SIZE=${OVERRIDE_HOST_PAGE_SIZE}) -+ list(APPEND PCSX2_DEFS OVERRIDE_HOST_CACHE_LINE_SIZE=${OVERRIDE_HOST_CACHE_LINE_SIZE}) -+ else() -+ detect_page_size() -+ list(APPEND PCSX2_DEFS OVERRIDE_HOST_PAGE_SIZE=${HOST_PAGE_SIZE}) -+ detect_cache_line_size() -+ list(APPEND PCSX2_DEFS OVERRIDE_HOST_CACHE_LINE_SIZE=${HOST_CACHE_LINE_SIZE}) -+ endif() - endif() - - # Windows page/cache line size seems to match x68-64 -@@ -138,7 +155,7 @@ - list(APPEND PCSX2_DEFS OVERRIDE_HOST_CACHE_LINE_SIZE=64) - endif() - else() -- message(FATAL_ERROR "Unsupported architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR}") -+ message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}") - endif() - - # Require C++20. - \ No newline at end of file diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/001-lower-qt-version-requirement.patch b/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/001-lower-qt-version-requirement.patch deleted file mode 100644 index 26d82044ecf..00000000000 --- a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/001-lower-qt-version-requirement.patch +++ /dev/null @@ -1,16 +0,0 @@ -Lower the Qt6 minimum version from 6.10.1 to 6.8.3 to match the version -shipped in the ROCKNIX aarch64 sysroot (e.g. RK3576). yaps2/PCSX2 only -needs the newer Qt for the CorePrivate/GuiPrivate/WidgetsPrivate lookup, -which is already guarded behind a >= 6.10.0 check right below, so 6.8.3 -builds fine without it. ---- a/cmake/SearchForStuff.cmake -+++ b/cmake/SearchForStuff.cmake -@@ -114,7 +114,7 @@ - - # Find the Qt components that we need. - if(ENABLE_QT_UI) -- find_package(Qt6 6.10.1 COMPONENTS CoreTools Core GuiTools Gui WidgetsTools Widgets LinguistTools REQUIRED) -+ find_package(Qt6 6.8.3 COMPONENTS CoreTools Core GuiTools Gui WidgetsTools Widgets LinguistTools REQUIRED) - - if(NOT WIN32 AND NOT APPLE) - if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0) diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/002-fix-qt-6.8-compat.patch b/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/002-fix-qt-6.8-compat.patch deleted file mode 100644 index ab2d2b1541f..00000000000 --- a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/patches/002-fix-qt-6.8-compat.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/pcsx2-qt/GameList/GameListWidget.cpp -+++ b/pcsx2-qt/GameList/GameListWidget.cpp -@@ -75,21 +75,36 @@ - - void setFilterType(GameList::EntryType type) - { -+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) - beginFilterChange(); - m_filter_type = type; - endFilterChange(Direction::Rows); -+#else -+ m_filter_type = type; -+ invalidateFilter(); -+#endif - } - void setFilterRegion(GameList::Region region) - { -+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) - beginFilterChange(); - m_filter_region = region; - endFilterChange(Direction::Rows); -+#else -+ m_filter_region = region; -+ invalidateFilter(); -+#endif - } - void setFilterName(const QString& name) - { -+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) - beginFilterChange(); - m_filter_name = name; - endFilterChange(Direction::Rows); -+#else -+ m_filter_name = name; -+ invalidateFilter(); -+#endif - } - - bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override diff --git a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/scripts/start_yaps2.sh b/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/scripts/start_yaps2.sh deleted file mode 100755 index 5e939f8fd32..00000000000 --- a/projects/ROCKNIX/packages/emulators/standalone/yaps2-sa/scripts/start_yaps2.sh +++ /dev/null @@ -1,222 +0,0 @@ -#!/bin/bash - -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2022-present JELOS (https://github.com/JustEnoughLinuxOS) - -. /etc/profile - -#Check if YAPS2 exists in .config -if [ ! -d "/storage/.config/YAPS2" ]; then - mkdir -p "/storage/.config/YAPS2" - cp -r "/usr/config/YAPS2" "/storage/.config/" -fi - -#Check if YAPS2 ini exists in .config -if [ ! -f "/storage/.config/YAPS2/inis/PCSX2.ini" ]; then - cp -r "/usr/config/YAPS2/inis/PCSX2.ini" "/storage/.config/YAPS2/inis/" -fi - -#Check if secrets ini exists in .config -if [ ! -f "/storage/.config/YAPS2/inis/secrets.ini" ]; then - cp -r "/usr/config/YAPS2/inis/secrets.ini" "/storage/.config/YAPS2/inis/" -fi - -#Make YAPS2 bios folder -if [ ! -d "/storage/roms/bios/ps2" ]; then - mkdir -p "/storage/roms/bios/ps2" -fi - -#Create PS2 savestates folder -if [ ! -d "/storage/roms/savestates/ps2" ]; then - mkdir -p "/storage/roms/savestates/ps2" -fi - -#Use a shared PS2 texture directory -mkdir -p "/storage/roms/ps2/textures" -sed -i '/^Textures =/c\Textures = /storage/roms/ps2/textures' /storage/.config/YAPS2/inis/PCSX2.ini - -#Emulation Station Features -GAME=$(echo "${1}"| sed "s#^/.*/##") -PLATFORM=$(echo "${2}"| sed "s#^/.*/##") -ASPECT=$(get_setting aspect_ratio "${PLATFORM}" "${GAME}") -FILTER=$(get_setting bilinear_filtering "${PLATFORM}" "${GAME}") -FPS=$(get_setting show_fps "${PLATFORM}" "${GAME}") -RATE=$(get_setting ee_cycle_rate "${PLATFORM}" "${GAME}") -SKIP=$(get_setting ee_cycle_skip "${PLATFORM}" "${GAME}") -HWDOWNLOAD=$(get_setting hw_download_mode "${PLATFORM}" "${GAME}") -GRENDERER=$(get_setting graphics_backend "${PLATFORM}" "${GAME}") -IRES=$(get_setting internal_resolution "${PLATFORM}" "${GAME}") -VSYNC=$(get_setting vsync "${PLATFORM}" "${GAME}") -ENABLE_WIDESCREEN_PATCHES=$(get_setting enable_widescreen_patches "${PLATFORM}" "${GAME}") - -#Set the cores to use -CORES=$(get_setting "cores" "${PLATFORM}" "${GAME}") -if [ "${CORES}" = "little" ] -then - EMUPERF="${SLOW_CORES}" -elif [ "${CORES}" = "big" ] -then - EMUPERF="${FAST_CORES}" -else - #All.. - unset EMUPERF -fi - - #Aspect Ratio - if [ "$ASPECT" = "0" ] - then - sed -i '/^AspectRatio =/c\AspectRatio = 4:3' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$ASPECT" = "1" ] - then - sed -i '/^AspectRatio =/c\AspectRatio = 16:9' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$ASPECT" = "2" ] - then - sed -i '/^AspectRatio =/c\AspectRatio = Stretch' /storage/.config/YAPS2/inis/PCSX2.ini - fi - - #Bilinear Filtering - if [ "$FILTER" = "0" ] - then - sed -i '/^filter =/c\filter = 0' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$FILTER" = "1" ] - then - sed -i '/^filter =/c\filter = 1' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$FILTER" = "2" ] - then - sed -i '/^filter =/c\filter = 2' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$FILTER" = "3" ] - then - sed -i '/^filter =/c\filter = 3' /storage/.config/YAPS2/inis/PCSX2.ini - fi - - #Graphics Backend - if [ "$GRENDERER" = "0" ] - then - sed -i '/^Renderer =/c\Renderer = -1' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$GRENDERER" = "1" ] - then - sed -i '/^Renderer =/c\Renderer = 12' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$GRENDERER" = "2" ] - then - sed -i '/^Renderer =/c\Renderer = 14' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$GRENDERER" = "3" ] - then - sed -i '/^Renderer =/c\Renderer = 13' /storage/.config/YAPS2/inis/PCSX2.ini - fi - - #Internal Resolution - if [ "$IRES" > "0" ] - then - sed -i "/^upscale_multiplier =/c\upscale_multiplier = $IRES" /storage/.config/YAPS2/inis/PCSX2.ini - else - sed -i '/^upscale_multiplier =/c\upscale_multiplier = 1' /storage/.config/YAPS2/inis/PCSX2.ini - fi - - #Show FPS - if [ "$FPS" = "false" ] - then - sed -i '/^OsdShowFPS =/c\OsdShowFPS = false' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$FPS" = "true" ] - then - sed -i '/^OsdShowFPS =/c\OsdShowFPS = true' /storage/.config/YAPS2/inis/PCSX2.ini - fi - - #EE Cycle Rate - sed -i '/^EECycleRate =/c\EECycleRate = 0' /storage/.config/YAPS2/inis/PCSX2.ini - if [ "$RATE" = "0" ] - then - sed -i '/^EECycleRate =/c\EECycleRate = -3' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$RATE" = "1" ] - then - sed -i '/^EECycleRate =/c\EECycleRate = -2' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$RATE" = "2" ] - then - sed -i '/^EECycleRate =/c\EECycleRate = -1' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$RATE" = "3" ] - then - sed -i '/^EECycleRate =/c\EECycleRate = 0' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$RATE" = "4" ] - then - sed -i '/^EECycleRate =/c\EECycleRate = 1' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$RATE" = "5" ] - then - sed -i '/^EECycleRate =/c\EECycleRate = 2' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$RATE" = "6" ] - then - sed -i '/^EECycleRate =/c\EECycleRate = 3' /storage/.config/YAPS2/inis/PCSX2.ini - fi - - #EE Cycle Skip - sed -i '/^EECycleSkip =/c\EECycleSkip = 0' /storage/.config/YAPS2/inis/PCSX2.ini - if [ "$SKIP" = "0" ] - then - sed -i '/^EECycleSkip =/c\EECycleSkip = 0' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$SKIP" = "1" ] - then - sed -i '/^EECycleSkip =/c\EECycleSkip = 1' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$SKIP" = "2" ] - then - sed -i '/^EECycleSkip =/c\EECycleSkip = 2' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$SKIP" = "3" ] - then - sed -i '/^EECycleSkip =/c\EECycleSkip = 3' /storage/.config/YAPS2/inis/PCSX2.ini - fi - -#HW download mode - sed -i '/^HWDownloadMode =/c\HWDownloadMode = 0' /storage/.config/YAPS2/inis/PCSX2.ini - if [ "$HWDOWNLOAD" = "0" ] - then - sed -i '/^HWDownloadMode =/c\HWDownloadMode = 0' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$HWDOWNLOAD" = "1" ] - then - sed -i '/^HWDownloadMode =/c\HWDownloadMode = 1' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$HWDOWNLOAD" = "2" ] - then - sed -i '/^HWDownloadMode =/c\HWDownloadMode = 2' /storage/.config/YAPS2/inis/PCSX2.ini - fi - if [ "$HWDOWNLOAD" = "3" ] - then - sed -i '/^HWDownloadMode =/c\HWDownloadMode = 3' /storage/.config/YAPS2/inis/PCSX2.ini - fi - -#Widescreen patches - if [ "$ENABLE_WIDESCREEN_PATCHES" = "true" ] - then - sed -i '/^EnableWideScreenPatches =/c\EnableWideScreenPatches = true' /storage/.config/YAPS2/inis/PCSX2.ini - else - sed -i '/^EnableWideScreenPatches =/c\EnableWideScreenPatches = false' /storage/.config/YAPS2/inis/PCSX2.ini - fi - -#Retroachievements - /usr/bin/cheevos_yaps2.sh - -#Graphic driver fixes -@GRAPHICS@ - -#Set QT enviornment to wayland - export QT_QPA_PLATFORM=wayland - -#Run YAPS2 emulator - export SDL_AUDIODRIVER=pulseaudio - set_kill set "-9 yaps2-qt" - ${EMUPERF} /usr/share/yaps2-sa/yaps2-qt -bigpicture -fullscreen "${1}" diff --git a/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/010-analog_sticks_led_control b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/010-analog_sticks_led_control new file mode 100755 index 00000000000..dad0e9ad8f9 --- /dev/null +++ b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/010-analog_sticks_led_control @@ -0,0 +1,7 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX) + +cat </storage/.config/profile.d/010-analog_sticks_led_control +DEVICE_ANALOG_STICKS_LED_CONTROL="true" +EOF diff --git a/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/040-headphone-mbhc-wake b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/040-headphone-mbhc-wake new file mode 100644 index 00000000000..d815d47ffb6 --- /dev/null +++ b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/040-headphone-mbhc-wake @@ -0,0 +1,41 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) +# +# 040-headphone-mbhc-wake โ€” KONKR Pocket FIT Elite +# +# Speaker audio on this board goes MI2S -> AW88261 amps, bypassing the WCD939x +# codec entirely, so the WCD's SoundWire bus clock-stops whenever no WCD audio +# is playing. In clock-stop the codec's MBHC can't deliver a 3.5mm jack +# insert/remove (the out-of-band SoundWire wake IRQ is not wired up on this +# SoC), so the jack is never detected while idle. +# +# Keep the two WCD SoundWire controllers runtime-active so the MBHC stays live +# and jack events are delivered immediately. Paired with kernel patch 0063 +# (route the WCD939x USBSS to audio on mechanical insert) this makes the +# integrated headphone jack detect and route on plug-in. Cost: the WCD bus +# idles powered (a few mW) instead of clock-stopping. +# +# This is the pragmatic workaround for the missing swr wake-IRQ delivery; the +# upstream-clean fix would wire that IRQ in drivers/soundwire/qcom.c. + +CTRLS="/sys/devices/platform/soc@0/6ad0000.soundwire /sys/devices/platform/soc@0/7630000.soundwire" + +# Wait for BOTH the controllers AND the WCD slaves to enumerate (the slaves +# appear ~15s in, after the codec binds โ€” pinning before they exist misses +# them and the bus still clock-stops), then pin everything on. +n=0 +while [ "$n" -lt 40 ]; do + have=1 + for c in $CTRLS; do [ -e "$c/power/control" ] || have=0; done + ls /sys/bus/soundwire/devices/sdw:*/power/control >/dev/null 2>&1 || have=0 + [ "$have" = 1 ] && break + sleep 1; n=$((n + 1)) +done + +for c in $CTRLS; do + [ -e "$c/power/control" ] && echo on > "$c/power/control" 2>/dev/null +done +for s in /sys/bus/soundwire/devices/sdw:*; do + [ -e "$s/power/control" ] && echo on > "$s/power/control" 2>/dev/null +done diff --git a/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/analog_sticks_ledcontrol b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/analog_sticks_ledcontrol new file mode 100755 index 00000000000..406d086e473 --- /dev/null +++ b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/analog_sticks_ledcontrol @@ -0,0 +1,40 @@ +#!/bin/sh + +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX) + +# Simple script to set led brightness and rgb color based on +# brightness and rgb values from emulation station +# +# The MCU lighting frame carries a single rgb triple that reaches both rings, so +# the konkr_sysbtn serdev driver registers them as one multicolor LED. Combine +# the per-stick colors emulation station sends channel-wise: equal colors pass +# through, and a color set on one stick alone still lights both rings. +# +# Brightness scales the channel intensities in the LED core, so a brightness of +# 0 turns the rings off. + +LED_PATH="/sys/class/leds/konkr:rgb:joysticks" + +max() { + if [ ${1} -gt ${2} ]; then + echo ${1} + else + echo ${2} + fi +} + +# Display usage if no parameters are provided +if [ $# -ne 7 ]; then + echo "Usage: $0 " + echo "Example: $0 255 255 0 0 255 0 0" + exit 1 +fi + +BRIGHTNESS=$1 +RED=$(max ${2} ${5}) +GREEN=$(max ${3} ${6}) +BLUE=$(max ${4} ${7}) + +echo ${RED} ${GREEN} ${BLUE} >${LED_PATH}/multi_intensity +echo ${BRIGHTNESS} >${LED_PATH}/brightness diff --git a/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/battery_led_status b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/battery_led_status new file mode 100755 index 00000000000..194de9b9c4f --- /dev/null +++ b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/battery_led_status @@ -0,0 +1,94 @@ +#!/bin/sh + +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX) + +# Color the analogue-stick rings by battery state while led.color is battery: +# discharging is green >40%, yellow >30%, orange >20%, red >10% and blinking red +# below that; charging is orange until 95%, then green. + +# Minimal OS variable loading for performance +. /etc/profile.d/001-functions + +BATTERY="/sys/class/power_supply/battery" + +function bat_led() { + /usr/bin/analog_sticks_ledcontrol 255 ${1} ${2} ${3} ${1} ${2} ${3} +} + +function bat_led_off() { /usr/bin/analog_sticks_ledcontrol 0 0 0 0 0 0 0; } +function bat_led_red() { bat_led 255 0 0; } +function bat_led_orange() { bat_led 255 20 0; } +function bat_led_yellow() { bat_led 255 125 0; } +function bat_led_green() { bat_led 0 255 0; } + +PREV_BATCAP="null" +while true +do + if [ ! "$(get_setting led.color)" == "battery" ]; then + break + fi + + CAP=$(cat ${BATTERY}/capacity 2>/dev/null) + STAT=$(cat ${BATTERY}/status 2>/dev/null) + + # qcom-battmgr answers with EAGAIN until the ADSP link is up, so wait for a + # usable reading instead of comparing empty values + case ${CAP} in + ''|*[!0-9]*) + sleep 5 + continue + ;; + esac + + if [ -z "${STAT}" ]; then + sleep 5 + continue + fi + + if [ "${STAT}" == "Discharging" ]; then + if (( ${CAP} <= 10 )); then + for ctr in $(seq 1 1 5) + do + bat_led_red + sleep .5 + bat_led_off + sleep .5 + done + continue + elif (( ${CAP} <= 20 )); then + BATCAP="D_RED" + if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then + bat_led_red + fi + elif (( ${CAP} <= 30 )); then + BATCAP="D_ORANGE" + if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then + bat_led_orange + fi + elif (( ${CAP} <= 40 )); then + BATCAP="D_YELLOW" + if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then + bat_led_yellow + fi + else + BATCAP="D_GREEN" + if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then + bat_led_green + fi + fi + elif (( ${CAP} <= 94 )); then + BATCAP="C_ORANGE" + if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then + bat_led_orange + fi + else + BATCAP="C_GREEN" + if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then + bat_led_green + fi + fi + + PREV_BATCAP=${BATCAP} + sleep 15 +done diff --git a/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/ledcontrol b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/ledcontrol new file mode 100755 index 00000000000..94b3a5d0475 --- /dev/null +++ b/projects/ROCKNIX/packages/hardware/quirks/devices/KONKR Pocket FIT Elite/bin/ledcontrol @@ -0,0 +1,48 @@ +#!/bin/sh + +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX) + +# The analogue-stick rings are this device's only LEDs, so the LED color modes +# drive them: off, the color picked in the analog sticks LED menu, or battery +# status. + +# Minimal OS variable loading for performance +. /etc/profile.d/001-functions + +function led_off() { + /usr/bin/analog_sticks_ledcontrol 0 0 0 0 0 0 0 +} + +function led_rgb() { + LEDS_CONFIG=$(get_setting analogsticks.led) + + if [ -n "${LEDS_CONFIG}" ]; then + /usr/bin/analog_sticks_ledcontrol ${LEDS_CONFIG} + fi +} + +case ${1} in + off) + led_off + set_setting led.color ${1} + ;; + rgb) + led_rgb + set_setting led.color ${1} + ;; + battery) + set_setting led.color ${1} + systemctl restart batteryledstatus.service + ;; + poweroff) + led_off + ;; + list) +cat </storage/.config/profile.d/009-serial-number-path +DEVICE_SERIAL_NUMBER_PATH=("/sys/devices/soc0/serial_number") +EOF diff --git a/projects/ROCKNIX/packages/hardware/quirks/platforms/SM8750/020-fan_control b/projects/ROCKNIX/packages/hardware/quirks/platforms/SM8750/020-fan_control index dca421551ef..b218394a447 100644 --- a/projects/ROCKNIX/packages/hardware/quirks/platforms/SM8750/020-fan_control +++ b/projects/ROCKNIX/packages/hardware/quirks/platforms/SM8750/020-fan_control @@ -7,7 +7,7 @@ DEVICE_TEMP_SENSOR="" for zone in /sys/devices/virtual/thermal/thermal_zone*/; do type=$(cat "${zone}type" 2>/dev/null) case "${type}" in - cpu-*|cpuss-*|gpuss-*) + cpu-*|cpuss-*|gpuss*) DEVICE_TEMP_SENSOR="${DEVICE_TEMP_SENSOR} ${zone}temp" ;; esac diff --git a/projects/ROCKNIX/packages/linux-firmware/extra-firmware/package.mk b/projects/ROCKNIX/packages/linux-firmware/extra-firmware/package.mk index abcd6e604f6..1b00a279881 100644 --- a/projects/ROCKNIX/packages/linux-firmware/extra-firmware/package.mk +++ b/projects/ROCKNIX/packages/linux-firmware/extra-firmware/package.mk @@ -2,7 +2,7 @@ # Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX) PKG_NAME="extra-firmware" -PKG_VERSION="99e17b0d20fe888ea3b4b100945724090533515f" +PKG_VERSION="7be445d29c0c8fb37ebe1aedc57225bfbfc41976" PKG_LICENSE="proprietary" PKG_SITE="https://github.com/ROCKNIX/extra-firmware" PKG_URL="https://github.com/ROCKNIX/extra-firmware/archive/${PKG_VERSION}.tar.gz" diff --git a/projects/ROCKNIX/packages/linux/package.mk b/projects/ROCKNIX/packages/linux/package.mk index 0ddc7fa8aa6..efa1ff7fce7 100644 --- a/projects/ROCKNIX/packages/linux/package.mk +++ b/projects/ROCKNIX/packages/linux/package.mk @@ -85,10 +85,17 @@ done if [ "${DEVICE}" = "RK3326" -o "${DEVICE}" = "RK3566" ]; then PKG_DEPENDS_UNPACK+=" generic-dsi" -elif [ "${DEVICE}" = "SM8250" -o "${DEVICE}" = "H700" ]; then +elif [ "${DEVICE}" = "SM8250" -o "${DEVICE}" = "H700" -o "${DEVICE}" = "SM8650" -o "${DEVICE}" = "SM8750" ]; then PKG_DEPENDS_UNPACK+=" kernel-firmware" fi +# SM8750 builds the board audio topology and the speaker-amp calibration blob +# into the kernel, so the firmware package must be unpacked before the kernel +# is built. +if [ "${DEVICE}" = "SM8750" ]; then + PKG_DEPENDS_UNPACK+=" extra-firmware" +fi + post_patch() { # linux was already built and its build dir autoremoved - prepare it again for kernel packages if [ -d ${PKG_INSTALL}/.image ]; then @@ -256,6 +263,19 @@ pre_make_target() { mkdir -p ${PKG_BUILD}/external-firmware/qcom/sm8750 cp -Lv $(get_build_dir kernel-firmware)/.copied-firmware/qcom/sm8750/gen80000_zap.mbn ${PKG_BUILD}/external-firmware/qcom/sm8750 + # KONKR Pocket FIT Elite: AW88261 speaker-amp ACF (vendor cal/profile blob, + # extracted from the stock Android image). The aw88261 driver requests the + # blob; the amp nodes point at it with firmware-name. Built-in so the codec + # probe never depends on the rootfs firmware overlay. + mkdir -p ${PKG_BUILD}/external-firmware/qcom/sm8750/konkr/pfe + cp -Lv $(get_build_dir extra-firmware)/SM8750/qcom/sm8750/konkr/pfe/aw88261_acf.bin ${PKG_BUILD}/external-firmware/qcom/sm8750/konkr/pfe + + # KONKR Pocket FIT Elite: QUAT-MI2S audio topology (the AYN tplg with its + # MI2S backend retargeted SECONDARY->QUATERNARY โ€” the konkr's speaker amps + # are on QUATERNARY MI2S). Built-in firmware is searched before the rootfs, + # so this also overrides any stale copy in the SYSTEM overlay. + cp -Lv $(get_build_dir extra-firmware)/SM8750/qcom/sm8750/SM8750-KONKR-tplg.bin ${PKG_BUILD}/external-firmware/qcom/sm8750 + FW_LIST="$(find ${PKG_BUILD}/external-firmware -type f | sed 's|.*external-firmware/||' | sort | xargs)" ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE "${FW_LIST}" diff --git a/projects/ROCKNIX/packages/misc/modules/sources/gamelist.xml b/projects/ROCKNIX/packages/misc/modules/sources/gamelist.xml index 3e7de4ff268..d3a6db81bfd 100644 --- a/projects/ROCKNIX/packages/misc/modules/sources/gamelist.xml +++ b/projects/ROCKNIX/packages/misc/modules/sources/gamelist.xml @@ -312,9 +312,9 @@ ./images/moonlight.svg - ./Start YAPS2.sh - YAPS2 ์‹คํ–‰ - YAPS2 GUI(PS2)๋ฅผ ์—ด์–ด ์ „์—ญ ๊ตฌ์„ฑ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์—๋ฎฌ๋ ˆ์ดํ„ฐ์— ์ง์ ‘ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์„ค์ •์„ ์ˆ˜์ •ํ•˜๋ ค๋ฉด ๋งˆ์šฐ์Šค์™€ ํ‚ค๋ณด๋“œ๋ฅผ ์ค€๋น„ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. YAPS2๋Š” ๋ฌด๋ฃŒ ์˜คํ”ˆ ์†Œ์Šค PlayStation 2(PS2) ์—๋ฎฌ๋ ˆ์ดํ„ฐ์ž…๋‹ˆ๋‹ค. ๊ทธ ๋ชฉ์ ์€ MIPS CPU ์ธํ„ฐํ”„๋ฆฌํ„ฐ, ๋ฆฌ์ปดํŒŒ์ผ๋Ÿฌ ๋ฐ ํ•˜๋“œ์›จ์–ด ์ƒํƒœ์™€ PS2 ์‹œ์Šคํ…œ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ€์ƒ ๋จธ์‹ ์˜ ์กฐํ•ฉ์„ ์‚ฌ์šฉํ•˜์—ฌ PS2์˜ ํ•˜๋“œ์›จ์–ด๋ฅผ ์—๋ฎฌ๋ ˆ์ดํŠธํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. + ./Start ARMSX2.sh + ARMSX2 ์‹คํ–‰ + ARMSX2 GUI(PS2)๋ฅผ ์—ด์–ด ์ „์—ญ ๊ตฌ์„ฑ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์—๋ฎฌ๋ ˆ์ดํ„ฐ์— ์ง์ ‘ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์„ค์ •์„ ์ˆ˜์ •ํ•˜๋ ค๋ฉด ๋งˆ์šฐ์Šค์™€ ํ‚ค๋ณด๋“œ๋ฅผ ์ค€๋น„ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ARMSX2๋Š” ๋ฌด๋ฃŒ ์˜คํ”ˆ ์†Œ์Šค PlayStation 2(PS2) ์—๋ฎฌ๋ ˆ์ดํ„ฐ์ž…๋‹ˆ๋‹ค. ๊ทธ ๋ชฉ์ ์€ MIPS CPU ์ธํ„ฐํ”„๋ฆฌํ„ฐ, ๋ฆฌ์ปดํŒŒ์ผ๋Ÿฌ ๋ฐ ํ•˜๋“œ์›จ์–ด ์ƒํƒœ์™€ PS2 ์‹œ์Šคํ…œ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ€์ƒ ๋จธ์‹ ์˜ ์กฐํ•ฉ์„ ์‚ฌ์šฉํ•˜์—ฌ PS2์˜ ํ•˜๋“œ์›จ์–ด๋ฅผ ์—๋ฎฌ๋ ˆ์ดํŠธํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ROCKNIX ROCKNIX 5.0 diff --git a/projects/ROCKNIX/packages/rocknix/sources/post-update b/projects/ROCKNIX/packages/rocknix/sources/post-update index 1493b038d47..efae74ab355 100644 --- a/projects/ROCKNIX/packages/rocknix/sources/post-update +++ b/projects/ROCKNIX/packages/rocknix/sources/post-update @@ -110,136 +110,7 @@ fi ### Add items below this line that are safe to remove after a period of time. ################################################################################ -if echo ${HW_DEVICE} | grep -E 'H700'; then - rsync -a /usr/config/ppsspp /storage/.config/ - rsync -a /usr/config/flycast /storage/.config/ -fi - -if echo ${HW_DEVICE} | grep -E 'H700'; then - sed -i '/menu_scale_factor =/c\menu_scale_factor = "0.74"' /storage/.config/retroarch/retroarch.cfg - sed -i '/menu_widget_scale_factor =/c\menu_widget_scale_factor = "1.000000"' /storage/.config/retroarch/retroarch.cfg -fi - -if echo ${HW_DEVICE} | grep -E 'RK3326|RK3399|RK3576|RK3588|S922X|SM6115|SM8250|SM8550|SM8650|SM8750'; then - sed -i '/menu_scale_factor =/c\menu_scale_factor = "0.74"' /storage/.config/retroarch/retroarch.cfg - sed -i '/menu_widget_scale_factor =/c\menu_widget_scale_factor = "0.88"' /storage/.config/retroarch/retroarch.cfg -fi - -if echo ${HW_DEVICE} | grep -E 'RK3566'; then - sed -i '/menu_scale_factor =/c\menu_scale_factor = "0.86"' /storage/.config/retroarch/retroarch.cfg - sed -i '/menu_widget_scale_factor =/c\menu_widget_scale_factor = "0.88"' /storage/.config/retroarch/retroarch.cfg -fi - -# run the idtech script on update if folder does not exist -if [ ! -d "/storage/.config/idtech" ]; then - /usr/bin/generate-idtech.sh -fi - -# Clean up Dolphin -rm -r /storage/.config/dolphin-emu/GC -cp -rf /usr/config/dolphin-emu /storage/.config/ - -# Remove gamepad overlays -rm -r /tmp/overlays/gamepads - -# Clean hypseus/daphne mapping so the correct gets applied -if echo ${QUIRK_DEVICE} | grep ARC; then - rm /storage/.config/game/configs/hypseus/hypinput.ini -fi - -# Clean old dtb-overlays, they have been renamed to dtbo -if [ "${HW_DEVICE}" = "RK3566" ] && \ - [ $(ls -1 /flash/overlays/rk3566-undervolt-cpu*.dtb | wc -l) != 0 ]; then - mount -o remount,rw /flash - rm /flash/overlays/rk3566-undervolt-cpu*.dtb - sed -i '/FDTOVERLAYS/s/.dtb/.dtbo/g' /flash/extlinux/extlinux.conf - sed -i '/FDTOVERLAYS/s/.dtboo/.dtbo/g' /flash/extlinux/extlinux.conf - mount -o remount,ro /flash -fi - -if [ "$(uname -m)" = "aarch64" ] && \ - [ ! -d "/storage/roms/savestates/saturn/yabasanshiro" ]; then - mkdir "/storage/roms/savestates/saturn/yabasanshiro" - cp /storage/.config/yabasanshiro/*.yss /storage/roms/savestates/saturn/yabasanshiro/ - cp /storage/.config/yabasanshiro/*.png /storage/roms/savestates/saturn/yabasanshiro/ -fi - -# Rename network.enabled to wifi.enabled -sed -i 's/network.enabled/wifi.enabled/g' /storage/.config/system/configs/system.cfg - -# Add skip IPL/bios option tol dolphin config -DINI=/storage/.config/dolphin-emu/Dolphin.ini -grep -q "SkipIPL" "$DINI" -if [ $? -ne 0 ]; then - sed -i "/\[Core\]/a SkipIPL = True" $DINI -fi - -# Fix GUID Arc -if echo ${QUIRK_DEVICE} | grep ARC; then - for file in "\ - /storage/.config/emulationstation/es_input.cfg \ - /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt \ - /storage/.config/yabasanshiro/input.cfg \ - /storage/.config/yabasanshiro/keymapv2.json \ - yabasanshiro/devices/keymapv2_rg_arc_joypad.json"; do - sed -i "s/1900d632010000000100000000010000/1900d632010000002c0a000000010000/g" $file - done -fi - -# Fix GUID R33s -if echo ${QUIRK_DEVICE} | grep R33S; then - for file in "\ - /storage/.config/emulationstation/es_input.cfg \ - /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt \ - /storage/.config/yabasanshiro/input.cfg \ - /storage/.config/yabasanshiro/keymapv2.json \ - yabasanshiro/devices/keymapv2_rg_arc_joypad.json"; do - sed -i "s/190014b3010000009178000000050000/190014b301000000a20a000000010000/g" $file - done -fi - -# set the default global.bezel if it doesn't already exist -grep -q "^global\.bezel=" /storage/.config/system/configs/system.cfg || - sed -i '$ a\global.bezel=thebezelproject' /storage/.config/system/configs/system.cfg - -# Clean RGB10X mupen64plus-sa config -if echo ${QUIRK_DEVICE} | grep RGB10X; then - rm -rf /storage/.config/mupen64plus -fi - -if [ ! -d "/storage/.config/mednafen/mednafen.cfg" ]; then - # Don't load cd images to RAM, doesn't work with CHD or is at least very slow on rk3566 - sed -i "s/cd.image_memcache 1/cd.image_memcache 0/" /storage/.config/mednafen/mednafen.cfg -fi - -# Make sure we are using the latest gamecontrollerdb file -cp -r "/usr/config/SDL-GameControllerDB/gamecontrollerdb.txt" "/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt" - -# Duckstation Qt -if [ -e "/storage/.config/duckstation/settings.ini" ]; then - # don't ask to create a desktop shortcut - grep -q "^NoDesktopFile =" /storage/.config/duckstation/settings.ini || - sed -i '/\[Main\]/a\NoDesktopFile = true' /storage/.config/duckstation/settings.ini - # no confirmation popup - sed -i 's/ConfirmPowerOff = true/ConfirmPowerOff = false/' /storage/.config/duckstation/settings.ini -fi - -# Delete ares config file -rm -rf /storage/.config/ares/settings.* - -# Delete gopher64 config file -rm -rf /storage/.config/gopher64/config.json - -# Set the flag to enable fake suspend if it doesn't already exist -grep -q "^system\.suspend\.enable=" /storage/.config/system/configs/system.cfg || - sed -i '$ a\system.suspend.enable=1' /storage/.config/system/configs/system.cfg - -# Set the flag to enable timed shutdown after suspend if it doesn't already exist -grep -q "^system\.suspend\.enable_timed_shutdown=" /storage/.config/system/configs/system.cfg || - sed -i '$ a\system.suspend.enable_timed_shutdown=1' /storage/.config/system/configs/system.cfg - -# Clear stale suspend-disable config left by older SM6115 builds -if echo ${HW_DEVICE} | grep -qE 'SM6115' && [ -f /storage/.config/logind.conf.d/login.conf ]; then - rm -f /storage/.config/logind.conf.d/login.conf - /usr/bin/suspendmode mem +# Copy aethersx2 bios files for armsx2 for convenience +if [ -d "/storage/roms/bios/aethersx2/bios" ] && [ ! -d "/storage/roms/bios/armsx2" ]; then + cp -rf /storage/roms/bios/aethersx2/bios /storage/roms/bios/armsx2 fi diff --git a/projects/ROCKNIX/packages/ui/emulationstation/config/common/es_features.cfg b/projects/ROCKNIX/packages/ui/emulationstation/config/common/es_features.cfg index ffa4767e4ec..ee54eb1a092 100644 --- a/projects/ROCKNIX/packages/ui/emulationstation/config/common/es_features.cfg +++ b/projects/ROCKNIX/packages/ui/emulationstation/config/common/es_features.cfg @@ -1232,9 +1232,9 @@ - + - + diff --git a/projects/ROCKNIX/packages/virtual/emulators/package.mk b/projects/ROCKNIX/packages/virtual/emulators/package.mk index 92f54bcc721..af93d1e2ab7 100644 --- a/projects/ROCKNIX/packages/virtual/emulators/package.mk +++ b/projects/ROCKNIX/packages/virtual/emulators/package.mk @@ -56,44 +56,44 @@ case "${DEVICE}" in RK3576) [ "${ENABLE_32BIT}" == "true" ] && EMUS_32BIT="box86 desmume-lr gpsp-lr pcsx_rearmed-lr" PKG_DEPENDS_TARGET+=" common-shaders glsl-shaders" - PKG_EMUS+=" aethersx2-sa armsx2-sa azahar-sa dolphin-sa drastic-sa mednafen melonds-sa vita3k-sa yaps2-sa" + PKG_EMUS+=" aethersx2-sa armsx2-sa azahar-sa dolphin-sa drastic-sa mednafen melonds-sa vita3k-sa" LIBRETRO_CORES+=" dolphin-lr" ;; RK3588) [ "${ENABLE_32BIT}" == "true" ] && EMUS_32BIT="box86 desmume-lr gpsp-lr pcsx_rearmed-lr" - PKG_EMUS+=" aethersx2-sa azahar-sa dolphin-sa drastic-sa mednafen melonds-sa supermodel-sa vita3k-sa" + PKG_EMUS+=" aethersx2-sa armsx2-sa azahar-sa dolphin-sa drastic-sa mednafen melonds-sa supermodel-sa vita3k-sa" LIBRETRO_CORES+=" beetle-psx-lr beetle-saturn-lr bsnes-lr bsnes-hd-lr dolphin-lr" ;; SM6115) [ "${ENABLE_32BIT}" == "true" ] && EMUS_32BIT="box86 desmume-lr gpsp-lr pcsx_rearmed-lr" - PKG_EMUS+=" aethersx2-sa azahar-sa dolphin-sa drastic-sa mednafen melonds-sa supermodel-sa vita3k-sa yaps2-sa" + PKG_EMUS+=" aethersx2-sa armsx2-sa azahar-sa dolphin-sa drastic-sa mednafen melonds-sa supermodel-sa vita3k-sa" LIBRETRO_CORES+=" beetle-psx-lr beetle-saturn-lr bsnes-lr bsnes-hd-lr dolphin-lr" ;; SM8250) [ "${ENABLE_32BIT}" == "true" ] && EMUS_32BIT="box86 daedalusx64-sa desmume-lr gpsp-lr pcsx_rearmed-lr" PKG_EMUS+=" aethersx2-sa armsx2-sa azahar-sa bigpemu-sa cemu-sa dolphin-sa heroic mednafen melonds-sa nanoboyadvance-sa rpcs3-sa supermodel-sa \ - xemu-sa skyemu-sa steam vita3k-sa eden-sa yaps2-sa" + xemu-sa skyemu-sa steam vita3k-sa eden-sa" LIBRETRO_CORES+=" beetle-psx-lr beetle-saturn-lr bsnes-lr bsnes-hd-lr dolphin-lr kronos-lr" ;; SM8550) [ "${ENABLE_32BIT}" == "true" ] && EMUS_32BIT="box86 daedalusx64-sa desmume-lr gpsp-lr pcsx_rearmed-lr" PKG_EMUS+=" aethersx2-sa ares-sa armsx2-sa azahar-sa bigpemu-sa cemu-sa dolphin-sa drastic-sa gopher64-sa heroic mednafen melonds-sa nanoboyadvance-sa rpcs3-sa supermodel-sa \ - xemu-sa skyemu-sa steam vita3k-sa eden-sa yaps2-sa" + xemu-sa skyemu-sa steam vita3k-sa eden-sa" LIBRETRO_CORES+=" beetle-psx-lr beetle-saturn-lr bsnes-lr bsnes-hd-lr dolphin-lr kronos-lr" ;; SM8650|SM8750) PKG_EMUS+=" aethersx2-sa ares-sa armsx2-sa azahar-sa bigpemu-sa cemu-sa dolphin-sa gopher64-sa heroic mednafen melonds-sa nanoboyadvance-sa rpcs3-sa supermodel-sa \ - xemu-sa skyemu-sa steam vita3k-sa eden-sa yaps2-sa" + xemu-sa skyemu-sa steam vita3k-sa eden-sa" LIBRETRO_CORES+=" beetle-psx-lr beetle-saturn-lr bsnes-lr bsnes-hd-lr dolphin-lr kronos-lr" ;; S922X) [ "${ENABLE_32BIT}" == "true" ] && EMUS_32BIT="box86 pcsx_rearmed-lr" - PKG_EMUS+=" aethersx2-sa azahar-sa dolphin-sa drastic-sa duckstation-sa melonds-sa vita3k-sa yaps2-sa" + PKG_EMUS+=" aethersx2-sa azahar-sa dolphin-sa drastic-sa duckstation-sa melonds-sa vita3k-sa armsx2-sa" LIBRETRO_CORES+=" beetle-psx-lr beetle-saturn-lr bsnes-lr bsnes-hd-lr dolphin-lr" ;; AMD64) PKG_EMUS+=" ares-sa azahar-sa cemu-sa dolphin-sa gopher64-sa mednafen melonds-sa nanoboyadvance-sa \ - xemu-sa skyemu-sa vita3k-sa yaps2-sa" + xemu-sa skyemu-sa vita3k-sa armsx2-sa" LIBRETRO_CORES+=" beetle-psx-lr beetle-saturn-lr bsnes-lr bsnes-hd-lr dolphin-lr" esac @@ -1196,17 +1196,15 @@ makeinstall_target() { ### Sony Playstation 2 case ${DEVICE} in AMD64) - add_emu_core ps2 yaps2 yaps2-sa true - install_script "Start YAPS2.sh" + add_emu_core ps2 armsx2 armsx2-sa true + install_script "Start ARMSX2.sh" add_es_system ps2 ;; RK3399|RK3576|RK3566|RK3588|SM6115|SM8250|SM8550|SM8650|SM8750|S922X) add_emu_core ps2 aethersx2 aethersx2-sa true case ${DEVICE} in S922X|RK3576|SM6115|SM8250|SM8550|SM8650|SM8750) - add_emu_core ps2 yaps2 yaps2-sa false add_emu_core ps2 armsx2 armsx2-sa false - install_script "Start YAPS2.sh" install_script "Start ARMSX2.sh" ;; esac @@ -1218,6 +1216,7 @@ makeinstall_target() { + ### Sony Playstation 3 case ${DEVICE} in SM8250|SM8550|SM8650|SM8750) diff --git a/projects/ROCKNIX/packages/virtual/emulators/sources/Start ARMSX2.sh b/projects/ROCKNIX/packages/virtual/emulators/sources/Start ARMSX2.sh index 46fef42eb23..e6c3dbcd13c 100644 --- a/projects/ROCKNIX/packages/virtual/emulators/sources/Start ARMSX2.sh +++ b/projects/ROCKNIX/packages/virtual/emulators/sources/Start ARMSX2.sh @@ -7,16 +7,19 @@ source /etc/profile DATA_ROOT="/storage/.config/ARMSX2" mkdir -p "${DATA_ROOT}/inis" -if [ ! -f "${DATA_ROOT}/inis/PCSX2.ini" ] || \ - ! grep -q '^SettingsVersion = 1$' "${DATA_ROOT}/inis/PCSX2.ini"; then - cp -f /usr/config/ARMSX2/inis/PCSX2.ini "${DATA_ROOT}/inis/PCSX2.ini" +if [ ! -f "${DATA_ROOT}/inis/PCSX2.ini" ]; then + cp -r /usr/config/ARMSX2/inis/PCSX2.ini "${DATA_ROOT}/inis/PCSX2.ini" +fi + +if [ ! -f "${DATA_ROOT}/inis/secrets.ini" ]; then + cp -r /usr/config/ARMSX2/inis/secrets.ini "${DATA_ROOT}/inis/secrets.ini" fi mkdir -p /storage/roms/bios/ps2 mkdir -p /storage/roms/savestates/ps2 mkdir -p /storage/roms/ps2/textures sed -i '/^Textures =/c\Textures = /storage/roms/ps2/textures' "${DATA_ROOT}/inis/PCSX2.ini" -ln -sf /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt "${DATA_ROOT}/game_controller_db.txt" +ln -sf /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt "${DATA_ROOT}/game_controller_db.txt" 2>/dev/null set_kill set "armsx2-qt" export QT_QPA_PLATFORM=wayland diff --git a/projects/ROCKNIX/packages/virtual/emulators/sources/Start YAPS2.sh b/projects/ROCKNIX/packages/virtual/emulators/sources/Start YAPS2.sh deleted file mode 100755 index 10c738d0c63..00000000000 --- a/projects/ROCKNIX/packages/virtual/emulators/sources/Start YAPS2.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) - -source /etc/profile - -#Check if YAPS2 exists in .config -if [ ! -d "/storage/.config/YAPS2" ]; then - mkdir -p "/storage/.config/YAPS2" - cp -r "/usr/config/YAPS2" "/storage/.config/" -fi - -if [ ! -f "/storage/.config/YAPS2/inis/PCSX2.ini" ]; then - mkdir -p "/storage/.config/YAPS2/inis" - cp -f "/usr/config/YAPS2/inis/PCSX2.ini" "/storage/.config/YAPS2/inis/" -fi - -#Make YAPS2 bios folder -if [ ! -d "/storage/roms/bios/ps2" ]; then - mkdir -p "/storage/roms/bios/ps2" -fi - -mkdir -p "/storage/roms/ps2/textures" -sed -i '/^Textures =/c\Textures = /storage/roms/ps2/textures' /storage/.config/YAPS2/inis/PCSX2.ini - -set_kill set "yaps2-qt" - -#Set OpenGL 3.3 on panfrost - export MESA_GL_VERSION_OVERRIDE=3.3 - export MESA_GLSL_VERSION_OVERRIDE=330 - -#Set QT enviornment to wayland - export QT_QPA_PLATFORM=wayland - -sway_fullscreen "yaps2-qt" & - -/usr/share/yaps2-sa/yaps2-qt >/dev/null 2>&1 diff --git a/sdoj.md b/sdoj.md new file mode 100644 index 00000000000..0b91d69159d --- /dev/null +++ b/sdoj.md @@ -0,0 +1,65 @@ +# SDOJ Recomp (DoDonPachi Saidaioujou Recompiled) - ROCKNIX SM8550 ์ด์‹ ๋ฐ ์˜ค๋ฅ˜ ์ˆ˜์ • ๋ณด๊ณ ์„œ + +## 1. ๊ฐœ์š” (Overview) +- **๋Œ€์ƒ ๊ธฐ๊ธฐ ๋ฐ OS**: ROCKNIX OS / SM8550 (Snapdragon 8 Gen 2 / Adreno 740, ARM64) +- **๊ทธ๋ž˜ํ”ฝ ๋“œ๋ผ์ด๋ฒ„**: Mesa Turnip (Adreno 740, Vulkan 1.4 API) +- **ํŒจํ‚ค์ง€ ์œ„์น˜**: `projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/` + +--- + +## 2. ๋ฐœ์ƒํ•œ ์ฃผ์š” ์˜ค๋ฅ˜ ๋ฐ ์›์ธ ๋ถ„์„ (Issues & Root Causes) + +### Issue 1. ๊ณต์œ  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ(`*.so`) ์„ค์น˜ ๋ˆ„๋ฝ +- **ํ˜„์ƒ**: ๊ฒŒ์ž„ ์‹คํ–‰ ์‹œ `librexruntime.so` ๋ฐ `libsaidaioujou_recomp_tu1_*.so` ๋™์  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์–ด ๋Ÿฐํƒ€์ž„ ์‹œ์ž‘ ์‹คํŒจ. +- **์›์ธ**: `package.mk`์˜ `makeinstall_target()` ๊ตฌ๋ฌธ์—์„œ ํŒจํ‚ค์ง€ ๋นŒ๋“œ ํ›„ ๋งํ‚นํ•  ๋™์  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ณต์‚ฌ ๋ช…๋ น์–ด(`cp -P *.so*`)๊ฐ€ ๋ˆ„๋ฝ๋จ. + +### Issue 2. GTK / Vulkan ๋””์Šคํ”Œ๋ ˆ์ด ์„œํŽ˜์ด์Šค ์ƒ์„ฑ ์‹คํŒจ (`GDK_BACKEND=wayland`) +- **ํ˜„์ƒ**: ํ„ฐ๋ฏธ๋„ ์ถœ๋ ฅ์— `GTKWindow: The window system of the GTK window is not supported by Xenia` ์—๋Ÿฌ ์ถœ๋ ฅ ๋ฐ ํ™”๋ฉด ๋ถˆ์ถœ๋ ฅ. +- **์›์ธ**: ReXGlue SDK์˜ Linux Windowing ์‹œ์Šคํ…œ(`window_gtk.cpp`, `vulkan_presenter.cpp`)์€ ์˜ค์ง **X11 (`VK_KHR_xcb_surface`)** ์„œํŽ˜์ด์Šค๋งŒ ์ง€์›ํ•จ. SSH ์—ฐ๊ฒฐ ์‹คํ–‰ ํ™˜๊ฒฝ์—์„œ `DISPLAY` ํ™˜๊ฒฝ๋ณ€์ˆ˜๊ฐ€ ๋น„์–ด์žˆ์–ด GTK๊ฐ€ Wayland๋กœ ์ž‘๋™์„ ์‹œ๋„ํ•˜๋ฉฐ `nullptr` ์„œํŽ˜์ด์Šค๋ฅผ ๋ฐ˜ํ™˜ํ•จ. + +### Issue 3. Mesa Turnip ๋“œ๋ผ์ด๋ฒ„ `fmadz` ์…ฐ์ด๋” ์ปดํŒŒ์ผ๋Ÿฌ ์ค‘๋‹จ (Crash) +- **ํ˜„์ƒ**: + ```text + div 32 %632 = fmadz %181, %623, %690.y // exact, preserve:sz,inf,nan Unhandled ALU op: fmadz + ``` +- **์›์ธ**: ReXGlue `spirv_translator_alu.cpp`์˜ `ZeroIfAnyOperandIsZero()` ํ•จ์ˆ˜๊ฐ€ ์ƒ์„ฑํ•˜๋Š” SPIR-V `GLSLstd450NMin(abs(a), abs(b)) == 0` ๊ตฌ๋ฌธ์„ Mesa NIR ๋Œ€์ˆ˜ ์ตœ์ ํ™” ํŒจ์Šค๊ฐ€ NIR `fmadz` ์—ฐ์‚ฐ์ž๋กœ ๋ณ‘ํ•ฉํ•จ. Mesa Turnip(Adreno ir3) ๋“œ๋ผ์ด๋ฒ„์— `fmadz` ๋Œ€์‘ ์ฝ”๋“œ๊ฐ€ ์—†์–ด ์…ฐ์ด๋” ์ปดํŒŒ์ผ ์‹คํŒจ ๋ฐ abort ๋ฐœ์ƒ. + +### Issue 4. ๋ฒ„ํ…์Šค ์…ฐ์ด๋” ํŒŒ์ดํ”„๋ผ์ธ ๋ฌดํ•œ ๋Œ€๊ธฐ (๊ฒ€์€ ํ™”๋ฉด ๋ฉˆ์ถค) +- **ํ˜„์ƒ**: `Creating graphics pipeline state with VS 2EF78F7D2D666746` ๋กœ๊ทธ ์ถœ๋ ฅ ํ›„ ํ”„๋กœ์„ธ์Šค๋Š” ์‚ด์•„์žˆ์œผ๋‚˜ ํ™”๋ฉด/์‚ฌ์šด๋“œ ์‘๋‹ต ์—†์Œ. +- **์›์ธ**: Mesa Turnip ๋“œ๋ผ์ด๋ฒ„์—์„œ Vulkan ๋ถ€๋™์†Œ์ˆ˜์  ์ •๋ฐ€๋„ ์œ ์ง€ ์˜ต์…˜์ธ `shaderSignedZeroInfNanPreserveFloat32` ํ™œ์„ฑํ™” ์‹œ ํŠน์ • ๋ฒ„ํ…์Šค ์…ฐ์ด๋” ํŒŒ์ดํ”„๋ผ์ธ ์ƒ์„ฑ ์‹œ ๋ฐฑ๊ทธ๋ผ์šด๋“œ ์Šค๋ ˆ๋“œ๊ฐ€ ๋ฌดํ•œ ๋Œ€๊ธฐ(Stuck)์— ๋น ์ง. + +### Issue 5. ์œ ํšจํ•˜์ง€ ์•Š์€ SPIR-V ์…ฐ์ด๋” ์—ฐ์‚ฐ์ž๋กœ ์ธํ•œ ๋ Œ๋”๋ง ๋“œ๋กญ +- **ํ˜„์ƒ**: ํ”„๋กœ๊ทธ๋žจ ๊ตฌ๋™ ํ›„ ์‚ฌ์šด๋“œ์™€ ํ™”๋ฉด์ด ๋‚˜์˜ค์ง€ ์•Š๊ณ  ๊ฒ€์€ ํ™”๋ฉด ์ง€์†. +- **์›์ธ**: `ZeroIfAnyOperandIsZero()` ์šฐํšŒ ํŒจ์น˜ ์ค‘ ์ž„์‹œ๋กœ ์ ์šฉํ–ˆ๋˜ `GLSLstd450FClamp` ํ•จ์ˆ˜๊ฐ€ 3๊ฐœ ์ธ์ž๋ฅผ ์š”๊ตฌํ•จ์—๋„ 2๊ฐœ ์ธ์ž๋งŒ ์ „๋‹ฌ๋˜์–ด ์œ ํšจํ•˜์ง€ ์•Š์€(Invalid) SPIR-V๊ฐ€ ๋นŒ๋“œ๋˜์–ด Vulkan ํŒŒ์ดํ”„๋ผ์ธ ๋ Œ๋”๋ง์ด ์กฐ๊ธฐ ์ทจ์†Œ๋จ. + +--- + +## 3. ์ ์šฉ๋œ ์ตœ์ข… ์ˆ˜์ • ํŒจ์น˜ (Final Applied Solutions) + +### 1) ํŒจํ‚ค์ง€ ๋นŒ๋“œ ์Šคํฌ๋ฆฝํŠธ ์ˆ˜์ • ([package.mk](file:///home/aleksei/ROCKNIX/projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/package.mk)) +- **๋™์  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜ ๊ตฌ๋ฌธ ์ถ”๊ฐ€**: `makeinstall_target()`์— `librexruntime.so`, `libTracyClient.so`, `libsaidaioujou_recomp_tu1_*.so` ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ `/usr/lib/` ๋””๋ ‰ํ† ๋ฆฌ๋กœ ๋ฐฐ์น˜ํ•˜๋„๋ก ์ˆ˜์ •. +- **Mesa Turnip ๋ถ€๋™์†Œ์ˆ˜์  ๋ฒ„๊ทธ ํŒจ์น˜**: + `vulkan_device.cpp`์— ํŒจ์น˜๋ฅผ ์ ์šฉํ•˜์—ฌ Mesa Turnip ๋“œ๋ผ์ด๋ฒ„ ๊ฐ์ง€ ์‹œ `shaderSignedZeroInfNanPreserveFloat32 = false`๋กœ ๋ณ€๊ฒฝํ•จ์œผ๋กœ์จ ๋ฐฑ๊ทธ๋ผ์šด๋“œ ์…ฐ์ด๋” ๋ฌดํ•œ ๋Œ€๊ธฐ ํ•ด๊ฒฐ. +- **`fmadz` ๋ฌด๋ ฅํ™” ๋ฐ ํ‘œ์ค€ SPIR-V 2-Operand ๊ณฑ์…ˆ ์—ฐ์‚ฐ์ž ์ ์šฉ**: + `spirv_translator_alu.cpp`์˜ `ZeroIfAnyOperandIsZero()` ํ•จ์ˆ˜๋ฅผ ํ‘œ์ค€ SPIR-V ๊ณฑ์…ˆ ์—ฐ์‚ฐ์ž์ธ `spv::OpFMul` (`builder_->createBinOp(spv::OpFMul, ...)`)๋กœ ์น˜ํ™˜. + - Mesa NIR์˜ `fmadz` ํ•ฉ์„ฑ ํŒจํ„ด ์˜ค์ž‘๋™ ๋ฐฉ์ง€. + - 2๊ฐœ ์ธ์ž๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์˜ฌ๋ฐ”๋ฅธ SPIR-V ๊ทœ๊ฒฉ ์ƒ์„ฑ ๋ณด์žฅ. + +### 2) ๋Ÿฐ์ฒ˜ ์Šคํฌ๋ฆฝํŠธ ์ˆ˜์ • ([start_sdoj_recomp.sh](file:///home/aleksei/ROCKNIX/projects/ROCKNIX/packages/emulators/standalone/sdoj-recomp-sa/scripts/start_sdoj_recomp.sh)) +- `export LD_LIBRARY_PATH="${GAME_DATA}:/usr/lib:${LD_LIBRARY_PATH}"` ์ถ”๊ฐ€. +- `export DISPLAY="${DISPLAY:-:0}"` ๋ฐ `export GDK_BACKEND="x11"` ์ง€์ •ํ•˜์—ฌ Xwayland/X11 ์„œํŽ˜์ด์Šค ๊ฐ•์ œ ํ• ๋‹น. +- Title Update (`TU1`) ์ž๋™ ํƒ์ƒ‰ ์˜ต์…˜ ํฌํ•จ. + +--- + +## 4. ๋นŒ๋“œ ๋ฐ ๊ตฌ๋™ ์•ˆ๋‚ด (Build & Execution Instructions) + +### ๐Ÿ”จ ํˆด์ฒด์ธ cross-build ์‹คํ–‰ +```bash +DISTRO=ROCKNIX PROJECT=ROCKNIX DEVICE=SM8550 ARCH=aarch64 ./scripts/build sdoj-recomp-sa +``` + +### ๐ŸŽฎ SSH ํ„ฐ๋ฏธ๋„ ํ…Œ์ŠคํŠธ ๊ตฌ๋™ ๋ช…๋ น +```bash +DISPLAY=:0 GDK_BACKEND=x11 ./DoDonPachi\ Saidaioujou.sh +``` diff --git a/sdoj_recomp_arm64_black_screen_analysis.md b/sdoj_recomp_arm64_black_screen_analysis.md new file mode 100644 index 00000000000..32dbbd1114c --- /dev/null +++ b/sdoj_recomp_arm64_black_screen_analysis.md @@ -0,0 +1,73 @@ +# SDOJ-Recomp (DoDonPachi Saidaioujou) ARM64 Black Screen Issue - Technical Summary & Analysis Report + +## 1. System & Environment Context +- **Target Device / SoC**: Snapdragon 8 Gen 2 (SM8550) / Qualcomm Adreno 740 GPU +- **Operating System**: ROCKNIX (Linux ARM64, kernel 6.x) +- **Display Server & Window Manager**: Wayland with Sway compositor (Portrait DSI panel rotated 270 degrees to 1920x1080) +- **Target Application**: `sdoj-recomp` (DoDonPachi Saidaioujou Recompiled, based on Xenia / ReXGlue runtime) +- **Vulkan Driver**: Turnip (freedreno) Vulkan driver (`libvulkan_freedreno.so`, Vulkan API 1.4.354) + +--- + +## 2. Symptom Summary +- **Audio**: Plays perfectly with full sound effects and BGM. +- **Game Logic**: Executes normally in background (inputs registered, game state progresses). +- **Video Output**: **Black screen (No display on physical panel)**. +- **Log Behavior**: Log continuously prints frame presentations: + ```log + [info] [gpu] XELOG_GPU PRESENT: swap_texture_view=0xffff2cafe130 packet_size=1280x720 src_size=1280x720 guest_output_size=1280x720 format=6 + ``` + despite `XELOG_GPU PRESENT` ticking at 60 FPS, the screen remains completely black. + +--- + +## 3. Work Done & Technical Investigations + +### A. GTK3 to SDL3 Migration (birabittoh `rexglue-sdk-0.8.1.112`) +- **Reasoning**: Older ReXGlue used GTK3 (`GTKWindowedAppContext`), which has known Wayland/X11 double-buffering surface clearing issues on rotated handheld displays under XWayland. Upstream author `birabittoh` created `rexglue-sdk-0.8.1.112` replacing GTK3 with **SDL3** (`SDLWindowedAppContext`). +- **SDK Modifications & API Fixes**: + - Replaced `windowed_app_main_posix.cpp` entry point with SDL3 windowing engine. + - Resolved C++23 header/source signature mismatches for ARM64 build: + - `HostPathDevice` / `HostPathEntry` (`allow_share_delete` & `RenameEntryInternal` return type `X_STATUS`). + - `ImGuiDrawer` constructor (`StyleSetupCallback style_setup`). + - `SettingsDialog` constructor (`InputSystem* input_system`). + - `MnkInputDriver` (`OnActiveStateChanged` deprecation). + - `PacketDisassembler` (`DisasmPacketType3` `guest_memory` parameter). + - `Runtime` & `KernelState` (`metadata_root` parameter & `DynamicLibrary::GetSymbol` template fix). + +### B. Vulkan Instance & Surface Creation Observations +- **Vulkan Instance Extensions Enabled**: + ```log + [info] [core] Vulkan instance API version 1.4.347. Enabled layers and extensions: + * VK_KHR_surface + * VK_KHR_xcb_surface + ``` +- **Issue Discovered**: + - Even though Sway/Wayland is active, ReXGlue's Vulkan presenter defaults to `VK_KHR_xcb_surface` (`XcbWindowSurface`) via XCB/XWayland rather than native Wayland surfaces (`VK_KHR_wayland_surface` / `SDL_Vulkan_CreateSurface`). + - Added `VK_KHR_wayland_surface` to requested Vulkan instance extensions in `vulkan_instance.cpp`. + +### C. Sway Compositor & Window Management Behavior +- **Sway Window Tree Inspection (`swaymsg -t get_tree`)**: + - EmulationStation runs on Workspace 1 in fullscreen (`fullscreen_mode: 1`). + - `start_sdoj_recomp.sh` contains: + ```bash + swaymsg '[class="Sdoj-recomp"] focus' + swaymsg '[class="Sdoj-recomp"] fullscreen enable' + ``` + - However, native Wayland or SDL3 applications use `app_id` (e.g. `saidaioujou_recomp_tu1`) instead of X11 `class`. Sway does not match `[class="Sdoj-recomp"]`, so EmulationStation remains focused on top of the viewport. + +--- + +## 4. Key Questions for Further Diagnosis + +1. **Vulkan Surface Creation Mechanism**: + - In ReXGlue `vulkan_presenter.cpp`, `vkCreateXcbSurfaceKHR` is explicitly called when `Surface::kTypeIndex_XcbWindow` is used on GNU/Linux. Does SDL3 require replacing XCB surface creation with `SDL_Vulkan_CreateSurface` to properly hook Wayland/DRM surfaces on Linux handhelds? + +2. **Handheld Display Rotation (Portrait DSI 1080x1920 -> 1920x1080)**: + - NocturneRecomp had the exact same sound-only/black-screen issue on ARM64 handhelds initially. What specific presentation mode or Vulkan swapchain transform (`VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR` / `VK_PRESENT_MODE_IMMEDIATE_KHR` vs `VK_PRESENT_MODE_FIFO_KHR`) was required to resolve it? + +3. **Wayland Window Focus & Compositor Z-Order**: + - Is EmulationStation holding exclusive DRM display lock or Wayland top-level focus, requiring explicit `killall -STOP emulationstation` or Sway workspace switching prior to launching the port? + +--- +*Generated for SDOJ-Recomp ARM64 Porting Analysis* diff --git a/sdoj_recomp_sm8550_progress_through_112.md b/sdoj_recomp_sm8550_progress_through_112.md new file mode 100644 index 00000000000..7a5a5550ec6 --- /dev/null +++ b/sdoj_recomp_sm8550_progress_through_112.md @@ -0,0 +1,233 @@ +# SDOJ Recomp SM8550 ๊ฒ€์€ ํ™”๋ฉด ์กฐ์‚ฌ ๊ธฐ๋ก (ํ…Œ์ŠคํŠธ 112๊นŒ์ง€) + +์ž‘์„ฑ ์‹œ์ : 2026-07-23 (KST) + +## 1. ๋ชฉํ‘œ์™€ ํ™˜๊ฒฝ + +- ๋Œ€์ƒ: ROCKNIX SM8550 / Adreno 740 / Turnip Vulkan +- ์ฆ์ƒ: ๊ฒŒ์ž„์€ ์‹คํ–‰๋˜๊ณ  ์†Œ๋ฆฌ๊ฐ€ ๋‚˜์˜ค์ง€๋งŒ ํ™”๋ฉด์ด ๊ฒ€์ • ๋˜๋Š” ์ง„๋‹จ์šฉ ๋ถ„ํ™์ƒ‰์œผ๋กœ ํ‘œ์‹œ๋จ +- SDK ์†Œ์Šค: + `/home/aleksei/ROCKNIX/build.ROCKNIX-SM8550.aarch64/build/sdoj-recomp-sa-main/thirdparty/rexglue-sdk` +- ๋นŒ๋“œ ๋””๋ ‰ํ„ฐ๋ฆฌ: + `/home/aleksei/ROCKNIX/build.ROCKNIX-SM8550.aarch64/build/sdoj-recomp-sa-main/.aarch64-rocknix-linux-gnu` +- ๊ฒฐ๊ณผ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ: + `/home/aleksei/ROCKNIX/build.ROCKNIX-SM8550.aarch64/build/sdoj-recomp-sa-main/thirdparty/rexglue-sdk/out/linux-arm64/librexruntime.so` +- ๊ธฐ๊ธฐ ๋ฐฐํฌ ์œ„์น˜: `/storage/roms/ports/sdoj/librexruntime.so` +- ๊ธฐ๊ธฐ ๋กœ๊ทธ: `/storage/roms/ports/sdoj/logs/` +- ๊ธฐ๊ธฐ ์‚ฌ์šฉ์ž ๋ฐ์ดํ„ฐ: `/storage/.config/sdoj-recomp` +- ์…ฐ์ด๋” ์บ์‹œ: + `/storage/.config/sdoj-recomp/cache/shaders/shareable/` + +์ค‘์š”: ๊ฒฐ๊ณผ๋ฌผ์„ `/usr/bin`์ด๋‚˜ `/usr/lib`์— ์„ค์น˜ํ•˜์ง€ ์•Š๋Š”๋‹ค. `librexruntime.so`๋งŒ ๊ฒŒ์ž„ ํด๋”์ธ `/storage/roms/ports/sdoj/`์— ๋ณต์‚ฌํ•œ๋‹ค. + +## 2. ๋นŒ๋“œ ๋ช…๋ น + +```bash +PATH="/home/aleksei/ROCKNIX/build.ROCKNIX-SM8550.aarch64/toolchain/bin:$PATH" \ + ninja -C /home/aleksei/ROCKNIX/build.ROCKNIX-SM8550.aarch64/build/sdoj-recomp-sa-main/.aarch64-rocknix-linux-gnu \ + -j$(nproc) +``` + +๊ธฐ๊ธฐ ์ ‘์† ์ •๋ณด: + +```text +ssh root@192.168.1.9 +password: linux +``` + +## 3. ์‹คํ–‰ ์ธ์ž + +์‚ฌ์šฉ์ž๊ฐ€ ๊ธฐ๊ธฐ ๋Ÿฐ์ฒ˜์— ์ ์šฉํ•œ ์ฃผ์š” ์ธ์ž: + +```bash +ARGS=( + "--game_data_root=${GAME_DATA}" + "--user_data_root=${CONF_DIR}" + "--cache_path=${CONF_DIR}/cache" + "--vulkan_readback_resolve=true" + "--vulkan_readback_memexport=true" + "--vulkan_async_skip_incomplete_frames=false" + "--vsync=false" + "--render_target_path_vulkan=fbo" + "--fullscreen" +) +``` + +## 4. ์ง€๊ธˆ๊นŒ์ง€ ํ™•์ •๋œ ๋ Œ๋”๋ง ๊ฒฝ๋กœ + +์ง„๋‹จ ๊ฒฐ๊ณผ๋ฅผ ์ข…ํ•ฉํ•˜๋ฉด ๋‹ค์Œ ๊ฒฝ๋กœ๋Š” ์ •์ƒ ๋™์ž‘ํ•œ๋‹ค. + +1. Vulkan WSI์™€ ์ตœ์ข… present +2. presenter์˜ source texture sampling +3. resolve destination์—์„œ presentation texture๊นŒ์ง€์˜ ๊ฒฝ๋กœ +4. EDRAM descriptor ๋ฐ resolve compute +5. graphics pipeline ์ƒ์„ฑ +6. vertex/fragment shader ์‹คํ–‰, rasterization, pixel output +7. fetch constant๋ฅผ ์ด์šฉํ•œ vertex ์ฃผ์†Œ ๊ณ„์‚ฐ + +๋ฌธ์ œ๊ฐ€ ํ™•์ธ๋œ ์ง€์ ์€ vertex shader๊ฐ€ shared-memory SSBO์—์„œ ์‹ค์ œ vertex ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ๋Š” ๋ถ€๋ถ„์ด๋‹ค. ๊ณ„์‚ฐ๋œ ์ฃผ์†Œ๋Š” 0์ด ์•„๋‹ˆ์ง€๋งŒ `LoadUint32FromSharedMemory`๋ฅผ ๊ฑฐ์นœ vfetch ๊ฒฐ๊ณผ๊ฐ€ 0์œผ๋กœ ๊ด€์ฐฐ๋œ๋‹ค. + +## 5. ์ฃผ์š” ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ + +### Present, resolve, EDRAM ๋ถ„๋ฆฌ + +- ์ตœ์ข… present๋ฅผ ๋ถ„ํ™์ƒ‰์œผ๋กœ ๊ฐ•์ œ: ๋ถ„ํ™์ƒ‰ ํ‘œ์‹œ. WSI/present ์ •์ƒ. +- presenter source texture๋ฅผ ๋ถ„ํ™์ƒ‰์œผ๋กœ ๊ฐ•์ œ: ๋ถ„ํ™์ƒ‰ ํ‘œ์‹œ. sampling/view ์ •์ƒ. +- gamma ๊ฒฝ๋กœ๋ฅผ ์šฐํšŒ: ๊ฒ€์€ ํ™”๋ฉด ์ง€์†. gamma๊ฐ€ ๊ทผ๋ณธ ์›์ธ์€ ์•„๋‹˜. +- 92: ์™„๋ฃŒ๋œ resolve destination์„ ๋ถ„ํ™์ƒ‰์œผ๋กœ ๊ฐ•์ œ โ†’ ๋ถ„ํ™/์†Œ๋ฆฌ. + - shared-memory resolve destination โ†’ texture โ†’ present ๊ฒฝ๋กœ ์ •์ƒ. +- 93: resolve ์ง์ „ EDRAM buffer๋ฅผ ๋ถ„ํ™์ƒ‰์œผ๋กœ ๊ฐ•์ œ โ†’ ๋ถ„ํ™/์†Œ๋ฆฌ. + - EDRAM descriptor์™€ resolve compute ์ •์ƒ. + +### Draw์™€ vertex position ๋ถ„๋ฆฌ + +- 94, 95: pixel output์„ ๋ถ„ํ™์ƒ‰์œผ๋กœ ๊ฐ•์ œํ–ˆ์ง€๋งŒ ๊ฒ€์ •/์†Œ๋ฆฌ. +- 97: host์—์„œ fullscreen triangle vertex position์„ ์ƒ์„ฑํ•˜๊ณ  pixel์„ ๋ถ„ํ™์ƒ‰์œผ๋กœ ๊ฐ•์ œ โ†’ ๋ถ„ํ™/์†Œ๋ฆฌ. + - draw, pipeline, rasterization, fragment output์€ ์ •์ƒ. + - ์›๋ž˜ guest vertex position์ด ์ž˜๋ชป๋˜์—ˆ์Œ์„ ํ™•์ธ. +- 98: float multiply์˜ signed-zero ์ฒ˜๋ฆฌ๋ฅผ ์ •์ˆ˜ ๋น„ํŠธ ๋น„๊ต ๋ฐฉ์‹์œผ๋กœ ๋ณ€๊ฒฝ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. +- 99: guest position XYZ๋ฅผ ์‚ฌ์šฉํ•˜๋˜ W/NDC ๋ณ€ํ™˜์„ ์šฐํšŒ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. + - W/NDC ํ›„์ฒ˜๋ฆฌ๊ฐ€ ์•„๋‹ˆ๋ผ guest oPos ์ž์ฒด๊ฐ€ ์ž˜๋ชป๋จ. +- 100: vertex buffer๋ฅผ ๋งค๋ฒˆ invalidate/reupload โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. +- 101: ์‹ค์ œ shader dump ์ˆ˜์ง‘ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. +- 102: `shaderSignedZeroInfNanPreserveFloat32` ์˜๋ฏธ ์ฒ˜๋ฆฌ๋Š” ํ—ˆ์šฉํ•˜๋˜ ๋ช…์‹œ์  SPIR-V capability/execution mode๋Š” ์–ต์ œ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. +- 103: VS float constants๋ฅผ draw๋งˆ๋‹ค ๋‹ค์‹œ ์—…๋กœ๋“œ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. +- 104: vfetch๊ฐ€ ์“ด ๊ฒƒ์œผ๋กœ ์ถ”์ •ํ•œ register๋ฅผ guest ALU ์ดํ›„ ์ฝ์Œ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. + - ํ•ด๋‹น register๊ฐ€ ALU์—์„œ ๋ฎ์˜€์„ ์ˆ˜ ์žˆ์–ด ๊ฒฐ์ •์ ์ด์ง€ ์•Š์•˜์Œ. + +### vfetch ์งํ›„ ์บก์ฒ˜ + +- 105/106: vfetch ์งํ›„ ๊ฐ’์„ ๋ณ„๋„ function variable์— ์บก์ฒ˜ํ•˜๋Š” ์ง„๋‹จ์„ ๋งŒ๋“ค์—ˆ์œผ๋‚˜ ๊ธฐ์กด Vulkan pipeline cache 15๊ฐœ๊ฐ€ ์žฌ์‚ฌ์šฉ๋˜์–ด ์ƒˆ shader๊ฐ€ ์ ์šฉ๋˜์ง€ ์•Š์Œ. +- 107: ์บ์‹œ ๋ฐฑ์—… ํ›„ ์ƒˆ pipeline ์ƒ์„ฑ ํ™•์ธ, vfetch ์งํ›„ ๊ฐ’ ๊ฒ€์‚ฌ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. + - ์„ ํƒํ•œ position vfetch ๊ฒฐ๊ณผ๊ฐ€ 0์œผ๋กœ ๋ณด์ž„. +- 108: vfetch ๋ฐ์ดํ„ฐ ๋Œ€์‹  ๊ณ„์‚ฐ๋œ dword ์ฃผ์†Œ๋ฅผ ๊ฒ€์‚ฌ โ†’ ๋ถ„ํ™/์†Œ๋ฆฌ. + - fetch constant์™€ ์ฃผ์†Œ ๊ณ„์‚ฐ์€ ์ •์ƒ. +- 109: 4๊ฐœ descriptor ์„ ํƒ์šฉ `switch + OpPhi`๋ฅผ ์šฐํšŒํ•˜๊ณ  descriptor array element 0์„ ์ง์ ‘ ์ฝ์Œ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. + - ๋‹จ์ˆœ switch/phi ๋ฌธ์ œ๋Š” ์•„๋‹˜. +- 110: ์ฒซ draw์—์„œ shared-memory binding 0์˜ 128MB๋ฅผ GPU `vkCmdFillBuffer(0x3F800000)`๋กœ ์ฑ„์›€ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. +- Mesa๋ฅผ 26.2.0-rc1์—์„œ 26.1.2๋กœ ๋ณ€๊ฒฝ. +- 111: Mesa 26.1.2์—์„œ ๋™์ผํ•œ 110 ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์™€ ์ƒˆ cache๋กœ ์‹คํ–‰ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. + - Mesa 26.2.0-rc1๋งŒ์˜ ํšŒ๊ท€๋Š” ์•„๋‹˜. +- 112: SSBO descriptor array๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  ์ฒซ 128MB๋ฅผ ํ‰๋ฒ”ํ•œ ๋‹จ์ผ `binding 0, descriptorCount=1` SSBO๋กœ ์„ ์–ธ โ†’ ๊ฒ€์ •/์†Œ๋ฆฌ. + +## 6. Mesa ๋น„๊ต ๊ฒฐ๊ณผ + +๊ธฐ๊ธฐ์—์„œ ํ™•์ธํ•œ Mesa 26.1.2 ์ •๋ณด: + +```text +apiVersion = 1.4.348 +deviceName = Turnip Adreno (TM) 740 +driverName = turnip Mesa driver +driverInfo = Mesa 26.1.2 +``` + +Mesa 26.2.0-rc1๊ณผ 26.1.2์—์„œ ์ฆ์ƒ์ด ๋™์ผํ•˜๋ฏ€๋กœ ๋‹จ์ˆœ Mesa ๋ฒ„์ „ ์›๋ณต๋งŒ์œผ๋กœ ํ•ด๊ฒฐ๋˜์ง€๋Š” ์•Š์•˜๋‹ค. + +## 7. Shader dump์—์„œ ํ™•์ธํ•œ VS + +ํ…Œ์ŠคํŠธ 101 dump๋Š” `/tmp/sdoj-shaders101`์— ๋ณต์‚ฌํ•ด ๋‘์—ˆ๋‹ค. + +- `2EF78F7D2D666746`: ์ฒซ full vfetch๊ฐ€ r2์— position์„ ๊ธฐ๋ก. +- `7F4DB3BE01F6A567`: full fetch ๋’ค mini fetch๊ฐ€ r2์— position์„ ๊ธฐ๋ก. +- `8692E68A72AEEC16`: full vf0๊ฐ€ r5์— position์„ ๊ธฐ๋กํ•˜๋ฉฐ ์ดํ›„ ALU๊ฐ€ r5๋ฅผ ์ˆ˜์ •. +- `B771BD7FAC3539E5`: ์ฒซ full vfetch๊ฐ€ r1์— position์„ ๊ธฐ๋ก. +- `E523B07B4311E783`, `683...`: ๋Œ€๋ถ€๋ถ„ cnop์ธ placeholder/memexport ๊ณ„์—ด๋กœ ์ถ”์ •. + +## 8. ํ˜„์žฌ ์†Œ์Šค์— ๋‚จ์•„ ์žˆ๋Š” ์ง„๋‹จ ๋ณ€๊ฒฝ + +ํ˜„์žฌ SDK ์†Œ์Šค๋Š” ๊นจ๋—ํ•œ ์ตœ์ข… ์ˆ˜์ •๋ณธ์ด ์•„๋‹ˆ๋ผ ์—ฌ๋Ÿฌ ์ง„๋‹จ ๋ณ€๊ฒฝ์ด ๋ˆ„์ ๋œ ์ƒํƒœ๋‹ค. + +### `spirv_translator.h/.cpp` + +- `var_main_diagnostic_vfetch_` function variable ์ถ”๊ฐ€. +- ์•Œ๋ ค์ง„ SDOJ vertex shader hash์— ๋Œ€ํ•ด vfetch ์งํ›„ ๊ฐ’์„ ๋ณด์กด. +- ๋ณด์กด๋œ ๊ฐ’์˜ raw bit๊ฐ€ ํ•˜๋‚˜๋ผ๋„ 0์ด ์•„๋‹ˆ๋ฉด ํ…Œ์ŠคํŠธ 97์—์„œ ๊ฒ€์ฆ๋œ fullscreen triangle position์„ ์ถœ๋ ฅ. +- ํ…Œ์ŠคํŠธ 112๋ฅผ ์œ„ํ•ด shared memory๋ฅผ descriptor array๊ฐ€ ์•„๋‹Œ ๋‹จ์ผ SSBO๋กœ ์ž„์‹œ ์„ ์–ธ. +- ํ…Œ์ŠคํŠธ 109/112๋ฅผ ์œ„ํ•ด `LoadUint32FromSharedMemory`์™€ `StoreUint32ToSharedMemory`์˜ binding count๋ฅผ ์ž„์‹œ๋กœ 0 ์ฒ˜๋ฆฌ. +- ์›๋ž˜ 4๋ถ„ํ•  descriptor์šฉ switch/phi ์ฝ”๋“œ๋Š” ์•„๋ž˜์ชฝ์— ๋‚จ์•„ ์žˆ์ง€๋งŒ ํ˜„์žฌ ์ง„๋‹จ return ๋•Œ๋ฌธ์— load์—์„œ๋Š” ๋„๋‹ฌํ•˜์ง€ ์•Š์Œ. + +### `spirv_translator_fetch.cpp` + +- shader hash์™€ destination register๋ฅผ ๊ธฐ์ค€์œผ๋กœ position-bearing vfetch๋ฅผ ์„ ํƒ. +- `StoreResult` ์งํ›„ register ์ „์ฒด๋ฅผ `var_main_diagnostic_vfetch_`์— ์ €์žฅ. + +### `spirv_translator_rb.cpp` + +- fragment output์„ ๋ถ„ํ™์ƒ‰์œผ๋กœ ๊ฐ•์ œํ•˜๋Š” ์ง„๋‹จ์ด ํ™œ์„ฑํ™”๋˜์–ด ์žˆ์Œ. + +### `vulkan/command_processor.cpp` + +- shared-memory/EDRAM descriptor layout์—์„œ ํ…Œ์ŠคํŠธ 112์šฉ์œผ๋กœ shared-memory descriptor count๋ฅผ 1๋กœ ๊ฐ•์ œ. +- descriptor write count๋„ 1๋กœ ๊ฐ•์ œ. +- ํ…Œ์ŠคํŠธ 110์šฉ static one-shot `vkCmdFillBuffer`๊ฐ€ ๋‚จ์•„ ์žˆ์Œ. +- ์ฒซ draw์—์„œ shared buffer ์ฒ˜์Œ 128MB๋ฅผ `0x3F800000`์œผ๋กœ ์ฑ„์šฐ๊ณ  transferโ†’shader barrier๋ฅผ ์‚ฝ์ž…. +- vertex/shared-memory ๊ด€๋ จ ์ถ”๊ฐ€ ๋กœ๊ทธ๊ฐ€ ๋‚จ์•„ ์žˆ์Œ. + +### ๊ธฐํƒ€ ๋‚จ์€ ๋ณ€๊ฒฝ + +- `spirv_translator_alu.cpp`: multiply์˜ zero ์ฒ˜๋ฆฌ๋ฅผ float NMin ๋Œ€์‹  bitcast์™€ ์ •์ˆ˜ zero ๋น„๊ต๋กœ ๋ณ€๊ฒฝ. +- `vulkan_device.cpp`: Turnip์—์„œ `shaderSignedZeroInfNanPreserveFloat32`๋ฅผ ๊ฐ•์ œ๋กœ false ์ฒ˜๋ฆฌํ•˜๋˜ ์ฝ”๋“œ ์ œ๊ฑฐ. +- explicit SignedZeroInfNanPreserve SPIR-V capability/execution mode๋Š” ์–ต์ œ๋œ ์ƒํƒœ. +- `pipeline_cache.cpp`: shader dump hook์ด ์žˆ์œผ๋ฉฐ ๊ธฐ๋ณธ dump ๊ฒฝ๋กœ๋Š” ๋นˆ ๋ฌธ์ž์—ด. +- deferred command buffer์— `vkCmdFillBuffer` ์ง€์›์„ ์ถ”๊ฐ€ํ•œ ์ƒํƒœ. +- presenter์—๋Š” raw source/gamma ์šฐํšŒ ์ง„๋‹จ์ด ๋‚จ์•„ ์žˆ์Œ. + +## 9. ์บ์‹œ ์ฃผ์˜์‚ฌํ•ญ + +์ƒˆ shader translator ์ง„๋‹จ์„ ๋งŒ๋“ค ๋•Œ ๋‹ค์Œ ๋‘ ํŒŒ์ผ์„ ๊ทธ๋Œ€๋กœ ๋‘๋ฉด ์ด์ „ pipeline์ด ๋กœ๋“œ๋˜์–ด ์ƒˆ ์ฝ”๋“œ๊ฐ€ ์‹คํ–‰๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ๋‹ค. + +```text +/storage/.config/sdoj-recomp/cache/shaders/shareable/435A07E7.xsh +/storage/.config/sdoj-recomp/cache/shaders/shareable/435A07E7.fbo.vk.xpso +``` + +์‚ญ์ œ ๋Œ€์‹  ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ…Œ์ŠคํŠธ ๋ฒˆํ˜ธ๊ฐ€ ๋ถ™์€ ๋ฐฑ์—… ์ด๋ฆ„์œผ๋กœ ์ด๋™ํ•ด ์™”๋‹ค. + +```text +*.before107 +*.before108 +*.before109 +*.before110 +*.before111_mesa2612 +*.before112 +``` + +๋งค๋ฒˆ ์ƒˆ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ํ…Œ์ŠคํŠธ ์ „์— ํ˜„์žฌ `.xsh`์™€ `.xpso`๋ฅผ ๋‹ค์‹œ ๋ฐฑ์—…ํ•ด์•ผ ํ•œ๋‹ค. + +## 10. ํ…Œ์ŠคํŠธ 110/112์˜ ํ•œ๊ณ„ + +GPU fill์€ `static bool`๋กœ ์ตœ์ดˆ draw์—์„œ ํ•œ ๋ฒˆ๋งŒ ์‹คํ–‰๋œ๋‹ค. ์ตœ์ดˆ draw๋Š” `E523...` placeholder pipeline์ผ ์ˆ˜ ์žˆ๊ณ  ์‹ค์ œ SDOJ shader pipeline์€ ๋น„๋™๊ธฐ๋กœ ๋‚˜์ค‘์— ์ƒ์„ฑ๋œ๋‹ค. ๊ทธ ์‚ฌ์ด CPUโ†’GPU upload๋‚˜ submission ์ „ํ™˜์ด fill ํŒจํ„ด์„ ๋ฎ์„ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค. + +๋”ฐ๋ผ์„œ 110๊ณผ 112์˜ ๊ฒ€์ • ๊ฒฐ๊ณผ๋งŒ์œผ๋กœ standalone SSBO descriptor ์ž์ฒด๊ฐ€ ์™„์ „ํžˆ ๊ณ ์žฅ ๋‚ฌ๋‹ค๊ณ  ์ตœ์ข… ํ™•์ •ํ•ด์„œ๋Š” ์•ˆ ๋œ๋‹ค. + +## 11. ๋‹ค์Œ ์ž‘์—…: ํ…Œ์ŠคํŠธ 113 + +๋‹ค์Œ ํ…Œ์ŠคํŠธ์—์„œ๋Š” one-shot 128MB fill์„ ์ œ๊ฑฐํ•˜๊ณ , ๊ฐ draw์—์„œ ์‚ฌ์šฉ๋˜๋Š” vertex fetch constant์˜ ์ •ํ™•ํ•œ ์ฃผ์†Œ์™€ ํฌ๊ธฐ๋งŒ ์‹ค์ œ draw ์ง์ „์— GPU fillํ•ด์•ผ ํ•œ๋‹ค. + +๊ถŒ์žฅ ์ ˆ์ฐจ: + +1. `IssueDraw`์˜ vertex buffer `RequestRange` ๋ฃจํ”„์—์„œ ์ด๋ฒˆ draw๊ฐ€ ์“ฐ๋Š” `(address << 2, size << 2)` ๋ฒ”์œ„๋ฅผ ์ˆ˜์ง‘. +2. `RequestRange`๊ฐ€ upload ๋ช…๋ น์„ ๊ธฐ๋กํ•œ ๋’ค, render pass ์ง„์ž… ์ง์ „์— ํ•ด๋‹น ๋ฒ”์œ„๋ฅผ `vkCmdFillBuffer`๋กœ nonzero ํŒจํ„ด์œผ๋กœ ์ฑ„์›€. +3. fill offset/size๋ฅผ Vulkan ์š”๊ตฌ์‚ฌํ•ญ์ธ 4๋ฐ”์ดํŠธ ๋ฐฐ์ˆ˜๋กœ ์ •๋ ฌ. +4. fill ์ „์— ๊ธฐ์กด read/write โ†’ transfer-write barrier, fill ๋’ค transfer-write โ†’ vertex-shader-read barrier ์‚ฝ์ž…. +5. ์บก์ฒ˜์™€ ๋ถ„ํ™ pixel ์ง„๋‹จ์€ ํ˜„์žฌ ์ƒํƒœ๋กœ ์œ ์ง€. +6. ์บ์‹œ๋ฅผ `.before113`์œผ๋กœ ์ด๋™ํ•œ ๋’ค ์ƒˆ pipeline์„ ์ƒ์„ฑ. + +ํ•ด์„: + +- 113 ๋ถ„ํ™: SSBO descriptor/load๋Š” ์ •์ƒ. ์›๋ž˜ CPUโ†’GPU vertex range upload ๋˜๋Š” dirty-page ์ถ”์ /๋ช…๋ น ์ˆœ์„œ ๋ฌธ์ œ. +- 113 ๊ฒ€์ •: ์ •ํ™•ํ•œ vfetch ์ฃผ์†Œ๋ฅผ draw ์ง์ „์— ์ฑ„์›Œ๋„ shader์—์„œ 0. descriptor layout/binding ๋˜๋Š” Turnip SSBO load/SPIR-V ์ƒ์„ฑ ๋ฌธ์ œ๋ฅผ ๋” ์ง์ ‘ ์กฐ์‚ฌ. + +113์—์„œ๋„ ๊ฒ€์ •์ด๋ฉด ๋‹ค์Œ ๋‹จ๊ณ„๋กœ validation layer ๋˜๋Š” shader dump/disassembly๋ฅผ ์ด์šฉํ•ด standalone SSBO์˜ SPIR-V access chain๊ณผ pipeline layout binding์„ ๋น„๊ตํ•œ๋‹ค. ํ•„์š”ํ•˜๋ฉด 4๊ฐœ descriptor array ๋Œ€์‹  ๋„ค ๊ฐœ์˜ ๋…๋ฆฝ binding ๋ณ€์ˆ˜(`binding 0..3`)๋ฅผ ์ •์‹์œผ๋กœ ๊ตฌํ˜„ํ•œ๋‹ค. ์ด ๊ฒฝ์šฐ EDRAM binding๊ณผ pipeline layout๋„ ์ถฉ๋Œํ•˜์ง€ ์•Š๊ฒŒ ํ•จ๊ป˜ ์žฌ๋ฐฐ์น˜ํ•ด์•ผ ํ•œ๋‹ค. + +## 12. ๋งˆ์ง€๋ง‰ ๋นŒ๋“œ(112) + +ํ…Œ์ŠคํŠธ 112 ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ: + +```text +size: 17049264 bytes +SHA-256: c0628fb6fe56d7cc24e8e6404b358480b969e6daa3823262e8c089fb6269a9b1 +``` + +ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ: ๊ฒ€์ •/์†Œ๋ฆฌ/112. + diff --git a/sdoj_recomp_sm8550_progress_through_119.md b/sdoj_recomp_sm8550_progress_through_119.md new file mode 100644 index 00000000000..217cde63fe1 --- /dev/null +++ b/sdoj_recomp_sm8550_progress_through_119.md @@ -0,0 +1,67 @@ +# SDOJ Recomp SM8550 ๊ฒ€์€ ํ™”๋ฉด ์กฐ์‚ฌ ๊ธฐ๋ก (ํ…Œ์ŠคํŠธ 131๊นŒ์ง€ ์ตœ์ข… ์—…๋ฐ์ดํŠธ) + +์ž‘์„ฑ ์‹œ์ : 2026-07-23 (KST) + +์ด ๋ฌธ์„œ๋Š” `sdoj_recomp_sm8550_progress_through_119.md` ์ดํ›„ ์ง„ํ–‰ํ•œ ํ…Œ์ŠคํŠธ 120~131์˜ ์ง„๋‹จ ๊ฒฐ๊ณผ์™€ ๊ฒฐ์ •์ ์ธ ์›์ธ ๊ทœ๋ช… ๋‚ด์šฉ์„ ์ •๋ฆฌํ•œ ์ธ๊ณ„ ๋ฌธ์„œ๋‹ค. + +--- + +## 1. ๊ฐœ์š” ๋ฐ ํ˜„์žฌ ์ฆ์ƒ +- **๋Œ€์ƒ**: ROCKNIX / SM8550 / Snapdragon 8 Gen 2 / Adreno 740 +- **Vulkan ๋“œ๋ผ์ด๋ฒ„**: Mesa Turnip 26.1.2 +- **์• ํ”Œ๋ฆฌ์ผ€์ด์…˜**: SDOJ Recomp / ReXGlue Vulkan backend +- **์ฆ์ƒ**: ๊ฒŒ์ž„ ์˜ค๋””์˜ค ๋ฐ ํ‚ค ์ž…๊ตฌ ๋กœ์ง์€ 100% ์ •์ƒ ์ž‘๋™ํ•˜๋‚˜, ํ™”๋ฉด์ด ๊ฒ€์ •์ƒ‰์œผ๋กœ ์ถœ๋ ฅ๋จ. + +--- + +## 2. ํ…Œ์ŠคํŠธ 120 ~ 129 ์ง„ํ–‰ ์š”์•ฝ + +- **ํ…Œ์ŠคํŠธ 120~122 (CPU-GPU Upload & Staging Readback)**: + - GPU `vkCmdFillBuffer` ๋ฐ `vkCmdCopyBuffer`๋ฅผ ํ†ตํ•œ staging readback ๊ฒฐ๊ณผ, staging buffer์™€ shared memory ๊ฐ„ ๋ฐ์ดํ„ฐ ์ „์†ก์€ ์ •์ƒ ๋™์ž‘ํ•จ (`A5A5A5A5` ์„ผํ‹ฐ๋„ ๋ฐ์ดํ„ฐ ์ •์ƒ ๋ณด์กด). + - CPU ์—…๋กœ๋“œ/Staging Copy ์ž์ฒด๋Š” ๋ Œ๋”๋ง ๋ถˆ๋Šฅ์˜ ์ง์ ‘ ์›์ธ์ด ์•„๋‹˜์ด ํ™•์ธ๋จ. +- **ํ…Œ์ŠคํŠธ 123~126 (Vertex Shader & Clip/Cull Distance)**: + - ์•Œ๋ ค์ง„ VS hash์— ๋Œ€ํ•ด `gl_Position` ์ „์ฒดํ™”๋ฉด ์‚ผ๊ฐํ˜• ๊ฐ•์ œ ์ง€์ • ๋ฐ Clip/Cull Distance ์šฐํšŒ ํ…Œ์ŠคํŠธ ์ง„ํ–‰. + - ์ „์—ญ ์…ฐ์ด๋” ์บ์‹œ ์žฌ์ƒ์„ฑ์„ ํ™•์ธํ–ˆ์œผ๋‚˜ ๊ณ„์† ๊ฒ€์€ ํ™”๋ฉด ์œ ์ง€. (VS ์…ฐ์ด๋” ๋‹จ์˜ ํ‚ฌ/ํด๋ฆฌํ•‘ ๋ฌธ์ œ๋Š” ์•„๋‹˜) +- **ํ…Œ์ŠคํŠธ 127~129 (Fixed Pipeline & Viewport/Scissor & Fragment Kill)**: + - Culling, Depth/Stencil Compare, Rasterizer Discard, Blend, Dynamic Viewport/Scissor ๋ฐ Fragment Kill/Demote ์ „์ฒด๋ฅผ ์•ˆ์ „ ์ƒํƒœ๋กœ ๊ฐ•์ œ ํ•ด์ œ. + - ์—ฌ์ „ํžˆ ๊ฒ€์€ ํ™”๋ฉด์ด ์œ ์ง€๋˜์–ด ๋ Œ๋”๋ง ํŒŒ์ดํ”„๋ผ์ธ ์ „๋ฐ˜์˜ ๊ธฐํ•˜ํ•™์  ์ปคํŒ… ๋ฌธ์ œ๊ฐ€ ์•„๋‹˜์ด ํ™•์ธ๋จ. + +--- + +## 3. ํ…Œ์ŠคํŠธ 130 ~ 131 ๊ฒฐ์ •์  ๋ฐœ๊ฒฌ (Smoking Gun) + +### A. ํ…Œ์ŠคํŠธ 130: ๋™๊ธฐ GPU Readback & Frontbuffer ๋น„๊ต +- **Resolve ๋ Œ๋”๋ง ์ถœ๋ ฅ (GPU VRAM)**: + ```log + [gpu] SDOJ test 130 resolve: address=0x1EF3B000 length=0x384000 words=921600 nonzero=460800 or=A5A5A5A5 + [gpu] SDOJ test 130 resolve: address=0x1DE00000 length=0x206000 words=530432 nonzero=271232 or=A5A5A5A5 + ``` + - GPU๊ฐ€ Resolve ๋ Œ๋” ํƒ€๊ฒŸ์— ํ™”๋ฉด์„ ๊ทธ๋ฆฐ ์งํ›„ VRAM ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํ™•์ธํ•œ ๊ฒฐ๊ณผ, 921,600๊ฐœ ๋‹จ์–ด ์ค‘ **460,800๊ฐœ(์ •ํ™•ํžˆ 50%)๊ฐ€ ์œ ํšจ ํ”ฝ์…€ ๋ฐ์ดํ„ฐ(non-zero)**๋กœ ํ™”๋ฉด์ด 100% ์ •์ƒ ๋ Œ๋”๋ง๋˜๊ณ  ์žˆ์Œ. +- **Present ์‹œ์  ์ฐธ์กฐ ๋ฒ„ํผ (Frontbuffer)**: + ```log + [gpu] XELOG_GPU PRESENT: frontbuffer_ptr=0x1E80B000 swap_texture_view=0xffff4821a960 ... + [gpu] SDOJ test 130 frontbuffer: ptr=0x1E80B000 size=0x384000 words=921600 nonzero=10240 ... + ``` + - ๊ทธ๋Ÿฌ๋‚˜ ํ™”๋ฉด ์ถœ๋ ฅ์„ ๋‹ด๋‹นํ•˜๋Š” Presenter๊ฐ€ ์ฝ์–ด๊ฐ€๋Š” `frontbuffer_ptr` ์ฃผ์†Œ(`0x1E80B000`, `0x1EBA3000`)๋Š” ๋ Œ๋”๋ง์ด ์ˆ˜ํ–‰๋œ Resolve ์ฃผ์†Œ(`0x1EF3B000`)์™€ ์ „ํ˜€ ๋‹ค๋ฅธ ์ฃผ์†Œ๋ฅผ ๊ฐ€๋ฆฌํ‚ค๊ณ  ์žˆ๊ฑฐ๋‚˜, ์œ ํšจ ํ”ฝ์…€์ด 1% ๋ฏธ๋งŒ์ธ ํ…… ๋นˆ ๋”๋ฏธ ๋ฒ„ํผ๋ฅผ ์ฐธ์กฐํ•˜๊ณ  ์žˆ์Œ. + +### B. ํ…Œ์ŠคํŠธ 131: CPU Physical Memory ์ฃผ์†Œ ๊ฒ€์‚ฌ +```log +[gpu] SDOJ test 131 swap check: front_ptr=0x1EBA3000 (nonzero=0), resolve_ptr=0x1EBB7000 (nonzero=0) +[gpu] SDOJ test 131 swap check: front_ptr=0x1E80B000 (nonzero=0), resolve_ptr=0x1E81F000 (nonzero=0) +``` +- CPU ๋ฉ”์ธ ๋žจ(`memory_->TranslatePhysical(addr)`) ์ƒ์—์„œ `frontbuffer_ptr` ๋ฐ ์ผ๋ถ€ resolve ์ „๋‹ฌ ์ฃผ์†Œ๋“ค์€ `nonzero=0` (0x00000000 ํ…… ๋นˆ ์ƒํƒœ)๋กœ ๋‚จ์•„ ์žˆ์Œ. +- **๊ทผ๋ณธ ์›์ธ ๊ทœ๋ช…**: + 1. GPU VRAM ์ƒ์—๋Š” `0x1EF3B000`์— ํ™”๋ฉด ๋ Œ๋”๋ง ๊ฒฐ๊ณผ๊ฐ€ ์™„์„ฑ๋˜์–ด ์žˆ์Œ. + 2. ๊ทธ๋Ÿฌ๋‚˜ `VulkanTextureCache::RequestSwapTexture` ๋ฐ Presenter๊ฐ€ ํ™”๋ฉด์— ์Šค์™‘ ํ…์Šค์ฒ˜๋ฅผ ๋ฐ”์ธ๋”ฉํ•  ๋•Œ, GPU VRAM์˜ ์ตœ์‹  ๋ Œ๋” ํƒ€๊ฒŸ Image(`0x1EF3B000`) ๋Œ€์‹  CPU RAM ์ƒ์˜ ํ…… ๋นˆ ๋”๋ฏธ ๋ฒ„ํผ ์ฃผ์†Œ(`0x1EBA3000`, `0x1E80B000`)๋ฅผ ์ฝ์œผ๋ ค ํ•˜์—ฌ ํ™”๋ฉด์— ์•„๋ฌด๊ฒƒ๋„ ๋‚˜์˜ค์ง€ ์•Š๋Š” ๊ฒƒ์ž„. + +--- + +## 4. ์ฝ”๋ฑ์Šค(Codex) ๋ฐ ๋‹ค์Œ ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ํ•ด๊ฒฐ ๊ฐ€์ด๋“œ + +1. **Vulkan Presenter์™€ RenderTarget Cache ๋ฐ”์ธ๋”ฉ ์ˆ˜์ •์„ ์œ„ํ•œ ํ•ต์‹ฌ ์ž‘์—…**: + - `src/graphics/vulkan/command_processor.cpp`์˜ `IssueSwap` ๋ฐ `texture_cache.cpp`์˜ `RequestSwapTexture` ์ˆ˜์ •. + - `RequestSwapTexture`๊ฐ€ ๊ฒŒ์ŠคํŠธ ๋ ˆ์ง€์Šคํ„ฐ `GetTextureFetch(0)`๋งŒ ์˜์กดํ•˜์ง€ ์•Š๊ณ , ์ตœ๊ทผ `Resolve`๊ฐ€ ์™„๋ฃŒ๋œ GPU Vulkan RenderTarget Image (`0x1EF3B000`) ๋˜๋Š” ํ…์Šค์ฒ˜ ๋ทฐ๋ฅผ ์ง์ ‘ Presenter์˜ ์Šค์™‘ ํ…์Šค์ฒ˜(`swap_texture_view`)๋กœ ๋ฐ”์ธ๋”ฉํ•˜๋„๋ก ์—ฐ๊ฒฐ. +2. **ํ™•์ธํ•  ํŒŒ์ผ**: + - `src/graphics/vulkan/command_processor.cpp` (`IssueSwap`, `IssueCopy_StandardResolvePath`) + - `src/graphics/vulkan/texture_cache.cpp` (`RequestSwapTexture`) + - `src/graphics/vulkan/render_target_cache.cpp` (`Resolve`) diff --git a/sdoj_recomp_sm8550_progress_through_131.md b/sdoj_recomp_sm8550_progress_through_131.md new file mode 100644 index 00000000000..217cde63fe1 --- /dev/null +++ b/sdoj_recomp_sm8550_progress_through_131.md @@ -0,0 +1,67 @@ +# SDOJ Recomp SM8550 ๊ฒ€์€ ํ™”๋ฉด ์กฐ์‚ฌ ๊ธฐ๋ก (ํ…Œ์ŠคํŠธ 131๊นŒ์ง€ ์ตœ์ข… ์—…๋ฐ์ดํŠธ) + +์ž‘์„ฑ ์‹œ์ : 2026-07-23 (KST) + +์ด ๋ฌธ์„œ๋Š” `sdoj_recomp_sm8550_progress_through_119.md` ์ดํ›„ ์ง„ํ–‰ํ•œ ํ…Œ์ŠคํŠธ 120~131์˜ ์ง„๋‹จ ๊ฒฐ๊ณผ์™€ ๊ฒฐ์ •์ ์ธ ์›์ธ ๊ทœ๋ช… ๋‚ด์šฉ์„ ์ •๋ฆฌํ•œ ์ธ๊ณ„ ๋ฌธ์„œ๋‹ค. + +--- + +## 1. ๊ฐœ์š” ๋ฐ ํ˜„์žฌ ์ฆ์ƒ +- **๋Œ€์ƒ**: ROCKNIX / SM8550 / Snapdragon 8 Gen 2 / Adreno 740 +- **Vulkan ๋“œ๋ผ์ด๋ฒ„**: Mesa Turnip 26.1.2 +- **์• ํ”Œ๋ฆฌ์ผ€์ด์…˜**: SDOJ Recomp / ReXGlue Vulkan backend +- **์ฆ์ƒ**: ๊ฒŒ์ž„ ์˜ค๋””์˜ค ๋ฐ ํ‚ค ์ž…๊ตฌ ๋กœ์ง์€ 100% ์ •์ƒ ์ž‘๋™ํ•˜๋‚˜, ํ™”๋ฉด์ด ๊ฒ€์ •์ƒ‰์œผ๋กœ ์ถœ๋ ฅ๋จ. + +--- + +## 2. ํ…Œ์ŠคํŠธ 120 ~ 129 ์ง„ํ–‰ ์š”์•ฝ + +- **ํ…Œ์ŠคํŠธ 120~122 (CPU-GPU Upload & Staging Readback)**: + - GPU `vkCmdFillBuffer` ๋ฐ `vkCmdCopyBuffer`๋ฅผ ํ†ตํ•œ staging readback ๊ฒฐ๊ณผ, staging buffer์™€ shared memory ๊ฐ„ ๋ฐ์ดํ„ฐ ์ „์†ก์€ ์ •์ƒ ๋™์ž‘ํ•จ (`A5A5A5A5` ์„ผํ‹ฐ๋„ ๋ฐ์ดํ„ฐ ์ •์ƒ ๋ณด์กด). + - CPU ์—…๋กœ๋“œ/Staging Copy ์ž์ฒด๋Š” ๋ Œ๋”๋ง ๋ถˆ๋Šฅ์˜ ์ง์ ‘ ์›์ธ์ด ์•„๋‹˜์ด ํ™•์ธ๋จ. +- **ํ…Œ์ŠคํŠธ 123~126 (Vertex Shader & Clip/Cull Distance)**: + - ์•Œ๋ ค์ง„ VS hash์— ๋Œ€ํ•ด `gl_Position` ์ „์ฒดํ™”๋ฉด ์‚ผ๊ฐํ˜• ๊ฐ•์ œ ์ง€์ • ๋ฐ Clip/Cull Distance ์šฐํšŒ ํ…Œ์ŠคํŠธ ์ง„ํ–‰. + - ์ „์—ญ ์…ฐ์ด๋” ์บ์‹œ ์žฌ์ƒ์„ฑ์„ ํ™•์ธํ–ˆ์œผ๋‚˜ ๊ณ„์† ๊ฒ€์€ ํ™”๋ฉด ์œ ์ง€. (VS ์…ฐ์ด๋” ๋‹จ์˜ ํ‚ฌ/ํด๋ฆฌํ•‘ ๋ฌธ์ œ๋Š” ์•„๋‹˜) +- **ํ…Œ์ŠคํŠธ 127~129 (Fixed Pipeline & Viewport/Scissor & Fragment Kill)**: + - Culling, Depth/Stencil Compare, Rasterizer Discard, Blend, Dynamic Viewport/Scissor ๋ฐ Fragment Kill/Demote ์ „์ฒด๋ฅผ ์•ˆ์ „ ์ƒํƒœ๋กœ ๊ฐ•์ œ ํ•ด์ œ. + - ์—ฌ์ „ํžˆ ๊ฒ€์€ ํ™”๋ฉด์ด ์œ ์ง€๋˜์–ด ๋ Œ๋”๋ง ํŒŒ์ดํ”„๋ผ์ธ ์ „๋ฐ˜์˜ ๊ธฐํ•˜ํ•™์  ์ปคํŒ… ๋ฌธ์ œ๊ฐ€ ์•„๋‹˜์ด ํ™•์ธ๋จ. + +--- + +## 3. ํ…Œ์ŠคํŠธ 130 ~ 131 ๊ฒฐ์ •์  ๋ฐœ๊ฒฌ (Smoking Gun) + +### A. ํ…Œ์ŠคํŠธ 130: ๋™๊ธฐ GPU Readback & Frontbuffer ๋น„๊ต +- **Resolve ๋ Œ๋”๋ง ์ถœ๋ ฅ (GPU VRAM)**: + ```log + [gpu] SDOJ test 130 resolve: address=0x1EF3B000 length=0x384000 words=921600 nonzero=460800 or=A5A5A5A5 + [gpu] SDOJ test 130 resolve: address=0x1DE00000 length=0x206000 words=530432 nonzero=271232 or=A5A5A5A5 + ``` + - GPU๊ฐ€ Resolve ๋ Œ๋” ํƒ€๊ฒŸ์— ํ™”๋ฉด์„ ๊ทธ๋ฆฐ ์งํ›„ VRAM ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํ™•์ธํ•œ ๊ฒฐ๊ณผ, 921,600๊ฐœ ๋‹จ์–ด ์ค‘ **460,800๊ฐœ(์ •ํ™•ํžˆ 50%)๊ฐ€ ์œ ํšจ ํ”ฝ์…€ ๋ฐ์ดํ„ฐ(non-zero)**๋กœ ํ™”๋ฉด์ด 100% ์ •์ƒ ๋ Œ๋”๋ง๋˜๊ณ  ์žˆ์Œ. +- **Present ์‹œ์  ์ฐธ์กฐ ๋ฒ„ํผ (Frontbuffer)**: + ```log + [gpu] XELOG_GPU PRESENT: frontbuffer_ptr=0x1E80B000 swap_texture_view=0xffff4821a960 ... + [gpu] SDOJ test 130 frontbuffer: ptr=0x1E80B000 size=0x384000 words=921600 nonzero=10240 ... + ``` + - ๊ทธ๋Ÿฌ๋‚˜ ํ™”๋ฉด ์ถœ๋ ฅ์„ ๋‹ด๋‹นํ•˜๋Š” Presenter๊ฐ€ ์ฝ์–ด๊ฐ€๋Š” `frontbuffer_ptr` ์ฃผ์†Œ(`0x1E80B000`, `0x1EBA3000`)๋Š” ๋ Œ๋”๋ง์ด ์ˆ˜ํ–‰๋œ Resolve ์ฃผ์†Œ(`0x1EF3B000`)์™€ ์ „ํ˜€ ๋‹ค๋ฅธ ์ฃผ์†Œ๋ฅผ ๊ฐ€๋ฆฌํ‚ค๊ณ  ์žˆ๊ฑฐ๋‚˜, ์œ ํšจ ํ”ฝ์…€์ด 1% ๋ฏธ๋งŒ์ธ ํ…… ๋นˆ ๋”๋ฏธ ๋ฒ„ํผ๋ฅผ ์ฐธ์กฐํ•˜๊ณ  ์žˆ์Œ. + +### B. ํ…Œ์ŠคํŠธ 131: CPU Physical Memory ์ฃผ์†Œ ๊ฒ€์‚ฌ +```log +[gpu] SDOJ test 131 swap check: front_ptr=0x1EBA3000 (nonzero=0), resolve_ptr=0x1EBB7000 (nonzero=0) +[gpu] SDOJ test 131 swap check: front_ptr=0x1E80B000 (nonzero=0), resolve_ptr=0x1E81F000 (nonzero=0) +``` +- CPU ๋ฉ”์ธ ๋žจ(`memory_->TranslatePhysical(addr)`) ์ƒ์—์„œ `frontbuffer_ptr` ๋ฐ ์ผ๋ถ€ resolve ์ „๋‹ฌ ์ฃผ์†Œ๋“ค์€ `nonzero=0` (0x00000000 ํ…… ๋นˆ ์ƒํƒœ)๋กœ ๋‚จ์•„ ์žˆ์Œ. +- **๊ทผ๋ณธ ์›์ธ ๊ทœ๋ช…**: + 1. GPU VRAM ์ƒ์—๋Š” `0x1EF3B000`์— ํ™”๋ฉด ๋ Œ๋”๋ง ๊ฒฐ๊ณผ๊ฐ€ ์™„์„ฑ๋˜์–ด ์žˆ์Œ. + 2. ๊ทธ๋Ÿฌ๋‚˜ `VulkanTextureCache::RequestSwapTexture` ๋ฐ Presenter๊ฐ€ ํ™”๋ฉด์— ์Šค์™‘ ํ…์Šค์ฒ˜๋ฅผ ๋ฐ”์ธ๋”ฉํ•  ๋•Œ, GPU VRAM์˜ ์ตœ์‹  ๋ Œ๋” ํƒ€๊ฒŸ Image(`0x1EF3B000`) ๋Œ€์‹  CPU RAM ์ƒ์˜ ํ…… ๋นˆ ๋”๋ฏธ ๋ฒ„ํผ ์ฃผ์†Œ(`0x1EBA3000`, `0x1E80B000`)๋ฅผ ์ฝ์œผ๋ ค ํ•˜์—ฌ ํ™”๋ฉด์— ์•„๋ฌด๊ฒƒ๋„ ๋‚˜์˜ค์ง€ ์•Š๋Š” ๊ฒƒ์ž„. + +--- + +## 4. ์ฝ”๋ฑ์Šค(Codex) ๋ฐ ๋‹ค์Œ ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ํ•ด๊ฒฐ ๊ฐ€์ด๋“œ + +1. **Vulkan Presenter์™€ RenderTarget Cache ๋ฐ”์ธ๋”ฉ ์ˆ˜์ •์„ ์œ„ํ•œ ํ•ต์‹ฌ ์ž‘์—…**: + - `src/graphics/vulkan/command_processor.cpp`์˜ `IssueSwap` ๋ฐ `texture_cache.cpp`์˜ `RequestSwapTexture` ์ˆ˜์ •. + - `RequestSwapTexture`๊ฐ€ ๊ฒŒ์ŠคํŠธ ๋ ˆ์ง€์Šคํ„ฐ `GetTextureFetch(0)`๋งŒ ์˜์กดํ•˜์ง€ ์•Š๊ณ , ์ตœ๊ทผ `Resolve`๊ฐ€ ์™„๋ฃŒ๋œ GPU Vulkan RenderTarget Image (`0x1EF3B000`) ๋˜๋Š” ํ…์Šค์ฒ˜ ๋ทฐ๋ฅผ ์ง์ ‘ Presenter์˜ ์Šค์™‘ ํ…์Šค์ฒ˜(`swap_texture_view`)๋กœ ๋ฐ”์ธ๋”ฉํ•˜๋„๋ก ์—ฐ๊ฒฐ. +2. **ํ™•์ธํ•  ํŒŒ์ผ**: + - `src/graphics/vulkan/command_processor.cpp` (`IssueSwap`, `IssueCopy_StandardResolvePath`) + - `src/graphics/vulkan/texture_cache.cpp` (`RequestSwapTexture`) + - `src/graphics/vulkan/render_target_cache.cpp` (`Resolve`)