…but what does it means for Intel Linux Graphics?

I tried to summarize all the patches and changes which went to this kernel release which somehow affected the drivers/gpu/drm/i915 directory (and, therefore, the kernel part of our driver).

To give proper credit to all the authors whose code was accepted into the official kernel between the 3.0.0 and 3.1 release, here is the full list:

  • Adam Jackson: drm/i915/dp: Better hexdump of DPCD
  • Adam Jackson: drm/i915/dp: Don’t turn CPT DP ports on too early
  • Adam Jackson: drm/i915/dp: Explicitly disable symbol scrambling while training
  • Adam Jackson: drm/i915/dp: Explicitly request 8/10 channel coding
  • Adam Jackson: drm/i915/dp: Move DPCD dump to common code instead of PCH-only
  • Adam Jackson: drm/i915/dp: Read more DPCD registers on connection probe
  • Adam Jackson: drm/i915/dp: Retry DPCD fetch on G4X too
  • Adam Jackson: drm/i915/dp: Zero the DPCD data before connection probe
  • Adam Jackson: drm/i915/pch: Fix integer math bugs in panel fitting
  • Adam Jackson: drm/i915/pch: Save/restore PCH_PORT_HOTPLUG across suspend
  • Ben Widawsky: drm/i915: add module parameter compiler hints
  • Ben Widawsky: drm/i915: hangcheck disable parameter
  • Ben Widawsky: drm/i915: provide module parameter description
  • Chris Wilson: drm/i915: Add an interface to dynamically change the cache level
  • Chris Wilson: drm/i915/bios: Avoid temporary allocation whilst searching for downclock
  • Chris Wilson: drm/i915: Cache GT fifo count for SandyBridge
  • Chris Wilson: drm/i915: Combine pinning with setting to the display plane
  • Chris Wilson: drm/i915: Disable FBC across page-flipping
  • Chris Wilson: drm/i915/gtt: Split out i915_gem_gtt_rebind_object()
  • Chris Wilson: drm/i915: Introduce i915_gem_object_finish_gpu()
  • Chris Wilson: drm/i915: Introduce i915_gem_object_finish_gtt()
  • Chris Wilson: drm/i915: Mark the cursor and the overlay as being part of the display planes
  • Chris Wilson: drm/i915: Only export the generic intel_disable_fbc() interface
  • Chris Wilson: drm/i915: Perform intel_enable_fbc() from a delayed task
  • Chris Wilson: drm/i915: Remove vestigial pitch from post-gen2 FBC control routines
  • Chris Wilson: drm/i915: Replace direct calls to vfunc.disable_fbc with intel_disable_fbc()
  • Chris Wilson: drm/i915: Set persistent-mode for ILK/SNB framebuffer compression
  • Chris Wilson: drm/i915: Share the common work of disabling active FBC before updating
  • Chris Wilson: drm/i915: Use of a CPU fence is mandatory to update FBC regions upon CPU writes
  • Dave Airlie: Revert “drm/i915: Try enabling RC6 by default (again)”
  • Eric Anholt: drm/i915: Use the LLC mode on gen6 for everything but display.
  • Eric Anholt: drm/i915: Use the uncached domain for the display planes
  • Hugh Dickins: drm/i915: more struct_mutex locking
  • Jesse Barnes: drm/i915: add GPU max frequency control file
  • Jesse Barnes: drm/i915: allow cache sharing policy control
  • Jesse Barnes: drm/i915: apply phase pointer override on SNB+ too
  • Jesse Barnes: drm/i915: apply timing generator bug workaround on CPT and PPT
  • Jesse Barnes: drm/i915: check for supported depth at fb init time
  • Jesse Barnes: drm/i915: don’t set SDVO color range on ILK+
  • Jesse Barnes: drm/i915: don’t set transcoder bpc on CougarPoint
  • Jesse Barnes: drm/i915: don’t use uninitialized EDID bpc values when picking pipe bpp
  • Jesse Barnes: drm/i915/dp: wait for previous AUX channel activity to clear
  • Jesse Barnes: drm/i915: enable ring freq scaling, RC6 and graphics turbo on Ivy Bridge v3
  • Jesse Barnes: drm/i915: fix CB tuning check for ILK+
  • Jesse Barnes: drm/i915: flush plane control changes on ILK+ as well
  • Jesse Barnes: drm/i915/hdmi: HDMI source product description infoframe support
  • Jesse Barnes: drm/i915/hdmi: send AVI info frames on ILK+ as well
  • Jesse Barnes: drm/i915/hdmi: split infoframe setting from infoframe type code
  • Jesse Barnes: drm/i915: load a ring frequency scaling table v3
  • Jesse Barnes: drm/i915: load the LUT before pipe enable on ILK+
  • Jesse Barnes: drm/i915: provide more error output when mode sets fail
  • Jesse Barnes: drm/i915: provide more error output when mode sets fail
  • Jesse Barnes: drm/i915: set bpc for DP transcoder
  • Jesse Barnes: drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge
  • Jesse Barnes: drm/i915: show interrupt info on IVB
  • Jesse Barnes: drm/i915: split out Ironlake pipe bpp picking code
  • Jesse Barnes: drm/i915: split out PCH refclk update code
  • Jesse Barnes: drm/i915: split out plane update code
  • Jesse Barnes: drm/i915: use pipe bpp in DP link bandwidth calculation
  • Jesse Barnes: drm/i915: use pipe bpp in DP link bandwidth calculations
  • Jesse Barnes: drm/i915: use pipe bpp when setting HDMI bpc
  • Kamal Mostafa: i915: do not setup intel_backlight twice
  • Keith Packard: drm/i915: Call intel_enable_plane from i9xx_crtc_mode_set (again)
  • Keith Packard: drm/i915: Cannot set clock gating under UMS
  • Keith Packard: drm/i915: Can’t do accurate vblank timestamps with UMS
  • Keith Packard: drm/i915: DP_PIPE_ENABLED must check transcoder on CPT
  • Keith Packard: drm/i915: Enable dither whenever display bpc < frame buffer bpc
  • Keith Packard: drm/i915: Enable i915 frame buffer compression by default
  • Keith Packard: drm/i915: FBC off for ironlake and older, otherwise on by default
  • Keith Packard: drm/i915: Fix PCH port pipe select in CPT disable paths
  • Keith Packard: drm/i915: Fixup for ‘Hold mode_config->mutex during hotplug’
  • Keith Packard: drm/i915: Flush other plane register writes
  • Keith Packard: drm/i915: Hold mode_config->mutex during hotplug processing
  • Keith Packard: drm/i915: i915_gem_object_finish_gtt must always release gtt mmap
  • Keith Packard: drm/i915: Ignore GPU wedged errors while pinning scanout buffers
  • Keith Packard: drm/i915: In intel_dp_init, replace read of DPCD with intel_dp_get_dpcd
  • Keith Packard: drm/i915: Initialize RCS ring status page address in intel_render_ring_init_dri
  • Keith Packard: drm/i915: Leave LVDS registers unlocked
  • Keith Packard: drm/i915: Remove unused ‘reg’ argument to dp_pipe_enabled
  • Keith Packard: drm/i915: Rename i915_dp_detect_common to intel_dp_get_dpcd
  • Keith Packard: drm/i915: Select correct pipe during TV detect
  • Keith Packard: drm/i915: Set crtc DPMS mode to ON in intel_crtc_mode_set
  • Keith Packard: drm/i915: Skip GPU wait for scanout pin while wedged
  • Keith Packard: drm/i915: Try enabling RC6 by default (again)
  • Keith Packard: drm/i915: TVDAC_STATE_CHG does not indicate successful load-detect
  • Keith Packard: drm/i915: Use dp_detect_common in hotplug helper function
  • Keith Packard: drm/i915: Wait for LVDS panel power sequence
  • Keith Packard: Revert and fix “drm/i915/dp: remove DPMS mode tracking from DP”
  • Keith Packard: Revert “drm/i915/dp: Zero the DPCD data before connection probe”
  • Matthew Garrett: i915: Fix opregion notifications
  • Matthew Garrett: Not all systems expose a firmware or platform mechanism for changing the backlight intensity on i915, so add native driver support.
  • Michel Alexandre Salim: drm/i915: Add quirk to disable SSC on Sony Vaio Y2
  • Pieterjan Camerlynck: i915: add Dell OptiPlex FX170 to intel_no_lvds
  • Simon Farnsworth: drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI
  • Thomas Jarosch: drm/i915: Fix wrong initializer for “locked” variable in assert_panel_unlocked

