[PATCH v2 2/3] drm: Add variable refresh property to DRM CRTC

Pekka Paalanen ppaalanen at gmail.com
Fri Oct 12 09:21:44 UTC 2018


On Fri, 12 Oct 2018 07:35:57 +0000
"Koenig, Christian" <Christian.Koenig at amd.com> wrote:

> Am 12.10.2018 um 09:23 schrieb Pekka Paalanen:
> > On Wed, 10 Oct 2018 09:35:50 -0400
> > "Kazlauskas, Nicholas" <nicholas.kazlauskas at amd.com> wrote:
> >  
> >> The patches I've put out target this use case mostly because of the
> >> benefit for a relatively simple interface. VRR can and has been used in
> >> more ways that this, however.
> >>
> >> An example usecase that differs from this would actually be video
> >> playback. The monitor's refresh rate likely doesn't align with the video
> >> content rate. An API that exposes direct control over VRR (like the
> >> range, refresh duration, presentation timestamp) could allow the
> >> application to specify the content rate directly to deliver a smoother
> >> playback experience. For example, if you had a 24fps video and the VRR
> >> range was 40-60Hz you could target 48Hz via some API here.  
> > The way that has been discussed to be implemented is that DRM page flips
> > would carry a target timestamp, which the driver will then meet as good
> > as it can. It is better to define an absolute target timestamp than a
> > frequency, because a timestamp can be used to synchronize with audio
> > and more. Mario Kleiner can tell you all about scientific use cases
> > that require accurate display timing, not just frequency.  
> 
> To summarize what information should be provided by the driver stack to 
> make applications happy:
> 
> 1. The minimum time a frame can be displayed, in other words the maximum 
> frame rate.
> 2. The maximum time a frame can be displayed, in other words the minimum 
> frame rate.
> 3. How much change of frame timing is allowed between frames to avoid 
> luminescence flickering.
> 
> Number 1 and 2 can also be used to signal the availability of VRR to 
> applications, e.g. if they are identical we don't support VRR at all.

Hi Christian,

"the maximum time a frame can be displayed" is perhaps not an
unambiguous definition. A frame can be shown indefinitely in any case.
The CRTC will simply start scanning out the same frame again if there
is no new one. I understand what you want to say, but perhaps some
different words will be in order.

I do wonder if applications really want to know the maximum acceptable
slew rate in timings... maybe that should be left for the drivers to
apply. What I'm thinking is that we have the page flip timestamp with
the page flip events to tell when the new FB became active. That
information could be extended with a time range on when the very next
flip could take place. Applications are already computing that
prediction from the flip timestamp and fixed refresh rate, but it might
be nice to give them the driver's opinion explicitly. Maybe the
tolerable slew rate is not a constant.

Other than that, yes, it sounds fine to me.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20181012/8cfe4ae1/attachment.sig>


More information about the amd-gfx mailing list