]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/tests: Add test for drm_framebuffer_init()
authorCarlos Eduardo Gallo Filho <gcarlos@disroot.org>
Wed, 11 Sep 2024 00:15:33 +0000 (21:15 -0300)
committerMaxime Ripard <mripard@kernel.org>
Wed, 11 Sep 2024 12:17:10 +0000 (14:17 +0200)
commit2735d5e4060960c7bd06698b0a1990c7d42c762e
treef6a3dc7b7fa04ae6f3c9cadc4a0b13b833122d8a
parent3b3732b0d30fa2bb07c2b7f95df9b33b75e32d07
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>
drivers/gpu/drm/drm_framebuffer.c
drivers/gpu/drm/tests/drm_framebuffer_test.c