[PATCH v10 09/16] drm/vkms: Re-introduce line-per-line composition algorithm

2024-08-09 Thread Louis Chauvet
/lore.kernel.org/all/20240422-kms_fb_stress-dev-v5-0-0c577163d...@riseup.net/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 234 --- drivers/gpu/drm/vkms/vkms_drv.h | 28 +++-- drivers/gpu/drm/vkms/v

[PATCH v10 08/16] drm/vkms: Introduce pixel_read_direction enum

2024-08-09 Thread Louis Chauvet
, and one to compute the step, in byte, between two successive pixel in a specific direction. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 44 drivers/gpu/drm/vkms/vkms_drv.h | 11 + drivers/gpu/drm/vkms/vkms_formats.c

[PATCH v10 13/16] drm/vkms: Drop YUV formats TODO

2024-08-09 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/gpu/vkms.rst b

[PATCH v10 14/16] drm/vkms: Create KUnit tests for YUV conversions

2024-08-09 Thread Louis Chauvet
From: Arthur Grillo Create KUnit tests to test the conversion between YUV and RGB. Test each conversion and range combination with some common colors. The code used to compute the expected result can be found in comment. [Louis Chauvet: - fix minor formating issues (whitespace, double line

[PATCH v10 12/16] drm/vkms: Add range and encoding properties to the plane

2024-08-09 Thread Louis Chauvet
From: Arthur Grillo Now that the driver internally handles these quantization ranges and YUV encoding matrices, expose the UAPI for setting them. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts, updated the commit message] Acked-by: Pekka Paalanen Signed-off-by

[PATCH v10 11/16] drm/vkms: Add YUV support

2024-08-09 Thread Louis Chauvet
category of formats is the order of field, a simple swap in conversion matrix columns allows using the same function. Signed-off-by: Arthur Grillo [Louis Chauvet: - Adapted Arthur's work - Implemented the read_line_t callbacks for yuv - add struct conversion_matrix - store the

[PATCH v10 15/16] drm/vkms: Add how to run the Kunit tests

2024-08-09 Thread Louis Chauvet
From: Arthur Grillo Now that we have KUnit tests, add instructions on how to run them. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu

[PATCH v10 16/16] drm/vkms: Add support for DRM_FORMAT_R*

2024-08-09 Thread Louis Chauvet
-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 110 +++- drivers/gpu/drm/vkms/vkms_plane.c | 4 ++ 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index

[RFC] Adds support for ConfigFS to VKMS!

2024-08-09 Thread Louis Chauvet
and added a few comments on your > GitHub fork. I am not able to find any comments, can you send me the link to the page with them? I would like to read/apply them before submitting the first part of the series. Thanks for your time, Louis Chauvet [1]: https://lore.kernel.org/all/2024080

Re: [RFC PATCH 00/17] VKMS: Add configfs support

2024-08-13 Thread Louis Chauvet
nfigfs > support by Jim Shargo and Brandon Pollack [1]. > I tried to keep the changes as minimal and simple as possible > and addressed Sima's comments on [1]. > > Currently, there is another RFC by Louis Chauvet [2]. As I > mentioned on his RFC, I'm not trying to push my

Re: [RFC PATCH 04/17] drm/vkms: Allow to configure multiple CRTCs

2024-08-13 Thread Louis Chauvet
t; + return PTR_ERR(vkms_crtc); > + > + list_add_tail(&vkms_crtc->list, &vkmsdev->crtcs); > + > + if (crtc_cfg->writeback) { > + writeback = vkms_enable_writeback_connector(vkms_crtc); > + if (writeback) > + DRM_ERROR("Failed to init writeback > connector\n"); > + } > + } You are creating multiple CRTC, but only link planes to the `index` one. Is this intentional? DRM is not happy if a CRTC don't have any primary plane. > > ret = drm_connector_init(dev, connector, &vkms_connector_funcs, >DRM_MODE_CONNECTOR_VIRTUAL); > if (ret) { > DRM_ERROR("Failed to init connector\n"); > - goto err_connector; > + return ret; > } > > drm_connector_helper_add(connector, &vkms_conn_helper_funcs); > @@ -104,12 +115,6 @@ int vkms_output_init(struct vkms_device *vkmsdev, int > index) > goto err_attach; > } > > - if (vkmsdev->config->writeback) { > - writeback = vkms_enable_writeback_connector(vkmsdev); > - if (writeback) > - DRM_ERROR("Failed to init writeback connector\n"); > - } > - > drm_mode_config_reset(dev); > > return 0; > @@ -120,8 +125,5 @@ int vkms_output_init(struct vkms_device *vkmsdev, int > index) > err_encoder: > drm_connector_cleanup(connector); > > -err_connector: > - drm_crtc_cleanup(crtc); > - > return ret; > } > diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c > b/drivers/gpu/drm/vkms/vkms_writeback.c > index bc724cbd5e3a..b317cb291586 100644 -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 05/17] drm/vkms: Use managed memory to create encoders

2024-08-13 Thread Louis Chauvet
- goto err_encoder; > - } > - encoder->possible_crtcs = 1; > + encoder = vkms_encoder_init(vkmsdev, BIT(0)); > + if (IS_ERR(encoder)) > + return PTR_ERR(encoder); > > ret = drm_connector_attach_encoder(connector, encoder); > if (ret) { > @@ -120,9 +138,6 @@ int vkms_output_init(struct vkms_device *vkmsdev, int > index) > return 0; > > err_attach: > - drm_encoder_cleanup(encoder); > - > -err_encoder: > drm_connector_cleanup(connector); > > return ret; > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 12/17] drm/vkms: Allow to configure multiple CRTCs via configfs

2024-08-13 Thread Louis Chauvet
uct vkms_configfs *configfs; > - struct vkms_config_crtc *crtc_cfg = NULL; > struct vkms_config_encoder *encoder_cfg = NULL; > struct vkms_config_connector *connector_cfg = NULL; > char *config_name; > @@ -110,11 +247,10 @@ static struct config_group *make_device_group(struct > config_group *group, > goto err_kfree; > } > > - crtc_cfg = vkms_config_add_crtc(configfs->vkms_config, false, false); > - if (IS_ERR(crtc_cfg)) { > - ret = PTR_ERR(crtc_cfg); > - goto err_kfree; > - } > + config_group_init_type_name(&configfs->crtcs_group, "crtcs", > + &crtcs_group_type); > + configfs_add_default_group(&configfs->crtcs_group, > +&configfs->device_group); > > encoder_cfg = vkms_config_add_encoder(configfs->vkms_config, BIT(0)); > if (IS_ERR(encoder_cfg)) { > @@ -133,7 +269,6 @@ static struct config_group *make_device_group(struct > config_group *group, > > err_kfree: > kfree(configfs); > - kfree(crtc_cfg); > kfree(encoder_cfg); > kfree(connector_cfg); > return ERR_PTR(ret); > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 07/17] drm/vkms: Use managed memory to create connectors

2024-08-13 Thread Louis Chauvet
= vkms_encoder_init(vkmsdev, > encoder_cfg->possible_crtcs, > @@ -133,18 +153,7 @@ int vkms_output_init(struct vkms_device *vkmsdev, int > index) > return PTR_ERR(encoder); > } > > - ret = drm_connector_attach_encoder(connector, encoder); > - if (ret) { > - DRM_ERROR("Failed to attach connector to encoder\n"); > - goto err_attach; > - } > - The encoder is not attached to the connector? > drm_mode_config_reset(dev); > > return 0; > - > -err_attach: > - drm_connector_cleanup(connector); > - > - return ret; > } > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 13/17] drm/vkms: Allow to configure multiple encoders via configfs

2024-08-13 Thread Louis Chauvet
&configfs->device_group); > > - encoder_cfg = vkms_config_add_encoder(configfs->vkms_config, BIT(0)); > - if (IS_ERR(encoder_cfg)) { > - ret = PTR_ERR(encoder_cfg); > - goto err_kfree; > - } > + config_group_init_type_name(&configfs->encoders_group, "encoders", > + &encoders_group_type); > + configfs_add_default_group(&configfs->encoders_group, > +&configfs->device_group); > > connector_cfg = vkms_config_add_connector(configfs->vkms_config, BIT(0), > connector_status_connected); > @@ -269,7 +383,6 @@ static struct config_group *make_device_group(struct > config_group *group, > > err_kfree: > kfree(configfs); > - kfree(encoder_cfg); > kfree(connector_cfg); > return ERR_PTR(ret); > } > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 09/17] drm/vkms: Allow to configure multiple overlay planes

2024-08-13 Thread Louis Chauvet
DRM_ERROR("Failed to init writeback > connector\n"); > } > + > + cursor = NULL; > } > > list_for_each_entry(encoder_cfg, &vkmsdev->config->encoders, list) { > diff --git a/drivers/gpu/drm/vkms/vkms_plane.c > b/drivers/gpu/drm/vkms/vkms_plane.c > index e5c625ab8e3e..eb3edf4cb928 100644 > --- a/drivers/gpu/drm/vkms/vkms_plane.c > +++ b/drivers/gpu/drm/vkms/vkms_plane.c > @@ -198,13 +198,13 @@ static const struct drm_plane_helper_funcs > vkms_plane_helper_funcs = { > }; > > struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev, > -enum drm_plane_type type, int index) > +enum drm_plane_type type, uint32_t > possible_crtcs) > { > struct drm_device *dev = &vkmsdev->drm; > struct vkms_plane *plane; > > - plane = drmm_universal_plane_alloc(dev, struct vkms_plane, base, 1 << > index, > -&vkms_plane_funcs, > + plane = drmm_universal_plane_alloc(dev, struct vkms_plane, base, > +possible_crtcs, &vkms_plane_funcs, > vkms_formats, > ARRAY_SIZE(vkms_formats), > NULL, type, NULL); > if (IS_ERR(plane)) > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 06/17] drm/vkms: Allow to configure multiple encoders

2024-08-13 Thread Louis Chauvet
_encoder *encoder; > + struct vkms_config_encoder *encoder_cfg; > struct vkms_crtc *vkms_crtc; > struct vkms_config_crtc *crtc_cfg; > struct vkms_plane *primary, *cursor = NULL; > @@ -123,9 +126,12 @@ int vkms_output_init(struct vkms_device *vkmsdev, int > index) > > drm_connector_helper_add(connector, &vkms_conn_helper_funcs); > > - encoder = vkms_encoder_init(vkmsdev, BIT(0)); > - if (IS_ERR(encoder)) > - return PTR_ERR(encoder); > + list_for_each_entry(encoder_cfg, &vkmsdev->config->encoders, list) { > + encoder = vkms_encoder_init(vkmsdev, > encoder_cfg->possible_crtcs, > + encoder_cfg->index); > + if (IS_ERR(encoder)) > + return PTR_ERR(encoder); > + } > > ret = drm_connector_attach_encoder(connector, encoder); > if (ret) { > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 11/17] drm/vkms: Add and remove VKMS instances via configfs

2024-08-13 Thread Louis Chauvet
t; struct platform_device *pdev; > @@ -231,12 +232,22 @@ static int __init vkms_init(void) > > ret = vkms_create(config); > if (ret) > - vkms_config_destroy(config); > + goto err_kfree; > > + ret = vkms_configfs_register(); > + if (ret) > + goto err_destroy; > + > + return 0; > + > +err_destroy: > + vkms_destroy(config); > +err_kfree: > + vkms_config_destroy(config); > return ret; > } > > -static void vkms_destroy(struct vkms_config *config) > +void vkms_destroy(struct vkms_config *config) > { > struct platform_device *pdev; > > @@ -257,6 +268,8 @@ static void vkms_destroy(struct vkms_config *config) > > static void __exit vkms_exit(void) > { > + vkms_configfs_unregister(); > + > if (default_config->dev) > vkms_destroy(default_config); > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h > index 76394285dc68..eb32440e9f94 100644 > --- a/drivers/gpu/drm/vkms/vkms_drv.h > +++ b/drivers/gpu/drm/vkms/vkms_drv.h > @@ -143,6 +143,10 @@ struct vkms_device { > #define to_vkms_plane_state(target)\ > container_of(target, struct vkms_plane_state, base.base) > > +/* VKMS device */ > +int vkms_create(struct vkms_config *config); > +void vkms_destroy(struct vkms_config *config); > > /* CRTC */ > struct vkms_crtc *vkms_crtc_init(struct drm_device *dev, >struct drm_plane *primary, > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 08/17] drm/vkms: Allow to configure multiple connectors

2024-08-13 Thread Louis Chauvet
int > index) > } > } > > - connector = vkms_connector_init(vkmsdev, BIT(index)); > - if (IS_ERR(connector)) > - return PTR_ERR(connector); > - > list_for_each_entry(encoder_cfg, &vkmsdev->config->encoders, list) { &g

Re: [RFC PATCH 10/17] drm/vkms: Allow to change connector status

2024-08-13 Thread Louis Chauvet
int status; struct drm_connector base; }; and use container_of? > + > + return status; > +} > + > static const struct drm_connector_funcs vkms_connector_funcs = { > + .detect = vkms_connector_detect, > .fill_modes = drm_helper_probe_si

Re: [RFC PATCH 03/17] drm/vkms: Set device name from vkms_config

2024-08-13 Thread Louis Chauvet
- pdev = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0); > + pdev = platform_device_register_simple(config->dev_name, -1, NULL, 0); > if (IS_ERR(pdev)) > return PTR_ERR(pdev); > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/d

Re: [RFC PATCH 15/17] drm/vkms: Allow to configure multiple planes via configfs

2024-08-13 Thread Louis Chauvet
gt; + > +static struct config_item_type planes_group_type = { > + .ct_group_ops = &planes_group_ops, > + .ct_owner = THIS_MODULE, > +}; > + > static ssize_t device_enabled_show(struct config_item *item, char *page) > { > struct vkms_configfs *configfs = config_item_to_vkms_configfs(item); > @@ -538,6 +654,11 @@ static struct config_group *make_device_group(struct > config_group *group, > configfs_add_default_group(&configfs->connectors_group, > &configfs->device_group); > > + config_group_init_type_name(&configfs->planes_group, "planes", > + &planes_group_type); > + configfs_add_default_group(&configfs->planes_group, > +&configfs->device_group); > + > return &configfs->device_group; > } > > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 14/17] drm/vkms: Allow to configure multiple encoders

2024-08-13 Thread Louis Chauvet
gfs->vkms_config)) { > - ret = PTR_ERR(configfs->vkms_config); > - goto err_kfree; > + kfree(configfs); > + return ERR_CAST(configfs->vkms_config); > } > > config_group_init_type_name(&configfs->crtcs_group, "crtcs", > @@ -372,19 +533,12 @@ static struct config_group *make_device_group(struct > config_group *group, > configfs_add_default_group(&configfs->encoders_group, > &configfs->device_group); > > - connector_cfg = vkms_config_add_connector(configfs->vkms_config, BIT(0), > - connector_status_connected); > - if (IS_ERR(connector_cfg)) { > - ret = PTR_ERR(connector_cfg); > - goto err_kfree; > - } > + config_group_init_type_name(&configfs->connectors_group, "connectors", > + &connectors_group_type); > + configfs_add_default_group(&configfs->connectors_group, > +&configfs->device_group); > > return &configfs->device_group; > - > -err_kfree: > - kfree(configfs); > - kfree(connector_cfg); > - return ERR_PTR(ret); > } > > static void drop_device_group(struct config_group *group, > -- > 2.46.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

[PATCH v2 0/8] drm/vkms: Add support for multiple plane formats

2024-08-14 Thread Louis Chauvet
. This series must be applied on top of [1]. [1]: https://lore.kernel.org/all/20240809-yuv-v10-0-1a7c76416...@bootlin.com/ Signed-off-by: Louis Chauvet --- Changes in v2: - Add proper casting/type to __le16 when needed to avoid warnings with sparse - Change the function argb_u16_from_yuv to

[PATCH v2 1/8] drm/vkms: Create helpers macro to avoid code duplication in format callbacks

2024-08-14 Thread Louis Chauvet
The callback functions for line conversion are almost identical for some format. The generic READ_LINE macro generate all the required boilerplate to process a line. Two overrides of this macro have been added to avoid duplication of the same arguments every time. Signed-off-by: Louis Chauvet

[PATCH v2 3/8] drm/vkms: Add support for ARGB16161616 formats

2024-08-14 Thread Louis Chauvet
The formats XRGB16161616 and ARGB16161616 were already supported. Add the support for: - ABGR16161616 - XBGR16161616 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 11 --- drivers/gpu/drm/vkms/vkms_plane.c | 2 ++ 2 files changed, 10 insertions(+), 3 deletions

[PATCH v2 4/8] drm/vkms: Add support for RGB565 formats

2024-08-14 Thread Louis Chauvet
The format RGB565 was already supported. Add the support for: - BGR565 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 25 - drivers/gpu/drm/vkms/vkms_plane.c | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v2 7/8] drm/vkms: Create helper macro for YUV formats

2024-08-14 Thread Louis Chauvet
The callback functions for line conversion are almost identical for semi-planar formats. The generic READ_LINE_YUV_SEMIPLANAR macro generate all the required boilerplate to process a line from a semi-planar format. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 75

[PATCH v2 6/8] drm/vkms: Change YUV helpers to support u16 inputs for conversion

2024-08-14 Thread Louis Chauvet
Some YUV format uses 16 bit values, so change the helper function for conversion to support those new formats. Add support for the YUV format P010 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/tests/vkms_format_test.c | 3 ++- drivers/gpu/drm/vkms/vkms_formats.c | 22

[PATCH v2 8/8] drm/vkms: Add P01* formats

2024-08-14 Thread Louis Chauvet
The formats NV 12/16/24/21/61/42 were already supported. Add support for: - P010 - P012 - P016 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 7 ++- drivers/gpu/drm/vkms/vkms_plane.c | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v2 5/8] drm/vkms: Add support for RGB888 formats

2024-08-14 Thread Louis Chauvet
Add the support for: - RGB888 - BGR888 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 7 +++ drivers/gpu/drm/vkms/vkms_plane.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index

[PATCH v2 2/8] drm/vkms: Add support for ARGB8888 formats

2024-08-14 Thread Louis Chauvet
The formats XRGB and ARGB were already supported. Add the support for: - XBGR - RGBX - BGRX - ABGR - RGBA - BGRA Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 18 ++ drivers/gpu/drm/vkms/vkms_plane.c | 6 ++ 2 files

[PATCH v2 1/3] drm/vkms: Re-introduce line-by-line algorithm for writeback

2024-08-14 Thread Louis Chauvet
...@gmail.com/ [2]: https://lore.kernel.org/all/20230515135204.115393-4-mca...@igalia.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 17 + drivers/gpu/drm/vkms/vkms_drv.h | 20 +++--- drivers/gpu/drm/vkms/vkms_formats.c | 117

[PATCH v2 2/3] drm/vkms: Add a macro for write_line functions

2024-08-14 Thread Louis Chauvet
As stated in [2], the write_line functions are very similar and force code duplication. This patch add a macro to avoid code repetition. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 107 ++-- 1 file changed, 30 insertions(+), 77

[PATCH v2 3/3] drm/vkms: Add support for XRGB2101010

2024-08-14 Thread Louis Chauvet
Thanks to the WRITE_LINE macro, adding the format XRGB210101010 is trivial. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 12 drivers/gpu/drm/vkms/vkms_writeback.c | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v2 0/3] drm/vkms: Reimplement line-per-line pixel conversion for writeback

2024-08-14 Thread Louis Chauvet
support a new format This series depends on [1]. [1]: https://lore.kernel.org/all/20240814-b4-new-color-formats-v2-0-8b3499cfe...@bootlin.com/ Signed-off-by: Louis Chauvet --- Changes in v2: - PATCH 2/3: Remove YUV from supported format list, it is not supported - Link to v1: https://lore.ke

[PATCH 0/3] drm/vkms: Miscelanious clarifications

2024-08-14 Thread Louis Chauvet
This series does not introduce functionnal changes, only some documentation and renaming to clarify the code. This series is based on [1]. [1]: https://lore.kernel.org/all/20240814-writeback_line_by_line-v2-0-36541c717...@bootlin.com/ Signed-off-by: Louis Chauvet --- Louis Chauvet (3

[PATCH 2/3] drm/vkms: Rename index to possible_crtc

2024-08-14 Thread Louis Chauvet
The meaning of index was not clear. Replace them with crtc_index to clearly indicate its usage. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h| 4 ++-- drivers/gpu/drm/vkms/vkms_output.c | 13 +++-- drivers/gpu/drm/vkms/vkms_plane.c | 4 ++-- 3 files changed, 11

[PATCH 1/3] drm/vkms: Formatting and typo fix

2024-08-14 Thread Louis Chauvet
Some newlines were missing around comments. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index 6860bee8e981..5aeb43592960 100644 --- a

[PATCH 3/3] drm/vkms: Add documentation

2024-08-14 Thread Louis Chauvet
Add documentation around vkms_output and its initialization. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h| 81 -- drivers/gpu/drm/vkms/vkms_output.c | 12 +- 2 files changed, 80 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH RFC 0/6] drm/vkms: Completly split headers

2024-08-14 Thread Louis Chauvet
lot for the managment of multiple devices and the introduction of ConfigFS. This series depends on [1]. [1]: https://lore.kernel.org/all/20240814-google-clarifications-v1-0-3ee76d7d0...@bootlin.com/ Signed-off-by: Louis Chauvet --- Louis Chauvet (6): drm/vkms: Properly extract vkms_formats

[PATCH RFC 2/6] drm/vkms: Extract vkms_writeback header

2024-08-14 Thread Louis Chauvet
The vkms writeback functions are defined in a different .c, so make the same thing for the function declaration in the headers and create vkms_writeback.h. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 1 + drivers/gpu/drm/vkms/vkms_drv.h | 10

[PATCH RFC 1/6] drm/vkms: Properly extract vkms_formats header

2024-08-14 Thread Louis Chauvet
The vkms_format.h header was already separated from vkms_drv.h, but some function were missing. Move those function in vkms_format.h. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 74 +- drivers/gpu/drm/vkms/vkms_formats.c | 3

[PATCH RFC 3/6] drm/vkms: Extract vkms_plane header

2024-08-14 Thread Louis Chauvet
In order to properly split vkms_output function, extract all its function to its own header. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_crtc.c | 2 ++ drivers/gpu/drm/vkms/vkms_drv.h | 56 -- drivers/gpu/drm/vkms/vkms_formats.c | 3

[PATCH RFC 4/6] drm/vkms: Rename to_vkms_plane_state to avoid confusion

2024-08-14 Thread Louis Chauvet
The macro to_vkms_plane_state was not explicit about its expected content. Rename it to drm_plane_state_to_vkms_plane_state to avoid confusion and help the reader. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_crtc.c | 2 +- drivers/gpu/drm/vkms/vkms_plane.c | 4 ++-- drivers/gpu

[PATCH RFC 6/6] drm/vkms: Extract vkms_composer header

2024-08-14 Thread Louis Chauvet
The vkms composer functions are defined in a different .c, so make the same thing for the function declaration in the headers and create vkms_composer.h. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 2 ++ drivers/gpu/drm/vkms/vkms_composer.h | 18

[PATCH RFC 5/6] drm/vkms: Extract vkms_crtc header

2024-08-14 Thread Louis Chauvet
The vkms crtc functions are defined in a different .c, so make the same thing for the function declaration in the headers and create vkms_crtc.h. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- drivers/gpu/drm/vkms/vkms_crtc.c | 2 +- drivers/gpu/drm/vkms

[PATCH RFC 1/4] drm/vkms: Switch to managed for connector

2024-08-14 Thread Louis Chauvet
The current VKMS driver uses non-managed function to create connectors. It is not an issue yet, but in order to support multiple devices easily, convert this code to use drm and device managed helpers. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h| 1 - drivers/gpu/drm

[PATCH RFC 0/4] drm/vkms: Switch all vkms object to DRM managed objects

2024-08-14 Thread Louis Chauvet
-v1-0-51712f088...@bootlin.com/ Signed-off-by: Louis Chauvet --- Louis Chauvet (4): drm/vkms: Switch to managed for connector drm/vkms: Switch to managed for encoder drm/vkms: Switch to managed for crtc drm/vkms: Rename all vkms_crtc instance to be consistent drivers/gp

[PATCH RFC 4/4] drm/vkms: Rename all vkms_crtc instance to be consistent

2024-08-14 Thread Louis Chauvet
To avoid inconsistency in the VKMS code, rename all struct vkms_crtc instances to vkms_crtc. This should not change the behavior of the driver. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 30 ++-- drivers/gpu/drm/vkms/vkms_composer.h | 2

[PATCH RFC 3/4] drm/vkms: Switch to managed for crtc

2024-08-14 Thread Louis Chauvet
The current VKMS driver uses non-managed function to create crtcs. It is not an issue yet, but in order to support multiple devices easly, convert this code to use drm and device managed helpers. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 10 +-- drivers/gpu/drm

[PATCH RFC 2/4] drm/vkms: Switch to managed for encoder

2024-08-14 Thread Louis Chauvet
The current VKMS driver uses non-managed function to create encoders. It is not an issue yet, but in order to support multiple devices easly, convert this code to use drm and device managed helpers. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h| 1 - drivers/gpu/drm/vkms

[PATCH RFC 00/15] drm/vkms: Introduce detailed configuration

2024-08-14 Thread Louis Chauvet
    - possible_planes [automatically filled by helpers]     - possible_encoders [automatically filled by helpers] - encoders     - name     - possible_crtcs Signed-off-by: Louis Chauvet --- Louis Chauvet (15): drm/vkms: Remove useles devres group drm/vkms: remove possible crtc from parameters

