On 10/27/25 12:52, Thomas Zimmermann wrote: > For each plane, store the buffer object's sync status in the state > of the plane's respective CRTC. During the CRTC's atomic flush, > ignore the vblank timer if any of the CRTC's plane's buffer object > is synchronized to an external source. Instead send the vblank event > immediately. Avoids corner cases where a vblank event happens too > late for the next frame to be page flipped in time. > > Exporters of GEM objects sometimes interfere with the vblank timer; > resulting in framerate drops. Hence detect this case and handle it > as outlined above. > > The vblank timer is still active and fires in regular intervals > according to the guest display refresh. This rate limits clients > that only wait for the next vblank to occur, such as fbcon. These > clients would otherwise produce a very high number of frames per > second. > > v4: > - only handle imported GEM buffer objects (Dmitri, Vivek) > - fix test for plane visibility (Vivek) > - always enable vblank timer to make waiting clients happy > v3: > - disable vblank unconditionally > - compute status on each commit > v2: > - enable/disable vblank timer according to buffer setup > > Signed-off-by: Thomas Zimmermann <[email protected]> > --- > This patch was previously called "drm/virtgpu: Make vblank event > dependent on the host resource". Earlier versions where meant for > testing, rather than being merged. See [1] for a discussion of when > the fixed problem happens. > > [1] https://lore.kernel.org/dri-devel/20251016145230.79270-1- > [email protected]/ > --- > drivers/gpu/drm/virtio/virtgpu_display.c | 67 ++++++++++++++++++++++-- > drivers/gpu/drm/virtio/virtgpu_drv.h | 15 ++++++ > drivers/gpu/drm/virtio/virtgpu_plane.c | 28 +++++++++- > 3 files changed, 104 insertions(+), 6 deletions(-)
No problems spotted. I'd only extended comment in the code explicitly stating that drm_gem_is_imported() is the workaround, might edit it on applying. Will wait for Vivek's feedback. Thanks. Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> -- Best regards, Dmitry
