summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2024-10-30 10:35:02 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-25 10:45:07 +0200
commit85926abafad54ce1da8683cc32a401b0714246a8 (patch)
treeb0176b21509dbc4e7f0be52dd5562b116001bf2f /include/drm
parent60f481fdf1e75187975ba86945f0be68eb22c511 (diff)
downloadlinux-85926abafad54ce1da8683cc32a401b0714246a8.tar.gz
linux-85926abafad54ce1da8683cc32a401b0714246a8.tar.bz2
linux-85926abafad54ce1da8683cc32a401b0714246a8.zip
drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic()
[ Upstream commit caa714f86699bcfb01aa2d698db12d91af7d0d81 ] 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> Stable-dep-of: 70f29ca3117a ("drm/tests: cmdline: Fix drm_display_mode memory leak") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/drm')
-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 6e99627edf45..3e5f4a23685e 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_