If we count the final number of changes between the 3.0 and 3.1 versions, we come to the following results:

drivers/gpu/drm/i915/i915_debugfs.c     |  232 +++++++-
drivers/gpu/drm/i915/i915_dma.c         |   10 +-
drivers/gpu/drm/i915/i915_drv.c         |   69 ++-
drivers/gpu/drm/i915/i915_drv.h         |   51 +-
drivers/gpu/drm/i915/i915_gem.c         |  193 +++++-
drivers/gpu/drm/i915/i915_gem_gtt.c     |   39 +-
drivers/gpu/drm/i915/i915_irq.c         |   22 +-
drivers/gpu/drm/i915/i915_reg.h         |   59 ++-
drivers/gpu/drm/i915/i915_suspend.c     |   13 +-
drivers/gpu/drm/i915/intel_bios.c       |  140 +++--
drivers/gpu/drm/i915/intel_display.c    | 1028 +++++++++++++++++++++++--------
drivers/gpu/drm/i915/intel_dp.c         |  135 +++--
drivers/gpu/drm/i915/intel_drv.h        |   38 +-
drivers/gpu/drm/i915/intel_hdmi.c       |  166 +++++-
drivers/gpu/drm/i915/intel_lvds.c       |   90 ++--
drivers/gpu/drm/i915/intel_opregion.c   |   16 +-
drivers/gpu/drm/i915/intel_overlay.c    |    6 +-
drivers/gpu/drm/i915/intel_panel.c      |   76 +++-
drivers/gpu/drm/i915/intel_ringbuffer.c |   13 +-
drivers/gpu/drm/i915/intel_sdvo.c       |   88 +--
drivers/gpu/drm/i915/intel_tv.c         |   46 +-
21 files changed, 1879 insertions(+), 651 deletions(-)

So, in sum, there are changes all around the driver. Among the most interesting ones (in my humble opinion), are:

  • Frame Buffer Compression is now enabled for Gen6 onwards (in other words, starting with Sandy Bridge). Of course, you can always enable it manually on your machine as well by using the i915.i915_enable_fbc=1 kernel parameter.
  • FBC should work better in general, thanks to patches from Chris Wilson which disable it across page-flipping and before updating, persist framebuffer compression mode for Ironlake and Sandy Bridge, and also making a proper use of fences after CPU writes.
  • RC6 was attempted to be enabled, but it was reverted early in the development cycle. As we had unusual time frame for this kernel release, by the time we have hit RC8, all the remaining RC6-related issues were tracked down. But as it was already too late for kernel 3.1, its enablement by default should happen in kernel 3.2. The usage of RC6 brings amazing power usage benefits, so you can enable it by yourself via the i915.i915_enable_rc6=1 kernel parameter – and letting us know about any non-covered issues it may bring.
  • DCPD, or Display Port Configuration Data handling has received lots of attention, and in general one should have a much better support for Display Port outputs.
  • configuration parameters for changing the cache level, maximum GPU frequency, cache sharing policy and GPU ring frequency scaling.
  • additional debugging output when mode setting fails, information about interrupts on Ivy bridge, hangcheck disabling support and better DPCD hexdump.
  • improvements for HDMI support, SDVO and LVDS handling, better pipe handling of EDID bpc values and proper panel fitting calculationsl
  • usage of LLC mode (usage of CPU cache for GPU instructions) for Gen6. This one-lined (excluding comments :) ) change alone was responsible for about 20% performance improvements for openarena in full-screen mode, and about 12% improvements in nexuiz.

The i915 driver in kernel 3.1 received a total of 95 new patches when compared to 3.0 (excluding merges), coming from 14 different authors – both working at Intel and not. Now the road is open for 3.2. So fasten your seat belts and prepare for the next ride :) .

Another week, another round of updates :) .

As a shameless self-promoting plug, let me start by sharing the presentation about Linux and Open-Source which I did last week. As with all my other presentation, I put it on scribd:

Linux e Open-Source: o que são e como podem me ajudar durante a faculdade?

I hope it would be as much interesting for you to access it, as it was for me to have the opportunity to write and present it. Thanks to all who attended the event, it was great!

But going back to the technical items in the agenda, let me start with the Kernel progress over the past week:

  • As you all know, Kernel 3.1 was just released. It comes with a nice set of patches for Intel Graphics, so we hope you’ll enjoy it. Expect all range of improvements – from performance boosts to lots of stability and feature-wise fixes.
  • As a major news, we had a pull request for the drm-intel-next branch from Keith Packard, for inclusion into the 3.2 version of Linux kernel. It comes with lots of interesting patches, among which I’d like to highlight the Ivybridge 3-display pipe support, lots of fixes for Embedded Display Port (eDP) handling on Sandy Bridge architecture, workarounds for the VT-d-related issues on Ironlake family of GPU, fixes for interrupt race conditions, among many others.
  • Still on kernel, there was a number of conversations – all over the IRC channel, bugzilla and mailing lists – about GPU hangs and backlight-related issues. Some of those investigations resulted in new patches which could possibly solve – or, at least, help identifying the issues.
  • On the FBC front, I’ve sent an initial patch for enabling Frame Buffer Compression on Ivybridge. It still needs testing and verification though, and lots of changes in code style and content, many of which were pointed out by Chris Wilson. So I’ll work on it this week.
  • And as a bonus news, it looks like all the critical RC6-related issues (e.g., crashes or hangs) are now gone. There are still rendering-related problems though, some of which I came to figure out through this blog of mine (thank to you all for reporting!!). This is still not the ideal solution, but heck – it is a large step forward. Based on latest performance and power-related investigations which both we carried out internally, and the ones reported by community – by activating RC6 one could expect up to 50% improvements in power consumption. Definitely a nice thing to have.

On mesa front, we had a number of news as well:

  • A discussion about moving the DRI1 radeon drivers into the land where the old drivers live happy forever-after was started by Eric and picked up by a number of Mesa developers. Those are possibly the last remaining drivers using DRI1 code path out there, and I guess we won’t have them around for much longer. Specially now that gallium backend is among us.
  • Some optimizations about dead and non-reachable code cleanups were proposed by Ian.
  • And we had several fixes for Gen6 and Gen7 architectures from Kenneth and Yuanhan.

An interesting collection of news came from the X.org development land:

  • The discussion about Glamor server project was carried on, with a number of interesting opinions and talks. Glamor project, which was initially sent to the X developers mailing list some weeks ago, is aiming at introducing a new hardware-independent DDX which can use the GPU acceleration via OpenGL interface. One of the concerns expressed by the X development community about it is that, well, there are already too many different acceleration projects for X out there. So, after a number of very insightful discussions about Glamor, it was agreed that its development will be split into two different branches – one device-independent library, which could be reused by all the other DDX drivers; and intel-specific bits will be developed and integrated on their own incremental pace.
  • Besides Glamor, lots of activity came from the Xinput developers and documentation updates.
  • A number of coverity-discovered patches was sent by Dave Airle.
  • And as a major news, we had a new security update for the Xserver project, fixing two security vulnerabilities: CVE-2011-4028 and CVE-2011-4029. One of the vulnerabilities allows to disclose the existence of a privileged file, and another allows to reset permissions of a restricted file to 444 via a symlink attack. So it would be a good idea to update your Xserver installation with those fixes included.

On Cairo side, there was an interesting discussion about slow HTML5 rendering in Firefox, coming from the non-optimal usage of X shared memory. The root of the problem is that code path used in this case does not uses BigReq extension, so it is limited to allocating a fixed 16Kb buffer – which is obviously not enough for the data it needs to process. So it results in lots and lots of small transmissions, and incurring in around 25k context switches per second.

Those are the major highlights of what I’ve seen over the past few days. See you on the next post :) .