[PATCH RFC 02/15] drm/vkms: remove possible crtc from parameters

2024-08-14 Thread Louis Chauvet
As the crtc mask is dynamic, avoid hardcoding it. It is already computed once all the planes are created, so it should be a no-op Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.c | 10 +- drivers/gpu/drm/vkms/vkms_plane.c | 5 +++-- drivers/gpu/drm/vkms/vkms_plane.h

[PATCH RFC 01/15] drm/vkms: Remove useles devres group

2024-08-14 Thread Louis Chauvet
As the driver now uses drm managed allocation, the devres group is not needed anymore, so remove it. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers

[PATCH RFC 04/15] drm/vkms: Add a validation function for vkms configuration

2024-08-14 Thread Louis Chauvet
As the configuration will be used by userspace, add a validator to avoid creating a broken DRM device Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 5 + drivers/gpu/drm/vkms/vkms_config.h | 14 ++ 2 files changed, 19 insertions(+) diff --git a/drivers

[PATCH RFC 07/15] drm/vkms: Introduce plane name configuration

2024-08-14 Thread Louis Chauvet
As a plane will be a folder in ConfigFS, add name configuration for plane so it will reflect the folder name. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 14 ++ drivers/gpu/drm/vkms/vkms_config.h | 2 ++ drivers/gpu/drm/vkms/vkms_plane.c | 2 +- 3 files

[PATCH RFC 06/15] drm/vkms: Introduce plane configuration

2024-08-14 Thread Louis Chauvet
The current vkms driver only allows the usage of one primary, eight overlays and one cursor plane. This new configuration structure aims to make the configuration more flexible. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 90

[PATCH RFC 05/15] drm/vkms: Move default_config creation to its own function

2024-08-14 Thread Louis Chauvet
Extract the initialization of the default configuration to a function. Refactor, no functional changes. Signed-off-by: Louis Chauvet [Changes: Cherry pick and solve conflicts] Signed-off-by: José Expósito --- drivers/gpu/drm/vkms/vkms_config.c | 16 drivers/gpu/drm/vkms

[PATCH RFC 09/15] drm/vkms: Introduce configuration for plane color encoding

2024-08-14 Thread Louis Chauvet
VKMS driver supports all the color encoding on planes, but for testing it can be useful to only advertise few of them. This new configuration interface will allow configuring the color encoding per planes. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 15

[PATCH RFC 08/15] drm/vkms: Introduce plane rotation configuration

2024-08-14 Thread Louis Chauvet
VKMS driver supports all the rotation on planes, but for testing it can be useful to only advertise few of them. This new configuration interface will allow configuring the rotation per planes. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 9 + drivers/gpu/drm

[PATCH RFC 11/15] drm: writeback: Add drm_writeback_connector cleanup

2024-08-14 Thread Louis Chauvet
drm_writeback_connector_cleanup to allow a proper cleanup. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/drm_writeback.c | 10 ++ include/drm/drm_writeback.h | 11 +++ 2 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm

[PATCH RFC 12/15] drm/vkms: Add configuration for CRTCs and encoders

2024-08-14 Thread Louis Chauvet
The current VKMS driver can only uses one CRTC and one encoder. This patch introduce in the same time CRTC and encoders as they are tighly linked. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 266 + drivers/gpu/drm/vkms/vkms_config.h

[PATCH RFC 14/15] drm/vkms: Add name configuration for CRTCs

2024-08-14 Thread Louis Chauvet
As a CRTC will be a directory in ConfigFS, add the name configuration for CRTC name so we will be able to reflect the configfs directory name in the drm name. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 5 + drivers/gpu/drm/vkms/vkms_config.h | 2 ++ drivers/gpu

[PATCH RFC 15/15] drm/vkms: Add test for config structure

2024-08-14 Thread Louis Chauvet
The config structure is a bit complex in term of memory management. Add basic test to avoid breaking it in the future. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/tests/Makefile | 1 + drivers/gpu/drm/vkms/tests/vkms_config_test.c | 135 ++ 2 files

[PATCH RFC 03/15] drm/vkms: Extract vkms_config header

2024-08-14 Thread Louis Chauvet
Creating a new vkms_config structure will be more complex once we start adding more options. Extract the vkms_config structure to its own header and source files and add functions to create and delete a vkms_config and to initialize debugfs. Refactor, no functional changes. Signed-off-by: Louis

[PATCH RFC 13/15] drm/vkms: Add name configuration for encoders

2024-08-14 Thread Louis Chauvet
As an encoder will be a directory in ConfigFS, add the configuration for encoder name so we will be able to reflect the configfs directory name in the drm name. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 6 ++ drivers/gpu/drm/vkms/vkms_config.h | 2 ++ drivers/gpu

[PATCH RFC 10/15] drm/vkms: Introduce configuration for plane color range

2024-08-14 Thread Louis Chauvet
VKMS driver supports all the color range on planes, but for testing it can be useful to only advertise few of them. This new configuration interface will allow configuring the color range per planes. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_config.c | 15

[PATCH RFC 2/7] drm/vkms: Introduce ConfigFS interface

