<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/vkms, branch v6.6.12</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.12</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.12'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-09-14T10:48:19+00:00</updated>
<entry>
<title>Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"</title>
<updated>2023-09-14T10:48:19+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-09-14T10:19:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7908632f2927b65f7486ae6b67c24071666ba43f'/>
<id>urn:sha1:7908632f2927b65f7486ae6b67c24071666ba43f</id>
<content type='text'>
This reverts commit a0e6a017ab56936c0405fe914a793b241ed25ee0.

Unlocking a mutex in the context of a hrtimer callback is violating mutex
locking rules, as mutex_unlock() from interrupt context is not permitted.

Link: https://lore.kernel.org/dri-devel/ZQLAc%2FFwkv%2FGiVoK@phenom.ffwll.local/T/#t
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230914102024.1789154-1-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/vkms: Fix race-condition between the hrtimer and the atomic commit</title>
<updated>2023-07-27T23:32:50+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-05-23T12:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0e6a017ab56936c0405fe914a793b241ed25ee0'/>
<id>urn:sha1:a0e6a017ab56936c0405fe914a793b241ed25ee0</id>
<content type='text'>
Currently, it is possible for the composer to be set as enabled and then
as disabled without a proper call for the vkms_vblank_simulate(). This
is problematic, because the driver would skip one CRC output, causing CRC
tests to fail. Therefore, we need to make sure that, for each time the
composer is set as enabled, a composer job is added to the queue.

In order to provide this guarantee, add a mutex that will lock before
the composer is set as enabled and will unlock only after the composer
job is added to the queue. This way, we can have a guarantee that the
driver won't skip a CRC entry.

This race-condition is affecting the IGT test "writeback-check-output",
making the test fail and also, leaking writeback framebuffers, as the
writeback job is queued, but it is not signaled. This patch avoids both
problems.

[v2]:
    * Create a new mutex and keep the spinlock across the atomic commit in
      order to avoid interrupts that could result in deadlocks.

Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230523123207.173976-1-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/vkms: Add support to 1D gamma LUT</title>
<updated>2023-07-27T23:17:14+00:00</updated>
<author>
<name>Arthur Grillo</name>
<email>arthurgrillo@riseup.net</email>
</author>
<published>2023-07-09T01:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=db1f254f2cfaf0510ae34fa2311a8d749e95179a'/>
<id>urn:sha1:db1f254f2cfaf0510ae34fa2311a8d749e95179a</id>
<content type='text'>
Support a 1D gamma LUT with interpolation for each color channel on the
VKMS driver. Add a check for the LUT length by creating
vkms_atomic_check().

Enable VKMS to run the test igt@kms_plane@pixel-format.

Tested with:
igt@kms_color@gamma
igt@kms_color@legacy-gamma
igt@kms_color@invalid-gamma-lut-sizes

v2:
    - Add interpolation between the values of the LUT (Simon Ser)

v3:
    - s/ratio/delta (Pekka)
    - s/color_channel/channel_value (Pekka)
    - s/lut_area/lut_channel
    - Store the `drm_color_lut`, `lut_length`, and
      `channel_value2index_ratio` inside a struct called `vkms_lut`
      (Pekka)
    - Pre-compute some constants values used through the LUT procedure
      (Pekka)
    - Change the switch statement to a cast to __u16* (Pekka)
    - Make the apply_lut_to_channel_value return the computation result
      (Pekka)

v4:
    - Add a comment explaining that `enum lut_area` depends on the
      layout of `struct drm_color_lut` (Pekka)
    - Remove unused variable (kernel test robot)

v5:
    - Mention that this will make it possible to run the test
      igt@kms_plane@pixel-format (Maíra)
    - s/had/has (Maíra)

Signed-off-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Acked-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Reviewed-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230709013835.161004-1-arthurgrillo@riseup.net
</content>
</entry>
<entry>
<title>drm/vkms: Isolate writeback pixel conversion functions</title>
<updated>2023-06-24T22:06:16+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-05-09T20:28:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc4fd2934d41a69b4339d7145040d99e7ea79b02'/>
<id>urn:sha1:cc4fd2934d41a69b4339d7145040d99e7ea79b02</id>
<content type='text'>
All convertions from the ARGB16161616 format follow the same structure.
Instead of repeting the same structure for each supported format, create
a function to encapsulate the common logic and isolate the pixel
conversion functions in a callback function.

