The real life and work issues had eaten most of my time for the past 2 weeks, but things seem to be geting back to normal now. So time for semi-regular updates from the Intel Linux Graphics land.

Starting with kernel, many notable changes happened in the past weeks. To make our -next merge window process go faster, a new process was adopted for the kernel patch and branch handling process. Let me elaborate a bit more about how this is going to work.

For the past months, we had the drm-intel-next branch (containing patches intended to go into the next merge window – e.g., when the 3.3 kernel is being developed, this is the branch which contains patches intended to be included in the 3.4 kernel version), and also drm-intel-fixes branch (containing patches for the currently developed kernel – e.g., patches which fix issues which were added during the past merge window. So for instance, those are the patches which go into 3.3-rcN kernel versions after the merge window). Both of those patches were maintained by Keith Packard.

However, the amount of patches combined with other tasks resulted in a somewhat slower patch queuing process. So Daniel Vetter has volunteered himself to maintain the drm-intel-next branch from now on, reviewing, queuing and managing the patches intended to get into the next kernel merge window (for now, those are targeting the 3.4 kernel version).

At the same time, Keith Packard will continue to maintain the drm-intel-fixes branch, managing and carrying stability patches for the current kernel.

And finally, to improve the testing and availability of newer features for older kernel versions, I’ve started my own drm-intel-backports set of branches, for 3.0, 3.1 and 3.2 kernel versions – containing all the latest and greatest patches from the latest kernel releases. Of course, those patches do not follow the usual kernel stable development model, so they introduce new features, capabilities and possible issues. But for the brave souls out there willing to see and test the absolutely latest development in our drivers on top of their kernels, it should be a great chance to do so.

(I assume that I was not that fast with the drm-intel-backports patch merging process in the past 2 weeks, so for now it only contains patches from the 3.2 kernel branch. I intend to backport the 3.3 and 3.4-next patches for all those versions in the coming days. Also, apparently those backported patches do not work correctly with pre-Ironlake chipsets on 3.0 kernel, and there are some display-related issues on top of 3.1 one – I’ll look into it as well. Sorry for the delay – but the real life interfered with my patching capability for the past weeks…)

Besides those changes, we had a large number of notable kernel advances in the past weeks:

  • One of the most interesting features is the support for interlaced modes in the Intel Linux Graphics cards. A great work by Peter Ross, Daniel Vetter and Paulo Zanoni resulted in a series of patches which provided support for interlaced modes. These patches will be queued for inclusion in the 3.4 kernel – but when I’ll get back to my -backports series of patches, I’ll certainly include them into the 3.[012] series as well.
  • More Ivy bridge 3-display pipes issues were fixed, such as the hibernation problem with 3rd pipe being active.
  • Stabilizing the almost-ready-to-launch Ivy bridge platform, the hopefully final forcewake-related fixes were included in both drm-intel-next and drm-intel-fixes branches, and were also cherry-picked by Greg to be included in the stable 3.2 kernel as well. This should solve the remaining missing interrupts problems we were experiencing.
  • Initial patches to support the hardware context switching were sent by Ben Widawsky, and are accessible in his own freedesktop.org repository for testing. Hardware-supported context switching allows to save the hardware registers and state for each process, so it could essentially help the GL_EXT_transform_feedback extension and advanced geometry shading state passing between different stages. And, of course, it can also improve the stability – hardware would ensure that different processes would not interfere with each other in a harmful way.
  • And almost a hundred pending patches were picked by Daniel Vetter for his new drm-intel-next branch. The next merge window certainly looks interesting for the Intel Linux Graphics support in this sense…

On Mesa side, the 8.0 release is getting really close. After the 8.0-rc1 release a couple of weeks ago, lots of patches were picked into the 8.0 branch, improving the stability, performance, and fixing many rendering issues – especially on the Ivy Bridge platform. More excitingly, the communication between Mesa and Unigine developers resulted in better support for open-source drivers in the just released Oil Rush game. It is really great to see such cooperation – and Unigine-based game certainly is one of the most advanced graphical releases of past years on Linux.

Speaking about the Mesa development, this final stabilization phase prior to the 8.0 release is a great chance for you to report issues, bugs and problems before the release which is expected in a few days from now. So if you observe any last-minute problems and regressions with Mesa 8.0 branch – please, let us know! This next release looks really impressive from the technical side, but your help in additional testing is more than welcome.

On Wayland side, lots of different patches and features were received in the past weeks. Wayland and Weston development goes on with great pace – and the ones of you to attend FOSDEM next week will have some really interesting stuff to gaze upon. But I won’t spoil the surprise :) .

On Xserver development, the 1.12 RC2 and 1.11.4 releases were unleashed last week, together with a new glproto, util-macros and xkeyboard-config versions. The development continues non-stop, with hundreds of patches and discussions happening in the mailing lists.

And finally, the phoronix feedback I got from you over the past weeks was amazing. Thank you all for all your questions and suggestions – it was really nice to hear what you have in mind, what you like (and dislike) in our drivers and what direction we should be heading. I’ll try to answer the last remaining questions in the next few day, and will summarize everything on a dedicated blog post.

For the ones of you who haven’t read Phoronix lately – Michael is running a survey about Intel Linux Graphics drivers for the past few days.

So far it got 10 pages of amazingly interesting comments (which I was trying to answer as time and my fingertips permitted). 95 comments as of now to be fair (sorry, 96 already – my bad :) ). Make sure to check it out.

In the end, I’ll try to summarize all my replies in the thread here. But it will be a long read by the looks of it.

One of the most frequent complains questions related to the Intel Linux Graphics drivers I’ve received in the past few months was: “Why Intel devs work only on the most bleeding edge, and do not give enough attention the us stable users”?

Yes, this question affects all the components of the stack – kernel, mesa, libdrm, 2D driver, and so on, but the answer to this is quite simple – this is how software gets developed. New features go into new releases, and stable releases receive bugfixes and stability improvements at most. And this is not much of an issue to the userspace components anyway – with all the LD_LIBRARY_PATH flexibility it is possible to have multiple versions of the libraries installed without any issue. But as for the kernel, indeed, it is not that easy. So most of the times, those questions were directed at the kernel part of our driver – namely, the tiny i915.ko module which is responsible for making the graphical heart of Intel-based GPU beat.

Even for the kernel, this is not exactly true – Greg’s stable trees do include most of the critical fixes for our drivers since always. But it is true to some point – most of the newest development and patching happens within the usual Linux development window – and those patches and features are then merged to the release candidates of a future kernel during the merge window. And for the kernel, it is not that easy to have multiple kernels around at the same time without having to reboot between them here and again.

So therefore, I thought on giving a small gift to the users who are not still ready to jump into the latest and greatest kernels releases – but still want to enjoy the goodies brought with the latest versions of the graphics driver. So I prepared two kernel branches on my freedesktop.org kernel repository:

  • 3.0-drm-intel-backports — latest 3.0.x kernel with all the i915 patches from latest kernel release. Right now, it is 3.0.16 + 195 backported patches. Diffstat reports 78 files changed, 4988 insertions(+), 2176 deletions(-).
  • 3.1-drm-intel-backports — latest 3.1.x kernel with all the i915 patches from latest kernel release. Right now, it is 3.1.8 + 104 backported patches. Diffstat reports 74 files changed, 3147 insertions(+), 1589 deletions(-).

Besides driver backports, the patches which affect multiple drivers (like, i915, nouveau and r128) were also backported in full in those branches. And all the required build and API dependencies (like HDMI/DP ELD or drm/gem API changes) are also included in full.

I’ll try to keep those branches maintained on a semi-periodic basis and synchronized with the latest updates both from -stable branches, and from newest kernel releases.

Of course, let me put an obligatory support and stability statement:

Those branches are not supported officially, are experimental and can be unstable or even broken sometimes (in which case, if you’d be kind enough to let me know about that, I’d try to fix them ASAP). So use them at your own risk.

Other than that, have fun :) .

So, holidays came to an end, and it is time to get started with the 2012 series of “tales from the Intel Linux Graphics land”.

But as the year has just started, it is still time to cover some amazing gifts which Santa ClausDaniel Vetter brought to you all right in time for Christmas. Yes, I am talking about the new intel-gpu-tools 1.1 release!

This new release comes after 2 years from the 1.0.2 release (which came out back in 2009), and accumulates an astonishing amount of changes:

  • Diffstat reports that 138 files were changed, having 29694 insertions and 3524 deletions.
  • Lots of new instructions and registers decoding logic was added in intel_error_decode and intel_reg_dumper tools
  • Many changes in intel_gpu_top, which can now run non-interactively for monitoring GPU usage statistics
  • Different display and mode setting tests
  • And, probably the most interesting feature out there, the introduction of a full-feature test suite for Intel and DRM testing.

Let me stop a bit on this latest feature, and explain it in a more detailed form. Starting with the 1.1 version of intel-gpu-toops, the package provides a complete testing suite for most of the known issues and problems that have been caught in our graphics drivers for Linux for the past years. So when you run make test (as root) in the intel-gpu-tools directory, this will start a long pile of test cases, testing most parts of the GPU.

Ideally, all tests should pass – this means that your current kernel and userspace libraries are not affected by any known kernel (or userspace) issue. Some tests can fail – usually this comes with an explanation of why it fails (either on the test output or in dmesg). And some tests can fail in a very evil way, hanging the GPU or the entire machine. A specific category of tests (HANG tests), which are not run by default, are designed to test specific corner cases which should make your machine hang for good; and some tests are written specifically to caught performance regressions and hick-ups.

Still wonder why is this interesting? Well, I can think on one obvious huge bonuses we get from this test suite – if you are experiencing an issue, you can run the make test suite, and verify if it is a new genuine bug, or something that was already caught by a test case. And obviously, this is an easy way to find and track regressions on the kernel and drm level.

So, to sum it all up – if you want to give a quick try and check if your kernel/userspace/distribution configuration is affected by any known issue in the driver, just run the testsuite. If it passes, you are good to go. If it does not passes, well, you already know that something is not right and needs investigation.

Besides intel-gpu-tools, Mesa work continues towards the remaining GL 3.0 features. During last few days of 2011, Eric Anholt sent some patches for adding hardware support to GL_EXT_transform_feedback bits present on the Ivy Bridge architecture. Besides those changes, hundreds of patches and discussions take place on the mesa-dev mailing list – the most user-notable change comes from the fact that XCB is now mandatory. I guess we have a clear winner in the XCB vs XLIB match in 2012..

On Kernel side, with the release of 3.2 version of the kernel, next merge windows has opened and already received some patches for 3.3 kernel series. Besides the usual fixes and new features which I already covered in previous posts, several alternatives were proposed by Chris Wilson and Eric Anholt to solve the mysterious missed IRQ issue which affects Ivy Bridge (and some Sandy Bridge) machines. The winner in this competition, however, was Daniel Vetter, who came with a simple patch that not only had solved the issues in a nice way, but also allowed us to remove several work-arounds which were added in the past. So far, all my Ivy Bridge machines are up and running for some days without any problems – which is totally awesome!

Moving to other projects, notable changes which were introduced in the past weeks were the move of intel_decode facility for decoding GPU batch buffers from intel-gpu-tools to libdrm library by Eric Anholt; patches from Paulo Zanoni to support new screen rotation feature of VPro; additional patches for improved Glamor performance from Zhigang Gong; support for building libdrm on Android from Chad Versace; Kristian Høgsberg created a new W-prefixed project for Wayland (namely, Weston, which is a different town in Massachusetts state. I actually got to get through it once when I was in the US back in 2005, working on a remote boot and software streaming project for mstech, which was further acquired by Ardence, which was further acquired in Citrix.. fun to see how the world goes in circles :) ).

So I think that’s it for now. For the ones who are still in the new year holidays, enjoy the rest of your holidays; and for the ones who are already back into to the real life – welcome to 2012! :)

Yeah, I admit that my semi-periodic updates about Intel Linux Graphics got more “seldom-periodic” than “truly-periodic” for the past weeks. But have no fear – they are back! And I am still on my self-appointed bi-weekly schedule estimate. This is what’s good about semi-periodic schedule – one never can run too much out of it :) .

So starting with the coolest news – the Mesa team is getting close to the GL 3.0 milestone! Yeah, with latest GL_ext_transform_feedback patches from Paul Berry, the last major piece of GL 3.0 spec is getting into place. There are still some extensions missing and lots of smaller tasks to be done, but it is possible to say that we are almost there. I think that this is really exciting for both us, and for all the Linux and open-source users in the world – so yeah – we’ve been good boys and girls during the year and Santa Claus gift has materialized itself in form of almost-full GL 3.0 support in Mesa.

Who knows, maybe prior to the Chinese new year we’ll receive the 2nd part of this gift (in other words, mesa 8.0 release :) ).

On kernel side, the 3.2-rc6 release brought lots of awesome changes to our drivers. Yes, I am talking about everyone’s favorite rc6 and semaphores features. They are on by default on Ivy Bridge architecture, and are also enabled on Sandy Bridge if VTd is disabled. So most of you should enjoy greatly improved battery life, considerable faster performance and also enhanced stability within the i915 driver when Linux 3.2 will be released.

Besides those patches, work has started on collecting patches for the 3.3 merge window. Daniel Vetter sent his pending patches in a form of tiny 43-patches series. Those patches bring PPGTT support, improve debugfs handling, enhance pread/pwrite performance, fix swizzling for SNB/IVB, improve forcewake operations and enhance debugging support for cases when GPU rings get stuck.

Ben has also sent his patches for scheduling/throttling, but they haven’t received much interest except from myself and phoronix :) . Those patches add support for more fine-grained GPU scheduling and rings load distribution between individual process. I am really interested in this work, and I hope that they will be accepted into the main kernel in the foreseeable future.

Also on kernel, Rodrigo Vivi and Paulo Zanoni sent out some patches which finally fix some corner cases for TV-out and SDVO outputs. This certainly should make many users happy out there just in time for Christmas.

And finally, for the kernel size, Chris Wilson came with a patch which works around the missed IRQs issues on Ivy Bridge platform. With this patch, and with semaphores being enabled on Ivy Bridge by default, I am very happy to say that we don’t have any blocking bugs for Ivy Bridge in our bugzilla. I think that it comes as a nice Christmas gift for all the users out there (the ones who already have an Ivy Bridge machine, and the ones who will get it by its launch – which is still 4 months away). Of course, I won’t talk much about it prior to its official launch, but trust me – Ivy Bridge rocks!. I can’t wait to have an Ultrabook based on this platform for myself…

Besides mesa and kernel, it is worth mentioning that on the 2D side, Zhigang added full Glamor support into the driver. The Glamor acceleration is still considered very experimental and non-stable, but now it is available for the world to take a peek on it and witness how it works with their own eyes.

So I think that this is pretty much it. We have hundreds of patches floating around for all the projects, thousands of emails and millions of users in the world – and we are working hard to make all of them happy with the results of our work. 2011 was extremely productive and rewarding for us – and I hope that the year of 11111011100 (a.k.a., 0x7DC or 2012_base10 for the ones still reading in decimal numbers out there :) ) will be even more interesting*!

See you!

(*) Assuming the world won’t end in a core dump caused by the Mayan millennium counter overflow bug :) .

As many of you have already seen, we have just released a new version of the Intel Linux Graphics stack, composed by Kernel 3.1 (or 3.1.x in practice), Mesa 7.11.2, Libdrm 2.4.27, vaapi and vaapi-driver-intel 1.0.15 and xf86-video-intel 2.17.

The focus of this release was on performance and stability improvements in the drivers, and I think we managed to get the job done according to what we expected. Thanks to LLC caching and improvements in both Kernel and Mesa, 3D performance was improved by a large margin on Sandy Bridge generation of GPUs onwards, and many annoying issues were fixed as well (with some of the fixes already queued for Kernel 3.2 release). And I’d also like to highlight lots of work towards GLES compliance on Sandy Bridge architecture, and many and many different stability fixes in all the projects.

For statistical purposes, my saved bugzilla searches count 253 bug reports which were closed after the previous release, and we had 594 bug tickets in total which had any activity since that release. Of course, this does not represents what was done by an accurate number, so please, just use those numbers as some sort of bugzilla pondering references.

So to sum it all up, I’d like to thank all the developers, QA, users, testers, and all the community we have around Intel Linux Graphics project for your amazing work. Yes, the Intel Linux Graphics project has not only a team within Intel – but also a huge community and users all around the world, following the Open-Source road from Kernel up to the UI components. Thank you all guys!

Enjoy!

Development goes on, on all the fronts, and time has come for some news about Intel Linux Graphics project.

For the Kernel side, some nice patch series have arrived to the list:

  • Daniel Vetter sent his PPGTT enabling patches, which resulted in many interesting reviews and discussions. PPGTT, or Per-Process Graphics Translation Table, is a mechanism for remapping GPU memory into system one. Unlike traditional Graphics Translation Table, which has a global mapping for everything, PPGTT allows each process to have its own level of mapping. On practice, it should improve stability by a large margin and performance by a considerable value, and also is a nice thing to have in general, specially when hardware supports it natively (which it does, starting with Sandy Bridge). Also, if you are interested in learning the details of how GTT and GPU memory management works, you should check this excellent article from 2007 for a great introduction.
  • Ben Widawsky has sent a new series of patches for forced GPU throttling and scheduling. I already described them in one of the previous posts, and I am really interested in seeing them accepted to the kernel.
  • I’ve sent out some patches for userspace-controled RC6 enabling and tweaking, together with some patches for enabling semaphores and rc6 by default on newer generations of gfx hardware. Those patches, together with Ben’s ones, also raised an interesting point – we have many userspace-controllable items in the debugfs file system, which should probably belong to sysfs instead. This would require a proper definition of their usage and behavior before real userspace applications would be able to use them.
  • And Wu Fengguang sent some patches for Display Port and HDMI fixes.

Moving up the stack to the 3D driver, some major news worth highlighting are:

  • On Mesa side, the major news is Ian has released Mesa 7.11.2 with some additional GLES and EGL patches, and a small patch which fixed Mesa build on Mandriva (and also on other distributions which use -Werror by default, such as Mageia for example).
  • Lots of work is happening in Mesa, targeting OpenGL 3.0 support by the end of the year. GLSL 1.30 is already among us, and most of GL 3.0-required extensions are in place, but there are many things to do. Hopefully they will be all done in the next few weeks.
  • Speaking on Mesa, some major news happened for the drivers using the Gallium technology. As you probably heard through Phoronix already, the i965g, Cell and Failover gallium-based drivers were dropped from Mesa due to lack of love, support and care. Sad – but this is life. And in any case, i915g driver is still there, and of course, those events do not affect Intel’s 915 and 965 Mesa drivers at all.
  • And also on Mesa, Ian has started the work on GLX_ARB_create_context and the layered GLX_ARB_create_context_profile extension, and came with a question whether it is still worthy to support non-XCB protocol, or if there are any platforms that can’t / don’t use XCB for X protocol yet. The overall feedback so far was to drop non-XCB bits sooner than later. So looks like XCB has won the X protocol war in the end :) .

And finally, on the xserver side, discussions were raised on the mailing list on the release dates for the next xserver release, and the Xinput 2.2 state in it. It is almost there, and will probably get merged until Christmas. Also, Xorg-server 1.11.2.901 (a.k.a., 1.11.3-RC2) was released.

Well, not that long time, but still, I’ve been somewhat slower on news about Intel Linux Graphics this week, partly due to LinuxCon Brazil which happened here.

Speaking about it, it was actually the first LinuxCon I attended (I also went to LinuxWorld Brazil in 2006, but that’s pretty much all the Linux-specific events I’ve been to). So it was really nice to talk to all the people I know from the Internet and put some faces behind the irc nicks and email handles. It was also really nice to meet and talk to Linus, Dirk Hohndel and Lennart Poettering in person, and meet old ex-conectiva people from all over the world.

It was also particularly nice to meet and talk to Christian Reis (a.k.a., Kiko), who is the VP of Engineering at Linaro now. He used to study with me at UFSCar university more than a decade ago and we met on a couple of events at São Carlos previously. He did a very interesting keynote about the state of ARM on Linux at the beginning of the conference, and we talked a lot about GFX drivers on Linux afterwards.

As for my presentation, I’d like to thank you all for attending and asking interesting and technical questions. We actually managed to have a mini real-time debugging session on some lvds issues at the end of the presentation :) .

And of course, I managed to announce that Mesa 7.11.1 was going to be released about 5 minutes before Ian sent his email – it happened right during my presentation actually :) . And so.. I spoke of mesa, so yeah, let’s head back to the Intel Linux Graphics news now.

As you all know, Mesa 7.11.1 was released this week. It comes with an absolutely amazing number of 200+ backported patches for performance and stability enhancements in pretty much all the components we have. It is not the last release of the 7.11 branch, so you should expect some more releases in the next couple of months. And perhaps some more even after Mesa 8.0 will be released.

On Kernel side, lots of things happened this week. Linus has released Linux 3.2-rc2 (and also blogged about it in his google+ page while fighting the amazingly fast brazilian 3g connection issues :) ). It comes with many patches and fixes, for both Intel and non-Intel gfx cards. There is still many patches to get into the 3.2 branch though.

Also, I sent out some patches for once again enabling RC6 and Semaphores by default, but after a discussion on intel-gfx mailing lists I got some ideas on reworking them. And Keith Packard has also sent a rc6-enabling patch earlier today, which probably will fix all the RC6 issues and allow it to enter the kernel. This is the 5th attempt on enabling it by default as far as I remember, so I hope it will get in this time.

On xf86-video-intel, Chris Wilson has released the 2.17 version of the 2D driver, which comes with a large number of fixes for the UXA acceleration. Besides UXA, it also comes with more than 300 patches for SNA – so if you are using it, you really should update. Trust me, you really want to do it :) .

Still on Kernel, as many of you know, the latest Bios update to the Ivy Bridge bios somewhat broke suspend-resume for IVB machines out there. Keith Packard and Jesse Barnes had already sent some patches to address that, so if you one of the lucky ones out there with an Ivy Bridge, and you do have this issue – please, test it and let us know if it works!

On Mesa side, besides the 7.11.1 release, lots and lots of work is going on to finish GL 3.0 support. Among around a thousand of mails and commits on the mesa-dev list, it is hard to highlight the most important ones, but I’d like to give attention to the Chad Versace‘s patches which bring the HiZ support and enable it by default, and to Paul Berry‘s work on GLSL 1.30.

But besides those, yes, there is a huge number of amazing changes on pretty much everything, with some interesting changes from Eric, Kenneth, Chad, Yuanhan and Ian. Mesa 8.0 ought to be an exciting release!

So that’s it for today. See you!

For those of you who couldn’t attend LinuxCon Brazil – I’ve put my presentation about Intel Linux Graphics online for you all.

(of course, if you have attended and want to see it again, you can do this too :) ).

Have fun!

Intel Linux Graphics

Yeah, I know that it is Friday, and it is also 11/11/11 (though I still don’t know if the end of the world was expected on 11/11/11 at 11:11am or 11/11/11 at 11:11pm), but still, the development goes on and on.

But as I said, heck, it is Friday, and we all have a nice binary date on the calendar, so I’ll give you two additional reasons for celebration today:

  • On Mesa, Eric Anholt and Ian Romanick exposed GLSL 1.30 compatibility for Intel gen6+ cards. Yes, with the latest commit which added gl_VertexID support, everything required by GLSL spec should be supported now. Yet another milestone towards GL 3.0 was passed.

  • And on xf86-video-intel, patches which add the support for Glamor were sent by Zhigang. Yes, I am talking a lot about Glamor in the past days, as it certainly looks like a very interesting project. Now, with patches which split the device-independent library from the device-dependent part, its support towards upstreaming is getting closer and closer.

Besides those items, as usual, we have had lots of development and news for all the projects. And next week, we’ll have LinuxCon in Brazil, where I’ll give a presentation about Intel Linux Graphics, what it is, how it works, and what are all those scary words like kernel, drm, ddx, vaapi and wayland. And, of course, we’ll have lots of amazing presentations on many Linux-related projects.

So if you’ll be there, I’ll be glad to answer your questions and talk about pretty much everything.

See you!

After some period of silence, this blog returns in bringing you the latest and greatest news from the Intel Linux Graphics world.

So if you were sad, depressed and crying in despair without having a chance of reading about what was going on with the Intel Graphics for the past days, rejoice! :)

Those past few days were quite busy on all the projects, and with thousands of emails to keep track of it is hard to select the most relevant news – all of them are! But I’ll try to summarize the most interesting stuff that happened for the past few days.

Starting with kernel, as you all already know, we are living in the post-3.1 era now, with the release of Linux 3.2-rc1. It brings lots and lots of fixes and improvements all around, and much more are yet to come.

On Intel Graphics side, the following items caught my attention for the past days:

  • Keith Packard sent yet more eDP-related patches, allowing eDP displays connected to the PCH to, well, work :) . The main issue came from the fact that the driver incorrectly was treating a PCH-connected eDP panel like a CPU-connected one, setting the wrong bits in the wrong places.
  • Daniel Vetter has sent out a series of patches for simulating GPU hangs. As you all know, GPU hangs are an (unfortunate) part of a GPU driver life, and there are many factors which could cause them, ranging from incorrect GL instructions to out-of-bounds variables somewhere in the stream of commands and down to hardware failures. Prior to Daniel’s patches, the only way to see a GPU hang was by having a hung GPU, so most of them were not easy to reproduce and investigate. Now, it is possible to stop the GPU at will, and see the effects. This is particularly interesting at least for me, because I was working on some tools for doing heuristics analysis of the root-causes of GPU hangs. Now, I can do this task with much more ease.
  • Jesse Barnes sent out a new round of planes support, and support for SNB and IVB video sprites. The video sprites support different video formats natively and can do scaling as well, and their support was added to the DRM overlay code with this patchset.
  • Ken and Daniel did a bit of cleanup of code specific to some pre-production SNB systems. Now that Sandy Bridge is out there, those bits are not necessary anymore, so they were wiped out.
  • Daniel has sent a 13-patch series of pwrite/pread reworking. This patchset fixes some spurious -EFAULTS issues which could lead to kernel issues, improves the performance of pread/pwrite calls on LLC machines and cleanups unused code, replacing them with faster execution paths.
  • Also on kernel, I’ve found an issue which can cause division-by-zero in kernel when accessing power-related registers from userspace, and sent a small patch fixing it. Apparently, the very same issue was already found back in July by Konstantin Belousov. It is a small fix for a potential kernel crashing issue, and let’s hope it will be picked up in one of the next kernel pull requests.
  • And Jesse Barnes sent out some documentation and cleanup patches for the drm subsystem.
  • Still on kernel, but outside of our team’s area, one big news for Linux Graphics will certainly make some people out there happy. Yes, I am speaking about Alan Cox moving of basic GMA500 driver out of staging. This driver support accelerated console and non-accelerated KMS on Poulsbo, Oaktrail, Cedarview and Medfield hardware. Note that medfield support in this initial patchset is left out on purpose, as it needs considerable rework to be ready to enter main kernel.

One particular issue worth highlighting is that a long-standing issue on GL-based applications (among which Unigine Tropics and Sanctuary are probably the most notable examples, among many others) was finally fixed, thanks to an amazing work by Eric Anholt, Kenneth Graunke and Keith Packard. This issue can be described as ‘small moving ants on top of image edges’ or ‘flickering pixels‘. So if you have had this issue, make sure to check out the patches!

Going to Mesa, out of hundreds of emails and commits, it is hard to choose the most interesting ones. Work on GL 3.0 support proceeds quickly, and new mesa stability release, 7.11.1 is almost out of the door. Our Q&A team did a full testing of this bugfixing release, and haven’t found much issues. So prepare yourself, as in few weeks we’ll have MESA 7.11.1 out there. Stay tuned for Ian’s announcement in nearby future.

But as for mesa master branch, the following patches called my attention the most:

  • Eric sent a patch series to add support for GL_EXT_texture_integer on i965 driver.
  • More work towards EXT_transform_feedback was done by Dan McCabe and Paul Berry, and Marek from the community side.
  • And we had lots of fixes for potential segmentation faults, safety checks, better hardware specification compatibility, piglit-based fixes and other issues from Yuanhan, Eric, Ken, Chad and Ian.

On Wayland side of the force, lots of patches went in those days. Among those, there was an interesting proposal for the screen locking protocol by Pekka Paalanen, and some bugfixing patches from Juan Zhao.

Going to the other components, we had a release of xorg-xserver 1.11.2 RC2, with several crashes and correctness fixes; and new stable pixman 0.24.0 which brings many performance improvements and usage of architecture-specific instructions to improve overall performance over a number of different operations (such as bilinear scaling for example).

And finally, for the intel-gpu-tools, I was working on a new intel_gpu_analyze application, which I was using to tracing and analyzing CPU and GPU performance data during workloads, and also checking on the corresponding power consumption. This is a very experimental code yet, and it lives at my freedesktop.org git for now. But still, I can already do some nice performance analysis like this one.

…lots of things happened in the past days, on all fronts.

It took me longer than I originally expected to write this next post in the series due to some personal problems which kept me out of the virtual world for quite some time, but better late then never.

So, starting with Kernel, as usual, we had lots of updates.

  • Jesse Barnes sent out his patches for adding DRM planes and support for a new FB creation ioctl. Planes are similar to half-CRTCs, in the sense that they have a location and fb, but don’t drive outputs directly. His patchset provided two new interfaces: addfb2, a new FB creation ioctl that lets specify a surface format, as defined by a fourcc code from the video4linux headers; and ** planes – ioctls for fetching plane info and attaching an fb to a plane.
  • Jesse has also proposed some patches for enabling video sprites via overlays.
  • Keith Packard has prepared some patches for flicker-free boot, which attempts to avoid the initial modesetting in drm.
  • A very interesting set of patches from Ben which attempt at adding fairness to GPU scheduling, preventing greedy apps from over-dominating the GPU and leaving nothing for other apps. This, of course, is still experimental, but think about this like on what CFS scheduler did to Linux Process Scheduling, and CFQ did to I/O scheduling. Of course, this also raises some concerns, like for example what should happen to benchmarks – which expect to grab all the possible power to get some measurable numbers, but nothing unsolvable here. It would be really interesting to see how it will go.
  • Ben has also sent out some patches which attempt to fix recursive unmapping of pages, a side effect of the Ironlake workaround which was done recently.

For Mesa, lots of activities on all fronts too. I won’t be able to cover all of them, but the main highlights of the past days were:

  • Work on EXT_transform_feedback by Dan McCabe and Paul Berry from Intel and Marek Olsak. The piglit tests are already in place for some months (I actually started to work on some of them, but then Marek has published his own set of tests, and I left mine in a half-finished state for now at my freedesktop.org personal repo. But I think I’ll finish them at some point). The mesa support for this GL 3.0 extension is approaching its completeness fairly quickly.
  • A 33-patch series from Eric Anholt with lots of fixes for batch buffer handling within mesa.
  • Lots of different fixes and consistency improvements for Gen6 and Gen7 generations of cards from Ken were also unleashed into the wild.
  • A HUGE cleanup of the remaining DRI1 pieces, such as the radeon drivers, dri1-specific extensions and core mesa bits, was carried out by Kristian Høgsberg, Eric and many others who participated in the discussion.
  • GLSL and extensions-related work continues, with clean-ups, fixes and improvements from Ian, Ken, Paul Berry and Chad.
  • GL_ARB_texture_storage support was brought in by Brian Paul from VMware. It is supported by gallium drivers and swrast for now.
  • Chad Versace sent more patches for the Stencil buffer and HiZ support.
  • Ian sent out a 20-patch series which completely refactors the handling of uniforms within Mesa.
  • Eric has sent 24-patch series for improved renderbuffer mapping (MapRenderbuffer).
  • Paul Berry has added support for GLSL 1.30 interpolation qualifiers for Gen6+. This allows to keep track of which fragment shader inputs are overridden with the GLSL “flat”, “smooth”, “perspective” and “noperspective” interpolation qualifiers.
  • And Chia-I Wu has sent some new patches for an updated version of glext.h and for improved android-x86 support within core Mesa.

On Wayland land, we also had quite some interesting changes:

  • Tiago Vignatti sent several patches for improving input and evdev handling.
  • Juan Zhao has put out some documentation about Wayland building.
  • Ander, me, Benjamin Franzke, Casey Dahlin, Pekka Paalanen and Juan Zhao has also sent some build, correctness and GL-related patches. In overall, Wayland development is moving on nicely.

Moving to VAAPI, as I already wrote here, Gwenole has released a new version of both libva and vaapi-driver-intel. Also, speaking on new releases, Eric Anholt has also released libdrm 2.4.27, we had the release of xorg-server 1.11.2 RC2, a new pixman 0.23.8 release, which happens to be a release candidate for the stable 0.24 release, and Chris Wilson has put out xf86-video-intel 2.17 RC1, with several fixes and amazing list of 200+ SNA-related patches.

Also on SNA, I’ve put out two patches which would allow to activate SNA by means of a config file option, without recompiling. Those patches patches are floating around the intel-gfx mailing list, and make the task of SNA testing amazingly more easy (at least, for me :) ).

So – I guess I’ll stop here for now.

See you in the next iteration of The Tales from the Crypt Intel Linux Graphics land :) .

Hello media users around the world with Intel cards aboard!

I am glad to bring you the good news – Gwenole has just releases libva and vaapi-driver-intel version 1.0.15 into the wild! Go ahead and grab them here and here!

And now for the nice details of what you should expect from those releases.

Vaapi-driver-intel

This release improves the VC-1 and MPEG-2 decoding, and fixes some memory leaks:

  • Fix VC-1 decoding (TTFRM packing)
  • Fix MPEG-2 decoding on Ivy Bridge
  • Fix MPEG-2 decoding with sparse QM matrices updates
  • Fix slice-param & slice-data buffer memory leaks

Libva

This release moves the i965 driver into its own subdirectory, improves packaging support and build issues, and comes with some miscellaneous fixes.

  • API: make {Top,Bottom}FieldOrderCnt signed (Yi Wang)
  • Add auto-generated Debian packaging
  • Refine VA trace & VA fool utilities
  • Move i965 driver to a specific repository (vaapi/intel-driver)
  • Fix DSO link issue in tests
  • Fix fglrx driver name detection
  • Fix API vs. DSO vs. package versioning

As you can see, this is a bugfix-mostly release. Next step is 1.0.16, which will bring some nice features to you in nearby future.

As always, stay tuned :) .

Michael Larabel from Phoronix was kind enough to carry out two different testing for the recently released kernel 3.1 on top of our Intel Linux Graphics cards today (thanks again Michael!). He split his evaluations into two different articles – First one is focused on performance and power usage for stock 3.1 kernel; and Second one specifically enabled RC6 on this kernel to see its effects in action.

His testing confirms what I was pointing out with my latest series of the post (however, it always feels great to have independent confirmation of the results). For performance numbers, kernel 3.1 brings around +20% to +40% improvements on top of the previous release for Sandy Bridge architecture. Yeah, this is nice. So if you haven’t updated your kernel to the latest and greatest one (in other words, kernel 3.1), you should really consider doing this.

As for power numbers, we have some good news too. The default kernel power usage on 3.1 is mostly similar to 3.0, with some small variations here and there. However, if one enables RC6 support, the immediate results is that your power usage drops by up to 40% on idle. It is really nice to see less than two-digit watts numbers on current generation of desktop hardware (while it is pretty common to see it on Atom CPUs for some time already, desktop and mobile versions of Intel cards were not that used to such numbers – yet).

One additional bonus Michael has found out is pretty much more interesting one. Apparently, by enabling RC6, the graphics-intensive applications get an additional performance boost of up to 10%. This was a bit unexpected for me, but it is better to have good surprises than bad ones.

From what we have discussed with Jesse Barnes, such improvements could come from several different paths. The first explanation is that, with RC6 enabled, the graphical card can actually consume much less power (down to 0V), so it leaves more room for CPU to use the non-claimed power to do more processing of its own. And the second one is that, thanks to additional thermal bonus which we get from the RC6-provided power economy, the GPU frequency has more room for scaling. So effectively, in both of those case, RC6 allows you to have a better performance, both CPU and GPU-wise – at a cost of somewhat higher power usage coming from such performance.

So, in few words, I would define this situation as battery when you want, performance when you need. When you are on battery, under mostly idle workload (for example, browsing or reading or writing some blog posts), your battery lasts much longer. And when you start some processing-intensive application (say, openarena or angry birds), it gets more horsepower to get the job done, and some extra FPS which could mean life or death – which is specially true in case of said workloads :) . Of course, those additional horses are hungry, so this incurs in more power being used when such additional performance is there – but it is something to be expected in any case.

While writing this description, I actually came to realize that the feature known as GPU turbo, which is present on Intel graphics cards, could be used to define and control such behavior on a much finer granularity. From what I’ve searched all around, surprisingly, nobody seems to have covered its functionality yet. I guess I’ll try to cover how it works, and how one could use and control it from userspace in one of the next posts, so stay tuned! And meanwhile, enjoy all those nice power and performance-related bonuses which the Intel Linux Graphics team brought to you just in time for Halloween :) .

…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 :) .

© 2012 Eugeni's blog Suffusion theme by Sayontan Sinha