<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Plugable &#187; Programming</title>
	<atom:link href="http://plugable.com/category/user/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://plugable.com</link>
	<description>Do more with one simple USB cable</description>
	<lastBuildDate>Fri, 02 Jul 2010 19:23:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The Nexus One Phone-Top</title>
		<link>http://plugable.com/2010/06/09/the-nexus-one-phone-top/</link>
		<comments>http://plugable.com/2010/06/09/the-nexus-one-phone-top/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 18:09:13 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[UD-160-A]]></category>
		<category><![CDATA[udlfb]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=959</guid>
		<description><![CDATA[Sven Killig has a sense of where computing is headed: Powerful computers are everywhere, including in your pocket. And he has the skills to push things ahead, to show us glimpses of what&#8217;s coming. Last year, he demoed turning your router into a full-fledged computer. This year, it&#8217;s the Google Nexus One phone as a [...]]]></description>
			<content:encoded><![CDATA[<p>Sven Killig has a sense of where computing is headed:  Powerful computers are everywhere, including in your pocket. And he has the skills to push things ahead, to show us glimpses of what&#8217;s coming.</p>
<p>Last year, he demoed turning <a href="http://sven.killig.de/openwrt/slugterm_dl.html">your router into a full-fledged computer</a>.</p>
<p>This year, it&#8217;s the <a href="http://sven.killig.de/android/N1/2.2/usb_host/">Google Nexus One phone as a full computer</a> &#8212; with attached external keyboard, mouse, display, and more.</p>
<p>The Nexus One demo is using the <a href="http://plugable.com/category/project/udlfb/">udlfb</a> Linux kernel module to talk with the DisplayLink device, and it will work with any DisplayLink device, including Plugable&#8217;s.  </p>
<p>Note the version of udlfb in the 2.6.34 staging tree unfortunately didn&#8217;t work for Sven. So he&#8217;s now using the latest udlfb from <a href="http://git.plugable.com/">http://git.plugable.com/</a>, which will likely get merged in for kernel 2.6.36.</p>
<p>Also, he used a dual headed cable to get enough power.  A powered hub or a docking station/terminal like the <a href="http://plugable.com/products/UD-160-A">UD-160-A</a> won&#8217;t need that &#8212; it supplies its own power from AC &#8211; all the hardware needed is in the one package.</p>
<p>It&#8217;s exciting to have all this open source work come together in interesting demos like this.</p>
<p>There was a question recently why udlfb doesn&#8217;t use the same compression technique as the Windows drivers.  Among other reasons, one is that the RL compression used by udlfb scales down to devices like the ones Sven has been working on &#8212; it&#8217;s as light as possible on CPU load, while getting decent compression.  </p>
<p>Stepping back, it&#8217;s clear Apple (and now Microsoft) are making a mistake by limiting the hardware ecosystem around their devices.  Android and the other Linux variants have an opportunity here &#8212; and considering the Apple juggernaut, they definitely need every advantage.</p>
<p>Sven&#8217;s demos show how powerful these scenarios can be.  The hardware is ready. Devices like Plugable&#8217;s are designed with these scenarios in mind. Now we need to get the software refined and included in standard distributions, so normal consumers can take advantage of all the possibilities and benefits here.</p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/06/09/the-nexus-one-phone-top/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Summer of Code Work Kicks Off</title>
		<link>http://plugable.com/2010/05/24/google-summer-of-code-work-kicks-off/</link>
		<comments>http://plugable.com/2010/05/24/google-summer-of-code-work-kicks-off/#comments</comments>
		<pubDate>Mon, 24 May 2010 23:28:43 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[UD-160-A]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=934</guid>
		<description><![CDATA[Today is the kickoff of coding work for Google SoC 2010 projects. We&#8217;re very excited about the Google funded project to refine USB multiseat on Linux, with the winning proposal from Lucas Nascimento Ferreira at the Federal University of Parana in Brazil. In addition to providing mentoring, Plugable is also providing donated hardware for this [...]]]></description>
			<content:encoded><![CDATA[<p>Today is the kickoff of coding work for Google SoC 2010 projects.</p>
<p>We&#8217;re very excited about the Google funded project to refine USB multiseat on Linux, with the winning proposal from Lucas Nascimento Ferreira at the Federal University of Parana in Brazil.</p>
<p>In addition to providing mentoring, Plugable is also providing donated hardware for this project. Two <a href="/products/ud-160-a/" target="_blank">Plugable Universal Docking stations</a> with recent enhancements for use as a terminal, were just picked up by Lucas in Brazil today.  By next month, we expect to have updated versions of the <a href="/products/uga-125-hub/" target="_blank">UGA-125-HUB</a> for terminal use to send down.</p>
<p>For those interested in learning more and potentially following Lucas&#8217; work:</p>
<ul>
<li><a href="http://socghop.appspot.com/document/show/gsoc_program/google/gsoc2010/timeline" target="_blank">Google&#8217;s SoC 2010 Timeline</a></li>
<li><a href="http://www.inf.ufpr.br/lnf07/gsoc.txt" target="_blank">Lucas&#8217; winning USB Multiseat Proposal</a></li>
</ul>
<p>And we&#8217;ll post periodic status updates here.</p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/05/24/google-summer-of-code-work-kicks-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Support For Higher-Res Monitors on Lower-Res DisplayLink Devices</title>
		<link>http://plugable.com/2010/05/21/linux-support-for-higher-res-monitors-on-lower-res-displaylink-devices/</link>
		<comments>http://plugable.com/2010/05/21/linux-support-for-higher-res-monitors-on-lower-res-displaylink-devices/#comments</comments>
		<pubDate>Fri, 21 May 2010 16:40:19 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Display]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[UD-160-A]]></category>
		<category><![CDATA[UGA-125]]></category>
		<category><![CDATA[UGA-2K-A]]></category>
		<category><![CDATA[udlfb]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=914</guid>
		<description><![CDATA[On Windows and Mac, if you plug in a monitor with a higher resolution than your adapter supports, the driver will automatically fall back to the best common mode between the two. Linux hasn&#8217;t had that support &#8212; it would try to set the highest mode the monitor is capable of, often resulting in a [...]]]></description>
			<content:encoded><![CDATA[<p>On Windows and Mac, if you plug in a monitor with a higher resolution than your adapter supports, the driver will automatically fall back to the best common mode between the two.</p>
<p>Linux hasn&#8217;t had that support &#8212; it would try to set the highest mode the monitor is capable of, often resulting in a black screen.  Especially common for the DL-125 chip, with its mode limits of 1440&#215;900/1280&#215;1024.</p>
<p>That&#8217;s a shame because the DL-125 chip is a smart choice in many cases &#8211; by limiting itself to those lower modes, it stays more consistently within the limits of the USB 2.0 bus, resulting in more consistent performance.</p>
<p>So coinciding with the launch of Plugable&#8217;s DisplayLink DL-125 based products (<a href="/products/uga-125">UGA-125</a> and <a href="/products/uga-125-hub">UGA-125-HUB</a>), changes have been implemented to bring Linux roughly up to the level of Windows and Mac in this area for DisplayLink devices.  This also helps devices like the <a href="/products/ud-160-a">UD-160-A</a> when running on monitors greater than its limit of 1920&#215;1080.</p>
<p>The kernel framebuffer driver udlfb <a href="http://git.plugable.com/gitphp/index.php?p=udlfb&#038;a=commitdiff&#038;h=1bbba9e8123453ce1677fc247abc356c7040892c">has been enhanced to read the resolution limit from the firmware descriptors of the device, and adhere to it</a>.</p>
<p>On the X server side, we needed a driver which would limit itself to the resulting reduced mode list.  Unfortunately, the existing displaylink X server reads EDID directly, and assumes the adapter can do whatever the monitor can do. </p>
<p>We&#8217;ve been wanting to get rid of the need for a displaylink-specific X server, and the standard xf86-video-fbdev driver runs with the best existing mode, rather than trying to set a higher one in EDID.  So this was a good trigger for converting over.</p>
<p>So <a href="http://git.plugable.com/gitphp/index.php?p=xf86-video-fbdev&#038;a=commitdiff&#038;h=388fd2b6a20eb396ccface5b2cf2ec907ec96ba4">xf86-video-fbdev has been enhanced with X Damage protocol support</a>, ported from Roberto&#8217;s displaylink driver.  This is still a little in-flux from an interface perspective, but from a functional perspective it&#8217;s done and fully performant.  </p>
<p>So it&#8217;s now possible to run with a modified generic fbdev driver, which talks to udlfb, with full performance and without needing defio (although there&#8217;s also some good news in the defio space, which will be posted about later).</p>
<p>You can grab the latest udlfb kernel module with a &#8220;git clone http://git.plugable.com/webdav/udlfb&#8221;. Compile with &#8220;make &#038;&#038; sudo make install &#038;&#038; sudo depmod -a&#8221;</p>
<p>And you can grab the latest modified xf86-video-fbdev with a &#8220;git clone http://git.plugable.com/webdav/xf86-video-fbdev&#8221;.  Compile with &#8220;./autogen.sh &#038;&#038; make &#038;&#038; sudo make install&#8221;</p>
<p>You&#8217;ll need a very recent xorg-macros version (1.4), which in package &#8220;sudo apt-get install xutils-dev&#8221;</p>
<p>To use the new X server, you must turn on the new &#8220;ReportDamage&#8221; option to fbdev. Modify your <a href="http://plugable.com/2009/11/16/setting-up-usb-multiseat-with-displaylink-on-linux-gdm-up-to-2-20/">existing xorg conf </a>like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Section <span style="color: #ff0000;">&quot;Device&quot;</span>
  Identifier <span style="color: #ff0000;">&quot;dl&quot;</span>
  Driver <span style="color: #ff0000;">&quot;fbdev&quot;</span>
  Option <span style="color: #ff0000;">&quot;ReportDamage&quot;</span> <span style="color: #ff0000;">&quot;true&quot;</span>
  Option <span style="color: #ff0000;">&quot;fbdev&quot;</span> <span style="color: #ff0000;">&quot;/dev/fb0&quot;</span>
EndSection</pre></div></div>

<p>And you should be all set to go.   This new X server should work with the existing udlfb in the staging tree of kernel 2.6.31+ for now, as it&#8217;s re-using the same original ioctl.  But may require modeset changes that are only in 2.6.34+.</p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/05/21/linux-support-for-higher-res-monitors-on-lower-res-displaylink-devices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Summer of Code &#8211; USB Multiseat</title>
		<link>http://plugable.com/2010/04/06/google-summer-of-code-usb-multiseat/</link>
		<comments>http://plugable.com/2010/04/06/google-summer-of-code-usb-multiseat/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 00:17:11 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[UD-160-A]]></category>
		<category><![CDATA[amazon:asin=B002PONXAI]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=788</guid>
		<description><![CDATA[Plugable is offering mentoring and donated hardware for USB graphics projects that are funded as part of Google Summer of Code 2010. Plugable is working through X.Org as a sponsoring organization. The main focus is USB multiseat, and the details are on the xorg wiki for SoC 2010 With all the pieces that are just [...]]]></description>
			<content:encoded><![CDATA[<p>Plugable is offering mentoring and donated hardware for USB graphics projects that are funded as part of Google Summer of Code 2010.  Plugable is working through X.Org as a sponsoring organization.</p>
<p>The main focus is USB multiseat, and the details are on the <a href="http://www.x.org/wiki/SummerOfCodeIdeas">xorg wiki for SoC 2010</a></p>
<p>With all the pieces that are just coming together now, there is a potential here to do a project with huge impact, without a massive amount of engineering.  There is already a very solid proposal coming from a student in Brazil who has previously been involved with the MDM multiseat project.  </p>
<p>Google&#8217;s deadline for applications <a href="http://socghop.appspot.com/document/show/program/google/gsoc2009/timeline">is now just a few days away: April 9th</a>.</p>
<p>If there&#8217;s interest from other parties, we&#8217;ll get everyone talking &#8211; or there are other related proposals that we might be able to get in at the last minute. Foremost among those is conversion of the DisplayLink USB driver udlfb and matching X server from a fbdev driver to the KMS model. </p>
<p>Here&#8217;s the basics of the USB multiseat opportunity:</p>
<blockquote><p>USB Multiseat Refinement</p>
<p>Linux Multiseat setups have potential to significantly reduce the cost of computing, but can be hard to configure. Some progress has been made on USB multiseat, where all components of the &#8220;terminal&#8217; (display, keyboard, mouse, and more) are on USB, so configuration can be fully plug and play &#8211; you can just assume that all devices on the same USB hub constitute a terminal.</p>
<p>Some early prototypes of this are working (see http://plugable.com/2009/11/16/setting-up-usb-multiseat-with-displaylink-on-linux-gdm-up-to-2-20/). The underlying kernel drivers and X servers are largely in place.</p>
<p>But recent changes to the X Server, ConsoleKit, and other components open the possibility for a cleaner implementation.</p>
<p>This SoC project would constitute the refinement/creation of configuration scripts to enable a standard Linux or *nix computer to automatically launch additional seats when a USB terminal is plugged in</p>
<p>* udev rules to detect hubs/devices which should be collectively treated as terminals<br />
* udev attributes to label the set of devices with a common seat id<br />
* udev triggers for on-demand generation of the appropriate Xorg config files, to allow seats to coexist with the primary display/devices.<br />
* ConsoleKit scripts to launch independent GDM/X sessions for each USB terminal seat<br />
* InputClass rules to cause the primary X session to ignore multiseat-assigned devices, and the appropriate seat to use them<br />
* udev rules and X init scripts to grant access to audio, storage, and other devices to the person logged into the matching seat </p>
<p>The one-sentence goal of this project: To make USB multiseat fully plug and play for the end-user, and ready for any distro to safely and cleanly drop in at any time.</p></blockquote>
<p>Know any aspiring software engineering students that might be interested?  Check <a href="http://code.google.com/soc/">SoC info from Google</a> and the <a href="http://wiki.x.org/wiki/GSoCApplication">SoC guidelines from xorg</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/04/06/google-summer-of-code-usb-multiseat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xorg-server 1.8.0 released</title>
		<link>http://plugable.com/2010/04/02/xorg-server-1-8-0-released/</link>
		<comments>http://plugable.com/2010/04/02/xorg-server-1-8-0-released/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 18:14:11 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[UD-160-A]]></category>
		<category><![CDATA[UGA-2K-A]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=770</guid>
		<description><![CDATA[xorg-server 1.8.0 has been released. There will still be some bugs and issues to resolve &#8212; but this release has most of the features, specifically related to input handling and udev-based dynamic configuration, of a more solid USB multiseat solution. In short: udev rules, which already can detect a grouping of USB devices that constitute [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lists.freedesktop.org/archives/xorg/2010-April/049784.html">xorg-server 1.8.0 has been released</a>.  </p>
<p>There will still be some bugs and issues to resolve &#8212; but this release has most of the features, specifically related to input handling and udev-based dynamic configuration, of a more solid <a href="http://plugable.com/2009/11/16/setting-up-usb-multiseat-with-displaylink-on-linux-gdm-up-to-2-20/">USB multiseat</a> solution.</p>
<p>In short:</p>
<ul>
<li> udev rules, which already can detect a grouping of USB devices that constitute a terminal, can now tell X to ignore or use particular devices more easily through udev attributes and more dynamic/independent xorg.conf.d scripts.</li>
<li> udev is now the default configuration mechanism (the torch has been passed from the less flexible hal)</li>
</ul>
<p>So the challenges to explore are now more in the area of ConsoleKit integration and whether we can use these new capabilities support not just pure-USB multiseat setups, but also a mix of seats with PCIe attached graphics, and with fully USB seats.</p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/04/02/xorg-server-1-8-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X.Org Server 1.8 Release Candidate 2</title>
		<link>http://plugable.com/2010/03/22/x-org-server-1-8-release-candidate-2/</link>
		<comments>http://plugable.com/2010/03/22/x-org-server-1-8-release-candidate-2/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 15:21:37 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[UD-160-A]]></category>
		<category><![CDATA[UGA-2K-A]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=735</guid>
		<description><![CDATA[X.Org has announced RC2 of the 1.8 server release for Linux and other *nix operating systems. 1.8 contains several new features and configuration capabilities that will form the foundation of future USB multiseat work. In effect, USB multiseat has been waiting for this work to stabilize and get into the distros (of which Fedora 13 [...]]]></description>
			<content:encoded><![CDATA[<p>X.Org has announced RC2 of the 1.8 server release for Linux and other *nix operating systems.  1.8 contains several new features and configuration capabilities that will form the foundation of future USB multiseat work.  In effect, USB multiseat has been waiting for this work to stabilize and get into the distros (of which Fedora 13 will be one of the first).</p>
<p>You can read more about the <a href="http://who-t.blogspot.com/2010/01/new-configuration-world-order.html">new 1.8 configuration features</a> which multiseat will use at Peter Hutterer&#8217;s blog.</p>
<p>And read more about the RC itself at <a href="http://www.phoronix.com/scan.php?page=news_item&#038;px=ODA4OQ">Phoronix</a></p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/03/22/x-org-server-1-8-release-candidate-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update on DisplayLink Linux support (udlfb in 2.6.34)</title>
		<link>http://plugable.com/2010/03/14/update-on-displaylink-udlfb-in-2-6-34/</link>
		<comments>http://plugable.com/2010/03/14/update-on-displaylink-udlfb-in-2-6-34/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 23:03:50 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[UD-160-A]]></category>
		<category><![CDATA[UGA-2K-A]]></category>
		<category><![CDATA[udlfb]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=689</guid>
		<description><![CDATA[A 10-part udlfb patch series with several enhancements were recently accepted into the Linux kernel staging tree of 2.6.34. Greg&#8217;s maintainer patch series passing them on starts here. This catches the official kernel staging tree with everything on git.plugable.com up to Feb, 2010. Background udlfb provides Linux framebuffer (fbdev) support plus a private &#8220;damage&#8221; notification [...]]]></description>
			<content:encoded><![CDATA[<p>A <a target="_blank" href="http://marc.info/?l=linux-fbdev&#038;m=126624512024319&#038;w=2">10-part udlfb patch series</a> with several enhancements were recently accepted into the Linux kernel staging tree of 2.6.34.  Greg&#8217;s maintainer patch series passing them on <a target="_blank" href="http://driverdev.linuxdriverproject.org/pipermail/devel/2010-March/004293.html">starts here</a>. </p>
<p>This catches the official kernel staging tree with everything on <a target="_blank" href="http://git.plugable.com">git.plugable.com</a> up to Feb, 2010.  </p>
<p><strong>Background</strong></p>
<p>udlfb provides Linux framebuffer (fbdev) support plus a private &#8220;damage&#8221; notification ioctl used by the Roberto DeIoris&#8217; &#8220;displaylink&#8221; X server. Udlfb automatically detects and supports all current DisplayLink USB graphics chips &#8211; 120,160,115,125,165,195.  It supports 16bpp, with modes up to the maximum supported by the DisplayLink chips. Plugging any DisplayLink device into a Linux PC with this support should result in a &#8220;green screen&#8221; which means udlfb has loaded, set the monitor default mode, and drawn to the device successfully.</p>
<p>What udlfb does *not* do on its own is make configuring X easy &#8211; X sits on udlfb, but getting X running still involves editing configuration files like xorg.conf in different ways depending on what you&#8217;re trying to do, what distro version you have, and what primary GPU you have.</p>
<p><strong>Features in Linux kernel 2.6.34 so far</strong></p>
<ul>
<li>Improved performance (about 20% average improvement over a variety of “benchmarks” like x11perf, gtkperf, glxgears).  Video playback, flash games, etc. are all improved</li>
<li>Asynchronous urb dispatch and no mutexes held for extended periods during render</li>
<li>Slightly lower CPU consumption, fewer non-localized memory accesses, slightly higher average compression</li>
<li>Better handling of switching from X to fbcon VTs and back</li>
<li>Driver unloads more cleanly from either bottom-up (USB removal) or top-down (shutdown). Problem reports welcome.</li>
<li>More standard EDID parsing and mode handling, using fbdev&#8217;s built in mode libraries (but creates a new dependency on them being enabled in kernel)
<li>Performance metrics reported through sysfs (read /sys/class/graphics/fbX/*metrics* &#8211; but will move to debugfs)</li>
<li>EDID reported through sysfs (read /sys/class/graphics/graphics/fbX/edid)</li>
<li>Can compile as module with or without defio or sys_ dependencies</li>
<li>Lots of cleanup – tested on 64-bit, closer to endian clean, checkpatch.pl clean</li>
<li>Support for standard fbdev clients (via defio) &#8211; unfortunately buggy yet (see todos)</li>
</ul>
<p>Depending on timing, some additional todo items might make it, we&#8217;ll see.</p>
<p><strong>Versioning</strong></p>
<p>At one point, we wanted udlfb to have its own project cycles and release versioning to help clarify things here while udlfb evolved in the early days.  Got pushback on doing this from the kernel maintainers. So versioning of udlfb is purely by kernel version &#8211; &#8220;this bug is in udlfb in kernel 2.6.34rc1&#8243; or whatever.  There&#8217;ll also be a newer changes that haven&#8217;t been submitted to the kernel (e.g. at <a href="http://git.plugable.com/">http://git.plugable.com/</a>).  And it&#8217;s probably best to just version that per commit/checkin. &#8220;This bug shows up in commit 234b4e22&#8230;&#8221;.  This is nice in a way &#8211; just check the stuff in somewhere let the world know what you&#8217;re doing &#8211; the only &#8220;release process&#8221; you need to coordinate with is getting the patches into the kernel itself.  Or feel free also to send patches here, we&#8217;ll try to help them through the process.</p>
<p><strong>Todo</strong></p>
<ul>
<li>Add code to read pixel resolution limits from the device&#8217;s USB descriptors, and adhere to them.  Avoids blank screen when monitors caps exceeds that of the adapter</li>
<li>Add pseudo-32bpp mode to help the case of using Xinerama to extend desktop across PCIe/USB adapters. Not planning true 24/32-bpp mode yet because of complexity and perf tradeoffs</li>
<li>Disable defio by default, unfortunately, because of several bugs without obvious solutions
<ul>
<li>rendering problems with pages (lines) that no longer get updated &#8211; writes to those are no longer triggering deferred processing</li>
<li>When running 2 USB adapters, dirty pages for one instance seem to affect the other, and vice versa (udlfb has no common state, so appears to be in defio or mmu handling)</li>
<li>cases where we hit a kernel oops in the deferred io handler when it tries to touch the pages it&#8217;s been asked to handle.</li>
</ul>
<li>Move perf metrics from sysfs to debugfs and add ABI doc for what remains, <a href="http://marc.info/?l=linux-fbdev&#038;m=126653985829880&#038;w=2">per GregKH</a></li>
<li>Fix <a href="http://marc.info/?l=linux-fbdev&#038;m=126650956714168&#038;w=2">two ignored return values</a> that Greg&#8217;s build environment caught</li>
<li>Get a safe method from DisplayLink to detect future chips that might not be compatible with current ones, and bail out of probe</li>
</ul>
<p>There&#8217;s lot of other stuff that could be done &#8211; and any patches are very welcome.  One big open question is whether fbdev has legs, or whether this effort should be converted over to KMS/DRM/DRI.  </p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/03/14/update-on-displaylink-udlfb-in-2-6-34/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs macro to ease the pain of checkpatchitis</title>
		<link>http://plugable.com/2010/02/19/emacs-macro-to-ease-the-pain-of-checkpatchitis/</link>
		<comments>http://plugable.com/2010/02/19/emacs-macro-to-ease-the-pain-of-checkpatchitis/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 05:40:18 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[udlfb]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=437</guid>
		<description><![CDATA[In order to submit patches to the Linux kernel &#8212; as I&#8217;ve been doing lately to help improve Linux&#8217;s DisplayLink driver udlfb &#8212; the changed code has to pass a script called checkpatch.pl, which flags violations of the Linux kernel style guidelines. Style wars (e.g. &#8220;tabs vs. spaces&#8221;) are a never-ending source of tension on [...]]]></description>
			<content:encoded><![CDATA[<p>In order to submit patches to the Linux kernel &#8212; as I&#8217;ve been doing lately to help improve Linux&#8217;s DisplayLink driver udlfb &#8212; the changed code has to pass a script called checkpatch.pl, which flags violations of the Linux kernel style guidelines.</p>
<p>Style wars (e.g. &#8220;tabs vs. spaces&#8221;) are a never-ending source of tension on projects, so I actually appreciate automation like checkpatch.pl to just lay down the law, and be done with it.</p>
<p>But .. having to sift through endless warnings when you run checkpatch.pl late in the development process is frustrating.  And there&#8217;s no way most occasional kernel patchers will remember all the rules (especially if you strongly disagree with some of them &#8212; which I do). It&#8217;s much better if your editor can just warn you when you step off the golden path of enlightenment.  I use emacs, so I looked around for solutions, but they were only incomplete, or not real-time (e.g. checkpatch.pl has an &#8211;emacs option to run in the compile window of emacs).</p>
<p>So here&#8217;s something a little less incomplete that I&#8217;ve added to my .emacs file to catch the majority of checkpatch.pl errors in real-time (by highlighting the offending code in red). Works only on recent emacs versions.  Hopefully it&#8217;ll be useful to others pounding away on their patches.</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">;; *** BEGIN highlight checkpatch.pl warnings and errors ***</span>
<span style="color: #66cc66;">&#40;</span>add-hook 'c-mode-common-hook
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
      <span style="color: #808080; font-style: italic;">;; this sets defaults to match many checkpatch.pl guidelines</span>
      <span style="color: #66cc66;">&#40;</span>c-set-style <span style="color: #ff0000;">&quot;linux&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">;; but doesn't warn us about violations these regexp catch common ones</span>
<span style="color: #66cc66;">&#40;</span>custom-set-faces
    '<span style="color: #66cc66;">&#40;</span>my-warning-face <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>class color<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">background</span> <span style="color: #ff0000;">&quot;red&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>add-hook 'font-lock-mode-hook
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">function</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> font-lock-keywords
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">append</span> font-lock-keywords
		    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;^.<span style="color: #000099; font-weight: bold;">\\</span>{81<span style="color: #000099; font-weight: bold;">\\</span>}&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>/<span style="color: #000099; font-weight: bold;">\\</span>/.*&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;;[_A-Za-z0-9]+&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;,[_A-Za-z0-9]+&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;return[[:blank:]]*(.+);&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;([_A-Za-z0-9]+[<span style="color: #000099; font-weight: bold;">\\</span>*]+)&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;[[:blank:]]+<span style="color: #000099; font-weight: bold;">\\</span>)&quot;</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
		    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;^[[:blank:]]+{[[:blank:]]*$&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
		    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;[_A-Za-z0-9]+<span style="color: #000099; font-weight: bold;">\\</span>*[[:blank:]]&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> 'my-warning-face t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">;; exercise to reader - move regexps into c hook</span>
<span style="color: #808080; font-style: italic;">;; *** END highlight checkpatch.pl warnings and errors ***</span></pre></div></div>

<p>Any enhancements or corrections are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/02/19/emacs-macro-to-ease-the-pain-of-checkpatchitis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preparing more udlfb patches for linux-next</title>
		<link>http://plugable.com/2010/02/12/preparing-more-udlfb-patches-for-linux-next/</link>
		<comments>http://plugable.com/2010/02/12/preparing-more-udlfb-patches-for-linux-next/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 22:46:15 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[UD-160-A]]></category>
		<category><![CDATA[UGA-2K-A]]></category>
		<category><![CDATA[udlfb]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=392</guid>
		<description><![CDATA[There are limits on how much a small device company can and should do in contributing to open source driver support. But with a historical connection to DisplayLink and more products coming with the technology included, contributing what we can to the generic DisplayLink driver on Linux makes some sense. Also note this driver is [...]]]></description>
			<content:encoded><![CDATA[<p>There are limits on how much a small device company can and should do in contributing to open source driver support.  But with a historical connection to DisplayLink and more products coming with the technology included, contributing what we can to the generic DisplayLink driver on Linux makes some sense. </p>
<p>Also note this driver is just a foundation on which other stuff (like X) sits, so it doesn&#8217;t mean Linux is easy for real end users yet.  But it&#8217;s getting closer.</p>
<p>Here&#8217;s the announce that went to the list today:</p>
<p><em>The next patch series for udlfb is &#8220;nearly ready&#8221; for submission, hopefully will be coming in the next few days.</p>
<p>Testing and any problem reports would be helpful.  The code that will be submitted is at <a href="http://git.plugable.com/gitphp/index.php?p=udlfb&#038;a=summary">http://git.plugable.com/gitphp/index.php?p=udlfb&#038;a=summary</a></p>
<p>There are many dozens of checkins in git as inter-related problems have been explored and the code incrementally improved.  Before submitting, I&#8217;ll be reconstituting them into a smaller number of more analyzable email patches: make everything checkpatch.pl clean, reorganize things to match final layout, then per-feature patches. We&#8217;ll see how that goes.</p>
<p>Major features:</p>
<p>* Support for standard fbdev clients (via defio)<br />
* Improved performance (about 20% average improvement over a variety of &#8220;benchmarks&#8221; like x11perf, gtkperf, glxgears)<br />
* Asynchronous urb dispatch and no mutexes held for extended periods during render<br />
* Slightly lower CPU consumption, less touching memory, slightly higher average compression<br />
* Better handling of switching from X to fbcon VTs and back<br />
* Driver should unload cleanly from either bottom-up (USB removal) or top-down (shutdown).  Problem reports welcome.<br />
* Performance metrics reported through sysfs (read /sys/class/graphics/fbX/*metrics*)<br />
* EDID reported through sysfs (read /sys/class/graphics/graphics/fbX/edid)<br />
* Can compile as module with or without defio or sys_ dependencies<br />
* Lots of cleanup &#8211; tested on 64-bit, closer to endian clean, checkpatch.pl clean</p>
<p>What it does not have:</p>
<p>* The defio rendering problems (e.g. with xf86-video-fbdev X server) are still unsolved<br />
* Still 16bpp only.  Pseudo-truecolor 32->16 is on the wishlist.<br />
* No DL 1&#215;5 SKU detection yet (you&#8217;ll get a blank screen if your monitor&#8217;s res exceeds the adapter)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/02/12/preparing-more-udlfb-patches-for-linux-next/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux kernel framebuffer rendering APIs</title>
		<link>http://plugable.com/2010/01/30/linux-kernel-framebuffer-rendering-apis/</link>
		<comments>http://plugable.com/2010/01/30/linux-kernel-framebuffer-rendering-apis/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 00:56:49 +0000</pubDate>
		<dc:creator>Bernie Thompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[udlfb]]></category>

		<guid isPermaLink="false">http://plugable.com/?p=378</guid>
		<description><![CDATA[The Linux framebuffer interface has at least four different sets of APIs for rendering to the screen. Here they are mapped against the some important fbdev client &#8220;applications&#8221;. Description Linux console fbdev X server mplayer, fbi, some others fb_write and fb_read passes a buffer to copy to/from user no no no image_blit, fillrect, copyarea blit [...]]]></description>
			<content:encoded><![CDATA[<p>The Linux framebuffer interface has at least four different sets of APIs for rendering to the screen.  Here they are mapped against the some important fbdev client &#8220;applications&#8221;.</p>
<table>
<tr>
<th></th>
<th>Description</th>
<th>Linux console</th>
<th>fbdev X server</th>
<th>mplayer, fbi, some others
<th></tr>
<tr>
<td>fb_write and fb_read</td>
<td>passes a buffer to copy to/from user</td>
<td>no</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>image_blit, fillrect, copyarea</td>
<td>blit passes buffer to copy</td>
<td>yes</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>mmap</td>
<td>assuming writes go directly to device</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>mmap</td>
<td>with extra ioctl to report damage</td>
<td>no</td>
<td>no</td>
<td>no</td>
</tr>
</table>
<p>A &#8220;no&#8221; in the above table means the client application will fail if that&#8217;s the only API option supported by the kernel framebuffer driver.</p>
<p>udlfb supports all four, with some limitations (e.g. defio is required to support mmap without damage reports).</p>
<p>The custom displaylink X server is the only client today which supports the last option, which is the most performant option on indirect displays (like USB displays) &#8211; and hopefully will become a standard interface as it&#8217;s useful in many cases.</p>
<p>Unfortunately for the DisplayLink udlfb framebuffer, each API has different constraints it places on the driver.  Those constraints aren&#8217;t easily met all at once for a driver rendering to USB.  AFAICT, it looks like the driver actually needs to figure out what kind of client it&#8217;s dealing with, and assume that client will stick to that sub-set of the API.  That seems to be a safe assumption for the major fbdev apps today, but betting on something like this is always ugly.</p>
<p>Any misconceptions?</p>
]]></content:encoded>
			<wfw:commentRss>http://plugable.com/2010/01/30/linux-kernel-framebuffer-rendering-apis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
