From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
louis.chauvet@bootlin.com, drawat.floss@gmail.com,
hamohammed.sa@gmail.com, melissa.srw@gmail.com,
mhklinux@outlook.com, simona@ffwll.ch, airlied@gmail.com,
maarten.lankhorst@linux.intel.com
Cc: dri-devel@lists.freedesktop.org, linux-hyperv@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH v2 1/4] drm/vblank: Add vblank timer
Date: Tue, 02 Sep 2025 10:09:04 +0200 [thread overview]
Message-ID: <87iki1ff8f.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20250901111241.233875-2-tzimmermann@suse.de>
Thomas Zimmermann <tzimmermann@suse.de> writes:
> The vblank timer simulates a vblank interrupt for hardware without
> support. Rate-limits the display update frequency.
>
> DRM drivers for hardware without vblank support apply display updates
> ASAP. A vblank event informs DRM clients of the completed update.
>
> Userspace compositors immediately schedule the next update, which
> creates significant load on virtualization outputs. Display updates
> are usually fast on virtualization outputs, as their framebuffers are
> in regular system memory and there's no hardware vblank interrupt to
> throttle the update rate.
>
> The vblank timer is a HR timer that signals the vblank in software.
> It limits the update frequency of a DRM driver similar to a hardware
> vblank interrupt. The timer is not synchronized to the actual vblank
> interval of the display.
>
> The code has been adopted from vkms, which added the funtionality
> in commit 3a0709928b17 ("drm/vkms: Add vblank events simulated by
> hrtimers").
>
> The new implementation is part of the existing vblank support,
> which sets up the timer automatically. Drivers only have to start
> and cancel the vblank timer as part of enabling and disabling the
> CRTC. The new vblank helper library provides callbacks for struct
> drm_crtc_funcs.
>
> The standard way for handling vblank is to call drm_crtc_handle_vblank().
> Drivers that require additional processing, such as vkms, can init
> handle_vblank_timeout in struct drm_crtc_helper_funcs to refer to
> their timeout handler.
>
> v2:
> - implement vblank timer entirely in vblank helpers
> - downgrade overrun warning to debug
> - fix docs
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Tested-by: Louis Chauvet <louis.chauvet@bootlin.com>
> Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
> ---
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2025-09-02 8:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 11:06 [PATCH v2 0/4] drm: Add vblank timers for devices without interrupts Thomas Zimmermann
2025-09-01 11:06 ` [PATCH v2 1/4] drm/vblank: Add vblank timer Thomas Zimmermann
2025-09-02 8:09 ` Javier Martinez Canillas [this message]
2025-09-02 13:27 ` Ville Syrjälä
2025-09-02 14:16 ` Thomas Zimmermann
2025-09-02 15:58 ` Lyude Paul
2025-09-04 14:21 ` Thomas Zimmermann
2025-09-01 11:06 ` [PATCH v2 2/4] drm/vblank: Add CRTC helpers for simple use cases Thomas Zimmermann
2025-09-02 8:14 ` Javier Martinez Canillas
2025-09-01 11:07 ` [PATCH v2 3/4] drm/vkms: Convert to DRM's vblank timer Thomas Zimmermann
2025-09-02 8:15 ` Javier Martinez Canillas
2025-09-01 11:07 ` [PATCH v2 4/4] drm/hypervdrm: Use " Thomas Zimmermann
2025-09-02 8:30 ` Javier Martinez Canillas
2025-09-02 12:58 ` Thomas Zimmermann
2025-09-02 15:41 ` Javier Martinez Canillas
2025-09-04 3:38 ` Michael Kelley
2025-09-04 5:50 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iki1ff8f.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=drawat.floss@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=louis.chauvet@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=melissa.srw@gmail.com \
--cc=mhklinux@outlook.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox