> If crtc_msc >= msc, the DRM_IOCTL_WAIT_VBLANK ioctl should generate the > userspace event immediately Yes, that works. But the round trip of the vblank handling makes the performance worse.
Regards, Jammy -----Original Message----- From: Michel Dänzer [mailto:[email protected]] Sent: Monday, November 02, 2015 5:44 PM To: Zhou, Jammy Cc: [email protected] Subject: Re: [PATCH xf86-video-amdgpu] Call present_event_notify directly if target_msc <= crtc_msc (v2) On 29.10.2015 14:34, Jammy Zhou wrote: > Do present immediately in this case. > > v2: fix the overflow > > Change-Id: I25b9212169ccbf572b88c033dc09c0ac5cfa4812 > Signed-off-by: Jammy Zhou <[email protected]> > --- > src/amdgpu_present.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c index > 5e5ed72..b9cc1c7 100644 > --- a/src/amdgpu_present.c > +++ b/src/amdgpu_present.c > @@ -160,6 +160,16 @@ amdgpu_present_queue_vblank(RRCrtcPtr crtc, uint64_t > event_id, uint64_t msc) > struct amdgpu_drm_queue_entry *queue; > drmVBlank vbl; > int ret; > + uint64_t crtc_ust, crtc_msc; > + > + ret = amdgpu_present_get_ust_msc(crtc, &crtc_ust, &crtc_msc); > + if (ret != Success) > + return ret; > + > + if (crtc_msc >= msc) { > + present_event_notify(event_id, crtc_ust, crtc_msc); > + return Success; > + } If crtc_msc >= msc, the DRM_IOCTL_WAIT_VBLANK ioctl should generate the userspace event immediately, so I'm not sure anymore why this patch would make any difference. Can you provide more details about what exactly happens with and without this patch? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
