<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/gpu/drm/vkms, branch cpufreq-rust</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.kobert.dev/pm24.git/atom/drivers/gpu/drm/vkms?h=cpufreq-rust</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom/drivers/gpu/drm/vkms?h=cpufreq-rust'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2024-12-05T10:35:42Z</updated>
<entry>
<title>drm: remove driver date from struct drm_driver and all drivers</title>
<updated>2024-12-05T10:35:42Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2024-12-04T14:31:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=cb2e1c2136f71618142557ceca3a8802e87a44cd'/>
<id>urn:sha1:cb2e1c2136f71618142557ceca3a8802e87a44cd</id>
<content type='text'>
We stopped using the driver initialized date in commit 7fb8af6798e8
("drm: deprecate driver date") and (eventually) started returning "0"
for drm_version ioctl instead.

Finish the job, and remove the unused date member from struct
drm_driver, its initialization from drivers, along with the common
DRIVER_DATE macros.

v2: Also update drivers/accel (kernel test robot)

Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Acked-by: Simon Ser &lt;contact@emersion.fr&gt;
Acked-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Acked-by: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Acked-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt; # msm
Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1f2bf2543aed270a06f6c707fd6ed1b78bf16712.1733322525.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Remove useless drm_rotation_simplify</title>
<updated>2024-11-22T13:00:08Z</updated>
<author>
<name>Louis Chauvet</name>
<email>louis.chauvet@bootlin.com</email>
</author>
<published>2024-11-18T18:28:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=98efdd02e220fea84c1491012d7292749a71faeb'/>
<id>urn:sha1:98efdd02e220fea84c1491012d7292749a71faeb</id>
<content type='text'>
As all the rotation are now supported by VKMS, this simplification does
not make sense anymore, so remove it.

Acked-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-9-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Re-introduce line-per-line composition algorithm</title>
<updated>2024-11-22T13:00:08Z</updated>
<author>
<name>Louis Chauvet</name>
<email>louis.chauvet@bootlin.com</email>
</author>
<published>2024-11-18T18:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=1626f53717cd5396ad3ce062b5d5867925e87e76'/>
<id>urn:sha1:1626f53717cd5396ad3ce062b5d5867925e87e76</id>
<content type='text'>
Re-introduce a line-by-line composition algorithm for each pixel format.
This allows more performance by not requiring an indirection per pixel
read. This patch is focused on readability of the code.

Line-by-line composition was introduced by [1] but rewritten back to
pixel-by-pixel algorithm in [2]. At this time, nobody noticed the impact
on performance, and it was merged.

This patch is almost a revert of [2], but in addition efforts have been
made to increase readability and maintainability of the rotation handling.
The blend function is now divided in two parts:
- Transformation of coordinates from the output referential to the source
referential
- Line conversion and blending

Most of the complexity of the rotation management is avoided by using
drm_rect_* helpers. The remaining complexity is around the clipping, to
avoid reading/writing outside source/destination buffers.

The pixel conversion is now done line-by-line, so the read_pixel_t was
replaced with read_pixel_line_t callback. This way the indirection is only
required once per line and per plane, instead of once per pixel and per
plane.

The read_line_t callbacks are very similar for most pixel format, but it
is required to avoid performance impact. Some helpers for color
conversion were introduced to avoid code repetition:
- *_to_argb_u16: perform colors conversion. They should be inlined by the
  compiler, and they are used to avoid repetition between multiple variants
  of the same format (argb/xrgb and maybe in the future for formats like
  bgr formats).

This new algorithm was tested with:
- kms_plane (for color conversions)
- kms_rotation_crc (for rotations of planes)
- kms_cursor_crc (for translations of planes)
- kms_rotation (for all rotations and formats combinations) [3]
The performance gain was mesured with kms_fb_stress [4] with some
modification to fix the writeback format.

The performance improvement is around 5 to 10%.

