<?xml version='1.0' encoding='utf-8' ?>
<!--  If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/  -->
<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:media='http://search.yahoo.com/mrss/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>anholt&apos;s lj</title>
  <link>http://anholt.livejournal.com/</link>
  <description>anholt&apos;s lj - LiveJournal.com</description>
  <lastBuildDate>Sun, 06 May 2012 01:42:03 GMT</lastBuildDate>
  <generator>LiveJournal / LiveJournal.com</generator>
  <lj:journal>anholt</lj:journal>
  <lj:journalid>1658250</lj:journalid>
  <lj:journaltype>personal</lj:journaltype>
  <image>
    <url>http://l-userpic.livejournal.com/97892800/1658250</url>
    <title>anholt&apos;s lj</title>
    <link>http://anholt.livejournal.com/</link>
    <width>100</width>
    <height>100</height>
  </image>

<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/42329.html</guid>
  <pubDate>Sun, 06 May 2012 01:42:03 GMT</pubDate>
  <title>Backyard slackline limits reached</title>
  <link>http://anholt.livejournal.com/42329.html</link>
  <description>&lt;img src=&quot;http://anholt.net/~anholt/slackline-4x4.jpg&quot; align=&quot;right&quot;&gt;Two weeks ago we built a &lt;a href=&quot;http://en.wikipedia.org/wiki/Slackline&quot; rel=&quot;nofollow&quot;&gt;slackline&lt;/a&gt; setup in our back yard.  The issue we had was that we don&apos;t have any trees back there to tie up to.  Common solutions in this case involve building an &lt;a href=&quot;http://www.slacklineexpress.com/notrees.htm&quot; rel=&quot;nofollow&quot;&gt;A frame&lt;/a&gt; and using whatever sort of anchor you can come up with, with plenty of options available.&lt;br /&gt;&lt;br /&gt;We wanted better.  The yard could only go to about 40 ft of line, and we didn&apos;t want to sacrifice precious length between our anchors and the A frame.&lt;br /&gt;&lt;br /&gt;The first plan we were working with was to put a pipe in some cement, then slide a smaller pipe into it, and use that as our fake tree to anchor to:  Now there&apos;s a solid anchor, but it&apos;s removable if I decide to sell the house or something some day.  I found some numbers for guidelines for building railings, though, that indicated that you&apos;d need massive steel pipe to support the loads we&apos;re talking about.&lt;br /&gt;&lt;br /&gt;What we went with in the end was a wooden 4x4.  We&apos;d heard that slackliners were successfully using those in home setups.  But we were a little wary of trusting a wood 4x4 more than a steel pipe.  So what we buried in the cement was a &lt;a href=&quot;http://www.fairwayvinyl.com/sw_postslv_newels.html&quot; rel=&quot;nofollow&quot;&gt;post sleeve&lt;/a&gt; so that we could just slide our 4x4 into the cement hole after it was set.  The cement was 3 feet deep and just over 1 foot across (if you decide to go this route: post hole diggers are *awesome*).  This let us put an 8 foot 4x4 in each and be able to set a line at heights up to around 4 feet off the ground.  But just in case, we also dropped some heavy chains into the cement as well in case we want anchors for A frames if this posts thing doesn&apos;t work out.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://anholt.net/~anholt/slackline-4x4-break.jpg&quot; align=&quot;right&quot;&gt;We first used the system last Sunday with great success.  It&apos;s a typical 4-carabiner primitive system but we used a double pulley system behind that to get enough tension from a single person tightening that you&apos;d stay off the ground in the middle.  There was a disturbing amount of bending and some creaking in the 4x4s, but they held.&lt;br /&gt;&lt;br /&gt;Today Scott was setting up the line again, and said &quot;I got it nice and tight, look at that!&quot;, and I hopped on.  I made it about 1/3 of the way, when there was a snapping sound and suddenly I was on the ground.  Luckily failure wasn&apos;t as catastrophic as we feared.  The post had just bent over, and not detached and gone flying.&lt;br /&gt;&lt;br /&gt;Our next plan was to use steel I-beams: the backup plan that justified the 4x4 sleeves.  I&apos;m still concerned though -- a &lt;a href=&quot;http://www.reocities.com/richgetze/&quot; rel=&quot;nofollow&quot;&gt;beam stress calculator&lt;/a&gt; program says that for what we&apos;re thinking is like up to 1600lbs of force at 4 feet from the support point, we end up with a maximum bending stress at the support point of 164 ksi on a S3x7.5 I-beam (the biggest that will fit in our sleeves as far as I can see).  If I&apos;m supposed to compare this number to the yield stress of the steel the beam would be made of, that number is only 22 ksi.&lt;br /&gt;&lt;br /&gt;The plan for the moment is to throw together some A frames (actually, X frames -- Scott built and used some of those successfully this week, and it sounds easy enough) and use that unless we can figure out that I was wrong and steel will hold.</description>
  <comments>http://anholt.livejournal.com/42329.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/42146.html</guid>
  <pubDate>Sun, 07 Feb 2010 21:59:36 GMT</pubDate>
  <title>FOSDEM 2010</title>
  <link>http://anholt.livejournal.com/42146.html</link>
  <description>Through last minute travel approval, I got to come to FOSDEM again this year.  I gave a short talk about cairo-gl.  Openoffice presentation is &lt;a href=&quot;http://anholt.net/papers/fosdem2010-cairogl.odp&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.  But a few more words here since reading slides is failure.&lt;br /&gt;&lt;br /&gt;I&apos;ve been promising great 2D performance from open source graphics for years.  It was reaching the point where I was feeling awfully bad about being wrong so frequently.  So this summer I started playing in my free time with making a GL backend for cairo.  There was a previous sort of GL backend in the form of glitz, but it made a big mistake in trying to abstract GL through a Render-like API.  The problem with accelerating 2D is that Render is a bad match for hardware!&lt;br /&gt;&lt;br /&gt;A native GL backend turned out to be shockingly easy, now that we have support for EXT_framebuffer_objects all over, non-power-of-two textures, and GLSL.  Here&apos;s a comparison of 3 backends, normalized to the image backend.  Bigger bars means faster.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://people.freedesktop.org/~anholt/cairogl-chart.png&quot;&gt;&lt;br /&gt;&lt;br /&gt;This shows an accelerated backend beating the CPU rasterization backend on 3 tests.  Note that things for the image backend are a little unfair in its favor -- we can&apos;t scan out from cached system memory buffers, so if you want to actually see the results you have to do an upload at some point, which isn&apos;t reflected in the cairo-perf-trace results.  Being able to beat that with GPU rendering to something that could be scanned out is pretty awesome.  But that&apos;s only 3 tests -- for most of them image is winning.  I&apos;ve got some ideas for hacks on the 965 driver that may fix up a bunch of those bars (it&apos;s hard to estimate, since it&apos;s all about cache effects, and fixing those has a tendency to improve by more than the amount of time spent according to sysprof).&lt;br /&gt;&lt;br /&gt;Since comparing to image isn&apos;t too fair, and we&apos;re not using image today, I did a comparison to xlib.  This looks awesome:&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://people.freedesktop.org/~anholt/cairogl-chart-2.png&quot;&gt;&lt;br /&gt;&lt;br /&gt;By replacing Xlib usage with GL, we get a speedup on almost all the testcases, and a huge speed up on one that Xlib is pathologically slow on (I haven&apos;t figured out why for xlib yet).  We&apos;ve got a good pass rate on the cairo test suite, so I think this stuff is ready for people to start experimenting with in apps.&lt;br /&gt;&lt;br /&gt;There&apos;s much more to do for performance still.  I&apos;ve got a plan to work on the 965 driver to improve glyphs-heavy tests like firefox-talos-gfx (and ETQW and WoW as well).  For firefox-talos-svg, right now we&apos;re hitting aperture full because of all the spans data we&apos;re sending out before the GPU gets done with things.  If we speed up the GPU rendering just a little, for example by tuning the inefficient shaders we&apos;re using right now, we can probably avoid hitting aperture full and cut CPU further.  I think we&apos;re missing throttling for non-swapbuffers apps in DRI2, and we might actually do better and avoid aperture full if we do some appropriate throttling.  And there&apos;s a lot of room for people who&apos;d like to experiment with GL shader and state optimizations to jump in and tear this code apart.&lt;br /&gt;&lt;br /&gt;I&apos;d say that the Linux 2D acceleration story is starting to finally look good after all these years.</description>
  <comments>http://anholt.livejournal.com/42146.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>22</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/41829.html</guid>
  <pubDate>Wed, 25 Nov 2009 19:39:56 GMT</pubDate>
  <title>video hackfest</title>
  <link>http://anholt.livejournal.com/41829.html</link>
  <description>I got back from the &lt;a href=&quot;http://gstreamer.freedesktop.org/wiki/VideoHackfest&quot; rel=&quot;nofollow&quot;&gt;video hackfest&lt;/a&gt; a day ago.  It was a very productive meeting, even if most of it was getting across the features and requirements of our various projects to the other projects involved.  I finally understood why using GL in gstreamer is hard, why gstreamer wants to be that way, why we&apos;re changing the locking model in cairo, and other details of projects I&apos;m interested but not actively involved in.  And I got a few chances to go over how GL works with threading and the ridiculous context model that it has.&lt;br /&gt;&lt;br /&gt;Out of that, I ended up with the project of making GLX allow binding a single GL context into multiple threads.  This should largely fix the disaster that is GL multithreading.  The basic idea is: I have a collection of threads that want to work on a single context because they&apos;re sharing all the same objects and want to have some sort of serialization into a GL command stream.  If we pass the context around between the threads, unbinding and rebinding, you get this forced command stream flushing that will kill performance.  If we make multiple contexts, then at the transition of changed objects between one thread and another you have to flush in the producer and re-bind the object in the consumer.  Whether or not that could perform well, we determined that in the gstreamer model we couldn&apos;t know in time whether the producer is going to be in a different thread than the consumer: you&apos;d have to flush every time just like passing a single context around.&lt;br /&gt;&lt;br /&gt;So here comes a simple hack:  Just rip out the piece of the spec that says you can&apos;t bind one context into multiple threads.  Tell the user that if they do this, locking is up to them.  It&apos;s not an uncommon position for projects to take, and it will let us do exactly what we want in gstreamer: everyone works in the same context[1], and when you want access to the GL context, just grab the lock for the context and go.&lt;br /&gt;&lt;br /&gt;Development trees are at: &lt;br /&gt;&lt;a href=&apos;http://cgit.freedesktop.org/~anholt/piglit/log/?h=mesa-multithread-makecurrent&apos; rel=&apos;nofollow&apos;&gt;http://cgit.freedesktop.org/~anholt/piglit/log/?h=mesa-multithread-makecurrent&lt;/a&gt;&lt;br /&gt;&lt;a href=&apos;http://cgit.freedesktop.org/~anholt/mesa/log/?h=mesa-multithread-makecurrent&apos; rel=&apos;nofollow&apos;&gt;http://cgit.freedesktop.org/~anholt/mesa/log/?h=mesa-multithread-makecurrent&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The testcase gets bad rendering at the moment.  So I made the testcase for the non-extended version, and it still didn&apos;t render, with either i965 or swrast.  Next step is to test my testcase against someone else&apos;s GL.&lt;br /&gt;&lt;br /&gt;Incidentally, Apple&apos;s GL spec allows binding a single context to multiple threads like this.  Windows GL doesn&apos;t.&lt;br /&gt;&lt;br /&gt;[1] OK, so that&apos;s not exactly true.  I&apos;m assuming that elements negotiate a single context through some handwavy caps magic -- people have said that this is possible.  You can still end up with two contexts, though, like with the following pipeline: videotestsrc ! glupload ! glfilterblur ! gldownload ! gamma ! glupload ! glimagesink.  The second group of gl elements doesn&apos;t know about the first, or have any way to communicate with them.  But if each element calls glXMakeCurrent at the start, it&apos;ll be approximately free for the one-context case, and just work for the multiple-contexts case.</description>
  <comments>http://anholt.livejournal.com/41829.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>8</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/41522.html</guid>
  <pubDate>Sat, 12 Sep 2009 01:13:48 GMT</pubDate>
  <title>goodbye internets</title>
  <link>http://anholt.livejournal.com/41522.html</link>
  <description>This Sunday I&apos;m heading out on a bike trip through Oregon and Washington with my housemate&apos;s dad&apos;s family and friends.  50-70 miles a day for 7 days.  Gear hauled by car, sleeping in hotels, and eating out all the time.  The first two ground rules that were sent out:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;The morning of the ride we draw straws for SAG wagon driver order.  Everybody drives a half day.  After everybody has driven once we negotiate.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Afternoon driver responsible for buying a fifth of Jack Daniels and three or four six packs of good beer, plus chips and salsa.  Also some soda.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;You probably won&apos;t hear from me for a while.  I don&apos;t exactly intend to be merging patches in the evenings.&lt;br /&gt;&lt;br /&gt;I&apos;ve certainly been busy with patches recently, though.  The big update yesterday was &lt;a href=&apos;http://lists.freedesktop.org/archives/intel-gfx/2009-September/004122.html&apos; rel=&apos;nofollow&apos;&gt;http://lists.freedesktop.org/archives/intel-gfx/2009-September/004122.html&lt;/a&gt; -- those nasty 8xx hangs with GEM should now be fixed in drm-intel-next, to be landing in a 2.6.31.x near you soon.  I&apos;ve spent a long time on this bug, and we came incredibly close to fixing it with the clflush idea on the 8xx_chipset_flush() back in March, but the fact that we were writing to an uncached page meant we completely bypassed the cache we were trying to flush.&lt;br /&gt;&lt;br /&gt;The 2.6.31 kernel is finally out, with a lot of improvements in our graphics driver and only a slight delay in releasing due to us screwing up (uh, let&apos;s not do that again).  One of the biggest additions is DisplayPort support.  DP is like HDMI done right -- more bandwidth, nice connectors, better compatibility story, and a low power design for use inside of laptops.  keithp wrote the code and has been using it on his x200s&apos;s dock, and I came awfully close to picking up an x301 which has it on the laptop.  KMS is also in much better shape once again, with a ton of work from Ma Ling, Zhao Yakui, and Jesse Barnes.  It&apos;s also nice in looking back at the log to see a lot of fixes for serious issues in from non-Intel folks -- integrating with the community is continuing to pay off for us.  My contribution this cycle was generally GEM stability fixes again, though a number of fixes came from Chris Wilson&apos;s careful reviews of the code.&lt;br /&gt;&lt;br /&gt;I&apos;ve also fixed what I think was the last major regression for texture tiling, which is around a 30% win on many GPU-bound OpenGL apps on the 965 and newer.  That&apos;ll be landing on by default in Mesa 7.6.&lt;br /&gt;&lt;br /&gt;On the plate for 2.6.32 is framebuffer compression support for around a .5W power savings, automatic downclocking of the GPU when idle (no need for user power management, and another .5W or so), experimental new GPU reset support from Ben Gamari and Owain Ainsworth (That&apos;s right, an OpenBSD developer), and of course more KMS fixes and new hardware support.  We&apos;re also probably going to land execbuf2, which will let us do texture tiling efficiently on the pre-965 hardware.&lt;br /&gt;&lt;br /&gt;Most of my time recently, though, I&apos;ve finally been able to get back to spending serious time with Mesa after being stuck in 2D and the kernel for years.  It&apos;s where I enjoy working, despite the build system and development model.  In the last few weeks, I&apos;ve added support for ARB_sync, ARB_map_buffer_range, ARB_depth_clamp, ARB_copy_buffer, and ARB_draw_elements_base_vertex for our hardware.  All but ARB_depth_clamp (AKA NV_depth_clamp) work on pre-965 hardware as well.&lt;br /&gt;&lt;br /&gt;I also fixed up some major performance penalties for applications using OpenGL correctly.  I of course found these by writing an application using OpenGL the way it should be used as of the last 5 years or so.  Unfortunately most open-source software out there fails in that respect (thinking in particular of OpenArena, blender, and the various TuxRacer forks, being what seem to be the most popular offenders).  One fix was a 50-100% fps improvement, and another was a 70% CPU usage win.  I&apos;m going to be working on NV_primitive_restart support soon, which will be another CPU usage win, and likely a performance win as well on the 965.&lt;br /&gt;&lt;br /&gt;Another big change for us has been the addition of Ben Holmes to our team.  He&apos;s a fellow student in idr&apos;s OpenGL class, who&apos;s been writing tests for us.  A lot of bugfixes I&apos;ve done recently have been &quot;hey, Ben, I think there might be a problem if an app does the following thing.&quot;  He writes a test in piglit, tests that it fails, sends it out, we add it to the tree, then go fix the driver.  Today, I got dFdx()/dFdy() fixed in our GLSL support by exactly this method.  Unfortunately we&apos;ll be losing him back to school soon, but it&apos;s been well worth it so far.</description>
  <comments>http://anholt.livejournal.com/41522.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>11</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/41306.html</guid>
  <pubDate>Thu, 23 Jul 2009 05:40:44 GMT</pubDate>
  <link>http://anholt.livejournal.com/41306.html</link>
  <description>Another quarter, and another release.  I think we&apos;ve made big progress here.  One of my favorite reports on the mailing list was that a company deploying our graphics driver was delightfully surprised that their XV tearing issues were fixed.  That was a lot of work, and I was despairing of them saying it didn&apos;t work out.&lt;br /&gt;&lt;br /&gt;A few things I was involved with that I&apos;m happy with:&lt;br /&gt;- Fixing the &quot;memory leak&quot; of GEM buffer objects&lt;br /&gt;- Fixing quake4 and doom3 which regressed back in Mesa 7.4&lt;br /&gt;- Fixing VBO performance on 915 (I don&apos;t like discouraging people from doing the right thing)&lt;br /&gt;- OpenGL Performance and correctness fixes for cairo-gl&lt;br /&gt;- Fixing a bunch of FBO problems, particularly on 965&lt;br /&gt;- Hardware-accelerated glGenerateMipmaps and SGIS_generate_mipmap.  Finally.&lt;br /&gt;- Fixing many GLSL bugs on 965.&lt;br /&gt;- Fixing occlusion queries (sauerbraten)&lt;br /&gt;- Fixing crystalspace regression (woo supporting other open-source software developers)&lt;br /&gt;- Fixing ut2004 hangs on G4x.&lt;br /&gt;&lt;br /&gt;Already, things are looking exciting for our next release.  Thanks to cairo-perf-trace, I&apos;ve just landed a 10% improvement in firefox performance for UXA.  We&apos;re also working towards the future with cairo-gl, which I&apos;d started doing in my free time based off of ickle&apos;s cairo-drm work, and is now merged into cairo master.  This is a major step towards maintaining one driver (OpenGL) per chipset, with the other part being doing a real X-on-GL backend so that legacy stuff not using cairo doesn&apos;t suffer too badly.  Both of these are now on our plates for work activity in the next few months.&lt;br /&gt;&lt;br /&gt;But we&apos;ve got a ways to go to get there.  I know we&apos;ve got fixes to be made to our OpenGL before cairo-gl&apos;s going to shine, and cairo-gl needs a lot of work as well:&lt;br /&gt;&lt;pre&gt;
