/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
, 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
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
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
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
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
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
-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
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
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
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
- 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
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
= 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
&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
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
_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
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
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
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
- 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
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
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
.
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
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
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
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
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
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
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
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
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
...@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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
-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
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
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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
┃ ┣━ 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
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 --
┃ ┣━ 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
┃ ┗━ 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
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
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
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
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
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
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
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
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
^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
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
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
: 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
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
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
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
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
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
^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
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
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
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
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
(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
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
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
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
101 - 200 of 347 matches
Mail list logo