From: Ilija Hadzic Subject: Re: vblank problem (and proposed fix) on crtc > 1 Date: Thu, 10 Mar 2011 13:08:18 -0600 (CST) Message-ID: References: <1299251679.14068.83.camel@thor.local> <1299760304.5726.94.camel@thor.local> <1299766818.5726.126.camel@thor.local> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1297389768-1299783218=:23088" Return-path: Received: from ihemail4.lucent.com (ihemail4.lucent.com [135.245.0.39]) by gabe.freedesktop.org (Postfix) with ESMTP id 994489E771 for ; Thu, 10 Mar 2011 11:08:27 -0800 (PST) In-Reply-To: <1299766818.5726.126.camel@thor.local> Content-ID: 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: Michel =?ISO-8859-1?Q?D=E4nzer?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-1297389768-1299783218=:23088 Content-Type: TEXT/PLAIN; CHARSET=X-UNKNOWN; FORMAT=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: On Thu, 10 Mar 2011, Michel [ISO-8859-1] D=E4nzer wrote: > No, userspace shouldn't call the ioctl for a disabled CRTC during normal > operation, that would be a bug of its own. Well, that's exactly what DDX is doing today. Try this experiment: open a= =20 terminal window and run glxgears in it and observer the frame rate synced= =20 up to your monitor. Then in another terminal window type 'xset dpms force= =20 off' (or go to dpms off state any other way you want). The screen goes=20 blank (disabled CRTC). Wait a while and then move your mouse to exit the=20 disabled state. Notice the low frame rate reported by glxgears in one=20 line. That's because glxSwapBuffers was blocked while screen was in=20 power-down state. Now I don't know if this behavior is intentional (I know your opinion=20 based on the above), but it looks logical to me: if the screen is off and= =20 GLX attempts to wait on it, it gets what it deserves. If this is the real= =20 intent, then kernel returning error on disabled screen would break it (the= =20 application would just start to "rush" through rendering at max speed and= =20 eat up the I/O and CPU bandwidth for something that you can't see on the=20 screen). Anyway, this is a topic for a separate thread. I tend to agree that one day maybe the error is returned for some other=20 reason (where your example may have been a bad one) so I will look into=20 DRM_IOCTL_GET_CAP. > > The difference is that there should be no bogus error message in dmesg, > avoiding spurious bug reports. > That I agree and if GET_CAP ioctl is appropriate here, I'll change to=20 that. There will still be an error message in the kernel at probing time,= =20 but hopefully a more meaningfull one. I guess the Xorg log message should= =20 then be something along the "you need a newer kernel" lines. Agreed ? >> the same behavior if either component is old (DDX or kernel), rather tha= n >> have different behavior for different combinations of old/new. > > I don't see the value in conserving fundamentally broken behaviour. > There is even less value in introducing a wider variety of broken=20 behaviors. Returning immediately, would cause the application to rush at=20 full speed through buffer swaps and eat up the CPU and I/O bandwidth. It think that there are equal number of ppl. who would argue for that as=20 those who would argue for the opposite. > > You could probably always return 0, or previous value + 1 or whatever, > that's no more wrong than the values from a different CRTC. > What I could do doesn't matter that much, because whatever I do would not= =20 result it fully functional system unless both the DDX and the kernel match= =20 in capabilities. So I go for the one that is less likely to introduce new= =20 bugs or unpredictable behavior. > > Then at the very least the claim that 'an error message will appear in > the kernel only once at start up time' is wrong, there will actually be > four of them on old kernels. > More precisely: num_crtcs - 2 times. Use word 'once' used in a liberal=20 sense ;-) it doesn't happen repetatively during the normal operation. At least, if I can use DRM_IOCTL_GET_CAP (which I still have to check), the message will be more meaningful. ---559023410-1297389768-1299783218=:23088 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 ---559023410-1297389768-1299783218=:23088--