| CARVIEW |
Select Language
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 27 Dec 2025 11:13:22 GMT
Content-Type: text/xml
Content-Length: 49191
Last-Modified: Wed, 19 Nov 2025 04:51:16 GMT
Connection: keep-alive
ETag: "691d4cc4-c027"
Strict-Transport-Security: max-age=2592000
Accept-Ranges: bytes
Siqueira
Logbooks are an unstructured text which we explain operations, and approaches taken by us to finish the work; in a nutshell, it is an analogy with navigation of a ship. I like this idea and continuously use it in my life, and this site represents a materialization of this concept.
https://siqueira.tech/
2025-11-19
Wed, 19 Nov 2025 04:51:14 +0000
-
XDC 2025
<p>It has been a long time since I published any update in this space. Since this
was a year of colossal changes for me, maybe it is also time for me to make
something different with this blog and publish something just for a change —
why not start talking about XDC 2025?</p>
<p>This year, I attended XDC 2025 in Vienna as an Igalia developer. I was thrilled
to see some faces from people I worked with in the past and people I’m working
with now. I had a chance to hang out with some folks I worked with at AMD
(Harry, Alex, Leo, Christian, Shashank, and Pierre), many Igalians (Žan, Job,
Ricardo, Paulo, Tvrtko, and many others), and finally some developers from
Valve. In particular, I met Tímur in person for the first time, even though we
have been talking for months about GPU recovery. Speaking of <strong>GPU recovery</strong>,
we held a workshop on this topic together.</p>
<p>The workshop was packed with developers from different companies, which was
nice because it added different angles on this topic. We began our discussion
by focusing on the topic of <strong>job resubmission</strong>. Christian began sharing a
brief history of how the AMDGPU driver started handling resubmission and the
associated issues. After learning from erstwhile experience, amdgpu ended up
adopting the following approach:</p>
<ol>
<li>When a job cause a hang, call driver specific handler.</li>
<li>Stop the scheduler.</li>
<li>Copy all jobs from the ring buffer, minus the job that caused the issue, to a temporary ring.</li>
<li>Reset the ring buffer.</li>
<li>Copy back the other jobs to the ring buffer.</li>
<li>Resume the scheduler.</li>
</ol>
<p>Below, you can see one crucial series associated with amdgpu recovery
implementation:</p>
<ul>
<li><a href="https://lore.kernel.org/amd-gfx/20250701184451.11868-1-alexander.deucher@amd.com/T/#m5df543b5cbbdc31e2834c955d1e3e30b939cb77">https://lore.kernel.org/amd-gfx/20250701184451.11868-1-alexander.deucher@amd.com/T/#m5df543b5cbbdc31e2834c955d1e3e30b939cb77</a></li>
</ul>
<p>The next topic was a discussion around the
<strong>replacement of <code class="language-plaintext highlighter-rouge">drm_sched_resubmit_jobs()</code></strong> since this function became
deprecated. Just a few drivers still use this function, and they need a
replacement for that. Some ideas were floating around to extract part of the
specific implementation from some drivers into a generic function. The next
day, Philipp Stanner continued to discuss this topic in his workshop,
<a href="https://indico.freedesktop.org/event/10/contributions/450/">DRM GPU Scheduler</a>.</p>
<p>Another crucial topic discussed was <strong>improving GPU reset debuggability</strong> to
narrow down which operations cause the hang (keep in mind that GPU recovery is
a medicine, not the cure to the problem). Intel developers shared their
strategy for dealing with this by obtaining hints from userspace, which helped
them provide a better set of information to append to the devcoredump. AMD
could adopt this alongside dumping the IB data into the devcoredump (I am
already investigating this).</p>
<p>Finally, we discussed <strong>strategies to avoid hang issues regressions</strong>. In
summary, we have two lines of defense:</p>
<ul>
<li>IGT: At the IGT level, we can have more tests that insert malicious
instructions into the ring buffer, forcing the driver into an invalid state
and triggering the recovery process.</li>
<li>HangTest suite: HangTest suite is a tool that simulates some potential hangs
using Vulkan. Some tests are already available in this suite, but we should
explore more creative combinations for trying to trigger hangs.</li>
</ul>
<iframe type="text/html" width="320" height="180" itemprop="image" src="https://www.youtube.com/embed/MwTVQfRF2M0?si=GIjWJGcxJUyYcEE6&start=1992" frameborder="0" allow="encrypted-media" allowfullscreen=""></iframe>
<center>
<figcaption> Lighting talk </figcaption>
</center>
<p>This year, as always, XDC was super cool, packed with many engaging
presentations which I highly recommend everyone check out. If you are
interested, check the
<a href="https://indico.freedesktop.org/event/10/timetable/#20250929.detailed">schedule</a>
and the presentation recordings available on the
<a href="https://www.youtube.com/playlist?list=PLe6I3NKr-I4KYOHvuPNtrAcd9NjbiSCWb">X.Org Foundation Youtube</a>
page. Anyway, I hope this blog post marks the inauguration of a new era for
this site, where I will start posting more content ranging from updates to
tutorials. See you soon.</p>
Mon, 17 Nov 2025 00:00:00 +0000
https://siqueira.tech/2025-11-18-xdc-2025/
https://siqueira.tech/2025-11-18-xdc-2025/
-
Status Update and XDC 2019, October 2019
<p>It has been a while since my last post, but there is a simple reason for that:
on August 5th, I had to move from Brazil to Canada. Why did I move? Thanks to
Harry Wentland recommendation, I got an interview for a software engineering
position at AMD (Markham), and I got hired to work on the display team. From
now on, I suppose that I’ll be around the DRM subsystem for a long time :).
Even though I’m now employed by AMD this post reflect my personal thoughts only
and should not be construed to represent AMD in any way.</p>
<p>I have a few updates about my work with the community since I have been busy
with my relocation and adaptation. However, my main updates came from XDC 2019
<a name="cite-xdcsite-back" href="#cite-xdcsite">[1]</a> and I want to share it here.</p>
<h2 id="xdc-2019----montréal-concordia-university-conference">XDC 2019 - Montréal (Concordia University Conference)</h2>
<p>This year I had the great luck joining XDC again. However, at this time, I was
with Harry Wentland, Nicholas Kazlauskas, and Leo Li (we worked together at
AMD). We put effort into learning from other people’s experiences, and we tried
to know what the compositor developers wanted to see in our driver. We also
used this opportunity to try to explain a little bit more about our hardware
features. In particular, we had conversations about Freesync, MST, DKMS, and so
forth. Thinking of that, I’ll share my view of the most exciting moments that
we had.</p>
<h3 id="vkms">VKMS</h3>
<p>As usual, I tried my best to understand what people want to see in VKMS soon or
later. For example, from the XDC 2018, I focused on fixing some bugs but mainly
in add writeback support cause it could provide a visual output (this work is
almost done, see <a name="cite-wbV1-back" href="#cite-wbV1">[2]</a>). This year I collected
feedback from multiple people (special thanks to Marten, Lyude, Hiler, and
Harry), and from these conversations I tend to work in the following tasks:</p>
<ol>
<li>Finish the writeback feature and enable visual output;</li>
<li>Add support for adaptive refresh rate;</li>
<li>Add support for “dynamic connectors”, which can enable the MST test.</li>
</ol>
<p>Additionally, Martin Peres gave a talk that he shared his views for the CI and
test. In his presentation, he suggested using VKMS to validate the API, and I
have to admit that I’m really excited about this idea. I hope that I can help
with this.</p>
<h2 id="freesync">Freesync</h2>
<p>The <code class="language-plaintext highlighter-rouge">amdgpu</code> drivers support a technology named
Freesync <a name="cite-freesync-back" href="#cite-freesync">[3]</a>. In a few words, this feature
allows the dynamic change of the refreshes rate, which can bring benefits for
games and for power saving. Harry Wayland talked about that feature and you can
see it here:</p>
<iframe type="text/html" width="320" height="180" itemprop="image" src="https://www.youtube.com/embed/HYa4UvVtMOE?t=30120" frameborder="0" allow="encrypted-media" allowfullscreen=""></iframe>
<center>
<figcaption> Video 1: Freesync, Adaptive Sync & VRR </figcaption>
</center>
<p>After Harry’s presentation, many people asked interesting questions related to
this subject, this situation caught my attention, and for this reason, I added
the VRR to my roadmap in the VKMS. Roman Gilg, from KDE, was one of the
developers that asked for a protocol extension in Wayland for support Freesync;
additionally, compositor developers asked for mechanisms that enable them to
know in advance if the experience of a specific panel will be good or not.
Finally, there were some discussions about the use of Freesync for power saving
and in an application that requires time-sensitive.</p>
<h2 id="igt-and-ci">IGT and CI</h2>
<p>This year I kept my tradition of asking thousands of questions to Hiler with
the goal of learning more about IGT, and as usual, he was extremely kind and
gentle with my questions (thanks Hiler). One of the concepts that Hiler
explained to me, it is the use of <code class="language-plaintext highlighter-rouge">podman</code> (https://podman.io/) for prepare IGT
image, for example, after a few minutes of code pair with him I could run IGT
on my machine after executing the following commands:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>su
podman run <span class="nt">--privileged</span> registry.freedesktop.org/drm/igt-gpu-tools/igt:master
podman run <span class="nt">--privileged</span> registry.freedesktop.org/drm/igt-gpu-tools/igt:master <span class="se">\</span>
igt_runner <span class="nt">-t</span> core_auth
podman run <span class="nt">--privileged</span> registry.freedesktop.org/drm/igt-gpu-tools/igt:master <span class="se">\</span>
igt_runner <span class="nt">-t</span> core_auth /tmp
podman run <span class="nt">--privileged</span> <span class="nt">-v</span> /tmp/results:/results <span class="se">\</span>
registry.freedesktop.org/drm/igt-gpu-tools/igt:master igt_runner <span class="nt">-t</span> core_auth /results
</code></pre></div></div>
<p>We also had a chance to discuss CI with Martin Peres, and he explained his work
for improving the way that the CI keep track of bugs. In particular, he
introduced a fantastic tool named <code class="language-plaintext highlighter-rouge">cibuglog</code>, which is responsible for keep
tracking of test failures and using this data for building a database. Cibuglog
has many helpful filters that enable us to see test problems associated with a
specific machine and bugs in the Bugzilla. The huge insights from cibuglog it
is the idea of using data for helping with bug tracking. Thanks Martin, for
showing us this amazing tool.</p>
<h2 id="updates">Updates</h2>
<p>I just want to finish this post with brief updates from my work with free
software, starting with <code class="language-plaintext highlighter-rouge">kw</code> and finish with VKMS.</p>
<h2 id="kernel-workflow-kw">Kernel Workflow (<code class="language-plaintext highlighter-rouge">kw</code>)</h2>
<p>When I started to work with VKMS, I wrote a tool named <code class="language-plaintext highlighter-rouge">kworkflow</code>, or simply
<code class="language-plaintext highlighter-rouge">kw</code>, for helping me with basic tasks related to Kernel development. These days
<code class="language-plaintext highlighter-rouge">kw</code> reborn to me since I was looking for a way to automate my work with
<code class="language-plaintext highlighter-rouge">amdgpu</code>; as a result, I implemented the following features:</p>
<ul>
<li>Kernel deploy in a target machine (any machine reachable via IP);</li>
<li>Module deploy;</li>
<li>Capture <code class="language-plaintext highlighter-rouge">.config</code> file from a target machine;</li>
</ul>
<p>Unfortunately, the code is not ready for merging in the main branch, I’m
working on it; I think that in a couple of weeks, I can release a new version
with these features. If you want to know a little bit more about <code class="language-plaintext highlighter-rouge">kw</code> take a
look at https://siqueira.tech/doc/kw/</p>
<h2 id="vkms-1">VKMS</h2>
<p>I was not working in VKMS due to my change of country; however, now I am
reworking part of the IGT test related to writeback, and as soon as I finish
it, I will try to upstream it again. I hope that I can also have the VKMS
writeback merged into the <code class="language-plaintext highlighter-rouge">drm-misc-next</code> by the end of this month. Finally, I
merged the prime supported implemented by Oleg Vasilev (huge thanks!).</p>
<h2 id="references">References</h2>
<p><a name="cite-xdcsite">[1]</a> “First discussion in the Shayenne’s patch about the CRC problem”. URL: <a href="https://xdc2019.x.org">https://xdc2019.x.org</a>. <big><big><big><a href="#cite-xdcsite-back">⤴</a></big></big></big></p>
<p><a name="cite-wbV1">[2]</a> “Introduces writeback support”. URL: <a href="https://patchwork.freedesktop.org/series/61738/">https://patchwork.freedesktop.org/series/61738/</a>. <big><big><big><a href="#cite-wbV1-back">⤴</a></big></big></big></p>
<p><a name="cite-freesync">[3]</a> “FreeSync”. URL: <a href="https://en.wikipedia.org/wiki/FreeSync">https://en.wikipedia.org/wiki/FreeSync</a>. <big><big><big><a href="#cite-freesync-back">⤴</a></big></big></big></p>
Sun, 10 Nov 2019 00:00:00 +0000
https://siqueira.tech/2019-11-10-status-update-october-2019/
https://siqueira.tech/2019-11-10-status-update-october-2019/
-
Status Update, June 2019
<p>For a long period of time, I’m cultivating the desire of having a habit of
writing monthly status updates. Someway,
<a href="https://drewdevault.com/">Drew DeVault’s Blog posts</a> and
<a href="https://mupuf.org/blog/authors/mupuf/">Martin Peres’s</a> advice leverage me
towards this direction. So, here I am! I have decided to embrace the challenge
of composing a report per month. I hope this new habit helps me to improve my
writing and communication skills but most importantly, help me to keep track of
my work. I want to start this update by describing my work conditions and then
focus on the technical stuff.</p>
<p>In the last two months, I’ve been facing an infrastructure problem to work. I’m
dealing with obstacles such as restricted Internet access and long hours in
public transportation from my home to my workplace. Unfortunately, I can’t work
in my house due to the lack of space, and the best place to work is a public
library at the University of Brasilia (UnB). Going to UnB every day makes me
waste around 3h per day in a bus. The library has a great environment, but it
also has thousands of internet restrictions. The fact that I can’t access
websites with ‘.me’ domain and connect to my IRC bouncer is an example of that.
In summary: It’s been hard to work these days. So let’s stop talking about
non-technical stuff and get into the heart of the matter.</p>
<p>I really like working on VKMS. I know this is not news to anybody, and in June,
most of my efforts were dedicated to VKMS. One of my paramount endeavors it was
found and fixed a bug in vkms that makes kms_cursor_crc, and kms_pipe_crc_basic
fails. I was chasing this bug for a long time as can be seen here <a name="cite-crcproblemFirst-back" href="#cite-crcproblemFirst">[1]</a>. After many hours debugging it, I sent a
patch for handling this issue <a name="cite-crcproblemSecond-back" href="#cite-crcproblemSecond">[2]</a>,
however, after Daniel’s review, I realized that my patch didn’t fix correctly
the problem. So Daniel decided to dig into this issue to find the root of the
problem and later sent a final fix. If you want to see the solution, take a
look at <a name="cite-danielFixCRC-back" href="#cite-danielFixCRC">[3]</a>. One day, I want to write a
post about this fix since it is an interesting subject to discuss.</p>
<p>Daniel also noticed some concurrency problems in the CRC code and sent a
patchset composed of 10 patches that tackle the issue. These patches focused on
creating better framebuffers manipulation and avoiding race conditions. It took
me around 4 days to take a look and test this series. During my review, I
asked many things related to concurrency and other clarification about DRM.
Daniel always replied with a very nice and detailed explanation. If you want to
learn a little bit more about locks, I recommend you to take a look at <a name="cite-danielReworkCRC-back" href="#cite-danielReworkCRC">[4]</a>. Seriously, it is really nice!</p>
<p>I also worked for adding the writeback support in vkms; since XDC2018 I could
not stop to think about the idea of adding writeback connector in vkms due to
the benefits it could bring, such as new test and assist developers with visual
output. As a result, I started some clumsy attempts to implement it in January;
but I really dove in this issue in the middle of April, and in June I was
focused on making it work. It was tough for me to implement these features due
to the following reasons:</p>
<ol>
<li>There is not i-g-t test for writeback in the main repository, I had to use a
WIP patchset made by Brian and Liviu.</li>
<li>I was not familiar with framebuffer, connectors, and fancy manipulation.</li>
</ol>
<p>As a result of the above limitations, I had to invest many hours reading the
documentation and the DRM/IGT code. In the end, I think that add writeback
connectors paid well for me since I feel much more comfortable with many things
related to DRM these days. The writeback support was not landed yet, however,
at this moment the patch is under review (V3) and changed a lot since the first
version; for details about this series take a look at <a name="cite-wbV1-back" href="#cite-wbV1">[5]</a>. I’ll write a post about this feature after it gets merged.</p>
<p>After having the writeback connectors working in vkms, I felt so grateful for
Brian, Liviu, and Daniel for all the assistance they provided to me. In
particular, I was thrilled that Brian and Liviu made <code class="language-plaintext highlighter-rouge">kms_writeback</code> test which
worked as an implementation guideline for me. As a result, I updated their
patchsets for making it work in the latest version of IGT and made some tiny
fixes. My goal was helping them to upstream <code class="language-plaintext highlighter-rouge">kms_writeback</code>. I submitted the
series with the hope to see it landed in the IGT <a name="cite-igtWb-back" href="#cite-igtWb">[9]</a>.</p>
<p>Parallel to my work with ‘writeback’ I was trying to figure out how I could
expose vkms configurations to the userspace via configfs. After many efforts, I
submitted the first version of configfs support; in this patchset I exposed the
virtual and writeback connectors. Take a look at <a name="cite-configfs-back" href="#cite-configfs">[6]</a> for more information about this feature, and definitely, I’ll
write a post about this feature after it gets landed.</p>
<p>Finally, I’m still trying to upstream a patch that makes
<code class="language-plaintext highlighter-rouge">drm_wait_vblank_ioctl</code> return <code class="language-plaintext highlighter-rouge">EOPNOTSUPP</code> instead of <code class="language-plaintext highlighter-rouge">EINVAL</code> if the driver
does not support vblank get landed. Since this change is in the DRM core and
also change the userspace, it is not easy to make this patch get landed. For
the details about this patch, you can take a look here <a name="cite-novblank-back" href="#cite-novblank">[7]</a>. I also implemented some changes in the <code class="language-plaintext highlighter-rouge">kms_flip</code> to validate
the changes that I made in the function <code class="language-plaintext highlighter-rouge">drm_wait_vblank_ioctl</code> and it got
landed <a name="cite-novblankIGT-back" href="#cite-novblankIGT">[8]</a>.</p>
<h2 id="july-aims">July Aims</h2>
<p>In June, I was totally dedicated to vkms, now I want to slow my road a little
bit and study more about userspace. I want to take a step back and make some
tiny programs using libdrm with the goal of understanding the interaction among
userspace and kernel space. I also want to take a look at the theoretical part
related to computer graphics.</p>
<p>I want to put some effort to improve a tool named
<a href="https://github.com/rodrigosiqueira/kworkflow">kw</a> that help me during my work
with Linux Kernel. I also want to take a look at real overlay planes support in
vkms. I noted that I have to find a “contribution protocol” (review/write code)
that works for me in my current work conditions; otherwise, work will become
painful for my relatives and me. Finally, and most importantly, I want to take
some days off to enjoy my family.</p>
<p class="info"><strong>Info:</strong>
If you find any problem with this text, please let me know. I will be glad to
fix it.</p>
<h2 id="references">References</h2>
<p><a name="cite-crcproblemFirst">[1]</a> “First discussion in the Shayenne’s patch about the CRC problem”. URL: <a href="https://lkml.org/lkml/2019/3/10/197">https://lkml.org/lkml/2019/3/10/197</a>. <big><big><big><a href="#cite-crcproblemFirst-back">⤴</a></big></big></big></p>
<p><a name="cite-crcproblemSecond">[2]</a> “Patch fix for the CRC issue”. URL: <a href="https://patchwork.freedesktop.org/patch/308617/">https://patchwork.freedesktop.org/patch/308617/</a>. <big><big><big><a href="#cite-crcproblemSecond-back">⤴</a></big></big></big></p>
<p><a name="cite-danielFixCRC">[3]</a> “Daniel final fix for CRC”. URL: <a href="https://patchwork.freedesktop.org/patch/308881/?series=61703&rev=1">https://patchwork.freedesktop.org/patch/308881/?series=61703&rev=1</a>. <big><big><big><a href="#cite-danielFixCRC-back">⤴</a></big></big></big></p>
<p><a name="cite-danielReworkCRC">[4]</a> “Rework crc worker”. URL: <a href="https://patchwork.freedesktop.org/series/61737/">https://patchwork.freedesktop.org/series/61737/</a>. <big><big><big><a href="#cite-danielReworkCRC-back">⤴</a></big></big></big></p>
<p><a name="cite-wbV1">[5]</a> “Introduces writeback support”. URL: <a href="https://patchwork.freedesktop.org/series/61738/">https://patchwork.freedesktop.org/series/61738/</a>. <big><big><big><a href="#cite-wbV1-back">⤴</a></big></big></big></p>
<p><a name="cite-configfs">[6]</a> “Introduce basic support for configfs”. URL: <a href="https://patchwork.freedesktop.org/series/63010/">https://patchwork.freedesktop.org/series/63010/</a>. <big><big><big><a href="#cite-configfs-back">⤴</a></big></big></big></p>
<p><a name="cite-novblank">[7]</a> “Change EINVAL by EOPNOTSUPP when vblank is not supported”. URL: <a href="https://patchwork.freedesktop.org/patch/314399/?series=50697&rev=7">https://patchwork.freedesktop.org/patch/314399/?series=50697&rev=7</a>. <big><big><big><a href="#cite-novblank-back">⤴</a></big></big></big></p>
<p><a name="cite-novblankIGT">[8]</a> “Skip VBlank tests in modules without VBlank”. URL: <a href="https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/2d244aed69165753f3adbbd6468db073dc1acf9a">https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/2d244aed69165753f3adbbd6468db073dc1acf9a</a>. <big><big><big><a href="#cite-novblankIGT-back">⤴</a></big></big></big></p>
<p><a name="cite-igtWb">[9]</a> “Add support for testing writeback connectors”. URL: <a href="https://patchwork.freedesktop.org/series/39229/">https://patchwork.freedesktop.org/series/39229/</a>. <big><big><big><a href="#cite-igtWb-back">⤴</a></big></big></big></p>
Tue, 09 Jul 2019 00:00:00 +0000
https://siqueira.tech/2019-07-06-status-update-june-2019/
https://siqueira.tech/2019-07-06-status-update-june-2019/
-
An attempt to create a local Kernel community
<p>Since the day I had my first class of Operating Systems (OS) in my engineering
course, I got passionate about it; for me, OS represents one of the greatest
achievements of mankind. As a result of my delight for OS, I always tried to
gravitate around this field, but my school environment did not provide me with
many opportunities to get into the area. To summarize this long journey, I will
jump directly into the main point, on November 15 of 2017, I joined to a
conference named Linuxdev-br [1] which brought together some of the best
Brazilians Kernel developers. I took this opportunity to learn everything that
I could by asking lots of questions to developers. Additionally, I was lucky to
meet Gustavo Padovan. He helped me a lot during my first steps in the Linux
Kernel.</p>
<p>From November 2017 until now, I did the best I could to become a Kernel
developer, and I have to admit that the path was very complicated. I paid the
price to work from 8 AM to 11 PM, from Sunday to Sunday, to maintain my efforts
in my master and the Linux Kernel at the same time; unfortunately, I could not
stay focused only in the Kernel. However, all of these efforts were paid off
along the year; I had many patches accepted in the Kernel, I joined the Google
Summer of Code (GSoC), I traveled to conferences, I returned to Linuxdev-br
2018 as a speaker, I joined XDC2018 [2], and many other good things happened.</p>
<p>Now I am close to complete one year of Linux Kernel, and one question still
bugs me: why does it have to be so hard for someone in a similar condition to
become part of this world? I realized that I had great support from many people
(especially from my sweet and calm wife) and I also pushed myself very hard.
Now, I feel that it is time to start giving back something to society; as a
result, I began to promote some small events about free software in the
university and the city I live. However, my main project related to this
started around two months ago with six undergraduate students at the University
of Sao Paulo, IME [3]. My plan is simple: train all of these six students to
contribute to the Linux Kernel with the intention to help them to create a
local group of Kernel developers. I am excited about this project! I noticed
that within a few weeks of mentoring the students they already learned lots of
things, and in a few days, they will send out their contributions to the
Kernel. I want to write a new post about that in December 2018, reporting the
results of this new tiny project and the summary of this one year of Linux
Kernel. See you soon :)</p>
<h2 id="reference">Reference</h2>
<ol>
<li><a href="https://linuxdev-br.net/">linuxdev-br</a></li>
<li><a href="https://siqueira.tech/report/xdc-2018/">XDC 2018</a></li>
<li><a href="https://www.ime.usp.br/en">IME USP</a></li>
</ol>
Mon, 19 Nov 2018 00:00:00 +0000
https://siqueira.tech/2018-11-19-giving-back-something-to-society/
https://siqueira.tech/2018-11-19-giving-back-something-to-society/
-
XDC 2018 Report
<p>X.Org Developer’s Conference (XDC) is the summit meeting for people that work
with graphics in all the world to meet each other for three days. There you
will find people working with compositors, direct rendering management (DRM),
graphics applications, and so forth; all these people at the same place create
a unique learning opportunity. Finally, you can feel the community spirit in
every table, talk, and corner.</p>
<p>The XDC has many exciting talks, social events, and space for discussion with
developers. All of this enabled thanks to the organization team, which did a
great job by organizing the conference; they selected a great university that
had a perfect structure for hosting the event. They also included social
events that introduced some background about the history of the La Coruna; In
my case, I enjoyed to learn a bit of the local history. About the food, the
conference provided coffee breaks and lunch during all the days, all of them
great!</p>
<h1 id="about-the-community">About the community</h1>
<p>In my case, I put as much effort as possible to learn from people. In the first
day, I had a great conversation with Daniel Stone, Roman Gilg, Drew DeVault,
Guido Günther and other about compositors. In particular, Daniel Stone
explained a lot of details about Weston and Wayland; he also taught me how to
test Weston on top of VKMS, and how to see logs. Additionally, Daniel gave me
an excellent idea: add writeback to VKMS to provide visual output and other
features. In the same day, Daniel explained me many things about the community
organization and his work to maintain the Gitlab instance for the Freedesktop;
I really enjoyed every second of our conversation.</p>
<p>Additionally, I met a group of Sway developers during lunch. After a small
chat, for some reason they took their laptops and started to play with Sway; I
got really impressed with their work and enthusiasm. Then, I decided that I
wanted to learn how to contribute with Sway for two reasons: I want to learn
more about graphics in the user space (compositors), and I want to use a new
desktop environment. Afterwards, I started asking Drew to teach me how to
compile and use Sway. He was really kind, he showed me many things about
compositor then pointed me directions to better get into this world.</p>
<p>On the second day, I was obsessed about writeback, and I tried to talk with
Brian Starkey; he is the original author of the patch that added writeback to
DRM. We spoke for one hour, Bryan explained me so many details about writeback
and gave me some ideas on how I could implement it on VKMS. In the end, he also
sent me an email with diagrams that he made on-the-fly and some extra
explanation about the subject. I am happy that I had the opportunity to learn
so many things from him. In the same day, I also got a chance to talk to
Arkadiusz Hiler about some of the patches that I sent to IGT, and I also made
lots of questions about IGT. He explained with details, how I could read the
intel CI report and other related stuff. I hope that after his explanations I
can improve my patches and also send much more for IGT.</p>
<p>On the third day, Haneen and I worked together to learn as much as we could by
asking many things to Daniel Vetter. We used the opportunity to clarify many of
our questions, and also discuss some patches we sent. At the end of our
conversation, I applied to become co-mentor in the Outreachy; I hope that I can
help bringing new people to become part of this fantastic community.</p>
<p>This is just a brief summary of XDC, I took every single opportunity that I
had to talk to people and learned something new.</p>
<h1 id="i-finally-met-haneen-daniel-vetter-sean-paul-martin-peres-and-arkadiusz-hiler">I finally met Haneen, Daniel Vetter, Sean Paul, Martin Peres, and Arkadiusz Hiler</h1>
<p>One exciting thing about working remotely it is the fact that you talk with
many people without really know them in person. In particular, I worked with
Haneen for such a long time, but I have never seen her; however, in the XDC I
finally met her! It was really nice to talk to her, both of us were together
most of the time trying to understand as much as we could; as a result, we
always helped each other in the event to better understand the concepts that
someone would explained us.</p>
<p>I also met Daniel Vetter, and Sean Paul, both of them were our mentors during
summer. I really enjoyed to talk with them and put a face on the nickname.
Additionally, I met Martin Peres, thanks to him I created this website to keep
reporting my work and also thanks to him I could enjoy XDC.</p>
<p>Finally, I met Hiler from Intel. He provided many feedback on the patches I
sent IGT; he also helped a lot in the IRC channel. I really liked to meet him
in person.</p>
<h1 id="feedbacks">Feedbacks</h1>
<p>During the event, Haneen and I received so many feedback on how we could
improve the VKMS that we decided to do a workshop in the last day. The workshop
was great, a lot of people joined, and we took note of new ideas. From the
conversation, we emerged the following list of tasks:</p>
<ul>
<li><a href="https://dri.freedesktop.org/docs/drm/gpu/vkms.html#vkms">TODO LIST</a></li>
</ul>
<p>Now that I learned a lot and collected so many feedback, I will work on the
following steps:</p>
<ol>
<li>Implement writeback support</li>
<li>Implement configfs system</li>
<li>Mentor a newcomer in the outreachy</li>
</ol>
Fri, 05 Oct 2018 00:00:00 +0000
https://siqueira.tech/2018-10-05-xdc-2018/
https://siqueira.tech/2018-10-05-xdc-2018/
-
GSoC Final Report
<p>Nothing lasts forever, and this also applies for GSoC projects. In this report,
I tried to summarize my experience in the DRI community and my contributions.</p>
<h2 id="recap-the-project-idea">Recap the project idea</h2>
<p>First, it is important to remember the main subject of my GSoC Project:</p>
<blockquote>
<p>The Kernel Mode-Setting (KMS) is a mechanism that enables a process to
command the kernel to set a mode (screen resolution, color depth, and rate)
which is in a range of values supported by graphics cards and the display
screen. Creating a Virtual KMS (VKMS) has benefits. First, it could be used for
testing; second, it can be valuable for running X or Wayland on a headless
machine enabling the use of GPU. This module is similar to VGEM, and in some
ways to VIRTIO. At the moment that VKMS gets mature enough, it will be used to
run i-g-t test cases and to automate userspace testing.</p>
</blockquote>
<p>I heard about VKMS in the DRM TODO list and decided to apply for GSoC with this
project. A very talented developer from Saudi Arabia named Haneen Mohammed had
the same idea but applied to the Outreachy program. We worked together with the
desire to push as hard as we can the Virtual KMS.</p>
<h2 id="overcome-the-steep-learning-curve">Overcome the steep learning curve</h2>
<p>In my opinion, the main reason for the steep learning curve came from the lack
of background experience in how the graphics stack works. For example, when I
took operating system classes, I studied many things related to schedulers,
memory and disk management, and so forth; on the other hand, I had a 10000-foot
view of graphics systems. After long hours of studying and coding, I started to
understand better how things work. It is incredible all the progress and
advances that the DRI developers brought on the last few years! I wish that the
new versions of the Operating system books have a whole chapter for this
subject.</p>
<p>I still have problems to understand all the mechanisms available in the DRM;
however, now I feel confident on how to read the code/documentation and get
into the details of the DRM subsystem. I have plans to compile all the
knowledge acquired during the project in a series of blog posts.</p>
<h2 id="contributions">Contributions</h2>
<p>During my work in the GSoC, I send my patches to the DRI mailing list and
constantly got feedback to improve my work; as a result, I rework most of my
patches. The natural and reliable way to track the contribution is by using
“git log –author=”Rodrigo Siqueira” in one of the repositories below:</p>
<ul>
<li>For DRM patches: git://anongit.freedesktop.org/drm-misc</li>
<li>For patches already applied to Torvalds branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git</li>
<li>For IGT patches: git://anongit.freedesktop.org/drm/igt-gpu-tools</li>
</ul>
<p>In summary, follows the main patches that I got accepted:</p>
<ul>
<li>drm/vkms: Fix connector leak at the module removal</li>
<li>drm/vkms: Add framebuffer and plane helpers</li>
<li>drm/vkms: Add vblank events simulated by hrtimers</li>
<li>drm/vkms: Add connectors helpers</li>
<li>drm/vkms: Add dumb operations</li>
<li>drm/vkms: Add extra information about vkms</li>
<li>drm/vkms: Add basic CRTC initialization</li>
<li>drm/vkms: Add mode_config initialization</li>
</ul>
<p>We received two contributions from external people; I reviewed both patches:</p>
<ul>
<li>drm/vkms: Use new return type vm_fault_t</li>
<li>drm/vkms: Fix the error handling in vkms_init()</li>
</ul>
<p>I am using IGT to test VKMS, for this reason, I decided to send some
contributions to them. I sent a series of patches for fixing GCC warning:</p>
<ul>
<li>Fix comparison that always evaluates to false</li>
<li>Avoid truncate string in __igt_lsof_fds</li>
<li>Remove parameter aliases with another argument</li>
<li>Move declaration to the top of the code</li>
<li>Account for NULL character when using strncpy</li>
<li>Make string commands dynamic allocate (waiting for review)</li>
<li>Fix truncate string in the snprintf (waiting for review)</li>
</ul>
<p>I also sent a patchset with the goal of adding support for forcing a specific
module to be used by IGT tests:</p>
<ul>
<li>Add support to force specific module load</li>
<li>Increase the string size for a module name (waiting for review)</li>
<li>Add support for forcing specific module (waiting for review)</li>
</ul>
<p>As a miscellaneous contribution, I created a series of scripts to automate the
workflow of Linux Kernel development. This small project was based on a series
of scripts provided by my mentor, and I hope it can be useful for newcomers.
Follows the project link:</p>
<ol>
<li><a href="https://github.com/rodrigosiqueira/kworkflow">Kworkflow</a></li>
</ol>
<h2 id="work-in-progress">Work in Progress</h2>
<p>I am glad to say that I accomplished all the tasks initially proposed and I did
much more. Now I am working to make VKMS work without vblank. This still a work
in progress but I am confident that I can finish it soon. Finally, it is
important to highlight that my GSoC participation will finish at the end of
August because I traveled for two weeks to join the debconf2018.</p>
<h2 id="now-this-is-not-the-end-it-is-not-even-the-beginning-of-the-end-but-it-is-perhaps-the-end-of-the-beginning---winston-churchill"><strong>Now this is not the end. It is not even the beginning of the end. But it is, perhaps, the end of the beginning</strong> - Winston Churchill</h2>
<p>GSoC gave me one thing that I was pursuing for a long time: a subsystem in the
Linux Kernel that I can be focused for years. I am delighted that I found a
place to be focused, and I will keep working on VKMS until It is finished.</p>
<p>Finally, the Brazilian government opened a call for encouraging free software
development, and I decided to apply the VKMS project. Last week, I received the
great news that I was selected in the first phase and now I am waiting for the
final results. If everything ends well for me, I will receive funding to work
for 5 months in the VKMS and DRM subsystem.</p>
<h2 id="my-huge-thanks-to">My huge thanks to…</h2>
<p>I received support from many people in the dri-devel channel and mailing list.
I want to thanks everybody for all the support and patience.</p>
<p>I want to thanks Daniel Vetter for all the feedback and assistance in the VKMS
work. I also want to thanks Gustavo Padovan for all the support that he
provided to me (which include some calls with great explanations about the
DRM). Finally, I want to thanks Haneen for all the help and great work.</p>
<h2 id="reference">Reference</h2>
<ol>
<li><a href="https://lkml.org/lkml/2018/7/26/549">Use new return type vm_fault_t</a></li>
<li><a href="https://lkml.org/lkml/2018/8/2/951">Fix the error handling in vkms_init()</a></li>
<li><a href="https://www.spinics.net/lists/intel-gfx/msg170670.html">Add support to force specific module load</a></li>
</ol>
Mon, 13 Aug 2018 00:00:00 +0000
https://siqueira.tech/2018-08-13-gsoc-final-report/
https://siqueira.tech/2018-08-13-gsoc-final-report/
-
Talk about VKMS accepted in linuxdev-br
<figure>
<a href="#image?=1">
<img class="img-center" src="
https://siqueira.tech/images/posts/linuxdev-br.png
" alt="linuxdev-br" />
<div class="popup-image" id="image?=1">
<div class="popup-inner-frame">
<p>
<img class="fig-center" srcset="
https://siqueira.tech/images/posts/linuxdev-br.png
" />
</p>
<a href="#!" class="img-pop-up-button">x</a>
<a href="#!" class="img-pop-up-button-close-icon">x</a>
</div>
</div>
</a>
<figcaption class="fig-center">
<b>Figure 1.</b>
linuxdev-br
</figcaption>
</figure>
<p>Recently, I submitted a talk about VKMS in a conference named Linux Developer
Conference Brazil (linuxdev-br)[1] and got accepted [2]. I am delighted with
this opportunity, since I attended linuxdev-br 2017 as a complete newbie and
the conference provided me the required inputs to start working in the Kernel.
Also, I had the opportunity to talk with great kernel developers and learn a
little bit more with them. As a result, I have a lot of affection for this
conference; presenting at linuxdev-br 2018 means a lot to me.</p>
<p>In the talk, I will explain how I started with Linux Kernel and got accepted in
the GSoC 2018. Following that, I want to provide an overview of the DRM
subsystem and finish with the explanation of the VKMS. I want to detail some of
the features that I developed, and I will try to explain the features developed
by Haneen. As soon as I have the presentation done, I will post it here.</p>
<h2 id="reference">Reference</h2>
<ol>
<li><a href="https://linuxdev-br.net/">Linux Developer Conference Brazil</a></li>
<li><a href="https://linuxdev-br.net/2018/07/07/here-are-our-speakers/">Linuxdev-br speakers</a></li>
</ol>
Wed, 25 Jul 2018 00:00:00 +0000
https://siqueira.tech/2018-07-25-vkms-presentation-accepted-at-linuxdev-br-2018/
https://siqueira.tech/2018-07-25-vkms-presentation-accepted-at-linuxdev-br-2018/