GSoC 2023 Final Report
The GSoC journey is coming to a close. In just over 100 days, I gained more experience in open-source development than I could ever imagine in this period.
Prior to GSoC, I was not used to regularly submit patches to the mailing lists. Now, I’ve sent many patches and revisions. I believe my interaction with the community will only grow. I learned so much about the tools and workflow of kernel development.
After this experience, I’m more than certain that I want to make this a job, contributing to open-source is fun, so why not make this a living :)
Goals
The main goal of the project was to increase the code coverage on the DRM core helper functions by creating unit tests.
As the coverage of all helpers is a big task for the time period, I
decided to create tests for the drm_format_helper.c
functions.
Throughout the project, other side tasks appeared. I will list the contributions made below.
GSoC contributions
Linux Kernel - VKMS
VKMS is a software-only model of a KMS driver that is useful for testing and running X (or similar) on headless machines.
This was, unexpectedly, a big part of my GSoC. I learned a lot about color formats and how a graphics driver works. Currently, only one piece of my work was upstreamed, the rest needs more work and was postponed in favor of the primary project goal.
Patch | Status |
---|---|
drm/vkms: Add support to 1D gamma LUT | Accepted |
For more information go check my blogpost about the whole process.
IGT
IGT GPU Tools is a collection of tools for the development and testing of DRM drivers. While working on VKMS I used heavily the IGT framework for testing, in one occasion a bug made a test to stop working on the VKMS, so a submitted a patch to fix that.
Patch | Status |
---|---|
lib/igt_fb: Add check for intel device on use_enginecopy | Accepted |
Linux Kernel - DRM
In the DRM subsystem, I’ve done the main project goal, contributed by
adding unit tests, and also helped to fix some bugs that appeared
while working on the tests. With the sent patches I got 71.5% of line
coverage and 85.7% of function
coverage
on the drm_format_helper.c
.
Challenges Faced
I think the most difficult task was describing my work. Either on blog posts or in the commit messages, it takes a lot of work to write what you’ve done concisely and clearly. With time you get the way of things, but I think I can improve on this subject.
Moreover, many times I had to debug some problems. I already knew how to use GDB, but using it in the kernel is a little more cumbersome. After searching, reading the documentation, and getting tips from my mentors, I got it working.
On the VKMS, I had to create new features, this requires a lot of thought. I made a lot of diagrams in my head to understand how the color formats would be displayed in memory, and yet most of my work hasn’t seen the light of day XD.
What is left to do
I was able to do most of the proposed tasks. But the drm_xfrm_toio
was left out due to the difficulty of testing it, as it uses IO
memory. I tested the drm_fb_blit()
, but I’m waiting for the
acceptance of the patchset to send it, with that patch the line
coverage will go to 89.2% and the function coverage will go to
94.3%.
Community Interaction
Besides patch submission, I reviewed some patches too. Going to the other side, I enjoyed thinking about how a piece of code could be improved.
Also, on one occasion I started a discussion about the best way to solve an issue by sending a patch. This got me a Reported-by tag on the patch that fixed the bug.
Moreover, I use a Thunderbird addon to make the diff properly highlyted. When I was tinkering with the configuration, I noticed that the CSS of the configuration menu was wrong, so it made the user experience pretty bad.
I sent a patch fixing that to the maintainer of the addon, this patch generated a discussion that made a whole change in the CSS file due to Thunderbird updates.
Acknowledgments
I’d like to thank my mentors, André “Tony” Almeida, Maíra Canal, and Tales L. Aparecida. Their support and expertise were invaluable throughout this journey.
Moreover, I thank the X.Org Foundation for allowing me to participate in this program, and also for accepting my talk proposal on the XDC 2023.
Lastly, I thank my colleague Carlos Eduardo Gallo for exchanging knowledge during the weekly meetings.