diff options
author | Maxime Ripard <mripard@kernel.org> | 2025-04-03 15:33:31 +0200 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2025-04-07 10:29:44 +0200 |
commit | 321e644716a3dd517cfa0a035deb3a2a0209f0db (patch) | |
tree | 2fa4bf1946747eafecf4d23e16c4d638beaaeaab | |
parent | 9e26a3740cc08ef8bcdc5e5d824792cd677affce (diff) |
drm/vc4: tests: Document output handling functions
vc4_mock_atomic_add_output() and vc4_mock_atomic_del_output() are public
but aren't documented. Let's provide the documentation.
In particular, special care should be taken to deal with EDEADLK.
Reviewed-by: MaĆra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20250403-drm-vc4-kunit-failures-v2-2-e09195cc8840@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
-rw-r--r-- | drivers/gpu/drm/vc4/tests/vc4_mock_output.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/tests/vc4_mock_output.c b/drivers/gpu/drm/vc4/tests/vc4_mock_output.c index f0ddc223c1f8..577d9a956369 100644 --- a/drivers/gpu/drm/vc4/tests/vc4_mock_output.c +++ b/drivers/gpu/drm/vc4/tests/vc4_mock_output.c @@ -61,6 +61,19 @@ static const struct drm_display_mode default_mode = { DRM_SIMPLE_MODE(640, 480, 64, 48) }; +/** + * vc4_mock_atomic_add_output() - Enables an output in a state + * @test: The test context object + * @state: Atomic state to enable the output in. + * @type: Type of the output encoder + * + * Adds an output CRTC and connector to a state, and enables them. + * + * Returns: + * 0 on success, a negative error code on failure. If the error is + * EDEADLK, the entire atomic sequence must be restarted. All other + * errors are fatal. + */ int vc4_mock_atomic_add_output(struct kunit *test, struct drm_atomic_state *state, enum vc4_encoder_type type) @@ -105,6 +118,19 @@ int vc4_mock_atomic_add_output(struct kunit *test, return 0; } +/** + * vc4_mock_atomic_del_output() - Disables an output in a state + * @test: The test context object + * @state: Atomic state to disable the output in. + * @type: Type of the output encoder + * + * Adds an output CRTC and connector to a state, and disables them. + * + * Returns: + * 0 on success, a negative error code on failure. If the error is + * EDEADLK, the entire atomic sequence must be restarted. All other + * errors are fatal. + */ int vc4_mock_atomic_del_output(struct kunit *test, struct drm_atomic_state *state, enum vc4_encoder_type type) |