Suggested-by: Melissa Wen &lt;mwen@igalia.com&gt;
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230515135204.115393-4-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/vkms: Enable ARGB8888 support for writeback</title>
<updated>2023-06-24T22:06:13+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-05-15T13:52:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e2a47217b9ca755ebb56ee696ef022cf340c7bf7'/>
<id>urn:sha1:e2a47217b9ca755ebb56ee696ef022cf340c7bf7</id>
<content type='text'>
The VKMS already has a function to convert ARGB16161616 to ARGB8888, so
it is possible to use this function to provide the writeback support for
the ARGB8888 format. Therefore, add the ARGB8888 format to the writeback
format list.

Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230515135204.115393-3-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/vkms: Reduce critical section</title>
<updated>2023-06-24T22:06:10+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-05-15T13:52:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c494ca6fd820ca6f4329bfbdcd048466dc752e2'/>
<id>urn:sha1:6c494ca6fd820ca6f4329bfbdcd048466dc752e2</id>
<content type='text'>
The spinlock composer_lock protects the variables crc_pending,
wb_pending, frame_start and frame_end, which are variables that are used
by the composer worker. There is no need to protect the wb_frame_info
information with a spinlock. Therefore, reduce the critical section of
the lock by removing the assignments to the wb_frame_info from the
critical section.

Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230515135204.115393-2-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/vkms: Fix all kernel-doc warnings of the vkms_composer file</title>
<updated>2023-06-19T23:40:10+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-05-08T22:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc4298072a990418af23352d42b04fbd13036008'/>
<id>urn:sha1:fc4298072a990418af23352d42b04fbd13036008</id>
<content type='text'>
Fix the following warnings:

drivers/gpu/drm/vkms/vkms_composer.c:42: warning: Function parameter or member 'frame_info' not described in 'pre_mul_alpha_blend'
drivers/gpu/drm/vkms/vkms_composer.c:42: warning: Excess function parameter 'src_frame_info' description in 'pre_mul_alpha_blend'
drivers/gpu/drm/vkms/vkms_composer.c:93: warning: Cannot understand  * @wb_frame_info: The writeback frame buffer metadata
 on line 93 - I thought it was a doc line

by correcting variable names and adding function name.

Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230508220030.434118-2-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/vkms: Add kernel-doc to the function vkms_compose_row()</title>
<updated>2023-06-19T23:40:09+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-05-08T22:00:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d755cd3cffe52a4b64c926f4e680d2e2a6edcd94'/>
<id>urn:sha1:d755cd3cffe52a4b64c926f4e680d2e2a6edcd94</id>
<content type='text'>
The function vkms_compose_row() was introduced in the code without any
documentation. In order to make the function more clear, add a
kernel-doc to it.

Suggested-by: Melissa Wen &lt;mwen@igalia.com&gt;
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230508220030.434118-1-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/vkms: Fix RGB565 pixel conversion</title>
<updated>2023-05-15T13:58:11+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-05-12T10:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab87f558dcfb2562c3497e89600dec798a446665'/>
<id>urn:sha1:ab87f558dcfb2562c3497e89600dec798a446665</id>
<content type='text'>
Currently, the pixel conversion isn't rounding the fixed-point values
before assigning it to the RGB coefficients, which is causing the IGT
pixel-format tests to fail. So, use the drm_fixp2int_round() fixed-point
helper to round the values when assigning it to the RGB coefficients.

Tested with igt@kms_plane@pixel-format and igt@kms_plane@pixel-format-source-clamping.

[v2]:
    * Use drm_fixp2int_round() to fix the pixel conversion instead of
      casting the values to s32 (Melissa Wen).

Fixes: 89b03aeaef16 ("drm/vkms: fix 32bit compilation error by replacing macros")
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230512104044.65034-2-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/vkms: add rotate-270 property</title>
<updated>2023-05-08T12:57:20+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2023-04-18T13:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd0755508d81736d026bc25647a89dfc79162d95'/>
<id>urn:sha1:cd0755508d81736d026bc25647a89dfc79162d95</id>
<content type='text'>
Currently, vkms supports the rotate-90, rotate-180, reflect-x and
reflect-y properties. Therefore, improve the vkms IGT test coverage by
adding the rotate-270 property to vkms. The rotation was implement by
software: rotate the way the blending occurs by making the source x axis
be the destination y axis and the source y axis be the destination x
axis and reverse-read the axis.

Now, vkms supports all possible rotation values.

Tested with igt@kms_rotation_crc@primary-rotation-270 [1],
and igt@kms_rotation_crc@sprite-rotation-270 [1].

[1] https://patchwork.freedesktop.org/series/116025/

Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230418130525.128733-6-mcanal@igalia.com
</content>
</entry>
</feed>