2024-08-14 Thread Louis Chauvet
DEVICE_1 ┗━ enable DEVICE_2 ┗━ enable Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/Kconfig | 1 + drivers/gpu/drm/vkms/Makefile| 1 + drivers/gpu/drm/vkms/vkms_configfs.c | 144 +++ drivers/gpu/drm/vkms/vkms_configfs.h | 35

[PATCH RFC 1/7] drm/vkms: Add vkms_delete/create_device helper

2024-08-14 Thread Louis Chauvet
In preparation for introduction of ConfigFS support, expose the vkms_destroy/create helper to remove a vkms device. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.c | 4 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH RFC 6/7] drm/vkms: Add color range in ConfigFS

2024-08-14 Thread Louis Chauvet
┃ ┣━ supported_rotations ┃ ┣━ supported_color_encoding ┃ ┣━ supported_color_ranges ┃ ┣━ default_rotation ┃ ┣━ default_color_encoding ┃ ┗━ default_color_range DEVICE_2 ┗━ ditto Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms

[PATCH RFC 3/7] drm/vkms: Introduce basic plane creation

2024-08-14 Thread Louis Chauvet
type ┃ ┗━ PLANE_3 ┃ ┗━ type DEVICE_2 ┗━ ditto Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 149 --- drivers/gpu/drm/vkms/vkms_configfs.h | 20 + 2 files changed, 160 insertions(+), 9 deletions(-) diff --

[PATCH RFC 5/7] drm/vkms: Add color encoding to ConfigFS

2024-08-14 Thread Louis Chauvet
┃ ┣━ supported_rotations ┃ ┣━ supported_color_encoding ┃ ┣━ default_rotation ┃ ┗━ default_color_encoding DEVICE_2 ┗━ ditto Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 107 +++ 1 file

[PATCH RFC 4/7] drm/vkms: Introduce plane rotation in ConfigFS

2024-08-14 Thread Louis Chauvet
┃ ┗━ default_rotation DEVICE_2 ┗━ ditto Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 102 +++ 1 file changed, 102 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_configfs.c b/drivers/gpu/drm/vkms/vkms_configfs.c

[PATCH RFC 7/7] drm/vkms: Add crtc and encoder configuration in ConfigFS

2024-08-14 Thread Louis Chauvet
DEVICE_2 ┗━ ditto Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_configfs.c | 404 +-- drivers/gpu/drm/vkms/vkms_configfs.h | 54 - 2 files changed, 437 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_configfs.c b

[PATCH v2 0/9] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-02-23 Thread Louis Chauvet
Maarten Lankhorst To: Maxime Ripard To: Thomas Zimmermann To: David Airlie To: arthurgri...@riseup.net To: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Cc: linux-ker...@vger.kernel.org Cc: jeremie.dautheri...@bootlin.com Cc: miquel.ray...@bootlin.com Cc: thomas.petazz...@bootlin.com Signe

[PATCH v2 1/9] drm/vkms: Code formatting

2024-02-23 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 10 +- drivers/gpu/drm/vkms/vkms_crtc.c | 6 ++ drivers/gpu/drm/vkms/vkms_drv.c | 3 +-- drivers/gpu/drm/vkms/vkms_plane.c| 9

[PATCH v2 2/9] drm/vkms: Use drm_frame directly

2024-02-23 Thread Louis Chauvet
From: Arthur Grillo Remove intermidiary variables and access the variables directly from drm_frame. These changes should be noop. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 3 --- drivers/gpu/drm/vkms/vkms_formats.c | 12

