aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2024-10-30 10:35:02 +0800
committerMaxime Ripard <mripard@kernel.org>2024-10-31 10:31:34 +0100
commitcaa714f86699bcfb01aa2d698db12d91af7d0d81 (patch)
tree1f2a110c4355e9c48f5ec5f5dfc97301a48a249a /include
parent4700fd3e050da8302e60ebd4850d008250fa7204 (diff)
drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic()
As Maxime suggested, add a new helper drm_kunit_display_mode_from_cea_vic(), it can replace the direct call of drm_display_mode_from_cea_vic(), and it will help solving the `mode` memory leaks. Acked-by: Maxime Ripard <mripard@kernel.org> Suggested-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030023504.530425-2-ruanjinjie@huawei.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_kunit_helpers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drm_kunit_helpers.h b/include/drm/drm_kunit_helpers.h
index e7cc17ee4934..afdd46ef04f7 100644
--- a/include/drm/drm_kunit_helpers.h
+++ b/include/drm/drm_kunit_helpers.h
@@ -120,4 +120,8 @@ drm_kunit_helper_create_crtc(struct kunit *test,
const struct drm_crtc_funcs *funcs,
const struct drm_crtc_helper_funcs *helper_funcs);
+struct drm_display_mode *
+drm_kunit_display_mode_from_cea_vic(struct kunit *test, struct drm_device *dev,
+ u8 video_code);
+
#endif // DRM_KUNIT_HELPERS_H_