dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
To: Harry Wentland <harry.wentland-5C7GfCeVMHo@public.gmane.org>
Cc: "Nicolai Hähnle" <nicolai.haehnle-5C7GfCeVMHo@public.gmane.org>,
	"Daniel Vetter" <daniel.vetter-/w4YWyX8dFk@public.gmane.org>,
	"Michel Dänzer" <michel.daenzer-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx mailing list"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Manasi Navare"
	<manasi.d.navare-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	dri-devel
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
Subject: Re: RFC for a render API to support adaptive sync and VRR
Date: Fri, 13 Apr 2018 18:04:53 +0200	[thread overview]
Message-ID: <20180413160453.GC31310@phenom.ffwll.local> (raw)
In-Reply-To: <435ebd04-0435-5a6a-9f1e-e4c4fc629aa9-5C7GfCeVMHo@public.gmane.org>

On Mon, Apr 09, 2018 at 04:00:21PM -0400, Harry Wentland wrote:
> Adding dri-devel, which I should've included from the start.

Top posting, because I'm lazy and was out sick ...

Few observations:
- Stéphane has a great point which seems to have been ignored thus far.
- Where's the VK extension for this - there must be one :-) Starting with
  a full implementation for that (based on radv or anv or something like
  that) might help.
- Imo if we do a conversion between the vk api and what we feed into the
  hw, then let's not do a midlayer mistake: That conversion should happen
  at the bottom, in the kernel driver, maybe assisted with some helpers.
  Not somewhere in-between, like in libdrm of all places!

Cheers, Daniel

> 
> On 2018-04-09 03:56 PM, Harry Wentland wrote:
> > === What is adaptive sync and VRR? ===
> > 
> > Adaptive sync has been part of the DisplayPort spec for a while now and allows graphics adapters to drive displays with varying frame timings. VRR (variable refresh rate) is essentially the same, but defined for HDMI.
> > 
> > 
> > 
> > === Why allow variable frame timings? ===
> > 
> > Variable render times don't align with fixed refresh rates, leading to
> > stuttering, tearing, and/or input lag.
> > 
> > e.g. (rc = render completion, dr = display refresh)
> > 
> > rc       B          C            D            E      F
> > dr	A	B	C	C	D	E	F
> > 
> >                     ^             ^        
> > 		  frame         missed     
> > 		 repeated	display    
> > 		  twice	        refresh   
> > 
> > 
> > 
> > === Other use cases of adaptive sync ====
> > 
> > Beside the variable render case, adaptive sync also allows adjustment of refresh rates without a mode change. One such use case would be 24 Hz video.
> > 
> > 
> > 
> > === A DRM render API to support variable refresh rates ===
> > 
> > In order to benefit from adaptive sync and VRR userland needs a way to let us know whether to vary frame timings or to target a different frame time. These can be provided as atomic properties on a CRTC:
> >  * bool	variable_refresh_compatible
> >  * int	target_frame_duration_ns (nanosecond frame duration)
> > 
> > This gives us the following cases:
> > 
> > variable_refresh_compatible = 0, target_frame_duration_ns = 0
> >  * drive monitor at timing's normal refresh rate
> > 
> > variable_refresh_compatible = 1, target_frame_duration_ns = 0
> >  * send new frame to monitor as soon as it's available, if within min/max of monitor's reported capabilities
> > 
> > variable_refresh_compatible = 0/1, target_frame_duration_ns = > 0
> >  * send new frame to monitor with the specified target_frame_duration_ns
> > 
> > When a target_frame_duration_ns or variable_refresh_compatible cannot be supported the atomic check will reject the commit.
> > 
> > 
> > 
> > === Previous discussions ===
> > 
> > https://lists.freedesktop.org/archives/dri-devel/2017-October/155207.html
> > 
> > 
> > 
> > === Feedback and moving forward ===
> > 
> > I'm hoping to get some feedback on this or continue the discussion on how adaptive sync / VRR might look like in the DRM ecosystem. Once there are no major concerns or objections left we'll probably start creating some patches to sketch this out a bit better and see how it looks in practice.
> > 
> > 
> > 
> > Cheers,
> > Harry
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> > 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-04-13 16:04 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c79421ce-9408-5cd6-5de3-0fa521146e4b@amd.com>
     [not found] ` <c79421ce-9408-5cd6-5de3-0fa521146e4b-5C7GfCeVMHo@public.gmane.org>
2018-04-09 20:00   ` RFC for a render API to support adaptive sync and VRR Harry Wentland
     [not found]     ` <435ebd04-0435-5a6a-9f1e-e4c4fc629aa9-5C7GfCeVMHo@public.gmane.org>
2018-04-09 21:45       ` Manasi Navare
     [not found]         ` <20180409214554.GB13967-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-10  6:45           ` Christian König
