diff options
author | Carlos Eduardo Gallo Filho <gcarlos@disroot.org> | 2024-09-10 21:15:33 -0300 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2024-09-11 14:17:10 +0200 |
commit | 2735d5e4060960c7bd06698b0a1990c7d42c762e (patch) | |
tree | f6a3dc7b7fa04ae6f3c9cadc4a0b13b833122d8a /drivers/gpu/drm/drm_framebuffer.c | |
parent | 3b3732b0d30fa2bb07c2b7f95df9b33b75e32d07 (diff) |
drm/tests: Add test for drm_framebuffer_init()
Add three KUnit test cases for the drm_framebuffer_init function:
1. Test if expected values are being set after drm_framebuffer_init() call.
2. Try to init a framebuffer without setting its format.
3. Try calling drm_framebuffer_init() with mismatch of the drm_device
passed at the first argument and the one pointed by fb->dev.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-9-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/drm_framebuffer.c')
-rw-r--r-- | drivers/gpu/drm/drm_framebuffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index 9cd85ac789bb..47e6e8577b62 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -839,6 +839,7 @@ void drm_framebuffer_free(struct kref *kref) fb->funcs->destroy(fb); } +EXPORT_SYMBOL_FOR_TESTS_ONLY(drm_framebuffer_free); /** * drm_framebuffer_init - initialize a framebuffer |