All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] Add new formats support to vkms
@ 2021-10-26 11:34 Igor Torrente
  2021-10-26 11:34 ` [PATCH v2 1/8] drm: vkms: Replace the deprecated drm_mode_config_init Igor Torrente
                   ` (9 more replies)
  0 siblings, 10 replies; 28+ messages in thread
From: Igor Torrente @ 2021-10-26 11:34 UTC (permalink / raw)
  To: rodrigosiqueiramelo, melissa.srw, ppaalanen, tzimmermann
  Cc: Igor Torrente, hamohammed.sa, daniel, airlied, contact,
	leandro.ribeiro, dri-devel

Summary
=======
This series of patches refactor some vkms components in order to introduce
new formats to the planes and writeback connector.

Now in the blend function, the plane's pixels are converted to ARGB16161616
and then blended together.

The CRC is calculated based on the ARGB1616161616 buffer. And if required,
this buffer is copied/converted to the writeback buffer format.

And to handle the pixel conversion, new functions were added to convert
from a specific format to ARGB16161616 (the reciprocal is also true).

Tests
=====
This patch series was tested using the following igt tests:
-t ".*kms_plane.*"
-t ".*kms_writeback.*"
-t ".*kms_cursor_crc*"
-t ".*kms_flip.*"

New tests passing
-------------------
- pipe-A-cursor-size-change
- pipe-A-cursor-alpha-transparent

Performance
-----------
Following some optimization proposed by Pekka Paalanen, now the code
runs way faster than V1 and slightly faster than the current implementation.

|                          Frametime                          |
|:---------------:|:---------:|:--------------:|:------------:|
|  implmentation  |  Current  |  Per-pixel(V1) | Per-line(V2) |
| frametime range |  8~22 ms  |    32~56 ms    |    6~19 ms   |
|     Average     |  10.0 ms  |     35.8 ms    |    8.6 ms    |

Writeback test
--------------
During the development of this patch series, I discovered that the
writeback-check-output test wasn't filling the plane correctly.

So, currently, this patch series is failing in this test. But I sent a
patch to igt to fix it[1].

XRGB to ARGB behavior
=====================
During the development, I decided to always fill the alpha channel of
the output pixel whenever the conversion from a format without an alpha
channel to ARGB16161616 is necessary. Therefore, I ignore the value
received from the XRGB and overwrite the value with 0xFFFF.

---
Igor Torrente (8):
  drm: vkms: Replace the deprecated drm_mode_config_init
  drm: vkms: Alloc the compose frame using vzalloc
  drm: vkms: Replace hardcoded value of `vkms_composer.map` to
    DRM_FORMAT_MAX_PLANES
  drm: vkms: Add fb information to `vkms_writeback_job`
  drm: drm_atomic_helper: Add a new helper to deal with the writeback
    connector validation
  drm: vkms: Refactor the plane composer to accept new formats
  drm: vkms: Exposes ARGB_1616161616 and adds XRGB_16161616 formats
  drm: vkms: Add support to the RGB565 format

 drivers/gpu/drm/drm_atomic_helper.c   |  47 ++++
 drivers/gpu/drm/vkms/vkms_composer.c  | 329 +++++++++++++++-----------
 drivers/gpu/drm/vkms/vkms_drv.c       |   6 +-
 drivers/gpu/drm/vkms/vkms_drv.h       |  14 +-
 drivers/gpu/drm/vkms/vkms_formats.h   | 252 ++++++++++++++++++++
 drivers/gpu/drm/vkms/vkms_plane.c     |  17 +-
 drivers/gpu/drm/vkms/vkms_writeback.c |  33 ++-
 include/drm/drm_atomic_helper.h       |   3 +
 8 files changed, 545 insertions(+), 156 deletions(-)
 create mode 100644 drivers/gpu/drm/vkms/vkms_formats.h

-- 
2.30.2


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2021-11-12 12:50 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 11:34 [PATCH v2 0/8] Add new formats support to vkms Igor Torrente
2021-10-26 11:34 ` [PATCH v2 1/8] drm: vkms: Replace the deprecated drm_mode_config_init Igor Torrente
2021-10-26 11:34 ` [PATCH v2 2/8] drm: vkms: Alloc the compose frame using vzalloc Igor Torrente
2021-10-26 11:34 ` [PATCH v2 3/8] drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES Igor Torrente
2021-11-03 15:40   ` Thomas Zimmermann
2021-10-26 11:34 ` [PATCH v2 4/8] drm: vkms: Add fb information to `vkms_writeback_job` Igor Torrente
2021-11-03 15:45   ` Thomas Zimmermann
2021-11-03 19:18     ` Igor Torrente
2021-11-04  7:21       ` Thomas Zimmermann
2021-10-26 11:34 ` [PATCH v2 5/8] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation Igor Torrente
2021-10-28 21:38   ` Leandro Ribeiro
2021-11-03 15:03     ` Igor Torrente
2021-11-03 15:11       ` Leandro Ribeiro
2021-11-03 15:37         ` Thomas Zimmermann
2021-11-03 18:41           ` Igor Torrente
2021-10-26 11:34 ` [PATCH v2 6/8] drm: vkms: Refactor the plane composer to accept new formats Igor Torrente
2021-11-09 11:40   ` Pekka Paalanen
2021-11-10 16:56     ` Igor Torrente
2021-11-11  9:33       ` Pekka Paalanen
2021-11-11 14:07         ` Igor Torrente
2021-11-11 14:37           ` Pekka Paalanen
2021-11-12 12:50             ` Igor Torrente
2021-10-26 11:34 ` [PATCH v2 7/8] drm: vkms: Exposes ARGB_1616161616 and adds XRGB_16161616 formats Igor Torrente
2021-10-26 11:34 ` [PATCH v2 8/8] drm: vkms: Add support the RGB565 format Igor Torrente
2021-10-26 11:34 ` [PATCH v2 8/8] drm: vkms: Add support to " Igor Torrente
2021-11-09  9:32 ` [PATCH v2 0/8] Add new formats support to vkms Pekka Paalanen
2021-11-10 17:32   ` Igor Torrente
2021-11-11  8:32     ` Pekka Paalanen

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.