2018-04-10  7:37             ` Michel Dänzer
     [not found]               ` <b75e31f7-ce59-de97-5445-cb4c03ff7336-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-10 15:08                 ` Harry Wentland
     [not found]                   ` <ae9992e5-43ab-9636-13e1-8a5c692480b5-5C7GfCeVMHo@public.gmane.org>
2018-04-10 15:28                     ` Christian König
2018-04-10 15:35                     ` Cyr, Aric
2018-04-10 15:43                       ` Christian König
     [not found]                         ` <fc53ce53-f02c-891d-4aa5-e9a11cbe3007-5C7GfCeVMHo@public.gmane.org>
2018-04-10 16:26                           ` Cyr, Aric
     [not found]                             ` <MWHPR12MB1837488A047C03E955282A4182BE0-Gy0DoCVfaSXe1Hf+mWOIywdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-04-10 16:37                               ` Nicolai Hähnle
     [not found]                                 ` <54baa87e-33a9-bd69-a309-d61176eb4e8d-5C7GfCeVMHo@public.gmane.org>
2018-04-10 17:52                                   ` Harry Wentland
     [not found]                             ` <063d6dff-2b97-ef01-12bb-8a24125a58ec@daenzer.net>
2018-04-10 17:13                               ` Cyr, Aric
     [not found]                                 ` <65006f34-39b9-5aca-e0c0-77a591b69c3a@daenzer.net>
     [not found]                                   ` <65006f34-39b9-5aca-e0c0-77a591b69c3a-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-10 17:25                                     ` Cyr, Aric
     [not found]                                       ` <f85e3590-b283-843b-12d0-5f6f0c4c0952@amd.com>
2018-04-10 21:45                                         ` Cyr, Aric
2018-04-11  6:57                                           ` Nicolai Hähnle
     [not found]                                             ` <72c1d357-db72-b181-9421-04f99b3bbf2f-5C7GfCeVMHo@public.gmane.org>
2018-04-11  9:50                                               ` Michel Dänzer
     [not found]                                                 ` <2005817c-09c0-aebe-bb96-9e22d6f16df5-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-11 23:30                                                   ` Cyr, Aric
     [not found]                                                     ` <MWHPR12MB1837F8120B126FA3A4CE899982BD0-Gy0DoCVfaSXe1Hf+mWOIywdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-04-12  8:48                                                       ` Michel Dänzer
2018-04-12 11:39                                                     ` Nicolai Hähnle
     [not found]                                                       ` <a5b5c31f-e7c5-8ae0-1239-06bfa86b939b-5C7GfCeVMHo@public.gmane.org>
2018-04-12 14:57                                                         ` Michel Dänzer
2018-04-12 17:39                                                         ` Harry Wentland
2018-04-11 10:28                                       ` Michel Dänzer
2018-04-11 15:45                             ` Michel Dänzer
     [not found]                       ` <MWHPR12MB1837C57016A470A5199E855282BE0-Gy0DoCVfaSXe1Hf+mWOIywdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-04-10 17:13                         ` Michel Dänzer
2018-04-12 21:38                 ` Stéphane Marchesin
2018-04-13 19:24                   ` Harry Wentland
2018-04-18  3:58                 ` Keith Packard
2018-04-18  7:39                   ` Daniel Vetter
2018-04-20 20:32                     ` Manasi Navare
     [not found]                       ` <20180420203240.GA9472-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-21 10:30                         ` Daniel Stone
2018-04-23 14:40                         ` Harry Wentland
2018-04-23 21:19                           ` Manasi Navare
     [not found]                             ` <20180423211944.GC9472-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-24 12:09                               ` Daniel Vetter
2018-04-24 14:20                                 ` Cyr, Aric
     [not found]                                 ` <20180424120946.GW31310-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-04-24 14:28                                   ` Harry Wentland
     [not found]                                     ` <b9c33eeb-1db8-f782-cfbe-411d94fecb67-5C7GfCeVMHo@public.gmane.org>
2018-04-24 21:57                                       ` Daniel Vetter
     [not found]                                         ` <CAKMK7uHzLRUwZSFbMb4qDzXBODVSQVTTw6BxgmvJdES4gJmBDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-17 10:20                                           ` Ernst Sjöstrand
2018-04-10 15:03           ` Harry Wentland
2018-04-10 21:36             ` Manasi Navare
2018-04-10 22:00               ` Cyr, Aric
2018-04-13 16:04       ` Daniel Vetter [this message]
     [not found]         ` <20180413160453.GC31310-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-04-13 19:20           ` Harry Wentland

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=20180413160453.GC31310@phenom.ffwll.local \
    --to=daniel-/w4ywyx8dfk@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=daniel.vetter-/w4YWyX8dFk@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \
    --cc=manasi.d.navare-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=michel.daenzer-5C7GfCeVMHo@public.gmane.org \
    --cc=nicolai.haehnle-5C7GfCeVMHo@public.gmane.org \
    /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