Skip to content

drm/vkms: Allow to configure device

José Expósito dri-devel lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest14 patches 2 repliesIn review
  2. v314 patches 10 repliesSuperseded
  3. v215 patches 16 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v113 patches27 repliesSuperseded

Changes in v4 from the cover letter

- Applied review comments by Louis Chauvet: (thanks!!)
- Do not access "private" struct fields in tests
- Reviewed-by in all patches
- Rebased on top of drm-misc-next
- Link to v3: https://lore.kernel.org/dri-devel/[email protected]/T/

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14drm/vkms: Extract vkms_connector headerdrivers/gpu/drm/vkms/Makefile drivers/gpu/drm/vkms/vkms_connector.c drivers/gpu/drm/vkms/vkms_connector.h +1 more+73 -380 replies
2/14drm/vkms: Create vkms_connector structdrivers/gpu/drm/vkms/vkms_connector.c drivers/gpu/drm/vkms/vkms_connector.h drivers/gpu/drm/vkms/vkms_output.c+16 -70 replies
3/14drm/vkms: Add KUnit test scaffoldingdrivers/gpu/drm/vkms/Kconfig drivers/gpu/drm/vkms/Makefile drivers/gpu/drm/vkms/tests/.kunitconfig +2 more+42 -00 replies
4/14drm/vkms: Extract vkms_config headerdrivers/gpu/drm/vkms/Makefile drivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c +4 more+121 -420 replies
5/14drm/vkms: Move default_config creation to its own functiondrivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c drivers/gpu/drm/vkms/vkms_config.h +1 more+71 -50 replies
6/14drm/vkms: Set device name from vkms_configdrivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c drivers/gpu/drm/vkms/vkms_config.h +2 more+40 -50 replies
7/14drm/vkms: Add a validation function for VKMS configurationdrivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c drivers/gpu/drm/vkms/vkms_config.h +1 more+21 -00 replies
8/14drm/vkms: Allow to configure multiple planes.clang-format drivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c +2 more+370 -360 replies
9/14drm/vkms: Allow to configure multiple CRTCs.clang-format drivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c +1 more+222 -50 replies
10/14drm/vkms: Allow to attach planes and CRTCs.clang-format drivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c +3 more+454 -360 replies
11/14drm/vkms: Allow to configure multiple encoders.clang-format drivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c +1 more+195 -00 replies
12/14drm/vkms: Allow to attach encoders and CRTCs.clang-format drivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c +2 more+266 -200 replies
13/14drm/vkms: Allow to configure multiple connectors.clang-format drivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c +2 more+205 -00 replies
14/14drm/vkms: Allow to attach connectors and encoders.clang-format drivers/gpu/drm/vkms/tests/vkms_config_test.c drivers/gpu/drm/vkms/vkms_config.c +2 more+216 -130 replies

Reviews trailers per patch

All 14 patches have a Reviewed-by or Acked-by.

PatchLouis Chauvet
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14R-b
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/14] drm/vkms: Allow to configure device

Hi everyone,

In preparation for ConfigFS support, a flexible way to configure VKMS device(s) is required.
This series adds the required APIs to create a configuration, the code changes required to apply it and KUnit test validating the changes.

Louis Chauvet and I are working on ConfigFS support. In this series I tried to merge his changes [1] with mine [2].
I kept his Signed-off-by to reflect that, even if I show up as the author of some/most of the patches, this was a joint effort.

I'll send the ConfigFS code [3] and its IGT tests [4] code this week. Meanwhile, the IGT tests also exercise this series and can be used for additional test coverage.

Best wishes,
José Expósito

[1] https://patchwork.kernel.org/project/dri-devel/cover/20250121-google-remove-crtc-index-from-parameter-v3-0-cac00a3c3544@bootlin.com/
[2] https://patchwork.kernel.org/project/dri-devel/cover/[email protected]/
[3] https://github.com/JoseExposito/linux/commits/patch-vkms-configfs/
[4] https://gitlab.freedesktop.org/jexposit/igt-gpu-tools/-/commits/vkms-configfs