[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]    image             firefox-20090601   92.877  108.208   6.54%   15/15
[  0]     xlib             firefox-20090601   46.609   46.832   0.28%    6/6
[  0]       gl             firefox-20090601  238.103  238.195   0.35%    5/6
(tested with master of everything on a 945GM, lower is better)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;One of the things we need to figure out is what sort of shader support cairo-gl&apos;s going to be based on, and what we want to do in our driver to support it.  The 915 and other hardware of that era can&apos;t do dynamic flow control, so many GLSL shaders would be unimplementable.  But we as developers of software targeting GL on these chips would love to write in GLSL instead of ugly ARB_fragment_program and ARB_vertex_program, even if we know we can&apos;t use some language features.  We could maybe expose the GLES GLSL extension on 915, which explicitly says that programs with dynamic flow control and other features missing on this generation of chips may not compile.  We could also be sneaky and do it on desktop OpenGL GLSL and be within spec (I think, and afaik some closed vendors have done it as well), though some apps might get angry with us for doing so.  This is up in the air, but I&apos;m hoping our answer is &quot;expose it&quot;.&lt;br /&gt;&lt;br /&gt;(Oh, and other people are doing exciting things, like jbarnes and mjg59 making big power savings, but I&apos;ll leave blogging to them)</description>
  <comments>http://anholt.livejournal.com/41306.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>8</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/41132.html</guid>
  <pubDate>Fri, 29 May 2009 17:53:41 GMT</pubDate>
  <link>http://anholt.livejournal.com/41132.html</link>
  <description>Things are continuing to settle down in the Intel graphics driver.  We&apos;re in the ~5th month of driver stabilization, and I think it&apos;s starting to really show.&lt;br /&gt;&lt;br /&gt;One of the key things we&apos;ve done recently is remove the old options in the 2D driver.  We had proliferation problems before where everybody was running a different configuration (XAA or EXA or UXA, DRI1 or DRI2, KMS or not) to get their particular usage working well.  So we&apos;d fix someone&apos;s configuration, and break someone else&apos;s.  The moment I cleaned out all that, we suddenly fixed a bunch of bugs with the path you should be using (UXA, DRI2, KMS) that had been obscured by the mess all over the driver.  But the 2D driver&apos;s actually been pretty quiet -- the cool stuff is in:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;commit 3da9e9d34ed7d2f5c33fd194d9dd09e15f4e51c0&lt;br /&gt;Merge: 44ada1a 07f4f3e&lt;br /&gt;Author: Linus Torvalds &amp;lt;torvalds@linux-foundation.org&amp;gt;&lt;br /&gt;Date:   Fri May 29 08:48:13 2009 -0700&lt;br /&gt;&lt;br /&gt;    Merge branch &apos;drm-intel-next&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;We&apos;ve been making continual incremental improvement to the kernel code.  The driver quality hit a low point around January when we were landing our last features we&apos;d been developing over the previous year -- KMS and DRI2 in particular.  A lot of it was deadline driven, and we had to land things sooner than we probably would have otherwise.  But every week since then we&apos;ve been turning around nice fixes and I&apos;d like to mention just what happened this week in the kernel here:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;krh fixed the swap-related corruption&lt;/b&gt;&lt;br /&gt;This turned out to be a bug with our GTT mapping where we got some cache domain management wrong.  GTT mapping is a great performance feature -- when you&apos;re uploading data to the GPU, instead of writing it to memory, flushing the CPU cache, and having the GPU access the buffer, just write it through the GPU&apos;s aperture.  The streaming write performance is basically the same (it&apos;s a 50% win to a 50% loss in microbenchmarks, in the noise at a macro level), but the important thing is that it avoids sucking up your CPU&apos;s cache space for data you no longer want in the CPU&apos;s cache.  If it means that your app starts fitting in L2 or L1 when it didn&apos;t before, the results can be huge.&lt;br /&gt;&lt;br /&gt;Only, we made a mistake.  When an object wasn&apos;t in the GTT aperture, touching your GTT mapping would fault the object in.  We would forget to set the cache domain of the object to the GTT.  If the CPU hadn&apos;t touched the pages, it worked out, or if the object had been bound to the GTT before userland started down the faulting path it worked out since userland asked to do the domain transition.  But in the case of swapping of GEM objects, the CPU has the object in its cache since it was just DMAed from disk, and we silently dropped the user&apos;s GTT domain transition request because the object wasn&apos;t in the GTT domain yet.  So we faulted it in, wrote some data uncached into the object, and later on down the line the CPU cache lines got flushed out to it.  You ended up with old glyph data on top of your new glyph data.  The solution was to do domain setting at the right time -- when the object gets bound to the GTT in the fault handler.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;I fixed 8xx 3D rendering&lt;/b&gt;&lt;br /&gt;Since around January, 8xx 3D&apos;s been in bad shape, most of it related to tiling.  Daniel Vetter came along in March and fixed it up pretty significantly -- the untested port of userland stuff to the kernel had been quite wrong.  Only, it turned out that Daniel&apos;s stuff was also a mis-translation of the working userland code to the kernel, and since he didn&apos;t have the docs it wasn&apos;t as easy to debug as it should be.  I did have the docs, so after a day of sitting down and investigating this &lt;a href=&quot;https://bugs.freedesktop.org/show_bug.cgi?id=20473#c7&quot; rel=&quot;nofollow&quot;&gt;model bug report comment by Daniel&lt;/a&gt;, I had a fix for the kernel for stride issues, and a fix for a Mesa regression for resizing issues.&lt;br /&gt;&lt;br /&gt;We&apos;re still working on getting docs for these old chipsets out, so that people don&apos;t need to get blocked on us.  Sadly, it&apos;s slow going -- our group doesn&apos;t have the authority to do release the docs, so we have to convince other groups (who have other business to be doing) to spend their time going through the process to get the docs released.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;I applied a big workaround for 865 cache flushing.&lt;/b&gt;&lt;br /&gt;There&apos;s something weird about the 865.  People that have been following our development probably know a bit about how we do weird cache management things.  In particular, for getting an object in the CPU cache accessible by the GPU, we map each page of the object to the CPU, clflush each cache line of the page, then write to a magic register to flush the chipset&apos;s cache of flushed CPU cachelines out to memory, at which point the GPU can actually see them.  This works beautifully (and much faster than using kernel mechanisms to manage PTE cachability flags) on all the other hardware we have.  But on the 865, if you started up X -retro, it would show that some of the little blits drawing the root weave wouldn&apos;t appear.  The blits are 32 bytes each, or half a cache line, and generally they&apos;d be missing in groups of two.  It&apos;s as if cache lines didn&apos;t get flushed, and the GPU saw zeroes (the original contents of the page) instead of the new values containing blit commands.&lt;br /&gt;&lt;br /&gt;krh did a bunch of experimenting, and nothing else we came up with helped except for wbinvd.  So when we&apos;re CPU cache flushing the objects on 865, we now do wbinvd instead of mapping pages and clflushing them, and the desktop appears to be stable again.&lt;br /&gt;&lt;br /&gt;After some more investigation of docs, I&apos;ve got a couple more experiments to try, but at least 2.6.30 should have working 865 support.&lt;br /&gt;&lt;br /&gt;So, that&apos;s it, folks.  One week of kernel fixes, and we&apos;ve got rendering and stability improvements across the board.  I&apos;m hoping next week I get do do work, I can sit down and figure out the memory leak with GL compositing -- we just got a simple testcase posted on the mailing list that&apos;s supposed to show an actual leak, and I want to take a look at it soon.</description>
  <comments>http://anholt.livejournal.com/41132.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>12</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/40850.html</guid>
  <pubDate>Tue, 24 Feb 2009 23:17:04 GMT</pubDate>
  <link>http://anholt.livejournal.com/40850.html</link>
  <description>Things have been pretty quiet on the intel graphics driver front for a while.  After all the churn of FBOs, GEM, DRI2, and KMS, we&apos;ve been settling down to seriously stabilizing the driver.  Things are looking pretty good -- KMS is now suspending/resuming, resizing framebuffers, supporting rotation, and generally looking relatively correct on the machines we&apos;re testing on.  A number of DRI2 performance regressions are fixed.  We&apos;ve fixed some tricky little bugs in GEM cache handling.  Big thanks goes out to the RH guys (airlied and krh) for pushing so hard on this code and fixing a bunch of the sharp edges instead of just filing bugs, and to ickle for reviewing and fixing piles of error path problems in the DRM.  I love working with this community.&lt;br /&gt;&lt;br /&gt;We&apos;re now ramping up for the Q1 release, which means we&apos;re switching from what has been nearly 100% time on bug and regression fixing to 100% bug and regression fixing.  I just pushed out xf86-video-intel 2.6.2 to get some of our stable fixes into the world so people have a better base for testing KMS.  By the end of March we should have a new release out with current 2D, a new Mesa tarball with the latest fixes since 7.4, and hopefully a kernel 2.6.29 with KMS.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;In my spare time I&apos;ve been working on a GL backend for cairo.  My assertion for some time has been that anything we&apos;re doing with accelerating Render, we could do with less developer time and faster runtime with GL.  It took about 2 weeks of me flailing around learning how to do GL, and I got cairogears up and running at about 4 times the speed of Render, on various 965s.&lt;br /&gt;&lt;br /&gt;The code&apos;s still pretty rough -- it doesn&apos;t check for extensions it needs, relies on NPOT textures when it could use rectangular textures, doesn&apos;t do shaders for gradients, etc.  But actually most of the time on the code has been spent fixing our 3D driver.  There were some texture upload issues, BO cache explosion issues, drawpixels issues, DRI2 viewport overhead issues, and my current one is that the latest commit in cairo-gl ends up hanging both 915s and 965s after a while in cairogears.&lt;br /&gt;&lt;br /&gt;I&apos;m hoping some other people interested in this stuff might feel like picking it up and playing with it.  It&apos;s not terribly complicated code, I don&apos;t think, there are other backends to compare to, and cairo&apos;s test suite is wonderful for validating what you&apos;re trying out.  The code is in:&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;git://people.freedesktop.org/~anholt/cairo on the gl branch&lt;br /&gt;git://people.freedesktop.org/~anholt/cairogears on the gl branch&lt;br /&gt;&lt;/tt&gt;</description>
  <comments>http://anholt.livejournal.com/40850.html</comments>
  <category>moblin</category>
  <lj:security>public</lj:security>
  <lj:reply-count>8</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/40452.html</guid>
  <pubDate>Wed, 24 Dec 2008 05:01:51 GMT</pubDate>
  <title>snowmageddon</title>
  <link>http://anholt.livejournal.com/40452.html</link>
  <description>I&apos;ve been enjoying the &lt;a href=&quot;http://snowpocalypse.com/&quot; rel=&quot;nofollow&quot;&gt;snowpocalypse&lt;/a&gt;.  The first few days were pretty fun, as with an inch or two you could bike quite well in it, yet the streets were almost empty of cars.  Except for crazies who insist on passing you under any circumstance, and with minimal room to spare.  Still, mostly of the time it was good, and people got a kick out of me on the brompton in the snow.  Some hippies stopped, got out of their car, and asked to take a picture of me to &amp;quot;document their day&amp;quot;.  Sure, no problem.  Then they asked if I was carrying a piece, and I was amused to find that despite selling out I can be mistaken for the kind of person who would smoke a bowl with strangers in broad daylight.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;img src=&quot;http://www.anholt.net/~anholt/brompton-snow.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;&lt;font size=&quot;-1&quot;&gt;Biking in the snow.&lt;br /&gt;Scaled down picture so you can&apos;t tell that my camera is angry about the soaking it got this summer/.&lt;/font&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;By Sunday morning, though, biking was pretty much out.  3&amp;quot; of snow or so was more than I could successfully plow through, so walking and biking were about tied in the mile or so I did getting home, and the walking was a lot less comical.  So I&apos;ve been walking and taking the bus/MAX since.  Everybody I know is stir-crazy, frustrated by the snow, and yet I think I&apos;ve been out of the house more than I usually am.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
  <comments>http://anholt.livejournal.com/40452.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/40208.html</guid>
  <pubDate>Fri, 05 Dec 2008 21:33:16 GMT</pubDate>
  <title>excitement in X land</title>
  <link>http://anholt.livejournal.com/40208.html</link>
  <description>A couple of major milestones this week:&lt;br /&gt;&lt;br /&gt;- DRI2 merged to intel master and server-1.6-branch.&lt;br /&gt;We&apos;ll have DRI2 in this server release, seriously.  We don&apos;t have DRI2 vblank-synced swaps going, but we should be able to make Mesa do its old path (wait for vblank, then ask DRM (now the xserver) to do the swap) and have people mostly happy with that.  I just ran xcompmgr -c and glxgears at the same time and it was everything I thought it could be.&lt;br /&gt;&lt;br /&gt;- DRM modesetting merged to drm-intel-next.&lt;br /&gt;That means we&apos;re planning on having this working, seriously, for 2.6.29.  It&apos;s ready to test today if you&apos;ve got a lucky platform, with sudo modprobe i915 modeset=1, then using drmtest from the modesetting-gem branch of libdrm, or libdrm from that branch plus xf86-video-intel built against it.  I hear the 2D driver needs a bit of love again after recent shakeups, but that may be unfounded rumor.&lt;br /&gt;&lt;br /&gt;I&apos;m doing my best to dogfood the whole mess on my development system, as we&apos;re planning on having DRI2 and GEM stable for release this month.  I&apos;ve got some misrendering with UXA, though things are much better today than before (Thanks Pierre Willenbrock!).  965 3D&apos;s in pretty good shape since my last fix, and I&apos;ve been using it most days to play &lt;a hef=&quot;http://www.playgreenhouse.com/game/BASLX-000001-01/&quot;&gt;Eschalon&lt;/a&gt;.  We&apos;ve still got IRQ issues on GM965, though, as long as it&apos;s not my GM965.  Plenty to keep us busy this month.</description>
  <comments>http://anholt.livejournal.com/40208.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>5</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/40006.html</guid>
  <pubDate>Sat, 25 Oct 2008 22:03:19 GMT</pubDate>
  <title>Linux on the HP 2530p</title>
  <link>http://anholt.livejournal.com/40006.html</link>
  <description>Two weeks ago or so I got a lovely new laptop, the HP Elitebook 2530p, but quickly found that ACPI on it would make it hang at boot.  I installed with acpi=off, and used it as a desktop-style testing machine while we tried to figure out what was going wrong with it.  It was kind of rough, as someone who&apos;s never debugged ACPI before -- the &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=linux+acpi+documentation&amp;amp;btnG=Search&quot; rel=&quot;nofollow&quot;&gt;googling&lt;/a&gt; gives you documentation that advertises itself as stale (so why does it exist?), and the &lt;a href=&quot;http://www.lesswatts.org/projects/acpi/debug.php&quot; rel=&quot;nofollow&quot;&gt;real&lt;/a&gt; documentation isn&apos;t where &lt;a href=&quot;http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;f=Documentation/acpi;h=c56a231d71a65f4dff52849f9282618d4284b25f;hb=HEAD&quot; rel=&quot;nofollow&quot;&gt;it should be&lt;/a&gt;.  The ACPI guys I know seemed stumped -- various debug output all came up clean, yet enabling ACPI caused boot-time hangs in the ACPI battery, ACPI thermal, and HDA drivers.&lt;br /&gt;&lt;br /&gt;It turned out after I nuked a bunch of BIOS options, that the option to enable the fan while AC is on is what was causing it.  Disable it for linux on 2530p happiness.&lt;br /&gt;&lt;br /&gt;Also, suspend/resume works out of the box, as long as your box includes loading the Intel DRM.</description>
  <comments>http://anholt.livejournal.com/40006.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/39921.html</guid>
  <pubDate>Wed, 22 Oct 2008 07:14:24 GMT</pubDate>
  <title>doing it right</title>
  <link>http://anholt.livejournal.com/39921.html</link>
  <description>Things are looking up in the Intel driver.  The GEM work has landed in Linus&apos;s master, meaning that at this point we can worry about just fixing our bugs, and know that it&apos;s going to end up in 2.6.28.&lt;br /&gt;&lt;br /&gt;But what gets me even more excited than getting our first major kernel merge done is that we&apos;re starting to create a culture of review surrounding our driver.  Keith started by insisting on posting patches instead of git trees, which meant that I read his patches and found issues before they were queued for upstream.  I started posting patches in retaliation, and he kept NAKing them for needing improvements (which I&apos;ve usually got around to) or being obsoleted by better work he did.  Now we&apos;ve got the rest of the team joining the party.  While it has slowed things down a bit, it&apos;s also nice -- the internal TODO list of &quot;someone committed some junk and I need to go fix it up when I get some time&quot; is no longer growing out of control, and stability is definitely increasing.&lt;br /&gt;&lt;br /&gt;The majority of the improvements in the last week have been in vblank handling.  The vblank-rework changes had gone through a series of QA cycles before I merged them, but there were some issues that cropped up in integrating them with the GEM changes, and there were some plain old bugs we found when we started trying to use them on our desktops.  We also fixed some VT switching bugs that would have hurt suspend/resume, and a couple more G4X issues.&lt;br /&gt;&lt;br /&gt;My highest priority now is sorting out our failures with batchbuffers being too large.  Our testcases up until now have had texture load below the size of the aperture.  However, with more interesting apps like &lt;a href=&quot;http://www.google.com/url?sa=U&amp;amp;start=1&amp;amp;q=http://sauerbraten.org/&amp;amp;usg=AFQjCNG46ZUC_AA5rx2touG8Mw7HD_LASA&quot; rel=&quot;nofollow&quot;&gt;sauerbraten&lt;/a&gt; or &lt;a href=&quot;http://www.beyondspaceandtime.org/FCBSTWeb/web/index.html&quot; rel=&quot;nofollow&quot;&gt;Virtual Forbidden City&lt;/a&gt;, we&apos;re running into a problem where we accumulate a batchbuffer for execution that can&apos;t be loaded into the aperture all at once, and you get an error message and no rendering.  Dave Airlie had fixed this in classic mode with his check_aperture changes, but we never did them for GEM, since figured we&apos;d have the whole aperture available instead of just 32MB.  But when a single mipmapped texture is 24MB, we run out of aperture quickly anyway.  There are a few things we&apos;re planning on doing to resolve the problem:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Implement check_aperture on GEM so that we can flush the batch when it&apos;s likely going to be too big for the aperture.  This will avoid having rendering dropped on the floor for being too big.&lt;br /&gt;&lt;li&gt;Fix counting of aperture space consumed in check_aperture.  Right now we just sum up all the sizes of buffers targeted by relocations, but if you keep referencing the same big buffer over and over you&apos;ll flush too often.&lt;br /&gt;&lt;li&gt;Implement PPGTT support for new chipsets.  This gives us a 2GB virtual address space for your batchbuffers to play in instead of 256 or 512MB.  I&apos;m trying to avoid saying &quot;that&apos;ll be enough for anybody&quot;, but it&apos;ll certainly make a lot of apps happier.  This&apos;ll be a bit of work, as we don&apos;t have a PCI aperture mapping to that address space, so we can&apos;t use some of our old tricks the same way.  However, it should be a pretty significant win on any serious 3D workload.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;We&apos;re also looking into getting an appropriate API into the kernel for our transient mappings of the aperture.  One of the sticking points in getting GEM merged was a hack we were doing with the kernel mapping APIs on CONFIG_HIGHMEM x86.  By actually sitting down and writing the API we need, we should get improved performance in PAT non-MTRR environments (like the G[M]45 where we don&apos;t get an MTRR slot), and improved performance on 64-bit where we couldn&apos;t do the CONFIG_HIGHMEM hack, for a 20% to 200% improvement depending on which case of failure occurred.  By being in a kernel tree, we can submit a single patch to the kernel community showing the API we want and how we plan to use it, and get much better feedback than we&apos;ve been able to in the past.  In this case, Ingo came up with fun ideas for how we can get the advantages of our atomic mapping path on CONFIG_HIGHMEM x86 without the scheduling restrictions of actually being atomic, which would be awfully convenient for one of our code paths.&lt;br /&gt;&lt;br /&gt;For those looking to run the latest hotness, here&apos;s the list:&lt;br /&gt;kernel: drm-intel-next in my tree (still has some bugfixes to be merged)&lt;br /&gt;libdrm: 2.4.0 (nothing major has happened since then)&lt;br /&gt;xf86-video-intel: 2.5.0 (nothing major has happened since then)&lt;br /&gt;dri2proto master&lt;br /&gt;inputproto master&lt;br /&gt;xserver: master (be sure to update your input drivers too!)&lt;br /&gt;mesa: master&lt;br /&gt;&lt;br /&gt;That&apos;s 2 things with version numbers on them compared to 2 weeks ago.  The X server would be in the list too, but we missed that the glyph cache didn&apos;t make it into the 1.5 series, which is critical for 2D performance.</description>
  <comments>http://anholt.livejournal.com/39921.html</comments>
  <category>x.org</category>
  <category>moblin</category>
  <lj:security>public</lj:security>
  <lj:reply-count>15</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/39544.html</guid>
  <pubDate>Tue, 30 Sep 2008 21:55:26 GMT</pubDate>
  <title>moving to kernel.org</title>
  <link>http://anholt.livejournal.com/39544.html</link>
  <description>I&apos;ve finally got my kernel tree up on kernel.org.  It took a couple of weeks to get an account, then a couple of weeks to find the time to worry about it.&lt;br /&gt;&lt;br /&gt;&lt;a href=&apos;http://git.kernel.org/?p=linux/kernel/git/anholt/drm-intel.git;a=shortlog;h=drm-intel-next&apos; rel=&apos;nofollow&apos;&gt;http://git.kernel.org/?p=linux/kernel/git/anholt/drm-intel.git;a=shortlog;h=drm-intel-next&lt;/a&gt;&lt;br /&gt;git clone git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel&lt;br /&gt;&lt;br /&gt;This should be the place where all of our future &quot;ready for upstream&quot; work goes.  So, for example, if you&apos;re looking to test GEM, grab these branches:&lt;br /&gt;&lt;br /&gt;kernel: drm-intel-next&lt;br /&gt;libdrm: master&lt;br /&gt;xf86-video-intel: master&lt;br /&gt;mesa: master&lt;br /&gt;&lt;br /&gt;If you&apos;re looking to test dri2, it&apos;s a little more work.  Grab these:&lt;br /&gt;kernel: drm-intel-next&lt;br /&gt;libdrm: master&lt;br /&gt;dri2proto: master&lt;br /&gt;xserver: master (then edit hw/xfree86/Makefile.am to uncomment dri2)&lt;br /&gt;xf86-video-intel: dri2&lt;br /&gt;mesa: master</description>
  <comments>http://anholt.livejournal.com/39544.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>15</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/39405.html</guid>
  <pubDate>Fri, 12 Sep 2008 23:58:50 GMT</pubDate>
  <title>taste of success</title>
  <link>http://anholt.livejournal.com/39405.html</link>
  <description>As part of the work we&apos;re doing for &lt;a href=&quot;http://www.moblin.org/&quot; rel=&quot;nofollow&quot;&gt;Moblin&lt;/a&gt;, I got our head trees in shape for GL compositing on GEM.  We had a nice demo of the technology at XDS from krh, and today I got the same setup working: glxgears and totem on a cube all playing nicely together.  It feels like things are finally coming together, and we&apos;ll be ready to support this stuff in releases soon, even if it won&apos;t be at the end of this release cycle.&lt;br /&gt;&lt;br /&gt;All the code&apos;s in master, and available to test.  The usual warnings about master apply, and just to show how serious we are about our in-development code, among the known issues are:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Can&apos;t do UXA (and therefore DRI2) with tiling.&lt;/b&gt;&lt;br /&gt;It&apos;s kind of hard to teach X about tiled buffers.  NVIDIA went with wrapping all pixel access from libfb to produce libwfb.  Our plan is to return to GTT-managed access of buffers in the X Server so we don&apos;t have to teach it about this -- we keep the nice write-combined performance we&apos;re used to with framebuffer access, though we also suffer from painful read performance we&apos;re used to if we have fallbacks that read (See also: Render gradients and convolutions).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2D performance has tanked when you use UXA.&lt;/b&gt;&lt;br /&gt;If you fallback on front buffer rendering with the X Server, GEM goes wild with cache flushing because the X Server isn&apos;t telling it just what memory it touched, yet we&apos;re telling GEM that the results need to land in the front buffer &quot;soon&quot;.  This means that compositing is fast, but non-composited isn&apos;t if you run emacs or gitk anything else that causes fallbacks.  There are a couple of potential fixes for this, but the current plan is to avoid it using GTT mapping, which resolves the coherency issue.&lt;br /&gt;&lt;br /&gt;Long term, we&apos;re going to be adding support for telling GEM what pages we touched after the fact (or maybe use fault-based clflushing) for OpenGL, and at that point we may reconsider how X maps its buffers.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3D performance has tanked in some cases&lt;/b&gt;&lt;br /&gt;Haven&apos;t debugged this one, and it&apos;s next on the list.  Can&apos;t reproduce on the test systems here.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Applications hang on to a lot of buffer objects&lt;/b&gt;&lt;br /&gt;In TTM we would allocate giant buffer objects and then suballocate out of them, because allocation performance was so slow.  This meant that userland had to pay attention to a lot of fencing issues (and you had to expose the idea of a fence) so that you could know which pieces were still used.&lt;br /&gt;&lt;br /&gt;We went with a simpler model for GEM, where the userland caches buffer objects of similar size, and reuses them when the kernel tells us they&apos;re no longer used by the GPU.  By returning &quot;freed&quot; buffers to the cache, we get wonderful performance when an app is running flat out and allocating and freeing buffers like mad.  However, as we think about cairo moving to a GL backend, and all your apps sitting waiting for input hanging onto these cached buffers, the memory usage is likely to become an issue.  They&apos;re pageable, but that&apos;s slow and we&apos;re looking at systems with limited memory+swap anyway.  Instead, we need to free buffers when they&apos;re not serving any use in the cache.  One way we&apos;re thinking about is on allocate, when a cached buffer is &quot;really old&quot; (seconds), actually free it.&lt;br /&gt;&lt;br /&gt;That still leaves some excess memory laying around when an app does some rendering and then stops for input.  The long-term solution would be for userland to tell the kernel when it wasn&apos;t going to actively use a buffer and the contents could be thrown out.  Then, in the memory pressure callback from the kernel, we can throw out cached buffers and nuke mappings, and userland has to allocate new ones when it needs.</description>
  <comments>http://anholt.livejournal.com/39405.html</comments>
  <category>moblin</category>
  <lj:security>public</lj:security>
  <lj:reply-count>7</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/39165.html</guid>
  <pubDate>Mon, 25 Aug 2008 20:52:42 GMT</pubDate>
  <title>eee 901 wireless updates</title>
  <link>http://anholt.livejournal.com/39165.html</link>
  <description>I got a lovely little eee 901 for work.  It mostly seems like a useful machine, except for the position of the right shift key which is a disaster.  (Placing my fingers on the home row, I&apos;ve hovering over the up-arrow instead of shift.  Hilarity ensues when trying to type &apos;~&apos; in the terminal or working on spreadsheets in any way).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;However, the wireless driver isn&apos;t integrated into the kernel yet, and the old driver tarball is already broken on 2.6.27 release candidates.  I was having a hard time finding who was working on it or where the code was.  So, I cobbled together the patches I found wandering around the internet, and put up a git repo:&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;git clone git://anongit.anholt.net/git/rt2860&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;Don&apos;t expect this repo to necessarily get updated, but it&apos;ll probably get you going if you&apos;re on 2.6.27-rc2 or so today.</description>
  <comments>http://anholt.livejournal.com/39165.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>14</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/38717.html</guid>
  <pubDate>Thu, 21 Aug 2008 21:28:03 GMT</pubDate>
  <title>continuing GEM progress</title>
  <link>http://anholt.livejournal.com/38717.html</link>
  <description>Just got back from a week in Hawaii with the family.&amp;nbsp; It was great to finally take a break, and come back refreshed instead of feeling overwhelmed.&lt;br /&gt;&lt;br /&gt;Two weeks ago the good news for GEM was getting ReadPixels to go fast.&amp;nbsp; It should be fast under our architecture, since we can map the pages and get at them cached.&amp;nbsp; We just didn&apos;t get around to making sure that was the case for a while, and it turns out we had some traps.&amp;nbsp; Conformance tests that go and write a pixel, then read the value, then write a new pixel etc. were taking hours instead of the minutes that they should.&amp;nbsp; The fix was to make the fallback spans code (which is how our ReadPixels is handled, though this is pretty pessimal) use pread instead of mapping and reading the contents out.&amp;nbsp; This gave the kernel the information it needed to not clflush the whole buffer when you just needed a little bit out.&amp;nbsp; That fixed the conformance tests.&amp;nbsp; Once I combined that with a little cache of pread data so I didn&apos;t syscall per pixel, I was getting faster large-scale ReadPixels out of GEM than we&apos;d seen out of the aperture reads that the driver&apos;s always used before.&amp;nbsp; And there&apos;s still significant room for improvement.&lt;br /&gt;&lt;br /&gt;ReadPixels shouldn&apos;t be important.&amp;nbsp; In theory apps aren&apos;t doing this, since ReadPixels is so slow on just about everyone&apos;s hardware that you should figure out some way to get around using it.&amp;nbsp; But it turned out that at least gl-117 was actually using it, and it was a performance bottleneck, which is now almost gone (~10% of the profile).&amp;nbsp; So in this case conformance testing ended up forcing us to fix a real app bug.&lt;br /&gt;&lt;br /&gt;I also fixed a couple of performance regressions seen on the 965 with openarena -- one was a failure in the drm-gem-merge branch, and another was cache ping-ponging for vertex/index buffer uploads since GTT mappings started happening.&amp;nbsp; It&apos;s now back up to 76 fps from 28 fps.&lt;br /&gt;&lt;br /&gt;With our recent fixes plus the changes in response to lkml review, I&apos;m ready to take another stab at getting into linux-next.&amp;nbsp; That&apos;s the gating step for releasing libdrm, then the 2d driver, then making an appropriate mesa tarball, then getting all the new hotness into distros.&amp;nbsp; It&apos;s been a long time coming.</description>
  <comments>http://anholt.livejournal.com/38717.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/38494.html</guid>
  <pubDate>Wed, 16 Jul 2008 00:34:08 GMT</pubDate>
  <title>GEM and buffer objects</title>
  <link>http://anholt.livejournal.com/38494.html</link>
  <description>Keith has noted the &lt;a href=&quot;http://keithp.com/blogs/intel_gfxcon_2008/&quot; rel=&quot;nofollow&quot;&gt;adventures&lt;/a&gt; that we&apos;ve recently had in the GEM branch with the disagreement between the CPU and GPU about how memory gets addressed.  We&apos;ve got a pretty decent solution now I think, though I&apos;m having some troubles getting the MCHBAR mapped on desktop 965s, so I can&apos;t tell what mode the CPU is in.  I automatically disable tiling in that case, to avoid broken rendering.  Apparently the MCHBAR&apos;s locked out so that mortals don&apos;t go in and break their memory configuration.  But overclockers have figured out how to unlock it, so I&apos;m sure we will figure out as well in due time.&lt;br /&gt;&lt;br /&gt;Next project for me is fixing issues with PBO and FBO.  While we enabled support for the ARB_framebuffer_objects and ARB_pixel_buffer_objects on 965 with TTM/GEM development, that implementation from the 915 came with a lot of bugs that we haven&apos;t got around to fixing.  Now as more people are looking to use buffer objects, we need to get those bugs fixed.&lt;br /&gt;&lt;br /&gt;The first issue I&apos;ve found is that we&apos;re not flushing batchbuffers full of rendering before mapping buffer objects.  This will anger conformance tests that do rendering then read the resulting data out immediately.  I wrote up a fix for this today that I&apos;ll be testing in the next couple of days.&lt;br /&gt;&lt;br /&gt;The second is that we&apos;re trying to use the 2d blitter for accelerating copies between buffer objects and the screen.  That&apos;s things like glReadPixels to a PBO, glDrawPixels from a PBO, glCopyTexSubImage, glCopyPixels with read != draw drawable, etc.  The trick is that for buffer objects we render them upside down compared to the shared front and back buffers.  So when we&apos;re blitting between the two we need to invert the data -- set a negative pitch on one of the buffers and a base address somewhere at the other end.  The blitter&apos;s supposed to be cool with this.  Except that there&apos;s this comment in the code:&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;   /* Initial y values don&apos;t seem to work with negative pitches.  If&lt;br /&gt;    * we adjust the offsets manually (below), it seems to work fine.&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;So we need to not just put the offset somewhere on the other side, but exactly so that y == 0 in the offset we set is the end of the blit area.  Combine this with the fact that for tiled buffers the offset has to be 4KB-aligned, and it means that we&apos;re probably going to be angering our blitter if you choose unpleasant offsets for the the part of the blit that&apos;s in the shared front/back/depth.&lt;br /&gt;&lt;br /&gt;I might be able to work around it today by just flipping the buffer that isn&apos;t tiled instead, assuming that both aren&apos;t tiled.  But we want to get to the point of tiling them both. I think the right solution here is to just ditch using the blitter for almost everything.  If we figure out how to add meta operations to mesa for these sort of pixel path operations, we could write generic acceleration for anybody who wanted to use it, by mapping them to normal GL operations using texturing.  While it&apos;s some CPU overhead for state management, the 3D path is supposed to be faster than 2D GPU-wise, and it would get rid of a bunch of metaops code inside of our driver which has proved to be fragile at best.&lt;br /&gt;&lt;br /&gt;In the next week I&apos;m hoping to work on getting some metaops set up.  Beyond PBO, it would also help us for implementing accelerated SGIS_generate_mipmap, which is currently hurting compiz and other apps, and more complete glBitmap which is hurting mesa demos (and we know how important those are).</description>
  <comments>http://anholt.livejournal.com/38494.html</comments>
  <category>netbook</category>
  <category>intel</category>
  <lj:security>public</lj:security>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/38228.html</guid>
  <pubDate>Wed, 21 May 2008 23:13:25 GMT</pubDate>
  <title>On the Rain-Slick Precipice of Darkness and Mesa</title>
  <link>http://anholt.livejournal.com/38228.html</link>
  <description>I was very excited for the release of &lt;a href=&quot;http://playgreenhouse.com/game/HOTHG-000001-01/&quot; rel=&quot;nofollow&quot;&gt;On the Rain-Slick Precipice of Darkness&lt;/a&gt;.  Unfortunately, it appears to be broken on open-source graphics drivers.  After a bit of debugging with some folks on the forums, it looks like the game is testing for OpenGL extensions before creating a GL context.  Since we only load the driver at the time someone makes a direct context, we have no idea what to return for the extension list, and just return NULL.  The game appears to take that answer and get all indignant that we don&apos;t support things like ARB_multitexture.&lt;br /&gt;&lt;br /&gt;They&apos;re looking into it, and hopefully we&apos;ll have a playable game soon.</description>
  <comments>http://anholt.livejournal.com/38228.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/37944.html</guid>
  <pubDate>Fri, 16 May 2008 20:03:39 GMT</pubDate>
  <title>freedesktop.org mess</title>
  <link>http://anholt.livejournal.com/37944.html</link>
  <description>EDIT: daniels (the guy doing all the work) posted a good summary of what happened to fd.o to announce@, so I&apos;ll quote that:&lt;br /&gt;&lt;br /&gt;Hi,&lt;br /&gt;Due to the recent Debian OpenSSL trainwreck[0], we&apos;ve had to do a fair&lt;br /&gt;bit of housecleaning with regards to authentication.&lt;br /&gt;&lt;br /&gt;Firstly, the host keys have been regenerated, as below:&lt;br /&gt;root@fruit:~% ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key&lt;br /&gt;2048 1e:81:13:df:b9:68:fc:c2:ec:9d:c3:87:d1:5e:30:77 /etc/ssh/ssh_host_rsa_key.pub&lt;br /&gt;root@gabe:~% ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key&lt;br /&gt;2048 c1:1a:8a:e5:99:ce:5a:d9:a9:e2:b3:95:67:95:9d:f7 /etc/ssh/ssh_host_rsa_key.pub&lt;br /&gt;root@kemper:~% ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key&lt;br /&gt;2048 95:b5:28:3d:9b:37:55:d4:fc:3d:99:b4:06:9d:9b:5f /etc/ssh/ssh_host_rsa_key.pub&lt;br /&gt;root@annarchy:~% ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key&lt;br /&gt;2048 32:3e:0c:df:0a:c8:a6:33:72:9c:6c:ba:68:58:d2:30 /etc/ssh/ssh_host_rsa_key.pub&lt;br /&gt;&lt;br /&gt;You&apos;ll note that these are RSA-only.  DSA is no longer supported, nor is&lt;br /&gt;SSH1.&lt;br /&gt;&lt;br /&gt;Secondly, all vulnerable keys (weak RSA keys, RSA1 keys, and DSA keys)&lt;br /&gt;have been removed; anyone who had a vulnerable key will have received an&lt;br /&gt;email from myself at whichever address you had in LDAP, explaining what&lt;br /&gt;happened, and how to fix it[1].&lt;br /&gt;&lt;br /&gt;annarchy.fd.o (hosting bugs.fd.o, www.x.org, and others) is still having&lt;br /&gt;major issues, thanks to the Moin 1.6 upgrade being unbelievably painful;&lt;br /&gt;thanks very much to Benjamin Close for somehow dealing with this&lt;br /&gt;godawful upgrade, which is running its load average up to 116, and using&lt;br /&gt;up to 7GB of RAM just to convert a wiki from Moin 1.5 to 1.6.&lt;br /&gt;&lt;br /&gt;The snakeoil cert from bugs.fd.o is still vulnerable, and feel free to&lt;br /&gt;distrust it just as much as any other snakeoil cert.  We&apos;ll be getting a&lt;br /&gt;real cert from CAcert[2] soonish, but regenerating our snakeoil in the&lt;br /&gt;meantime.&lt;br /&gt;&lt;br /&gt;Thanks for bearing with us; if it&apos;s any consolation, it&apos;s not been the&lt;br /&gt;best week for admins.&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Daniel&lt;br /&gt;&lt;br /&gt;[0]: &lt;a href=&apos;http://lists.debian.org/debian-security-announce/2008/msg00152.html&apos; rel=&apos;nofollow&apos;&gt;http://lists.debian.org/debian-security-announce/2008/msg00152.html&lt;/a&gt; &lt;br /&gt;[1]: &lt;a href=&apos;http://www.freedesktop.org/wiki/AccountMaintenance&apos; rel=&apos;nofollow&apos;&gt;http://www.freedesktop.org/wiki/AccountMaintenance&lt;/a&gt;&lt;br /&gt;[2]: &lt;a href=&apos;http://www.cacert.org&apos; rel=&apos;nofollow&apos;&gt;http://www.cacert.org&lt;/a&gt; -- add its certs to your browser if they&lt;br /&gt;     aren&apos;t there, and don&apos;t forget to let your distribution and/or&lt;br /&gt;     browser vendor know.</description>
  <comments>http://anholt.livejournal.com/37944.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/37822.html</guid>
  <pubDate>Wed, 12 Mar 2008 23:35:49 GMT</pubDate>
  <title>EXA on 965 updates</title>
  <link>http://anholt.livejournal.com/37822.html</link>
  <description>Following on to &lt;a href=&quot;http://cworth.org/exa/i965/lca_2008/&quot; rel=&quot;nofollow&quot;&gt;Carl&apos;s update&lt;/a&gt; on our LCA talk, I&apos;ve been trying to pull the 965 Render improvements out of the batchbuffer branch and onto master.  Most of the changes in it are not actually dependent on batchbuffers or TTM.  We can avoid reuploading programs without TTM.  We can make bigger vertex buffers to reduce syncing without TTM.  What the TTM branch (intel-batchbuffer) should be getting us is improved EXA pixmap migration performance, reduced memory fragmentation, more efficient buffer reuse, and possibly DRI2.&lt;br /&gt;&lt;br /&gt;The current status of my work is at git://people.freedesktop.org/~anholt/xf86-video-intel on the 965-render-merge branch. It compiles, it runs, but the output is not quite what I hoped:&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href=&quot;http://people.freedesktop.org/~anholt/blog-965-render-desktop.png&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://people.freedesktop.org/~anholt/blog-965-render-desktop.png&quot; width=&quot;360&quot; height=&quot;225&quot;&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;The code is mostly the same as what&apos;s on the branch, with just some changed buffer handling that should be all-or-nothing rendering correctness, not brokenness with colors.  If I turn on xcompmgr, that desktop background goes thoroughly flourescent, and the windows partially translucent.  Something very weird is going on, and I&apos;m going to take a break and fix my 830/845 Render performance fix (&quot;here test my patch, oh wait I didn&apos;t make it compile first&quot;) instead of bashing my head against this for now.</description>
  <comments>http://anholt.livejournal.com/37822.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>5</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/37538.html</guid>
  <pubDate>Thu, 06 Sep 2007 20:59:00 GMT</pubDate>
  <title>X11R7.3 released</title>
  <link>http://anholt.livejournal.com/37538.html</link>
  <description>&lt;tt&gt;&lt;br /&gt;X Window System Release 7.3&lt;br /&gt;        2007-09-06&lt;br /&gt;&lt;br /&gt;The X11R7.3 release incorporates the 1.4 version of the X.Org X Server, which&lt;br /&gt;is most notable for the addition of input hotplugging support, with device&lt;br /&gt;detection managed either through HAL or a dbus-connected manager.&lt;br /&gt;&lt;br /&gt;Also new in the X Server since X11R7.2 is the 1.2 version of the RandR&lt;br /&gt;extension, which allows for runtime configuration of outputs within X Screens&lt;br /&gt;and an improved static configuration system for multihead in a RandR 1.2&lt;br /&gt;environment.&lt;br /&gt;&lt;br /&gt;This release also rolls in a new driver, xf86-video-vermilion, and re-adds&lt;br /&gt;the xf86-video-glide driver which had been present in the monolithic releases.&lt;br /&gt;The xbacklight command-line tool is also added for configuring backlight&lt;br /&gt;properties through RandR 1.2.  Other modules have also gone through the usual&lt;br /&gt;host of updates and bugfixes as well.&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Previous release managers may find me strange, but I didn&apos;t mind too much dealing with the release.  It was approximately the expected level of stress and frustration.  I made some changes this time around which greatly reduced the burden -- the old &quot;branded&quot; tarballs (&lt;tt&gt;modulename-X11Rwhatever-version.tar.b2&lt;/tt&gt; instead of just &lt;tt&gt;modulename-version.tar.bz2&lt;/tt&gt;) are now a thing of the past, and the published directory structure is simplified.  I&apos;ve update the wiki instructions for the next release manager, and it&apos;s relatively short.  Basically the only work that&apos;s left is what should be left -- making sure all the modules work well together, and making sure the blocker bugs for the server get resolved.&lt;br /&gt;&lt;br /&gt;As far as that, I think it was a mixed result.  Blocker bugs for the server I think I handled reasonably well -- hounding the appropriate people for the critical fixes, and not blocking to deal with the last-minute fixes for minor issues.  But the whole-release integration didn&apos;t go too well, with at least one required module update having been left out initially (fixed this morning).  What I hope we can have happen for the next katamari:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;I&apos;ll tinderbox the proposed module list in our ports tree to shake out integration issues.&lt;br /&gt;&lt;li&gt;Module maintainers may update util/modular/module-list.txt to make sure their stuff lands in the next release.&lt;br /&gt;&lt;/ul&gt;</description>
  <comments>http://anholt.livejournal.com/37538.html</comments>
  <category>freebsd</category>
  <lj:security>public</lj:security>
  <lj:reply-count>7</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/37350.html</guid>
  <pubDate>Sat, 21 Jul 2007 19:38:44 GMT</pubDate>
  <link>http://anholt.livejournal.com/37350.html</link>
  <description>This GUADEC has been excellent.  Not quite the same environment as the last one, since we&apos;re hiding in pubs from the rain and general &lt;a href=&quot;http://uncyclopedia.org/wiki/Birmingham&quot; rel=&quot;nofollow&quot;&gt;Birmingham&lt;/a&gt; dreariness, instead of getting naked in the Mediterranean, but I think the general quality of talks has gone way up.  My talk (on gnome-power-manager improvements) seemed to go over pretty well, and discussions with gtk folks were great, particularly at daniels&apos;s talk tonight.&lt;br /&gt;&lt;br /&gt;I finally took the two days needed to sit down and type out the DRM ioctl cleanups I&apos;d committed to do at a conference probably two years ago.   I tested it on FreeBSD and it worked great.  I passed the branch off to daniels to test, and he said &quot;woo glxgears works.  push!&quot;.  Apparently he was too far gone to notice that DRI hadn&apos;t initialized at all, so the linux side of the DRM is totally busted.  But hey, it&apos;s not like I was more sober, and I wasn&apos;t going to turn down pushing +2000, -3000 lines of diff.&lt;br /&gt;&lt;br /&gt;Now I&apos;m working on fixing up DRM mapping on FreeBSD to be less terrible, and writing some support code in the process that will be important for kernel memory management.</description>
  <comments>http://anholt.livejournal.com/37350.html</comments>
  <category>freebsd</category>
  <lj:security>public</lj:security>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/37091.html</guid>
  <pubDate>Fri, 30 Mar 2007 21:09:19 GMT</pubDate>
  <title>965GM support pushed</title>
  <link>http://anholt.livejournal.com/37091.html</link>
  <description>keithp and I have just pushed the support code for the 965GM (laptop graphics chipset that will be available soon) to mesa, drm, and xf86-video-intel.  The remaining piece is agpgart, which we just haven&apos;t done the lkml submission for yet, but if you check the patches for those 3 projects, you can probably guess what the agpgart diff looks like.  It wouldn&apos;t seem like a very big addition, since it was something like 100 lines total, but there&apos;s something cool and new here: We&apos;ve managed to get the ability to push the code before the chipset launch.  Previously, chipset support like this has been released early only to distributions, who then try to have packages ready to go for that day (often with bugs or integration issues due to only having received old snapshots), but this still meant that you couldn&apos;t just grab a released distro CD and pop it in your machine and go.  Now, there&apos;s a much better chance of this happening, depending on how your distro&apos;s release cycle aligns with ours.&lt;br /&gt;&lt;br /&gt;Getting even little policy changes like this really gives me hope that we can fix hardware vendors to do the right thing with open source software.  Ultimately, it&apos;s in their interests.</description>
  <comments>http://anholt.livejournal.com/37091.html</comments>
  <category>freebsd</category>
  <lj:security>public</lj:security>
  <lj:reply-count>10</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/36764.html</guid>
  <pubDate>Wed, 28 Feb 2007 00:46:53 GMT</pubDate>
  <title>i855 LVDS oops</title>
  <link>http://anholt.livejournal.com/36764.html</link>
  <description>I just found out today that I had totally broken i855 LVDS support in the modesetting branch, and while fixing that, I realized that our i855 LVDS support had been pretty broken since its inception.&amp;nbsp; With some digging, I found one bugzilla entry for it, but several emails.&amp;nbsp; Please file more bugzilla entries for bugs, folks, and don&apos;t worry about finding the right bug to attach to -- more individual bugs means more a better chance that I&apos;ll end up fixing your bug instead of some less important one of someone else&apos;s.&lt;br /&gt;&lt;br /&gt;So, if you&apos;re trying to use the modesetting branch on your i855 and having troubles, please try &lt;a href=&apos;http://people.freedesktop.org/~anholt/i8xx-clocks.diff&apos; rel=&apos;nofollow&apos;&gt;http://people.freedesktop.org/~anholt/i8xx-clocks.diff&lt;/a&gt; on your driver from a fresh boot, and either:&lt;br /&gt;&lt;br /&gt;1) Tell me that it makes your system work&lt;br /&gt;2) File a bugzilla with Xorg.0.log and a note that you tried this patch.</description>
  <comments>http://anholt.livejournal.com/36764.html</comments>
  <category>freebsd</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/36362.html</guid>
  <pubDate>Sat, 06 Jan 2007 03:05:52 GMT</pubDate>
  <title>my first X extension</title>
  <link>http://anholt.livejournal.com/36362.html</link>
  <description>Today I got to implement my first X request, from design through working code.  It&apos;s a simple one, but the results are nice.&lt;br /&gt;&lt;br /&gt;Up until now, DRI clients haven&apos;t been able to report damage.  As a result, screencast programs haven&apos;t been able to use XDamage to do minimal screen-scraping when GL apps are running.  I added a request where you simply hand an XFixes region of the area to be damaged plus a drawable, and the server reports that damage to that drawable.  The DRI drivers in cooperation with the GL library now use this at SwapBuffers time to report the drawing they do to the screen.&lt;br /&gt;&lt;br /&gt;I tested this using gstreamer, which let me easily create a screencast that displayed on the same screen.  The command I used was:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;gst-launch ximagesrc ! videoscale ! video-x-raw-rgb, width=400 ! ximagesink sync=false&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;There was only one issue: gstreamer folks still haven&apos;t committed my improvement &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=342463&quot; rel=&quot;nofollow&quot;&gt;#342463&lt;/a&gt; to ximagesrc.  So if you run glxgears for example, it overwhelms ximagesrc with damage rectangles, and within a few frames it&apos;s ground to a halt trying to catch up.  Someone needs to commit this (or just OK me to give myself a commit bit :) )  I ended up sticking a sleep in gears to slow things down enough for now with stock ximagesrc.&lt;br /&gt;&lt;br /&gt;I didn&apos;t actually do this for screencasting, though that was originally why I&apos;d thought about doing this extension.  We&apos;d run into a problem with RandR 1.2, which allows for each CRTC to have different rotation, so each CRTC may need a shadow buffer for its rotation of the framebuffer.  This means the server wants more control over rotation, which was already a mess to support in the previous architecture of the DRI driver doing the shadow buffer update on its own using rotation information we jammed into the sarea.  Now we can nuke a bunch of support code and do shadow updates for rotation entirely within the server, with no concern for 3D.&lt;br /&gt;&lt;br /&gt;Next things that could be done to build on this:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Make AIGLX support the new DRI method for damage reporting so screencasters work on it, too.&lt;br /&gt;&lt;li&gt;Merge to server-1.3 branch once we branch that off of randr-1.2-for-server-1.2 so it hits the next X Server release after 1.2.&lt;br /&gt;&lt;li&gt;Fix the driver to report damage for glCopyPixels and front buffer rendering&lt;br /&gt;&lt;li&gt;Fix libXvMC to report damage for its direct rendering.&lt;br /&gt;&lt;/ul&gt;</description>
  <comments>http://anholt.livejournal.com/36362.html</comments>
  <category>freebsd</category>
  <lj:security>public</lj:security>
  <lj:reply-count>5</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://anholt.livejournal.com/36180.html</guid>
  <pubDate>Thu, 04 Jan 2007 19:23:32 GMT</pubDate>
  <title>jhbuilding xorg</title>
  <link>http://anholt.livejournal.com/36180.html</link>
  <description>For a while people have been using various hacky scripts to build all of modular xorg.  I&apos;ve never liked them -- when I&apos;m building something, I just want to update one piece, and whatever it depended on.  jhbuild, therefore, has been a good tool, except that it can&apos;t deal with the Mesa build disaster without using a custom module type.&lt;br /&gt;&lt;br /&gt;So, a while back, I went ahead and made &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=349343&quot; rel=&quot;nofollow&quot;&gt;that module type&lt;/a&gt;.  However, getting review from jamesh by prodding on IRC has been a failure, and 4 months later it&apos;s still uncommitted.    So this is a plea: Can anyone get this committed to gnome, or will I be forced to maintain a fork of jhbuild for something so trivial?&lt;br /&gt;&lt;br /&gt;What this is blocking is coverity checking.  For coverity, they want something simple to build the whole project.  jhbuild would be great for that, I think, except that right now manual intervention is required to get Mesa built, and that&apos;s in the middle of building the xorg stack.</description>
  <comments>http://anholt.livejournal.com/36180.html</comments>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
</channel>
</rss>
