Skip to content

gbm_surface_lock_front_buffer is returning the same buffer before it is released #4

@vanvugt

Description

@vanvugt

gbm_surface_lock_front_buffer is returning the same buffer before it is released.

This happens when attempting to do triple buffering, the Xilinx Mali backend seems to only support double buffering but instead of returning an error when it runs out of buffers it locks the same buffer twice; before it has been safely released and is still on screen. Tearing then occurs.

gbm_surface_lock_front_buffer = A ✔️
gbm_surface_lock_front_buffer = B ✔️
gbm_surface_release_buffer(A) ✔️
gbm_surface_lock_front_buffer = A ✔️
gbm_surface_release_buffer(B) ✔️
gbm_surface_lock_front_buffer = B ✔️
gbm_surface_lock_front_buffer = A ❌ buffer returned before it was released (still on screen)

While this is a driver bug we could detect at runtime, ideally that shouldn't be necessary. The impact is low though. The buffers seem to be linear so the tearing is acceptable when it happens.

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