| #
4a9671a0 |
| 05-Feb-2026 |
Joel Fernandes <joelagnelf@nvidia.com> |
gpu: Move DRM buddy allocator one level up (part one)
Move the DRM buddy allocator one level up so that it can be used by GPU drivers (example, nova-core) that have usecases other than DRM (such as
gpu: Move DRM buddy allocator one level up (part one)
Move the DRM buddy allocator one level up so that it can be used by GPU drivers (example, nova-core) that have usecases other than DRM (such as VFIO vGPU support). Modify the API, structures and Kconfigs to use "gpu_buddy" terminology. Adapt the drivers and tests to use the new API.
The commit cannot be split due to bisectability, however no functional change is intended. Verified by running K-UNIT tests and build tested various configurations.
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Reviewed-by: Dave Airlie <airlied@redhat.com> [airlied: I've split this into two so git can find copies easier. I've also just nuked drm_random library, that stuff needs to be done elsewhere and only the buddy tests seem to be using it]. Signed-off-by: Dave Airlie <airlied@redhat.com>
show more ...
|
| #
b7f51380 |
| 15-Nov-2025 |
Harry Wentland <harry.wentland@amd.com> |
drm/tests: Add a few tests around drm_fixed.h
While working on the CTM implementation of VKMS I had to ascertain myself of a few assumptions. One of those is whether drm_fixed.h treats its numbers u
drm/tests: Add a few tests around drm_fixed.h
While working on the CTM implementation of VKMS I had to ascertain myself of a few assumptions. One of those is whether drm_fixed.h treats its numbers using signed-magnitude or twos-complement. It is twos-complement.
In order to make someone else's day easier I am adding the drm_test_int2fixp test that validates the above assumption.
I am also adding a test for the new sm2fixp function that converts from a signed-magnitude fixed point to the twos-complement fixed point.
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr> Link: https://patch.msgid.link/20251115000237.3561250-22-alex.hung@amd.com
show more ...
|
| #
4f522a44 |
| 16-Jun-2025 |
Thomas Zimmermann <tzimmermann@suse.de> |
drm/tests: Test drm_fb_build_fourcc_list() in separate test suite
Only sysfb drivers use drm_fb_build_fourcc_list(). The helper will be moved from format helpers to sysfb helpers. Moving the related
drm/tests: Test drm_fb_build_fourcc_list() in separate test suite
Only sysfb drivers use drm_fb_build_fourcc_list(). The helper will be moved from format helpers to sysfb helpers. Moving the related tests to their own test suite.
v3: - rename tests according to filename (José) v2: - rename filename to match tested code (Maxime)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20250616083846.221396-3-tzimmermann@suse.de
show more ...
|
| #
e0c358e2 |
| 13-Mar-2025 |
Maxime Ripard <mripard@kernel.org> |
drm/tests: Create tests for drm_atomic
We don't have a set of kunit tests for the functions under drm_atomic.h. Let's use the introduction of drm_atomic_get_connector_for_encoder() to create some te
drm/tests: Create tests for drm_atomic
We don't have a set of kunit tests for the functions under drm_atomic.h. Let's use the introduction of drm_atomic_get_connector_for_encoder() to create some tests for it and thus create that set.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-7-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
show more ...
|
| #
6b4dc080 |
| 13-Mar-2025 |
Maxime Ripard <mripard@kernel.org> |
drm/tests: Add kunit tests for bridges
None of the drm_bridge function have kunit tests so far. Let's change that, starting with drm_bridge_get_current_state().
Reviewed-by: Dmitry Baryshkov <dmitr
drm/tests: Add kunit tests for bridges
None of the drm_bridge function have kunit tests so far. Let's change that, starting with drm_bridge_get_current_state().
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-3-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
show more ...
|
| #
73d934d7 |
| 11-Dec-2024 |
Jessica Zhang <quic_jesszhan@quicinc.com> |
drm/tests: Add test for drm_atomic_helper_commit_modeset_disables()
Add a subtest to check that modeset is called when the connector is changed
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.c
drm/tests: Add test for drm_atomic_helper_commit_modeset_disables()
Add a subtest to check that modeset is called when the connector is changed
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241211-abhinavk-modeset-fix-v3-2-0de4bf3e7c32@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
show more ...
|
| #
eb66d34d |
| 27-May-2024 |
Maxime Ripard <mripard@kernel.org> |
drm/tests: Add output bpc tests
Now that we're tracking the output bpc count in the connector state, let's add a few tests to make sure it works as expected.
Reviewed-by: Dave Stevenson <dave.steve
drm/tests: Add output bpc tests
Now that we're tracking the output bpc count in the connector state, let's add a few tests to make sure it works as expected.
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Sui Jingfeng <sui.jingfeng@linux.dev> Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-6-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
show more ...
|
| #
93032ae6 |
| 30-Nov-2023 |
Marco Pagani <marpagan@redhat.com> |
drm/test: add a test suite for GEM objects backed by shmem
This patch introduces an initial KUnit test suite for GEM objects backed by shmem buffers.
Suggested-by: Javier Martinez Canillas <javierm
drm/test: add a test suite for GEM objects backed by shmem
This patch introduces an initial KUnit test suite for GEM objects backed by shmem buffers.
Suggested-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marco Pagani <marpagan@redhat.com>
v5: - using __drm_kunit_helper_alloc_drm_device() to avoid local struct v4: - Add missing MMU dependency for DRM_GEM_SHMEM_HELPER (kernel test robot) v3: - Explicitly cast pointers in the helpers - Removed unused pointer to parent dev in struct fake_dev - Test entries reordering in Kconfig and Makefile sent as a separate patch v2: - Improved description of test cases - Cleaner error handling using KUnit actions - Alphabetical order in Kconfig and Makefile
Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231130171417.74162-1-marpagan@redhat.com
show more ...
|
| #
f740f031 |
| 15-Nov-2023 |
Marco Pagani <marpagan@redhat.com> |
drm/test: rearrange test entries in Kconfig and Makefile
Rearrange entries in Kconfig and Makefile alphabetically to make room for additional KUnit test suites.
Signed-off-by: Marco Pagani <marpaga
drm/test: rearrange test entries in Kconfig and Makefile
Rearrange entries in Kconfig and Makefile alphabetically to make room for additional KUnit test suites.
Signed-off-by: Marco Pagani <marpagan@redhat.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231115103537.220760-1-marpagan@redhat.com
show more ...
|
| #
9710631c |
| 13-Apr-2022 |
Christian König <christian.koenig@amd.com> |
drm: add drm_exec selftests v4
Exercise at least all driver facing functions of this new component.
v2: add array test as well v3: some kunit cleanups v4: more tests and cleanups
Signed-off-by: Ch
drm: add drm_exec selftests v4
Exercise at least all driver facing functions of this new component.
v2: add array test as well v3: some kunit cleanups v4: more tests and cleanups
Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230711133122.3710-3-christian.koenig@amd.com
show more ...
|
| #
aebd8f0c |
| 31-Jan-2023 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
Merge v6.2-rc6 into drm-next
Due to holidays we started -next with more -fixes in-flight than usual, and people have been asking where they are. Backmerge to get things better in sync.
Conflicts: -
Merge v6.2-rc6 into drm-next
Due to holidays we started -next with more -fixes in-flight than usual, and people have been asking where they are. Backmerge to get things better in sync.
Conflicts: - Tiny conflict in drm_fbdev_generic.c between variable rename and missing error handling that got added. - Conflict in drm_fb_helper.c between the added call to vgaswitcheroo in drm_fb_helper_single_fb_probe and a refactor patch that extracted lots of helpers and incidentally removed the dev local variable. Readd it to make things compile.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
| #
523dfa96 |
| 15-Dec-2022 |
Arnd Bergmann <arnd@arndb.de> |
drm/tests: reduce drm_mm_test stack usage
The check_reserve_boundaries function uses a lot of kernel stack, and it gets inlined by clang, which makes __drm_test_mm_reserve use even more of it, to th
drm/tests: reduce drm_mm_test stack usage
The check_reserve_boundaries function uses a lot of kernel stack, and it gets inlined by clang, which makes __drm_test_mm_reserve use even more of it, to the point of hitting the warning limit:
drivers/gpu/drm/tests/drm_mm_test.c:344:12: error: stack frame size (1048) exceeds limit (1024) in '__drm_test_mm_reserve' [-Werror,-Wframe-larger-than]
When building with gcc, this does not happen, but the structleak plugin can similarly increase the stack usage and needs to be disabled, as we do for all other kunit users.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Maíra Canal <mairacanal@riseup.net> Link: https://patchwork.freedesktop.org/patch/msgid/20221215163511.266214-1-arnd@kernel.org
show more ...
|
| #
4adf5944 |
| 01-Dec-2022 |
Maxime Ripard <maxime@cerno.tech> |
drm/tests: Add a test for DRM managed actions
DRM-managed actions are supposed to be ran whenever the device is released. Let's introduce a basic unit test to make sure it happens.
Reviewed-by: Jav
drm/tests: Add a test for DRM managed actions
DRM-managed actions are supposed to be ran whenever the device is released. Let's introduce a basic unit test to make sure it happens.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-12-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
show more ...
|
| #
b85be042 |
| 01-Dec-2022 |
Maxime Ripard <maxime@cerno.tech> |
drm/tests: Introduce a config option for the KUnit helpers
Driver-specific tests will need access to the helpers without pulling every DRM framework test. Let's create an intermediate Kconfig option
drm/tests: Introduce a config option for the KUnit helpers
Driver-specific tests will need access to the helpers without pulling every DRM framework test. Let's create an intermediate Kconfig options for the helpers.
Suggested-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-2-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
show more ...
|
| #
1e4a91db |
| 17-Nov-2022 |
Noralf Trønnes <noralf@tronnes.org> |
drm/probe-helper: Provide a TV get_modes helper
Most of the TV connectors will need a similar get_modes implementation that will, depending on the drivers' capabilities, register the 480i and 576i m
drm/probe-helper: Provide a TV get_modes helper
Most of the TV connectors will need a similar get_modes implementation that will, depending on the drivers' capabilities, register the 480i and 576i modes.
That implementation will also need to set the preferred flag and order the modes based on the driver and users preferrence.
This is especially important to guarantee that a userspace stack such as Xorg can start and pick up the preferred mode while maintaining a working output.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Tested-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> Acked-in-principle-or-something-like-that-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-12-256dad125326@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
show more ...
|
| #
d4613e3e |
| 17-Nov-2022 |
Maxime Ripard <maxime@cerno.tech> |
drm/connector: Add a function to lookup a TV mode by its name
As part of the command line parsing rework coming in the next patches, we'll need to lookup drm_connector_tv_mode values by their name,
drm/connector: Add a function to lookup a TV mode by its name
As part of the command line parsing rework coming in the next patches, we'll need to lookup drm_connector_tv_mode values by their name, already defined in drm_tv_mode_enum_list.
In order to avoid any code duplication, let's do a function that will perform a lookup of a TV mode name and return its value.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Tested-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> Acked-in-principle-or-something-like-that-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-7-256dad125326@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
show more ...
|
| #
4fcd2385 |
| 17-Nov-2022 |
Maxime Ripard <maxime@cerno.tech> |
drm/modes: Add a function to generate analog display modes
Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and 625-lines modes in their drivers.
Since those modes are fairly standar
drm/modes: Add a function to generate analog display modes
Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and 625-lines modes in their drivers.
Since those modes are fairly standard, and that we'll need to use them in more places in the future, it makes sense to move their definition into the core framework.
However, analog display usually have fairly loose timings requirements, the only discrete parameters being the total number of lines and pixel clock frequency. Thus, we created a function that will create a display mode from the standard, the pixel frequency and the active area.
Tested-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> Acked-in-principle-or-something-like-that-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-6-256dad125326@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
show more ...
|
| #
44a39283 |
| 14-Nov-2022 |
Maxime Ripard <maxime@cerno.tech> |
drm/tests: Add Kunit Helpers
As the number of kunit tests in KMS grows further, we start to have multiple test suites that, for example, need to register a mock DRM driver to interact with the KMS f
drm/tests: Add Kunit Helpers
As the number of kunit tests in KMS grows further, we start to have multiple test suites that, for example, need to register a mock DRM driver to interact with the KMS function they are supposed to test.
Let's add a file meant to provide those kind of helpers to avoid duplication.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Tested-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-2-24b168e5bcd5@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
show more ...
|
| #
542bbaa7 |
| 29-Sep-2022 |
Maxime Ripard <maxime@cerno.tech> |
drm/tests: Order Kunit tests in Makefile
Since we've recently added a ton of tests, the list starts to be a bit of a mess and creates unneeded conflicts.
Let's order it alphabetically.
Acked-by: T
drm/tests: Order Kunit tests in Makefile
Since we've recently added a ton of tests, the list starts to be a bit of a mess and creates unneeded conflicts.
Let's order it alphabetically.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-2-60d38873f782@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
show more ...
|
| #
fc8d29e2 |
| 08-Jul-2022 |
Arthur Grillo <arthur.grillo@usp.br> |
drm: selftest: convert drm_mm selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM mm selftest to the KUnit API.
Signed-off-by: Arthur Grillo <arthur.grillo@us
drm: selftest: convert drm_mm selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM mm selftest to the KUnit API.
Signed-off-by: Arthur Grillo <arthur.grillo@usp.br> Tested-by: David Gow <davidgow@google.com> Acked-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Maíra Canal <maira.canal@usp.br> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220708203052.236290-10-maira.canal@usp.br
show more ...
|
| #
932da861 |
| 08-Jul-2022 |
Maíra Canal <maira.canal@usp.br> |
drm: selftest: convert drm_buddy selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM buddy selftest to the KUnit API.
Tested-by: David Gow <davidgow@google.co
drm: selftest: convert drm_buddy selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM buddy selftest to the KUnit API.
Tested-by: David Gow <davidgow@google.com> Acked-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Maíra Canal <maira.canal@usp.br> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220708203052.236290-9-maira.canal@usp.br
show more ...
|
| #
9eb11f52 |
| 08-Jul-2022 |
Maíra Canal <maira.canal@usp.br> |
drm: selftest: convert drm_framebuffer selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM framebuffer selftest to the KUnit API.
Tested-by: David Gow <davidg
drm: selftest: convert drm_framebuffer selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM framebuffer selftest to the KUnit API.
Tested-by: David Gow <davidgow@google.com> Acked-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Maíra Canal <maira.canal@usp.br> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220708203052.236290-8-maira.canal@usp.br
show more ...
|
| #
848b3c0b |
| 08-Jul-2022 |
Maíra Canal <maira.canal@usp.br> |
drm: selftest: convert drm_dp_mst_helper selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM DP MST helper selftest to the KUnit API.
Co-developed-by: Rubens
drm: selftest: convert drm_dp_mst_helper selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM DP MST helper selftest to the KUnit API.
Co-developed-by: Rubens Gomes Neto <rubens.gomes.neto@usp.br> Signed-off-by: Rubens Gomes Neto <rubens.gomes.neto@usp.br> Tested-by: David Gow <davidgow@google.com> Acked-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Maíra Canal <maira.canal@usp.br> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220708203052.236290-7-maira.canal@usp.br
show more ...
|
| #
913b1e7c |
| 08-Jul-2022 |
Maíra Canal <maira.canal@usp.br> |
drm: selftest: convert drm_plane_helper selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM plane helper selftest to the KUnit API.
Co-developed-by: Djakson C
drm: selftest: convert drm_plane_helper selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM plane helper selftest to the KUnit API.
Co-developed-by: Djakson C. G. Filho <djakson.filho@gmail.com> Signed-off-by: Djakson C. G. Filho <djakson.filho@gmail.com> Co-developed-by: Anderson Fraga <aaafraga@gmail.com> Signed-off-by: Anderson Fraga <aaafraga@gmail.com> Tested-by: David Gow <davidgow@google.com> Acked-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Maíra Canal <maira.canal@usp.br> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220708203052.236290-6-maira.canal@usp.br
show more ...
|
| #
0421bb0b |
| 08-Jul-2022 |
Maíra Canal <maira.canal@usp.br> |
drm: selftest: convert drm_format selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM format selftest to the KUnit API.
Tested-by: David Gow <davidgow@google.
drm: selftest: convert drm_format selftest to KUnit
Considering the current adoption of the KUnit framework, convert the DRM format selftest to the KUnit API.
Tested-by: David Gow <davidgow@google.com> Acked-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Maíra Canal <maira.canal@usp.br> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220708203052.236290-5-maira.canal@usp.br
show more ...
|