[1]: commit 8ba1648567e2 ("drm: vkms: Refactor the plane composer to accept
     new formats")
     https://lore.kernel.org/all/20220905190811.25024-7-igormtorrente@gmail.com/
[2]: commit 322d716a3e8a ("drm/vkms: isolate pixel conversion
     functionality")
     https://lore.kernel.org/all/20230418130525.128733-2-mcanal@igalia.com/
[3]: https://lore.kernel.org/igt-dev/20240313-new_rotation-v2-0-6230fd5cae59@bootlin.com/
[4]: https://lore.kernel.org/all/20240422-kms_fb_stress-dev-v5-0-0c577163dc88@riseup.net/

Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Acked-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-8-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Introduce pixel_read_direction enum</title>
<updated>2024-11-22T13:00:08Z</updated>
<author>
<name>Louis Chauvet</name>
<email>louis.chauvet@bootlin.com</email>
</author>
<published>2024-11-18T18:28:22Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b52fd27356af947f80b0c0855691e42a4c02ee79'/>
<id>urn:sha1:b52fd27356af947f80b0c0855691e42a4c02ee79</id>
<content type='text'>
The pixel_read_direction enum is useful to describe the reading direction
in a plane. It avoids using the rotation property of DRM, which not
practical to know the direction of reading.
This patch also introduce two helpers, one to compute the
pixel_read_direction from the DRM rotation property, and one to compute
the step, in byte, between two successive pixel in a specific direction.

Acked-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-7-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend</title>
<updated>2024-11-22T13:00:07Z</updated>
<author>
<name>Louis Chauvet</name>
<email>louis.chauvet@bootlin.com</email>
</author>
<published>2024-11-18T18:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=cb6de83faa9049bf40e7dc6821d903016bec2337'/>
<id>urn:sha1:cb6de83faa9049bf40e7dc6821d903016bec2337</id>
<content type='text'>
The pre_mul_alpha_blend is dedicated to blending, so to avoid mixing
different concepts (coordinate calculation and color management), extract
the x_limit and x_dst computation outside of this helper.
It also increases the maintainability by grouping the computation related
to coordinates in the same place: the loop in `blend`.

Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-6-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Update pixels accessor to support packed and multi-plane formats.</title>
<updated>2024-11-22T13:00:07Z</updated>
<author>
<name>Louis Chauvet</name>
<email>louis.chauvet@bootlin.com</email>
</author>
<published>2024-11-18T18:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d6dc39e495678d54a8125e1ae08b3ca35c306426'/>
<id>urn:sha1:d6dc39e495678d54a8125e1ae08b3ca35c306426</id>
<content type='text'>
Introduce the usage of block_h/block_w to compute the offset and the
pointer of a pixel. The previous implementation was specialized for
planes with block_h == block_w == 1. To avoid confusion and allow easier
implementation of tiled formats. It also remove the usage of the
deprecated format field `cpp`.

Introduce the plane_index parameter to get an offset/pointer on a
different plane.

Acked-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-5-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Use const for input pointers in pixel_read an pixel_write functions</title>
<updated>2024-11-22T13:00:06Z</updated>
<author>
<name>Louis Chauvet</name>
<email>louis.chauvet@bootlin.com</email>
</author>
<published>2024-11-18T18:28:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=51091b4ab257887d9ab79d93078b7989abeeda6f'/>
<id>urn:sha1:51091b4ab257887d9ab79d93078b7989abeeda6f</id>
<content type='text'>
As the pixel_read and pixel_write function should never modify the input
buffer, mark those pointers const.

Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Reviewed-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-4-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions</title>
<updated>2024-11-22T13:00:06Z</updated>
<author>
<name>Louis Chauvet</name>
<email>louis.chauvet@bootlin.com</email>
</author>
<published>2024-11-18T18:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b21b580e57924ce1e58cb15f96566f3a52af216d'/>
<id>urn:sha1:b21b580e57924ce1e58cb15f96566f3a52af216d</id>
<content type='text'>
Introduce two typedefs: pixel_read_t and pixel_write_t. It allows the
compiler to check if the passed functions take the correct arguments.
Such typedefs will help ensuring consistency across the code base in
case of update of these prototypes.

Rename input/output variable in a consistent way between read_line and
write_line.

A warn has been added in get_pixel_*_function to alert when an unsupported
pixel format is requested. As those formats are checked before
atomic_update callbacks, it should never happen.

Document for those typedefs.

Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-3-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Use drm_frame directly</title>
<updated>2024-11-22T13:00:05Z</updated>
<author>
<name>Arthur Grillo</name>
<email>arthurgrillo@riseup.net</email>
</author>
<published>2024-11-18T18:28:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2f9741ac3b94c5f4418cd727d232ae0590b8ef1a'/>
<id>urn:sha1:2f9741ac3b94c5f4418cd727d232ae0590b8ef1a</id>
<content type='text'>
Remove intermidiary variables and access the variables directly from
drm_frame. These changes should be noop.

Signed-off-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Acked-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Reviewed-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Reviewed-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
[Louis Chauvet: Applied review from Maíra]
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-2-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
<entry>
<title>drm/vkms: Code formatting</title>
<updated>2024-11-22T13:00:05Z</updated>
<author>
<name>Louis Chauvet</name>
<email>louis.chauvet@bootlin.com</email>
</author>
<published>2024-11-18T18:28:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=22f16c50beb6b7c4e2744eb7ea998dae0d2cdbdc'/>
<id>urn:sha1:22f16c50beb6b7c4e2744eb7ea998dae0d2cdbdc</id>
<content type='text'>
Few no-op changes to remove double spaces and fix wrong alignments.

Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Reviewed-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Acked-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-1-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet &lt;louis.chauvet@bootlin.com&gt;
</content>
</entry>
</feed>