Changes in v4:

- Applied review comments by Louis Chauvet: (thanks!!)
- Do not access "private" struct fields in tests
- Reviewed-by in all patches
- Rebased on top of drm-misc-next
- Link to v3: https://lore.kernel.org/dri-devel/[email protected]/T/

Changes in v3:

- Applied review comments by Louis Chauvet:
- Moved drm_vblank_init(..., vkms_config_get_num_crtcs()) to a different patch
- Improved error handling in vkms_config_*_attach_*() functions
- Fixed compilation errors when CONFIG_DRM_VKMS_KUNIT_TEST=m
- Used for_each iterators in vkms_config_test_default_config(). A leftover from the removed connector hot-add code
- Validated that vkms_config.dev wasn't NULL before calling drm_info()
- Kept vkms_device.config as a const pointer (at the cost of casting in list_count_nodes())
- Renamed "CONFIG_DRM_VKMS_KUNIT_TESTS" to "CONFIG_DRM_VKMS_KUNIT_TEST" for consistency with other options
- Rebased on top of drm-misc-next
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:

- Applied review comments by Louis Chauvet:
- Added Co-developped-by tags where required
- Split the first patch in 2: vkms_connector.h/c creation and struct vkms_connector creation
- Fixes a user after free/double free bug. The bug is already present
in drm-misc-next and the fix could be merged independently
- Implemented for_each macros for the config
- Other naming fixes
- Link to v1: https://lore.kernel.org/all/[email protected]/

José Expósito (13):
drm/vkms: Extract vkms_connector header drm/vkms: Create vkms_connector struct
drm/vkms: Add KUnit test scaffolding
drm/vkms: Extract vkms_config header
drm/vkms: Move default_config creation to its own function drm/vkms: Set device name from vkms_config drm/vkms: Allow to configure multiple planes drm/vkms: Allow to configure multiple CRTCs drm/vkms: Allow to attach planes and CRTCs drm/vkms: Allow to configure multiple encoders drm/vkms: Allow to attach encoders and CRTCs drm/vkms: Allow to configure multiple connectors drm/vkms: Allow to attach connectors and encoders

Louis Chauvet (1):
drm/vkms: Add a validation function for VKMS configuration

 .clang-format                                 |   7 +
 drivers/gpu/drm/vkms/Kconfig                  |  15 +
 drivers/gpu/drm/vkms/Makefile                 |   5 +-
 drivers/gpu/drm/vkms/tests/.kunitconfig       |   4 +
 drivers/gpu/drm/vkms/tests/Makefile           |   3 +
 drivers/gpu/drm/vkms/tests/vkms_config_test.c | 951 ++++++++++++++++++
 drivers/gpu/drm/vkms/vkms_config.c            | 640 ++++++++++++
 drivers/gpu/drm/vkms/vkms_config.h            | 437 ++++++++
 drivers/gpu/drm/vkms/vkms_connector.c         |  61 ++
 drivers/gpu/drm/vkms/vkms_connector.h         |  26 +
 drivers/gpu/drm/vkms/vkms_drv.c               |  45 +-
 drivers/gpu/drm/vkms/vkms_drv.h               |  17 +-
 drivers/gpu/drm/vkms/vkms_output.c            | 176 ++--
 13 files changed, 2246 insertions(+), 141 deletions(-)
 create mode 100644 drivers/gpu/drm/vkms/tests/.kunitconfig
 create mode 100644 drivers/gpu/drm/vkms/tests/Makefile
 create mode 100644 drivers/gpu/drm/vkms/tests/vkms_config_test.c
 create mode 100644 drivers/gpu/drm/vkms/vkms_config.c
 create mode 100644 drivers/gpu/drm/vkms/vkms_config.h
 create mode 100644 drivers/gpu/drm/vkms/vkms_connector.c
 create mode 100644 drivers/gpu/drm/vkms/vkms_connector.h
Signature · 1 line
2.48.1