[PATCH v2 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-02-23 Thread Louis Chauvet
to avoid using a nullptr as a function. Document for those typedefs. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 23 +-- drivers/gpu/drm/vkms/vkms_formats.c | 8 drivers/gpu/drm/vkms/vkms_formats.h | 4 ++-- drivers/gpu/drm/vkms

[PATCH v2 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-02-23 Thread Louis Chauvet
functionality") https://lore.kernel.org/all/20230418130525.128733-2-mca...@igalia.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 219 +++--- drivers/gpu/drm/vkms/vkms_drv.h | 25 +++- drivers/gpu/drm/vkms/v

[PATCH v2 8/9] drm/vkms: Drop YUV formats TODO

2024-02-23 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/gpu/vkms.rst b

[PATCH v2 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-02-23 Thread Louis Chauvet
Add some documentation on pixel conversion functions. Update of outdated comments for pixel_write functions. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 4 +++ drivers/gpu/drm/vkms/vkms_drv.h | 13 drivers/gpu/drm/vkms/vkms_formats.c | 58

[PATCH v2 6/9] drm/vkms: Add YUV support

2024-02-23 Thread Louis Chauvet
^8. This is done to avoid the use of fixed point operations. Signed-off-by: Arthur Grillo [Louis Chauvet: Adapted Arthur's work and implemented the read_line_t callbacks for yuv formats] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- drivers/gpu/drm

[PATCH v2 7/9] drm/vkms: Add range and encoding properties to pixel_read function

2024-02-23 Thread Louis Chauvet
From: Arthur Grillo Create range and encoding properties. This should be noop, as none of the conversion functions need those properties. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 9

[PATCH v2 9/9] drm/vkms: Create KUnit tests for YUV conversions

2024-02-23 Thread Louis Chauvet
From: Arthur Grillo Create KUnit tests to test the conversion between YUV and RGB. Test each conversion and range combination with some common colors. Signed-off-by: Arthur Grillo [Louis Chauvet: fix minor formating issues (whitespace, double line)] Signed-off-by: Louis Chauvet --- drivers

[PATCH v3 0/9] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-02-26 Thread Louis Chauvet
: thomas.petazz...@bootlin.com Cc: seanp...@google.com Cc: marc...@google.com Cc: nicolejade...@google.com Signed-off-by: Louis Chauvet 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-ato

[PATCH v3 1/9] drm/vkms: Code formatting

2024-02-26 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 10 +- drivers/gpu/drm/vkms/vkms_crtc.c | 6 ++ drivers/gpu/drm/vkms/vkms_drv.c | 3 +-- drivers/gpu/drm/vkms/vkms_plane.c| 9

[PATCH v3 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-02-26 Thread Louis Chauvet
to avoid using a nullptr as a function. Document for those typedefs. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 23 +-- drivers/gpu/drm/vkms/vkms_formats.c | 8 drivers/gpu/drm/vkms/vkms_formats.h | 4 ++-- drivers/gpu/drm/vkms

[PATCH v3 7/9] drm/vkms: Add range and encoding properties to pixel_read function

2024-02-26 Thread Louis Chauvet
From: Arthur Grillo Create range and encoding properties. This should be noop, as none of the conversion functions need those properties. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 9

[PATCH v3 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-02-26 Thread Louis Chauvet
ixel conversion functionality") https://lore.kernel.org/all/20230418130525.128733-2-mca...@igalia.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 219 +++--- drivers/gpu/drm/vkms/vkms_drv.h | 24 +++- drivers/gpu/drm/vkms/v

[PATCH v3 2/9] drm/vkms: Use drm_frame directly

2024-02-26 Thread Louis Chauvet
From: Arthur Grillo Remove intermidiary variables and access the variables directly from drm_frame. These changes should be noop. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 3 --- drivers/gpu/drm/vkms/vkms_formats.c | 12

[PATCH v3 6/9] drm/vkms: Add YUV support

2024-02-26 Thread Louis Chauvet
^8. This is done to avoid the use of fixed point operations. Signed-off-by: Arthur Grillo [Louis Chauvet: Adapted Arthur's work and implemented the read_line_t callbacks for yuv formats] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- drivers/gpu/drm

[PATCH v3 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-02-26 Thread Louis Chauvet
Add some documentation on pixel conversion functions. Update of outdated comments for pixel_write functions. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 4 +++ drivers/gpu/drm/vkms/vkms_drv.h | 13 drivers/gpu/drm/vkms/vkms_formats.c | 58

[PATCH v3 8/9] drm/vkms: Drop YUV formats TODO

2024-02-26 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/gpu/vkms.rst b

[PATCH v3 9/9] drm/vkms: Create KUnit tests for YUV conversions

2024-02-26 Thread Louis Chauvet
From: Arthur Grillo Create KUnit tests to test the conversion between YUV and RGB. Test each conversion and range combination with some common colors. Signed-off-by: Arthur Grillo [Louis Chauvet: fix minor formating issues (whitespace, double line)] Signed-off-by: Louis Chauvet --- drivers

Re: [PATCH v2 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-02-27 Thread Louis Chauvet
ake pixel data (a, r, g, b, pixel, ...), > > convert them to the format > > * ARGB16161616 in out_pixel. > > * > > - * They are used in the `vkms_compose_row` function to handle multiple > > formats. > > + * They are used in the `read_line`s functions to avo

Re: [PATCH v2 7/9] drm/vkms: Add range and encoding properties to pixel_read function

2024-02-27 Thread Louis Chauvet
(same as for PATCHv2 6/9, I took the patch from Arthur with no modifications) Le 26/02/24 - 14:23, Pekka Paalanen a écrit : > On Fri, 23 Feb 2024 12:37:27 +0100 > Louis Chauvet wrote: > > > From: Arthur Grillo > > > > Create range and encoding properties. This

Re: [PATCH v2 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-02-27 Thread Louis Chauvet
or unsupported pixel formats. The caller > > must ensure that the > > + * pointer is valid before using it in a vkms_writeback_job. > > + * > > + * @format: 4cc of the format > > This too. Ack, I will use the same as above > > + */ > > void *get_pixel_write_function(u32 format) > > { > > switch (format) { > > > > I couldn't check if the docs are correct since the patch context is not > wide enough, but they all sound plausible to me. I checked again, I don't see other errors than your first comment. > > Thanks, > pq Kind regards, Louis Chauvet -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v3 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-02-27 Thread Louis Chauvet
Le 26/02/24 - 10:07, Arthur Grillo a écrit : > > > On 26/02/24 05:46, Louis Chauvet wrote: > > Add some documentation on pixel conversion functions. > > Update of outdated comments for pixel_write functions. > > > > Signed-off-by: Louis Chauvet > > --- &g

Re: [PATCH] drm/vkms: Add information on how to benchmark

2024-02-27 Thread Louis Chauvet
running multiple cases. And reviewers do not need to ask to re-run with > the correct options. > > I suppose rotations might get added, too. > > Or maybe you'd provide a script that covers all the standard > performance test cases? I agree with Pekka, it would b

<    1   2   3   4   >