From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Michel Dänzer" <michel.daenzer@mailbox.org>
Cc: Derek Foreman <derek.foreman@collabora.com>,
Chuanyu Tseng <Chuanyu.Tseng@amd.com>,
harry.wentland@amd.com, Mario.Limonciello@amd.com,
xaver.hugl@gmail.com, victoria@system76.com, seanpaul@google.com,
Sunpeng.Li@amd.com, dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH] drm/uapi: Indroduce a VRR Range Control Interface
Date: Wed, 24 Sep 2025 12:05:14 +0300 [thread overview]
Message-ID: <aNO0Snb9m5Nsf3H6@intel.com> (raw)
In-Reply-To: <cdb28aea-e647-4b2a-a5e3-1ec60f05a4aa@mailbox.org>
On Wed, Sep 24, 2025 at 10:39:16AM +0200, Michel Dänzer wrote:
> On 24.09.25 10:34, Ville Syrjälä wrote:
> > On Mon, Sep 15, 2025 at 03:37:07PM +0000, Derek Foreman wrote:
> >> On 9/15/25 5:01 AM, Michel Dänzer wrote:
> >>> On 12.09.25 15:45, Derek Foreman wrote:
> >>>> On 9/12/25 2:33 AM, Chuanyu Tseng wrote:
> >>>>> Introduce a DRM interface for DRM clients to further restrict the
> >>>>> VRR Range within the panel supported VRR range on a per-commit
> >>>>> basis.
> >>>>>
> >>>>> The goal is to give DRM client the ability to do frame-doubling/
> >>>>> ramping themselves, or to set lower static refresh rates for power
> >>>>> savings.
> >>>> I'm interested in limiting the range of VRR to enable HDMI's QMS/CinemaVRR features - ie: switching to a fixed rate for media playback without incurring screen blackouts/resyncs/"bonks" during the switch.
> >>>>
> >>>> I could see using an interface such as this to do the frame rate limiting, by setting the lower and upper bounds both to a media file's framerate. However for that use case it's not precise enough, as video may have a rate like 23.9760239... FPS.
> >>>>
> >>>> Would it be better to expose the limits as a numerator/denominator pair so a rate can be something like 24000/1001fps?
> >>> I was thinking the properties could allow directly specifying the minimum and maximum number of total scanlines per refresh cycle, based on the assumption the driver needs to program something along those lines.
> >>
> >> Surprisingly, this would also not be precise enough for exact media
> >> playback, as the exact intended framerate might not result in an integer
> >> number of scan lines. When that happens a QMS/CinemaVRR capable HDMI
> >> source is expected to periodically post a frame with a single extra scan
> >> line to minimize the error.
> >
> > Intel VRR hardware has a "CMRR" feature where it can automagically
> > tweak the vtotal between frames to maintain a non integer average.
>
> Neat.
>
>
> > As for knobs to limit the min/max refresh rates, technically you
> > wouldn't need the max knob because that is ultimately defined by
> > the vtotal of the supplied timings. But I guess if you have a
> > knob to limit the min then a max knob might be convenient as well.
>
> It allows the compositor to limit the maximum refresh rate without changing the mode (which can involve visual glitches).
I think the driver should be able to handle the two cases in exactly
the same way (assuming nothing else in the mode changes). But I'm not
opposed to having a max alongside the min.
IMO the min and max could be straight integers, if specified as
vtotals (that's what the hardware takes for us at least). And
for the CMRR thing we'd need another property to indicate the
target refresh rate somehow.
I suppose another option would be to have non-integer min/max,
and then enable CMRR if min==max==<non-integer value>. Not sure
I quite like that idea though.
Also not sure what the rules for such properties should be.
Should they be allowed to be specified outside the legal range
and the driver just clamps them, or should that be an error?
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-09-24 9:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 7:33 [RFC PATCH] drm/uapi: Indroduce a VRR Range Control Interface Chuanyu Tseng
2025-09-12 13:45 ` Derek Foreman
2025-09-15 10:01 ` Michel Dänzer
2025-09-15 15:37 ` Derek Foreman
2025-09-15 15:49 ` Michel Dänzer
2025-09-16 21:56 ` Xaver Hugl
2025-09-17 15:12 ` Derek Foreman
2025-09-18 8:33 ` Tseng, Chuan Yu (Max)
2025-09-22 19:06 ` Leo Li
2025-09-23 8:37 ` Michel Dänzer
2025-09-23 14:35 ` Leo Li
2025-09-24 11:44 ` Michel Dänzer
2025-09-24 8:34 ` Ville Syrjälä
2025-09-24 8:39 ` Michel Dänzer
2025-09-24 9:05 ` Ville Syrjälä [this message]
2025-09-24 9:32 ` Tseng, Chuan Yu (Max)
2025-09-24 11:56 ` Michel Dänzer
2025-09-29 8:01 ` Ville Syrjälä
2025-09-24 7:50 ` Michel Dänzer
2025-09-24 15:01 ` Leo Li
2025-09-26 14:19 ` Xaver Hugl
2025-09-27 8:51 ` Michel Dänzer
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=aNO0Snb9m5Nsf3H6@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Chuanyu.Tseng@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=derek.foreman@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=michel.daenzer@mailbox.org \
--cc=seanpaul@google.com \
--cc=victoria@system76.com \
--cc=xaver.hugl@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.