Draft: [RFC PATCH v2 0/6] drm/amd/display: Introduce KUnit to Display Mode Library
git format-patch --stdout --base=amd-staging-drm-next -5 --cover-letter --rfc -v2
From a9618fefc1733e668a2e93b9ae9696fde35dc167 Mon Sep 17 00:00:00 2001
From: Tales Aparecida <tales.aparecida@gmail.com>
Date: Mon, 11 Jul 2022 00:52:50 -0300
Subject: [RFC PATCH v2 0/6] drm/amd/display: Introduce KUnit to Display Mode Library
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Hello,
Here is the v2 of the RFC intending to bring unit testing to the AMDPGU driver,
with more tests and a new approach regarding the modules organization and code placement.
Amongst the tests we highlight the dcn20_fpu_test, which, had it existed then,
could catch the problems introduced to dcn20_fpu.c by 8861c27a6c later fixed by 9ad5d02c2a.
You can find this code in our tree, at https://gitlab.freedesktop.org/isinyaaa/linux/-/tags/introduce-kunit-for-amd-v2
Thanks in advance for your time taking a look and sending any feedback!
Best regards,
Tales
Changes since v1 (https://lore.kernel.org/all/20220608010709.272962-1-maira.canal@usp.br/):
This series now depends on the patches in review at https://lore.kernel.org/all/20220625050838.1618469-1-davidgow@google.com/#r
- Daniel Latypov's "kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites"
- Jeremy Kerr's "kunit: unify module and builtin suite definitions"
Which depend on a dozen of other commits already merged on torvalds/master related to the kunit framework.
The reason for that is to enable running the tests smoothly as modules, which in itself enables running them using IGT,
with the patches at https://lists.freedesktop.org/archives/igt-dev/2022-June/042895.html (v2 soon).
Link: https://patchwork.freedesktop.org/patch/488777/?series=104903&rev=1
Magali Lemes (1):
drm/amd/display: Introduce KUnit tests to the bw_fixed library
Maíra Canal (4):
drm/amd/display: Introduce KUnit to DML
drm/amd/display: Move bw_fixed macros to header file
drm/amd/display: Add kernel-doc to Display Mode Library
drm/amd/display: Introduce KUnit tests to the display_mode_vba library
Tales Aparecida (1):
drm/amd/display: Introduce KUnit tests for fixed31_32 library
drivers/gpu/drm/amd/display/Kconfig | 25 ++
.../gpu/drm/amd/display/dc/basics/Makefile | 4 +
.../drm/amd/display/dc/basics/tests/Makefile | 12 +
.../basics/tests/dc_basics_fixpt31_32_test.c | 195 +++++++++++
.../basics/tests/dc_basics_fixpt31_32_test.h | 13 +
.../display/dc/basics/tests/dc_basics_tests.c | 36 ++
drivers/gpu/drm/amd/display/dc/dml/Makefile | 4 +
.../drm/amd/display/dc/dml/calcs/bw_fixed.c | 14 +-
.../amd/display/dc/dml/display_mode_enums.h | 45 +++
.../drm/amd/display/dc/dml/display_mode_vba.c | 56 ++-
.../drm/amd/display/dc/dml/tests/.kunitconfig | 5 +
.../gpu/drm/amd/display/dc/dml/tests/Makefile | 12 +
.../dc/dml/tests/calcs/bw_fixed_test.c | 288 ++++++++++++++++
.../dc/dml/tests/calcs/bw_fixed_test.h | 16 +
.../dc/dml/tests/display_mode_lib_test.c | 72 ++++
.../dc/dml/tests/display_mode_lib_test.h | 10 +
.../dc/dml/tests/display_mode_vba_test.c | 105 ++++++
.../dc/dml/tests/display_mode_vba_test.h | 43 +++
.../drm/amd/display/dc/dml/tests/dml_tests.c | 36 ++
.../drm/amd/display/dc/dml/tests/vba_tests.c | 325 ++++++++++++++++++
drivers/gpu/drm/amd/display/dc/inc/bw_fixed.h | 14 +
21 files changed, 1308 insertions(+), 22 deletions(-)
create mode 100644 drivers/gpu/drm/amd/display/dc/basics/tests/Makefile
create mode 100644 drivers/gpu/drm/amd/display/dc/basics/tests/dc_basics_fixpt31_32_test.c
create mode 100644 drivers/gpu/drm/amd/display/dc/basics/tests/dc_basics_fixpt31_32_test.h
create mode 100644 drivers/gpu/drm/amd/display/dc/basics/tests/dc_basics_tests.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/.kunitconfig
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/Makefile
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/calcs/bw_fixed_test.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/calcs/bw_fixed_test.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/display_mode_lib_test.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/display_mode_lib_test.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/display_mode_vba_test.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/display_mode_vba_test.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/dml_tests.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/tests/vba_tests.c
base-commit: b5e6edee70bb8b4286d65a6ad2bd03d97eda58b5
prerequisite-patch-id: 046505cc4fec6ff227af18bac2cd8d09e56ea399
prerequisite-patch-id: b19194681eae7e4a87124ed56f52e1eaa05376d1
prerequisite-patch-id: 92d9259125f2982da5945be995b4ae2af1ca7c32
prerequisite-patch-id: 9664d8e1e71e5541aa39094992aa575bc8c5563b
prerequisite-patch-id: ba795b981f3e94890540f452e658e28408b500d2
prerequisite-patch-id: abd5e51f483a9afb08af468db043e2ebc7ce6867
prerequisite-patch-id: 8d804dd9cd62213fee48ead530b89b3f9c8bbbc2
prerequisite-patch-id: 676824fea3af9ef8a4bb8a5ee79a35709b641ef0
prerequisite-patch-id: 6b15e90354234809c3e054332d5d37612c5995dc
prerequisite-patch-id: 684ed745d944c90c2aae3c9eda5a4f5aa9cd48e5
prerequisite-patch-id: 1df87e0ffb6dff351d258c7ca44f98c6d5acd891
prerequisite-patch-id: 83185f6c5da6070e7b0b608bc705a2d3bf295ae6
prerequisite-patch-id: 64b8d555b9e0f7e03b93eb994cd775efcc7ad78f
prerequisite-patch-id: e23f2b7df13eb0d209aa6b871b88b3fcb89c530a
prerequisite-patch-id: bf48b96a7c921ca1742e52aba4f7f6d52198cfa8
--
2.37.0
Edited by Tales Aparecida