Skip to content

Ugly Screen Tearing on Kernel 5.15.X and up with OGL apps in DRM #4901

Closed

Description

@bluestang2006

Describe the bug

I am seeing very bad screen tearing in OpenGL apps, specifically vkQuake3, when using the app in KMS+DRM aka console.

This behavior is not seen in an X11 session, and it not seen using the Vulkan driver in either session (X11 or KMS+DRM).

As I said before it's strictly being seen in DRM using an OGL context.

Switching back to the latest stable firmware (5.10) the issue goes away.

Steps to reproduce the behaviour

This is easily reproducible if you compile/setup vkQuake3 and set the default renderer to opengl1 - seta cl_renderer "opengl1". This is best done by creating an autoexec.cfg in the baseq3 folder and running the app in DRM.

Device (s)

Raspberry Pi 4 Mod. B

System

64-bit RPiOS (Bullseye)
vc4-kms-v3d
kernel 5.15 (latest master branch)
NOTE: I am using the latest MESA git for the v3d+v3dv drivers.

Logs

No response

Additional context

No response

Activity

  1. added
    KMS Issue
    on Mar 2, 2022
  2. mripard commented on Mar 3, 2022

    @mripard
    Contributor

    It seems like it could be the same issue than the one we fixed in #4571

    Interestingly, that patch never got applied to the rpi-5.15.y branch, which might explain why it works on 5.10 but doesn't on 5.15.

    @pelwell

  3. pelwell commented on Mar 3, 2022

    @pelwell
    Contributor

    Being discussed offline, but this was one of the many patches that doesn't apply when moving from 5.10 to 5.15.

  4. pelwell commented on Mar 3, 2022

    @pelwell
    Contributor

    Or rather, it applies but then produces a build error due to dma_resv_get_excl no longer being defined.

  5. pelwell commented on Mar 4, 2022

    @pelwell
    Contributor

    @mripard Are you going to update this patch for 5.15?

  6. mripard commented on Mar 4, 2022

    @mripard
    Contributor

    Yes, I was planning on sending a new version but got distracted by the writeback issues, I'll send a PR today or on monday

  7. pelwell commented on Mar 4, 2022

    @pelwell
    Contributor

    Sure - when you're ready.

  8. mripard commented on Mar 4, 2022

    @mripard
    Contributor

    I've just done it with PR #4925

  9. bluestang2006 commented on Mar 5, 2022

    @bluestang2006
    Author

    #4925 fixed this issue. Tested with Quake3e and another OpenGL app called RetroFE and the vysnc issue is resolved. As a bonus this patch was tested on the rpi-5.16.y branch and everything looked great.

  10. pelwell commented on Mar 5, 2022

    @pelwell
    Contributor

    Thanks - forward-ported to rpi-5.16.y and rpi-5.17y.

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

    KMS Issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions