Skip to main content

Nouveau Summer Project - Progress Update

This is a summary of all the proceedings related to my project on Nouveau. The start was a little bumpy due to some bugs and incompatibilities with Ubuntu. After spending quite some time to fix things I decided it was better to shift to Arch rather than spending anymore time on it. It took over a day and many reinstalls to get the base system up and running. Then the xorg server was setup and nouveau was installed. This got a basic window system running. It was followed by a git clone of PDAEMON + envytools which was then compiled and successfully run on Arch system. Things worked perfectly on Arch and I would be posting a tutorial on how to install Arch on a usb stick because I find the official documentation not so friendly to newbies.

Designing and implementing a PDAEMON to Host communication was my first objective. I planned to work on it in C. I started off with a basic implementation of the  command submission. From there I made incremental modifications improving and testing it at every step. I made use of a ring buffer to utilize the shared memory effectively. Implementing a buggy command submission was not all that difficult ;) but resolving all bugs and optimizing it after extensive testing did prove to be very time consuming. The code was revamped many a time until what I got was a clean and optimized implementation. This design would now also serve as  an interface for PDAEMON programs to send messages/commands. I implemented it by employing the use of two ring buffers. Later, after discussing and contemplating the positives and negatives of using 1 ring over two ; I rewrote the code with the required interface and employing only 1 ring buffer.

Now that the design was ready, tested and implemented in C the next task was to port it to Fermi Micro Code. The main hurdle behind it was that I had never worked with FµC.
I began with multiple tries to make sense of the code (pdaemon.fuc) directly, failing which I started reading the fuc documentation in hwdocs. At first, it was mostly an exercise of jumping back and forth between docs because I was not able to understand all of it in the first (or second) go.

I was not confident that I had given them enough effort and so giving them another shot. After that I started referring to fuc-isa.txt and things started to make more sense as I went on trying to understand pdaemon.fuc line by line. I realized that the main problem I faced was retaining what I had previously read because all this was unlike the c++ code which I had been working on to develop user base applications. Anyhow I felt confident as I was finally being able to grasp more than what I was at the starting.
Using examples from existing code, I wrote short snippets to test my understanding and grasp over it.When I felt I was up to the task, I started porting my C-code to FµC. Starting with the smaller functions, I quickly got a good hold of it. Finally, I ported the entire thing to FµC and PDAEMON.Testing one function at a time, I realized that most of it worked well due to a great C-implementation.
</ div>

Currently, the code has been ported to PDAEMON and the PDAEMON -> HOST communication has been implemented. Though it is yet to be tested extensively but that would be over before this week ends. Here is the FµC :


Comments

  1. Do you have any plans to write about how to get started with nouveau for "newbies"?
    Anyway good work, thanks =D

    ReplyDelete
    Replies
    1. Thanks. :)
      And shockingly enough, I have submitted a talk to FOSS.IN on the lines of ~how to get started with nouveau for "newbies"~ Let us see if it gets accepted. :P
      I have also given some recommendations to mwk regarding additions to hwdocs for making it newbie friendly. :D

      Delete

Post a Comment

Popular posts from this blog

Nouveau - Summer Project

Implementing a software scripting engine on Fermi to achieve safe memory re-clocking. Fermi stands for Nvidia GPUs based on Fermi architecture. NVidia cards have long had the possibility to reclock at least some of the engines of its GPUs. Up to the geforce 7 (included), reclocking used to happen at boot time and usually didn't involve memory reclocking at all. It changed with geforce 8 (nv50) where almost all laptops got the capability to reclock both the VRAM and the main engines. This was introduced in order to lower power consumption when the GPU was mostly idle. The default boot clocks were usually in some intermediate state between the slowest and the fastest clocks. The reclocking process for these cards is mostly understood and Nouveau is not far from being safely reclock on the fly, even while gaming. Geforce 200 (nva3) introduced load-based reclocking on all the cards. This started being a real problem because the default boot clocks are a third to a half of the

uCharts - Financial Charting API

A few months back, the first stable release of the charting API, that I have been working on was released. A part of the uTrade product portfolio, it has been aptly named uCharts. uCharts is a general purpose charting API with prime focus on financial markets and data. In this post, I will give a brief overview of the features, compatibility and scope of extensions. Features The API currently supports 6 types of charts: Line Area CandleStick OHLC Bar Pie It has been designed in a manner that all aspects of the charts are user defined. Starting from the color of the charts, width of the candle bars till the number of ticks on each axis. Mentioning each element seems like a futile exercise. However, brushing over a few notable features seems more fruitful. Aggregation Formula The number of data points that can be displayed on a screen or inside a DIV is limited by its resolution. The number of pixels available can lead to a severe limitation especially

Getting Started with Open Source Projects

Fellow Open-source Enthusiasts Going to conferences is great , getting inspired by attending them is even better but you know what is better? Getting to attend conferences [National/International] for free , getting cool stickers and t-shirts being delivered at your place , being one of the first few to get your hands on a developer device or developer release of an upcoming software/OS and all this for free! I will hopefully be pardoned by true open-source enthusiasts for making this look like an advertisement rather than a motivator but I somehow couldn't resist.  Now , ignoring the above perks because they are 'perks' , the real deal is getting to learn while you work. Being involved with any open-source project brings along a great deal of learning , experience and contribution to real-time projects which people around the globe use in their daily lives. Once you are into development and learning , conferences make a whole lot of more sense as you actually ge