From: Louis Chauvet <louis.chauvet@bootlin.com>
To: "Rodrigo Siqueira" <rodrigosiqueiramelo@gmail.com>,
"Melissa Wen" <melissa.srw@gmail.com>,
"Maíra Canal" <mairacanal@riseup.net>,
"Haneen Mohammed" <hamohammed.sa@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
arthurgrillo@riseup.net, "Jonathan Corbet" <corbet@lwn.net>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com,
thomas.petazzoni@bootlin.com,
Louis Chauvet <louis.chauvet@bootlin.com>
Subject: [PATCH v2 0/9] drm/vkms: Reimplement line-per-line pixel conversion for plane reading
Date: Fri, 23 Feb 2024 12:37:20 +0100 [thread overview]
Message-ID: <20240223-yuv-v2-0-aa6be2827bb7@bootlin.com> (raw)
This patchset is the second version of [1]. It is almost a complete
rewrite to use a line-by-line algorithm for the composition.
It can be divided in three parts:
- PATCH 1 to 4: no functional change is intended, only some formatting and
documenting
(PATCH 2 is taken from [2])
- PATCH 5: main patch for this series, it reintroduce the
line-by-line algorithm
- PATCH 6 to 9: taken from Arthur's series [2], with sometimes adaptation
to use the pixel-by-pixel algorithm.
The PATCH 5 aims to restore the line-by-line pixel reading algorithm. It
was introduced in 8ba1648567e2 ("drm: vkms: Refactor the plane composer to
accept new formats") but removed in 8ba1648567e2 ("drm: vkms: Refactor the
plane composer to accept new formats") in a over-simplification effort.
At this time, nobody noticed the performance impact of this commit. After
the first iteration of my series, poeple notice performance impact, and it
was the case. Pekka suggested to reimplement the line-by-line algorithm.
Expiriments on my side shown great improvement for the line-by-line
algorithm, and the performances are the same as the original line-by-line
algorithm. I targeted my effort to make the code working for all the
rotations and translations. The usage of helpers from drm_rect_* avoid
reimplementing existing logic.
The only "complex" part remaining is the clipping of the coordinate to
avoid reading/writing outside of src/dst. Thus I added a lot of comments
to help when someone will want to add some features (framebuffer resizing
for example).
The YUV part is not mandatory for this series, but as my first effort was
to help the integration of YUV, I decided to rebase Arthur's series on
mine to help. I took [3], [4], [5] and [6] and adapted them to use the
line-by-line reading. If I did something wrong here, please let me
know.
My series was mainly tested with:
- kms_plane (for color conversions)
- kms_rotation_crc (for rotations of planes)
- kms_cursor_crc (for translations)
The benchmark used to measure the improvment was done with:
- kms_fb_stress
[1]: https://lore.kernel.org/r/20240201-yuv-v1-0-3ca376f27632@bootlin.com
[2]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-0-952fcaa5a193@riseup.net/
[3]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-3-952fcaa5a193@riseup.net/
[4]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-5-952fcaa5a193@riseup.net/
[5]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-6-952fcaa5a193@riseup.net/
[6]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-7-952fcaa5a193@riseup.net/
To: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
To: Melissa Wen <melissa.srw@gmail.com>
To: Maíra Canal <mairacanal@riseup.net>
To: Haneen Mohammed <hamohammed.sa@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: arthurgrillo@riseup.net
To: Jonathan Corbet <corbet@lwn.net>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: jeremie.dautheribes@bootlin.com
Cc: miquel.raynal@bootlin.com
Cc: thomas.petazzoni@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Note: after my changes, those tests seems to pass, so [7] may need
updating (I did not check, it was maybe already the case):
- kms_cursor_legacy@flip-vs-cursor-atomic
- kms_pipe_crc_basic@nonblocking-crc
- kms_pipe_crc_basic@nonblocking-crc-frame-sequence
- kms_writeback@writeback-pixel-formats
- kms_writeback@writeback-invalid-parameters
- kms_flip@flip-vs-absolute-wf_vblank-interruptible
And those tests pass, I did not investigate why the runners fails:
- kms_flip@flip-vs-expired-vblank-interruptible
- kms_flip@flip-vs-expired-vblank
- kms_flip@plain-flip-fb-recreate
- kms_flip@plain-flip-fb-recreate-interruptible
- kms_flip@plain-flip-ts-check-interruptible
- kms_cursor_legacy@cursorA-vs-flipA-toggle
- kms_pipe_crc_basic@nonblocking-crc
- kms_prop_blob@invalid-get-prop
- kms_flip@flip-vs-absolute-wf_vblank-interruptible
- kms_invalid_mode@zero-hdisplay
- kms_invalid_mode@bad-vtotal
- kms_cursor_crc.* (everything is SUCCEED or SKIP, but no fails)
[7]: https://lore.kernel.org/all/20240201065346.801038-1-vignesh.raman@collabora.com/
Changes in v2:
- Rebased the series on top of drm-misc/drm-misc-net
- Extract the typedef for pixel_read/pixel_write
- Introduce the line-by-line algorithm per pixel format
- Add some documentation for existing and new code
- Port the series [1] to use line-by-line algorithm
- Link to v1: https://lore.kernel.org/r/20240201-yuv-v1-0-3ca376f27632@bootlin.com
---
Arthur Grillo (5):
drm/vkms: Use drm_frame directly
drm/vkms: Add YUV support
drm/vkms: Add range and encoding properties to pixel_read function
drm/vkms: Drop YUV formats TODO
drm/vkms: Create KUnit tests for YUV conversions
Louis Chauvet (4):
drm/vkms: Code formatting
drm/vkms: write/update the documentation for pixel conversion and pixel write functions
drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions
drm/vkms: Re-introduce line-per-line composition algorithm
Documentation/gpu/vkms.rst | 3 +-
drivers/gpu/drm/vkms/Makefile | 1 +
drivers/gpu/drm/vkms/tests/.kunitconfig | 4 +
drivers/gpu/drm/vkms/tests/Makefile | 3 +
drivers/gpu/drm/vkms/tests/vkms_format_test.c | 155 +++++++
drivers/gpu/drm/vkms/vkms_composer.c | 233 ++++++++---
drivers/gpu/drm/vkms/vkms_crtc.c | 6 +-
drivers/gpu/drm/vkms/vkms_drv.c | 3 +-
drivers/gpu/drm/vkms/vkms_drv.h | 56 ++-
drivers/gpu/drm/vkms/vkms_formats.c | 565 +++++++++++++++++++++-----
drivers/gpu/drm/vkms/vkms_formats.h | 13 +-
drivers/gpu/drm/vkms/vkms_plane.c | 50 ++-
drivers/gpu/drm/vkms/vkms_writeback.c | 14 +-
13 files changed, 916 insertions(+), 190 deletions(-)
---
base-commit: aa1267e673fe5307cf00d02add4017d2878598b6
change-id: 20240201-yuv-1337d90d9576
Best regards,
--
Louis Chauvet <louis.chauvet@bootlin.com>
next reply other threads:[~2024-02-23 11:37 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 11:37 Louis Chauvet [this message]
2024-02-23 11:37 ` [PATCH v2 1/9] drm/vkms: Code formatting Louis Chauvet
2024-02-23 11:37 ` [PATCH v2 2/9] drm/vkms: Use drm_frame directly Louis Chauvet
2024-02-23 11:37 ` [PATCH v2 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions Louis Chauvet
2024-02-26 11:37 ` Pekka Paalanen
2024-02-27 15:02 ` Louis Chauvet
2024-02-29 8:48 ` Pekka Paalanen
2024-03-04 15:28 ` Louis Chauvet
2024-03-05 9:50 ` Pekka Paalanen
2024-03-06 17:29 ` Louis Chauvet
2024-03-07 8:42 ` Pekka Paalanen
2024-02-23 11:37 ` [PATCH v2 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions Louis Chauvet
2024-02-26 11:36 ` Pekka Paalanen
2024-02-27 15:02 ` Louis Chauvet
2024-02-29 9:07 ` Pekka Paalanen
2024-03-04 15:28 ` Louis Chauvet
2024-03-05 9:50 ` Pekka Paalanen
2024-02-23 11:37 ` [PATCH v2 5/9] drm/vkms: Re-introduce line-per-line composition algorithm Louis Chauvet
2024-02-23 11:49 ` Maíra Canal
2024-02-26 11:37 ` Pekka Paalanen
2024-02-27 15:02 ` Louis Chauvet
2024-02-29 10:21 ` Pekka Paalanen
2024-03-04 15:28 ` Louis Chauvet
2024-03-05 10:10 ` Pekka Paalanen
2024-03-06 17:29 ` Louis Chauvet
2024-02-23 11:37 ` [PATCH v2 6/9] drm/vkms: Add YUV support Louis Chauvet
2024-02-23 11:46 ` Thomas Zimmermann
2024-02-26 12:19 ` Pekka Paalanen
2024-02-27 15:02 ` Louis Chauvet
2024-02-27 20:01 ` Arthur Grillo
2024-02-29 1:52 ` Arthur Grillo
2024-02-29 12:12 ` Pekka Paalanen
2024-02-29 17:57 ` Arthur Grillo
2024-03-01 11:53 ` Pekka Paalanen
2024-03-02 14:14 ` Arthur Grillo
2024-03-04 15:28 ` Louis Chauvet
2024-03-04 15:39 ` Arthur Grillo
2024-03-04 15:48 ` Louis Chauvet
2024-03-04 16:51 ` Arthur Grillo
2024-03-06 20:09 ` Arthur Grillo
2024-03-07 0:03 ` Louis Chauvet
2024-02-23 11:37 ` [PATCH v2 7/9] drm/vkms: Add range and encoding properties to pixel_read function Louis Chauvet
2024-02-26 12:23 ` Pekka Paalanen
2024-02-27 15:02 ` Louis Chauvet
2024-02-29 12:24 ` Pekka Paalanen
2024-03-04 15:29 ` Louis Chauvet
2024-02-23 11:37 ` [PATCH v2 8/9] drm/vkms: Drop YUV formats TODO Louis Chauvet
2024-02-23 11:37 ` [PATCH v2 9/9] drm/vkms: Create KUnit tests for YUV conversions Louis Chauvet
2024-02-26 16:39 ` Arthur Grillo
2024-02-27 15:02 ` Louis Chauvet
2024-02-23 11:52 ` [PATCH v2 0/9] drm/vkms: Reimplement line-per-line pixel conversion for plane reading Maira 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=20240223-yuv-v2-0-aa6be2827bb7@bootlin.com \
--to=louis.chauvet@bootlin.com \
--cc=airlied@gmail.com \
--cc=arthurgrillo@riseup.net \
--cc=corbet@lwn.net \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=jeremie.dautheribes@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mairacanal@riseup.net \
--cc=melissa.srw@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=mripard@kernel.org \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=tzimmermann@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).