From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <87b1e377877b7285828eab6953685345@coraid.com> References: <7d3530220907132223o58711065w5a669c7fd0084e53@mail.gmail.com> <1a71e77003b3e1e72f9ae1d4f7a7fb1d@quanstro.net> <7d3530220907140903j55400f88h77301749c5b50f51@mail.gmail.com> <87b1e377877b7285828eab6953685345@coraid.com> Date: Tue, 14 Jul 2009 09:23:01 -0700 Message-ID: <7d3530220907140923s590847dcs2128ca4e33dcc13f@mail.gmail.com> From: John Floren To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] ugliness in vesa Topicbox-Message-UUID: 203b37c6-ead5-11e9-9d60-3106f5b1d025 On Tue, Jul 14, 2009 at 9:10 AM, erik quanstrom wrote: >> I believe I properly applied the pat patch, but I'm not really seeing >> any improvement. At least, it still takes fully two seconds to bring >> one large window in front of another. > > that's because the screen is not double-buffered. =C2=A0pat or mtrr do > not improve reads from video memory. =C2=A0there is no such thing > as read combining. =C2=A0and on some nvidia cards, especially the pcie > ones i have, reads from video memory are really slow. I haven't done much graphics hacking, but I remember that implementing double buffering in the few programs I wrote was extremely easy and gave a really cheap performance boost. Would it be similarly easy to add double-buffering to the driver? I'm willing to put in some time, but not too much or Ron will smack me ;) > >> Did you change anything with the nvidia driver when applying the mtrr >> patch? I was under the impression that the applied patch only affected >> the vesa driver. > > only the one line previously posted. =C2=A0(a similar change was made to = the > vesa driver, of course.) > > - erik > As I'm reading it, the change to vganvidia.c you posted above (re-pasted below) does pat stuff. Am I confused? I don't think pat and mtrr are the same thing... nv.dmabase =3D (void*)vmappat(scr->paddr + scr->storage - 128*1024, 128*1024, PATWT); John --=20 "I've tried programming Ruby on Rails, following TechCrunch in my RSS reader, and drinking absinthe. It doesn't work. I'm going back to C, Hunter S. Thompson, and cheap whiskey." -- Ted Dziuba