From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francisco Jerez Subject: Re: nouveau page_flip function implement not wait vblank, which cause screen garbage Date: Tue, 25 Oct 2011 14:15:18 +0200 Message-ID: <87mxcpp8rt.fsf@riseup.net> References: <5cfc7b09.427d.13339186037.Coremail.wwzbwwzb@163.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0655962429==" Return-path: Received: from mx1.riseup.net (mx1.riseup.net [204.13.164.18]) by gabe.freedesktop.org (Postfix) with ESMTP id 35C7F9EFC6 for ; Tue, 25 Oct 2011 05:23:51 -0700 (PDT) In-Reply-To: (Maarten Maathuis's message of "Tue, 25 Oct 2011 07:45:29 +0200") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Maarten Maathuis Cc: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org --===============0655962429== Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Maarten Maathuis writes: > 2011/10/25 chris : >> Can anyone give a suggestion, is wait-vblank fully implemented in >> page_flip() for nouveau drm driver? >> It's intentionally not implemented. The reason is that I wanted to support non-vsync'ed vblank as well, and for vsync'ed blits we had to think about a different mechanism for vblank synchronization anyway, so I figured it didn't make that much sense to force vblank synchronization directly from the pageflip ioctl. >> >> At 2011-10-24 14:30:55,chris=C2=A0 wrote: >> >> Dear, >> >> I use NVidia Geforce 7300GT graphics card in my PC, and Linux 3.1rc4 ker= nel >> code, git drm 2.4.36. >> =C2=A0 When I run the vbltest program, it prints=C2=A0 "60HZ"=C2=A0 whic= h indicated the >> implementation of drmWaitVBlank() and drm_vblank_wait()=C2=A0 is correct. >> =C2=A0 But when I run modetest with option " -v -s 12:1280x1024" , it pr= ints high >> fresh rate up to "150 HZ" .=C2=A0 I examing the code , and found that no= waiting >> vblank operation is processed in nouveau_crtc_ page_flip() function. The >> screen=C2=A0 produced lots of garbage and blink very much. That's fine if by "garbage" you just mean it's tearing like crazy. >>[...] > > It seems to be, the actual page flipping is done by software method > (see nv04_graph_mthd_page_flip). There is one thing i'm unsure about > and that is that we wait for the rendering to be done to the current > frontbuffer and not the current backbuffer (this is only done if the > page flip channel is different than the rendering channel). Maybe > someone else can comment on that. There's no need to wait for the backbuffer rendering to end because the pageflip is always pushed through the last channel that has queued rendering to it, so, the "waiting" is actually done by the GPU. The waiting to the current frontbuffer (which in most cases is going to be a cross-channel barrier instead of actual CPU waiting) is necessary for the (rare) case where you have several channels trying to render to the same pageflipped drawable, to make sure that the flips are properly synchronized with respect each other. --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EAREIAAYFAk6mqFYACgkQg5k4nX1Sv1vb2gD8DJ7x9iC/IlQ3/36vTnzO1I8n dzrZW7wNjZSNDYHxvv8A/A/3PSZgQxjF2HSoSqr784Vu4x5BzBKA7cMYJb0meJ9B =n/V/ -----END PGP SIGNATURE----- --==-=-=-- --===============0655962429== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0655962429==--