…and never had a chance to meet me, now you have :) .

I’ll do two Linux and open-source-related presentations in the coming weeks.

The first one would occur at the IV Semana Nacional de Ciência e Tecnologia, promoted by the Instituto Federal de Educação, Ciência e Tecnologia de São Paulo – campus São Carlos, this Friday as 20:30 at UFSCar. I’ll give a presentation about Linux, Open-Source, and why it is a good idea to work and contribute to it during the (under)graduation. The title of the presentation is Linux e Open-Source: o que são e como podem me ajudar durante a faculdade?, and it will be in portuguese. The link to the event and additional details about it are listed here.

The second will be at the LinuxCon Brazil conference, where I’ll have a presentation with self-explained title Intel Linux Graphics – Following the Open Source Road from Kernel to UI Toolkits. The LinuxCon conference needs no introduction, and it will have lots of amazing presentations, so be sure to check it out!

Also on LinuxCon, we’ll have a presentation by Guilherme Moro, who replaced my at Mandriva when I left. He’ll talk about Managing IT infrastructure with Open Source Multiplatform Tool Pulse 2. He is a great developer and a good friend of mine – I actually was responsible for bringing him to mstech, and later to Mandriva, to work in my teams. So it would be a great presentation to watch as well.

But in general – if you happen to come to any of the aforementioned presentation, I’ll be happy to talk about linux, intel, open-source, mandriva, mageia, football, programming and all other nice and endless issues :) .

So far, it turned out that the semi-periodic write-ups turned up to be much more frequent that I originally thought. Let’s see if I’ll be able to keep this pace – lots of interesting things are happening all around, so I think that it is not worth waiting weeks just to write a summary of most important points.

Since last update, we had a very productive weekend :) , and 2 days of work on all the projects. In this time span, on intel-gpu-tools front, we had some interesting commits:

  • One from myself, to add non-interactive logging of GPU activity, parseable by other scripts and applications
  • Several from Daniel, improving the debugging facilities of the tools
  • A new intel_reg_checker application from Eric Anholt, which attempts to discover possibly incorrect settings which could lead to the crash/hang/issue.
  • And I’ve sent some heuristics patches for intel_error_decode and intel_decode which attempt to identify the root cause of the problem (e.g., if it came through mesa codepath, or 2D driver, or VA). After discussion on both mail and IRC with Chris and Daniel, we came to the conclusion that this approach should be better approaches from a separate script or app, which would do the analysis of the trace.

On Kernel, we had some nice news too:

  • QA has carried out the performance and functionality testing for my edid patch, and it gave a really nice performance boost in all cases. After sending the final version of the patch, we had some comments from Jean Delvare and Alex Deucher about possible issues this could bring to radeon-based cards, if the fix would be implemented inside DRM. So I am still not sure about what to do here – I have two versions of the same fix, both are working, but I don’t know which one will be the final one.
  • Lots of activity and discussion on SNA, VA and RC6-related issues took place from Daniel, Ben, Chris and myself. Some of the reported issues have been isolated (well.. mostly :) ), and some have some patching attempts. The root cause of the problems is not clear yet. But on the bright side, apparently, we don’t have any crash or hang-related issues coming via RC6, only some rendering corruptions. So hopefully RC6-by-default will see the light of day again in some point in the future :) .
  • Some (possibly) final patches from Ben Widawsky and David Woodhouse arrived, attempting to fix the VTd-related problem on Ironlake chipsets.

Meanwhile, Mesa has had lots of activity too:

  • Chad Versace sent out some dozens of patches which added support for HiZ infrastructure in core mesa, adding new driver hooks and small changes all around. Note that HiZ is supposed to be supported by i965 family of the chips (e.g., 5th (Ironlake) generation onward).
  • Lots of piglit and conformance patches arrived from Eric, Yuanhan and Chad.
  • Stencil buffer support has received some updates from Chad as well.
  • And an improved math performance patch was sent by Ken. It should improve math-related operations by a nice margin on Ivybridge, and also allows it to work in a workaround-free way :) .

On DDX front, as usually, we had an impressive number of patches from Chris for SNA. On a related note, past weeks had given us lots and lots of feedback about SNA and how people are using it. This is great – it means that it works (despite some issues, many of which are already filed as bugs, or being investigated right now)! I’ve been using SNA by default on all my machines for a couple of months, and it works just fine for me. Only faster :) .

And finally, on Xserver-related work, we had a new Glamor pull request from Zhigang Gong, lots of man and documentation-related patches, Xinput and evdev development, and a small patch which drops support for the bsdi. I am actually quite curious about this one – it has been a really, really long time since I’ve seen a bsdi system out there. Does anyone still has one around? It would be nice to play with it those days… :)

EDIT: Update from Daniel Vetter – HiZ is available in hardware starting from Ironlake. I updated the post accordingly.

As a Friday gift for you readers, I have another round of updates about the Intel Linux Graphics development during this week.

There was much activity all around those days, so I decided not to wait until next week and do this update earlier. Certainly until next week lots of things will still happen.

But let’s get started. And first of all, I’d like to thank you all for the feedback I had on this blog – both by emails and comments and IRC and bugzilla – I was really and truly pleasantly surprised with your comments. Looks like this sort of information I am putting here is interesting to many people out there, so I’ll try to keep up to the task.

