Skip to content

Display Corruptions with KMS and Overscan Margins on the RaspberryPi 4 #4475

Closed

Description

@mripard

Moving the cursor along the edges of the display creates some visual artifacts when disable_overscan isn't set.

To reproduce

Build a kernel based on current the rpi-5.10.y branch (7aa66c0 in my case), start X and move the cursor along the edges. Complete corruption of the display should occur.

Adding disable_overscan=1 to config.txt makes it behave properly.

Activity

  1. timg236 commented on Jul 26, 2021

    @timg236
    Contributor

    Yes, we can see that here

  2. popcornmix commented on Jul 26, 2021

    @popcornmix
    Collaborator

    Also noticed that top right corner causes:

    [  227.049120] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:76:crtc-3] flip_done timed out
    [  227.049163] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:76:crtc-3] flip_done timed out
    [  237.289091] vc4-drm gpu: [drm] *ERROR* Timed out waiting for flip_done
    
  3. mripard commented on Jul 26, 2021

    @mripard
    ContributorAuthor

    For the record, I noticed this this morning while debugging something else and just opened the issue so that it doesn't get forgotten.

  4. timg236 commented on Jul 26, 2021

    @timg236
    Contributor

    I'm finding that when the mouse is stationary everything is ok. However, if it moves and is within 62 pixels of the bottom or right edge then the corrupt appears.
    This seems to correspond with the scaling mode changing from zero to 4 or 5 for that d-list element. In the stationary state the scaling mode is always zero.
    scl0_mode, scl1_mode in controlword0

  5. popcornmix commented on Jul 26, 2021

    @popcornmix
    Collaborator

    A possibly related issue is with kms, and two displays, from desktop rapidly switching mouse pointer between displays results in occasional glitches (on the framebuffer). It doesn't seem to be clock related (forcing it high doesn't avoid it).
    I'm suspicious that the mouse overlay being removed/added is causing a one frame glitch.
    When it doesn't change screen it presumably uses the simpler code path allowed by vc4_plane_atomic_async_check.

  6. popcornmix commented on Jul 26, 2021

    @popcornmix
    Collaborator

    I've reverted most of #4441 and the screen corruption when cursor near edges and glitches when mouse pointer switches screens issues are gone.

  7. popcornmix commented on Jul 27, 2021

    @popcornmix
    Collaborator

    This should be resolved with latest rpi-update kernel.

  8. mripard commented on Aug 30, 2021

    @mripard
    ContributorAuthor

    I reverted your revert and tried to fix all the pending bugs we had. I've been working on this one today and followed the suggestion from @timg236 on #4465 that it might be related to the core clock being too low on 4k.

    I'm seeing this on 1080p, but I still raised the core clock to 500MHz which is more than the double of what is computed (220MHz). I'm still getting both the corruptions (even though I'm getting less corruptions, possibly from my other fixes), and some timeouts.

    Moving the cursor in itself (using xdotool mousemove) doesn't trigger it, so it looks like it's the sequence of commits when moving the cursor that triggers it.

  9. mripard commented on Nov 18, 2021

    @mripard
    ContributorAuthor

    For the record, this also affects rpi-5.15.y with a single display

  10. mripard commented on Mar 2, 2022

    @mripard
    ContributorAuthor

    This was fixed by the PR #4895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions