Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
A
amd
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,029
    • Issues 1,029
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • drm
  • amd
  • Issues
  • #1371

Closed
Open
Opened Nov 13, 2020 by Simon Ser@emersion

amdgpu internal page-flip failure with "Mode validation failed for stream update!"

Brief summary of the problem:

gamescope is a compositor that tries to use KMS planes to scan out games. gamescope uses KMS atomic commits to perform page-flips. When running some clients, the atomic commit will succeed, but amdgpu will later internally fail the page-flip.

Since user-space isn't aware of the issue, it freezes, waiting for a page-flip event from the kernel.

Surprisingly enough, the bug goes away when user-space passes DRM_MODE_ATOMIC_ALLOW_MODESET on each commit (though this isn't desirable, it's just a workaround).

Expected behavior: amdgpu should perform all checks needed for a page-flip in the atomic check handler amdgpu_dm_atomic_check. If a game can't be directly scanned out, amdgpu should fail the atomic commit to let user-space know about the failure. In this particular case, it seems like amdgpu could still be capable of scanning out the game (since ALLOW_MODESET makes it work).

Hardware description:

  • CPU: AMD Ryzen 5 3500U
  • GPU: APU (PCI 1002:15d8 Advanced Micro Devices, Inc. [AMD/ATI] Picasso)
  • System Memory: 6GiB
  • Display(s): integrated screen
  • Type of Diplay Connection: eDP

System infomration:

  • Distro name and Version: Arch Linux
  • Kernel version: 5.9.3-arch1-1
  • Custom kernel: N/A
  • AMD package version: N/A

How to reproduce the issue:

  1. Clone gamescope
  2. Apply this patch to stop setting ALLOW_MODESET on all commits: https://l.sr.ht/DHTC.txt
  3. Build gamescope
  4. Run it with Steam and enable use of KMS planes: build/gamescope -e -l -d -- steam -tenfoot -steamos >gamescope.log 2>&1
  5. Start Portal 1 (also reproduces with a lot of other games)
  6. gamescope freezes, dmesg should contain:
[16283.676840] [drm:dc_commit_updates_for_stream [amdgpu]] *ERROR* Mode validation failed for stream update!
[16293.708914] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:62:crtc-0] flip_done timed out

Downstream bug: https://github.com/Plagman/gamescope/issues/67

Attached files:

DRM debug dmesg logs: https://l.sr.ht/NVUL.log (also contains errors about the cursor plane, but this is a separate and unrelated issue)

Edited Nov 13, 2020 by Simon Ser
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: drm/amd#1371