And one important reminder which somehow slipped out from the previous posts in the series – if you want to report an issue related to the Intel Graphics stack, there is a comprehensive guide on what you need to report here. For debugging suspend-resume issues, there is a separate guide as well. And, of course, if you want to build the latest versions of the drivers (or their snapshots) as well, there is a tutorial to get you started. Those links are hidden deep in the Intel Linux Graphics web page, so they are not easy to find sometimes – so I hope they will be useful to you.

But let’s go to the development progress on the components of the stack for this 2nd week of October.

  • I sent out yet another round of my EDID fixes. Thanks to the testing by Mike Lothian (thanks!!), the i915-specific fixes gave no visible regressions (however, no visible improvements improvements either), but the drm-specific fix managed to do something wrong with the Radeon adapter. So I switched the focus to the i915-specific version for now, as I don’t have non-intel hardware to do the debugging, and put it on my fd.o repository. Hopefully I’ll have more testing results next week, or maybe other comments on this patch. At least on all my machines, it managed to improve the monitor detection timing by a considerable margin.
  • Also on Kernel, Adam Jackson from RedHat sent out a nice patch that work around the limitations of active dp->any connectors. Quoting his patch description, ” Many such (including all DP->VGA chips I can find on the market) come equipped with only 2 DP lanes, which clips your dotclock to 144MHz at8bpc.  Of the standard DMT modes, that means you lose 1600×1200@60 and above.  Since these adaptors are marketed as supporting 1920×1200, we might as well make that work, otherwise it’s the driver that comes out looking bad.”.
  • Still on Kernel, Jesse Barnes had sent new iterations of his 3-display-pipes patches, which have evolved into more than that by now, improving lots of display handling aspects within the driver. Also within this context, Paulo Zanoni has worked around a bug with multiple VGA outputs by using some intel_reg_dumper/intel_reg_write magic :) , and came with a kernel patch for fixing such problems. This patch was further adapted according to Chris and Jesse’s comments, and is floating around the intel-gfx mailing lists at the moment.
  • Also on kernel, Daniel Vetter and (by a much smaller margin) myself were been doing lots of investigation for GPU hangs, corruptions, suspend-resume and rendering problems. Some of the problems has possible patches, some of them are still out in the wild. For the currently alive suspend-resume issues, looks like they happen when the Kernel Mode Setting (KMS) is being used, and go away with the nomodeset kernel parameter. So if you are affected by any of those, it would be worth trying that parameter in grub or kernel command line to see if it helps.
  • On development side of kernel, Jesse Barnes sent out a modeset verification patch, which could help identifying modeset-related problems; and Ben and Daniel Vetter did many code cleanups, sent out patches on hangcheck robustification, and overall were working on improving the debugging facilities of the driver.

Moving to the DDX (a.k.a., 2D display driver, usually known by its friendly nickname of xf86-video-intel), there was quite an activity as well:

  • Chris has sent out lots of SNA-related patches.
  • Daniel Vetter has sent some Sandy Bridge-specific fixes, and was also investigating SNA-related bug reports.
  • And I’ve managed to find a new GPU hang which only happens when SNA is active on an Ivy Bridge system. Somehow I suspect not many people out there besides myself are affected by it though :) .

On Mesa front, there were some new patches from Chad on Stencil Buffer development; lots of patch reviews by Eric Anholt and Ian, some Ivy Bridge-specific fixes from Ken, many code cleanups and refactoring by Ken again, and some patches from Yuanhan Liu for bug fixing, improved Ivy Bridge functionality, and better GL conformance. Besides Intel-specific development, there were some interesting patches from VMware developers (Thomas Hellstrom, José Fonseca and Brian Paul) which landed into master branch as well.

About Xserver, lots of emails on most different areas have been floating around, as usual, but not much Intel-specific activity took place. Among the discussions and patches which caught my attention the most were an interesting discussion about patches which allow X server to run without root user; a patch which adds support for running a backtracer in case of fault; a new round of Xinput fixes, a patch for setting a default DPI value from EDID data by Michal Suchanek, and more bus cleanups by Jeremy Huddleston. On a related note, Xserver 1.11.2 RC1 release is approaching fairly quickly.

Moving to Wayland, we had lots of x11-specific patches from Kristian, and some compositor bugfixes from Benjamin Franzke.

And finally, on LIBVA there was a one bugfixing patch from Gwenole for proper driver name detection with fglrx-powered cards.

Besides those news, we also have had a new pixman release, which added some nice optimizations by using SSE2 instructions on x86 platforms, and iwMMXt ones on ARM.

So yeah, quite some changes so far.

So this is the end of this semi-periodic-update about the state and news from the Intel Linux Graphics (and related) world – see you in the next one.

P.S.: On a slightly related note – I have received some comments which say that this kind of posts, when they do not directly mention Mandriva or Mageia, should not belong to the respective planets. However, I also received some posts saying that the Graphics-related news affect pretty much all the distributions out there. So I am open for opinions – what do you suggest, should such post be excluded from the syndication to Planet Mandriva and/or Mageia feeds, or they could fit there as well?

Hi folks,

another week, another update :) .

Lots of major things happened for the past week over all the Intel Linux Graphics-related projects. Let me highlight some of them for you.

  • On kernel side, the major feature is, certainly, the enablement of the 3rd display pipe for the Ivy Bridge architecture in the intel-gfx mailing list, by Jesse Barnes. Lots of things were already said about Ivy Bridge, which will arrive next year to your favorite reseller, and the Open Source drivers for it will be ready by the time it gets there. The enablement of the 3rd display pipe – and, therefore, the possibility of having 3 independent displays up and running on Linux – certainly is a major step forward. And having those patches in the open-source world early, months before the hardware will arrive to the vast majority of the users, is certainly a big plus for everyone (and specially for the open-source community)!
  • Lots of work for next stable release of mesa (7.11.1) was done, resulting in cherry-picking hundreds of commits to the stable branch.
  • MRT rendering support in OpenGL ES 2.0 was added to Mesa by Ian Romanick. This change brought the GL_NV_draw_buffers and GL_NV_fbo_color_attachment OpenGL extensions to ES 2.0.
  • Lots of internal shaders cleanup was also done by Ian Romanick.
  • Paul Berry has sent yet more patches for gl_Clip_Distance and gl_ClipVertex to mesa-dev mailing list. Also, a (possibly final) version of clipping series of patches for Gen6 is floating around mesa-dev mailing list now.
  • Also on mesa side, some work on GLES 1.1 conformance was done by Kenneth Graunke, together with new patches for HiZ support by Chad Versace and some GLSL 1.30 fixes by Carl Worth. Speaking on GLSL 1.30, it has received lots of commits from Eric Anholt, Kenneth Graunke and Paul Berry as well. The OpenGL 3.0 and GLSL 1.30 support is getting closer and closer now.
  • On intel-gfx mailing lists, irc and bugzilla, lots of discussion and possible fixes for the RC6-related problems I mentioned in the previous post took place by myself, Daniel Vetter, Chris Wilson and many others. So far, a workaround for bug 38567 seems to be found, while the bug 41226 is still playing tricks with us. Those are the only rc6-related bugs we are aware of at the moment, so hopefully they will be solved pretty soon.
  • Also on kernel side, some patches from Daniel Vetter and Ben Widawsky landed in the intel-gfx mailing list, which enable more verbose per-ring information collection. This would result in a much more accurate problem diagnosis – as newer GPU hardware has multiple rendering rings, the crash dumps not always provided all the necessary information. Now they should.
  • Some more timing and display detection-related patches from Keith Packard arrived to the intel-gfx mailing list, which greatly improve the monitor detection timings and provide support for new MacBook Air displays. They should probably get into the Kernel 3.2, but can already be used to testing with the 3.1 (and, with some adaptations 3.0) kernel series.
  • And finally, I’ve finally sent my patches for fixing the long display discovery issues to intel-gfx mailing list. According to the tests, they should improve the display detection timing by 30%–300%, by giving up earlier on non-working output ports. The effects should be more visible on machines which has lots of such ports – which is becoming quite common those days with the DisplayPort, HDMI, VGA, S-Video, and all the others connections we have out there.

On a related note, Mageia kernel was updated to 3.1-rc9 – so all the Mageia Cauldron users should experience a nice performance improvements with their Intel graphics cards. Mandriva kernel is at 3.1-rc9 as well, both distributions are on a similar page now.

After some iterations of my patch to improve the edid detection timings, I finally posted the release-candidate version of it to the intel-gfx mailing list yesterday.

What is this patch about? In many cases, when you have a system with different video outputs (say, VGA, HDMI, DP, among others), sometimes a simple xrandr execution takes too long – sometimes even longer than 1 second (the famous BUG #41059).

The first two iterations of this fix managed to improve the timing by a huge margin – as much by a factor 100x actually in some cases. But the drawback is that the fix also managed to exclude some valid port connectors sometimes, so it wasn’t a valid fix after all.

After more investigation, I came to realize that what happens in some cases is that the pins used for detection are stuck while the the connector is not plugged in; and suddenly come to their senses when the connector is there. So we couldn’t just ignore those pins in all cases – even if they seem to be invalid, they could change their mind at some point.

So I came with two different sets of patches – one which fixes the issue directly in drm, and should benefit all the video cards using it for edid detection; and another which does the same thing but within the i915 driver. In both cases, I have experienced a 30%-300% improvements in output detection on all the machines I have tested, which also resulted in some seconds of boot-time optimizations in total. So it is a nice improvement in my opinion :) .

The advantage of the first approach is that it should work with each card; but the disadvantage is that I don’t have any non-intel cards around for a long time already – well, technically, for 6 months, since my ASUS G1S passed away after 4 years or use, 2 years of disk uptime according to S.M.A.R.T.. He was solely responsible for all the builds of 4 Mandriva releases (2010.2 and all the 2011 preliminar ones) – so indeed, it was a hero notebook.

But back to the topic – if by a chance you experience slow xrandr execution; or you think that your machine takes a long time to start X or during the boot while attempting to find out all the video output it has – give them a try! I’d be very interested in any feedback.

Linux on IVB with 3 independent displays - ain't that aw... on Twitpic

Continuing my updating on latest intel linux graphics-related activity, some hours ago Jesse Barnes’ patches which add support for 3 display pipes to our Linux i915 driver have landed onto intel-gfx mailing list. This is one feature I am particularly very interested in, and it is great to have those patches available in the open-source world now – months before the IVB-based hardware will arrive at the consumer market.

Yes, as it was announced in several conferences, notes and even IDF, the Ivy Bridge graphics will bring out some impressive changes. Besides a greatly improved performance and new features, they also bring the support for 3 independent displays with them. So yes, it would be possible for one to have up to three independent video/audio streams being output to 3 different monitors at the same time (or having your display extended over 3 different monitors to bring you closer to the matrix reality :) ).

As for the user interface to configure such display – pretty much everything stays the same. You just have more options in the xrandr tool (and its GUI frontends out there).

So if you’ve been waiting for watching 3 HDTV 1080p (or even twice-that-resolution) videos at the same time, on 3 different monitors, this time is approaching very fast.

A long time no post.. but then, it was also a long time without a home, internet and free time as well.

As you already know, since August I am working at Intel, within the Intel Linux Graphics group. And, as many of you know as well, the news about Intel Linux graphics out there vary a lot, but usually just between the “it just works” and “nothing works” states, with few intermediate points in between (many of which are usually covered by phoronix news).

So to fill those empty spots, I thought on getting back into the habit of semi periodic write-ups I got while at Mandriva – just giving out some insights, overviews and overall updates about what is going on with Intel Linux Graphics and related open-source projects from time to time.

But first of all, let me do a quick review about what Intel Linux Graphics is all about. Unlikely other drivers project, the Linux Graphics does not consists from a single and unique driver. By the contrary, it has a lot of ground to cover, working directly on the upstream projects which compose the graphical stack – ranging from the i915 driver in kernel to the entire MESA 3D/GL stack, passing through libdrm and vaapi and all the way up to x11-server, cairo and wayland – among others. So when you read about an Intel Linux Graphics release, it considers a snapshot version of each of those components.

Of course, each of those projects has a different release goals and timelines, different sets of features to cover, and so on. And, of course, there is a matrix of different generations of graphical hardware, different variations of the models and revisions, and a multitude of OEM platforms to cover.

So, in short, “it’s complicated” :) .

In this sense, the Intel Linux Graphics project so far was doing quarterly releases of the entire stack, as one could see at 2011Q3, 2011Q1, 2010Q4 and all the previous ones. However, one of the problems with the quarterly releases, specially over such a big and varying stack, is that they don’t fit all the situations. So starting with the next release, we’ll be changing our process to carry out more specific releases, based on pre-defined release criteria for each of them. And the next release will be focused specifically on performance and stability enhancement over our current code.

What do I mean by performance and stability? While most of the people out there do not experience any issues with the drivers (e.g., “they just work” category I mentioned out there), we are by no means perfect, and yes, we have bugs which affect different users, operating systems and hardware components (all the way to that “nothing works” category of people – which is thankfully quite small, and of course we hope to promote it to the “just work” category of the people ASAP). And we are trying to get better and better for each release, at the same time trying to maintain the same level of openness as one would expect from open-source projects.

If you look at the freedesktop bugzilla, for intel graphics-specific issues, there is a quite complete list out there. Of course, many of those bugs are old, or do not apply to the current state of the code anymore, but some of those are valid – and they don’t get the level of attention they need. Specially considering the large number of reports, it is really hard to keep track of all of them, and it is specially easy to get lost among all of them. So if your bug is not getting enough attention – just go over to it, and ping us. We do not ignore you, but sometimes we lose track of specific issues out there, and we’ll be happy to be reminded either when an issue is fixed, or whether it is still out there and needs some love :) .

So, as I said previously, I’ll try to cover up the details of each part of our drivers stack, and try to keep updated the list of the current work and goals we have in mind. So I’ll start with this first post, and will try to cover a bit about the areas we’ve been focused the most for the past months – specially considering the “performance” and “stability” criteria, and the most interesting features we have out there.

RC6

The first feature which I’d like to mention, which is probably unknown to most of you out there, is the support for RC6 technology. This is a feature which allows the GPU (in other words, the graphical adapter) to enter an extremely low power-consuming state while the graphical card is idle. This feature has drastic effects on the power usage of the system – up to 26% power usage improvements according to Phoronix testing. So in theory, having this feature enabled by default would allow a much better battery life for a casual system out there equipped with an Intel graphical card.

However, one drawback to the rc6 is that in some very rare cases, it results in different set of issues. The good part is that very few systems are affected by this bug, and none of the machines either the developers or QA team has managed to reproduce the problems, so chances are very high that it could just work for your by adding a ‘i915.i915_enable_rc6=1′ parameter to the kernel. The bad part is.. well.. the same as the good part – we could not reproduce the issues on any of the machines we had. So by a chance, if you enable this feature and hit some unexpected behavior or issue – please, let us know! We would be really interested in fixing this for all the systems out there. But, with all the magnitude of different x86-based machines, it is virtually impossible to test them all. So we need your help to help of us fix this issue, in case it affects your machine. All the details, such as the vendor, model, installed OS, whether the issue happens with a new install from scratch, bios configuration – would help.

FBC

Besides RC6, one other interesting feature present in the Intel graphical drivers is the support for framebuffer compression, of fbc. This feature allows the driver to store the contents of the picture on screen in a compressed format, effectively reducing the amount of energy (and, therefore, power) required to update the screen. On some hardware revisions, however, this feature sometimes causes the GPU not to redraw the display correctly, resulting in only partial screen updates, sometimes visible only after a few suspend-resume sequences. The solution for this problem was to disable this feature by default on such machines, while having it enabled automatically on the chips which do not reproduce the problem. However, even on those chips, you can always enable it manually, by using a i915.i915_enable_fbc=1 kernel parameter.

Semaphores

And finally, the 3rd major issue being worked on the kernel side is the usage of semaphores in the graphical driver, which allows for a big jump in performance, and also in stability in some cases. However, not everything is perfect in this world :) , so on some hardware models this feature results in performance choppiness or GPU hangs. It is within of the nature of the bug to appear only on some selected machines, most of which are out of our reach, so chances are, like with the RC6 and FBC features, it should just work out of the box. But if it does not – please, let us know!

Apart from those 3 big items, lots of work has been carried out on different components of the stack in the past months. I’ll try to summarize the most interesting points for each component below.

Kernel

The Linux kernel 3.1, which is quickly approaching its release date, brings lots of stability and performance improvements over 3.0 version. The performance results are the most notable ones, as according to the initial testing, you could expect about 25% performance improvements in 3D games and performance benchmarks (and even up to 40% in some of them). I won’t enter into the details here, as I am certain that Michal Larabel from Phoronix will do his usual round of benchmarks soon enough and provide the numbers :) .

Besides the performance fixes, the timing for detecting the different video outputs has also received lots of attention. Some of the fixes will appear in 3.1 kernel, and some of them are already being prepared to get into 3.2 as soon as its merge window will open.

And of course, there were lots of patches for stability and error recovery within GPU.

Out of the major distributions out there, as far as I know, only Mandriva Cooker has already updated its kernel to the latest 3.1 pre-released version, so its users already have most of those features with them. So if you are a brave soul and are willing to try this as soon as possible, you could either try Mandriva’s development version; or download and build the 3.1-git kernel yourself. Or just wait a few weeks and it will came to you as soon as your $FAVORITE_DISTRIBUTION would update it in the repository.

So, leaving kernel area, let’s move to another major component of the stack, which is well-known by its name..

MESA

(No, it is not the Black Mesa Research Facility, so you may put away your crowbar :) )

Lots of work has been done on Mesa library, and some thousands of emails on the mesa-dev mailing list complement this statement.

Some initial patches for HiZ support from Chad Versace landed on the list, and Phoronix has also performed initial testing on them, obtaining very impressive results.

Also, a huge cleanup of old drivers, together with the removal of old DRI1 code and overall refactoring of the code in preparation for the GL 3.0 was done by Ian Romanick. Kenneth Graunke provided lots of patches for both performance and stability improvements for a large number of cases, together with the IvyBridge-specific optimizations. New Vertex Shader backend, lots of TextureImage development by Eric Anholt, work on gl_ClipDistance and the layout of vertex attributes by Paul Berry, lots of GLSL 1.30 development and overall bugfixing complement the picture of what happened with Mesa for the past month or so.

As mesa-dev list, and the git source tree, are quite busy places, there were lots of other development and updates all around which I haven’t covered here. Mesa 7.11.1 and 7.12 are really going to be amazing releases when they will come out!

But leaving mesa, the next stop in the Intel Linux Graphics stack overview leads us to..

DDX, or xf86-video-intel X driver

The video driver for Intel graphics cards has received lots of attention for the past weeks. Most of the patches came from Chris Wilson, and were related to further improvements in the SNA backend, and a fix for a non-SNA-related X crash. Besides those, we also had some IvyBridge-specific fixes from Kenneth Graunke and cleanup of some warnings from Paulo Zanoni.

Cairo

On Cairo side, a huge work has been made on performance, stability and testing. In some workloads, the performance improved by several orders of magnitude, and in average, one could expect better performance for Cairo on most cases when comparing with the previous release.

Wayland

For Wayland compositor, lots of discussions took place in the wayland-devel mailing list, covering a large collection of topics, randing from the best way to process configuration events and requests, similarities and differences between the wayland protocol and X operations, window management and overall interaction between the clients and the compositor within the Wayland world. From the technical side, there were lots of patches from Tiago Vignatti and Kristian Høgsberg on both core wayland and the wayland-demos repository. One notable change was the change of the GPLv2 headers to MIT for the remaining files where such change wasn’t applied previously.

Intel-gpu-tools

The package for providing tools for debugging, analyzing, tracing and profiling the Intel graphical cards on Linux/Unix has received some code cleanups from Paulo Zanoni, some news tests from Daniel Vetter, and also a small series of patches from myself which allows it to work in a non-interactive way, generating a tab-separated list of performance values for each capturing points. Those events can be further analyzed with a statistical tool, or plotted with gnuplot, or dumped into openoffice calc/excel applications – you name it.

Libdrm

Libdrm, which is a glue between the kernel and the userspace applications that use the kernel graphical driver, has received some fixes from Daniel Vetter last week. Besides those, there was a fix to make ‘make check’ work correctly, and a support for using xf86drm.h from C++ applications.

Xserver

X.org X server has received lots of updates and merges since the 1.11.0 release in the past weeks. Among the most notable ones, there were some enhancements to the DRI2, XRANDR and DAMAGE extensions, documentation, comments and scripts fixes, besides the changes in the input framework.

VAAPI

And finally, as for VAAPI, not much activities happened in the git repo for the past weeks besides some refinements on the API and the vatrace tool.

So, as this post has already grown past the size I originally expected, I think that I’ll stop about here this time.

I’ll try to continue with the semi-regular blogging about the news in the graphics land of Intel world on a weekly basis.

See you! Eugeni

As promised, August has come, so it is time for some news :) .

As most of you who are following either my twitter or facebook has already noticed, I am working at Intel now, within the Intel Linux Graphics group. However, this does not means that I have abandoned the Mandriva/Mageia communities! The move to other city, job, relocation, and other boring and time-consuming things took most of my time for the past weeks, but slowly everything is getting back into shape now.

Quoting Andrzej Sapkowski, one of my favorite authors, “something ends, something begins”. I am at the beginning of this new journey, and really looking forward for this new experience!

See you around :) .

© 2012 Eugeni's blog Suffusion theme by Sayontan Sinha