From: Louis Chauvet <louis.chauvet@bootlin.com>
To: Ananta Srikar Puranam <srikarananta01@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: Interest in Contributing to VKMS Development
Date: Sun, 1 Dec 2024 06:36:53 +0100 [thread overview]
Message-ID: <Z0v19YeZa2IAooUV@fedora> (raw)
In-Reply-To: <09cf19a7-b153-4da4-8704-f702f41909d3@gmail.com>
+Cc: dri-devel@lists.freedesktop.org
On 30/11/24 - 13:49, Ananta Srikar Puranam wrote:
> Dear Louis Chauvet,
Hi Srikar!
> I was able to successfully compile Linux with VKMS enabled and have set up
> igt-gpu-tests in a QEMU machine. I can now run some tests successfully.
Congratulation!
> I have a surface-level understanding of the DRM and KMS subsystems
> (framebuffers, planes, CRTCs, encoders, and connectors) and am eager to dive
> deeper into the VKMS module and contribute.
I am very happy to see some interest in VKMS development, do you have a
specific feature that you want to test?
> I understand VKMS helps test the DRM subsystem, but I’m struggling to fully
> grasp how the absence of visible display output aligns with its testing
> goals. Any guidance on this would be highly appreciated.
That the whole point of "V"KMS, everything is virtual, even the display
output :)
There are two way to get some information about the output content:
- CRC compuation [1]
- Writeback connector [2]
The CRC will allows you to write a test like this:
create_reference_image();
ref_crc = grab_crc();
test_procedure();
test_crc = grab_crc();
assert(ref_crc, test_crc);
This is used in the igt test "kms_plane" to test color conversion, they
compute a reference CRC and then test the conversion between multiple
formats [3].
The writeback connector is useful to grab a "screenshot" of the output,
but it is a bit less efficient. It can be used when a simple "reference
CRC" is not possible.
To grab a picture from the writeback connector, you have to do something
like this:
setup_pipeline();
wb_fb = create_fb();
while (true) {
send_fb_to_wb_connector(wb_fb);
wait_for_picture();
do_something_with_result(wb_fb);
}
There is a writeback example in igt [4], but I don't know how it works.
[1]:https://elixir.bootlin.com/linux/v6.12.1/source/drivers/gpu/drm/vkms/vkms_composer.c#L209
[2]:https://elixir.bootlin.com/linux/v6.12.1/source/drivers/gpu/drm/vkms/vkms_writeback.c#L171
[3]:https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/kms_plane.c#L1036
[4]:https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/kms_writeback.c
> Additionally, I noticed the TODO item to add the plane feature (background
> color KMS property). It seems like a good starting point, and I would be
> grateful for direction on how to approach it.
I think this is the good direction, yes!
All your patches must be on top of drm-misc-next [5]. If you are not
familiar with kernel contribution, I invite you to look at the kernel
documentation [6] and at the amazing b4 tool [7].
For the implementation itself, I think you have to work in the function
blend, probably around the fill_background function [8]. You also need to
attach a BACKGROUND property on the CRTC [9]. I think you have to do it
somewhere in crtc initialization [10].
[5]:https://gitlab.freedesktop.org/drm/misc/kernel/-/tree/drm-misc-next
[6]:https://docs.kernel.org/process/contribution-maturity-model.html
[7]:https://b4.docs.kernel.org/
[8]:https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next/drivers/gpu/drm/vkms/vkms_composer.c#L389
[9]:https://drmdb.emersion.fr/properties/3435973836/BACKGROUND
[10]:https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next/drivers/gpu/drm/vkms/vkms_crtc.c?ref_type=heads#L273
> Thank you for your time, and I look forward to your guidance.
>
> Best regards,
> Srikar
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next parent reply other threads:[~2024-12-01 5:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <09cf19a7-b153-4da4-8704-f702f41909d3@gmail.com>
2024-12-01 5:36 ` Louis Chauvet [this message]
2024-12-01 10:50 ` Interest in Contributing to VKMS Development Maíra Canal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z0v19YeZa2IAooUV@fedora \
--to=louis.chauvet@bootlin.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=srikarananta01@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.