PCI_OVER_VIRTIO=y \
--kconfig_add CONFIG_VIRTIO_UML=y
There is also some documentation on the DRM KUnit Tests on [1].
[1] https://docs.kernel.org/gpu/drm-internals.html#unit-testing
Best Regards,
- Maíra Canal
> Signed-off-by: Jouni Högander > ---
> drivers/gpu/drm/drm_damage_help
char *value;
> + unsigned int len;
Looks like this variable len is not being used and is producing the
following warning:
../drivers/gpu/drm/drm_modes.c:2122:15: warning: unused variable 'len'
[-Wunused-variable]
unsigned int len;
^
Best Regards,
- Ma
est)
> +{
> + drm_cmdline_test_tv_options(test,
> + "720x576i,tv_mode=SECAM-L",
> + drm_mode_analog_pal_576i(NULL),
> + DRM_MODE_TV_MODE_SECAM_L);
> +}
Instead of creating a function to each drm_cmdline_test_tv_options test,
you can create a parameter
_framebuffer_test.o \
> drm_kunit_helpers.o \
> drm_mm_test.o \
> + drm_modes_test.o \
> drm_plane_helper_test.o \
> drm_rect_test.o
> diff --git a/drivers/gpu/drm/tests/drm_modes_test.c
> b/drivers/gpu/drm/tests/drm_modes_test.c
> new file
On 8/23/22 08:29, Jouni Högander wrote:
> We need to set also src_x, src_y, src_w and src_h for the mock plane.
> After fix for drm_atomic_helper_damage_iter_init we are using these
> when iterating damage_clips.
>
> Signed-off-by: Jouni Högander
Tested-by: Maíra Canal
Best R
> + drm_mode_parse_command_line_for_connector(cmdline,
> + connector,
> +
> cmdline_mode));
> +
> + mutex_lock(&drm->mode_config.mutex);
> + ret
(test, drm_mode_equal(expected, mode));
> +}
> +
> +static struct kunit_case drm_modes_analog_tv_tests[] = {
> + KUNIT_CASE(drm_modes_analog_tv_ntsc_480i),
> + KUNIT_CASE(drm_modes_analog_tv_ntsc_480i_inlined),
> + KUNIT_CASE(drm_modes_analog_tv_pal_576i),
> + KUNIT_CASE(drm_modes_analog_tv_pal_576i_inlined),
> + { }
> +};
> +
> +static struct kunit_suite drm_modes_analog_tv_test_suite = {
> + .name = "drm_modes_analog_tv",
> + .init = drm_modes_test_init,
> + .test_cases = drm_modes_analog_tv_tests,
> +};
> +
> +kunit_test_suites(
> + &drm_modes_analog_tv_test_suite
> +);
Considering that there is only one suite, you could use the
kunit_test_suite macro instead.
Best Regards,
- Maíra Canal
> +MODULE_LICENSE("GPL v2");
_mode_from_name_valid,
> + drm_get_tv_mode_from_name_valid_gen_params),
> + KUNIT_CASE_PARAM(drm_test_get_tv_mode_from_name_invalid,
> + drm_get_tv_mode_from_name_invalid_gen_params),
> + { }
> +};
> +
> +static struct kunit_suite drm_get_tv_mode_from_name_test_suite = {
> + .name = "drm_get_tv_mode_from_name",
> + .test_cases = drm_get_tv_mode_from_name_tests,
> +};
> +
> +kunit_test_suites(
> + &drm_get_tv_mode_from_name_test_suite
> +);
Considering that there is only one suite, you could use the
kunit_test_suite macro instead.
Best Regards,
- Maíra Canal
>
T_TRUE(test, drm_mode_equal(drm_mode_analog_ntsc_480i(drm),
> mode));
> +}
> +
> static struct kunit_case drm_test_pick_cmdline_tests[] = {
> KUNIT_CASE(drm_test_pick_cmdline_res_1920_1080_60),
> KUNIT_CASE(drm_test_pick_cmdline_named_ntsc),
> + KUNIT_CASE(drm_test_pick_cmdline_named_ntsc_j),
> KUNIT_CASE(drm_test_pick_cmdline_named_pal),
> + KUNIT_CASE(drm_test_pick_cmdline_named_pal_m),
As the tests drm_test_pick_cmdline_named_ntsc,
drm_test_pick_cmdline_named_ntsc_j, drm_test_pick_cmdline_named_pal and
drm_test_pick_cmdline_named_pal_m follow a pretty similar structure, it
would be nice to parametrize those tests.
Best Regards,
- Maíra Canal
> {}
> };
>
>
E_PAL,
> + DRM_MODE_TV_MODE_NTSC,
> + &ntsc_mode, &pal_mode),
> +};
> +
> +static void
> +drm_connector_helper_tv_get_modes_desc(const struct
> drm_connector_helper_tv_get_modes_test *t,
> + char *desc)
> +{
> + sprintf(desc, "%s", t->name);
> +}
> +KUNIT_ARRAY_PARAM(drm_connector_helper_tv_get_modes,
> + drm_connector_helper_tv_get_modes_tests,
> + drm_connector_helper_tv_get_modes_desc);
> +
> +static struct kunit_case drm_test_connector_helper_tv_get_modes_tests[] = {
> + KUNIT_CASE_PARAM(drm_test_connector_helper_tv_get_modes_check,
> + drm_connector_helper_tv_get_modes_gen_params),
> + { }
> +};
> +
> +static struct kunit_suite drm_test_connector_helper_tv_get_modes_suite = {
> + .name = "drm_test_connector_helper_tv_get_modes",
> + .init = drm_probe_helper_test_init,
> + .test_cases = drm_test_connector_helper_tv_get_modes_tests,
> +};
> +
> +kunit_test_suites(
> + &drm_test_connector_helper_tv_get_modes_suite
> +);
Considering that there is only one suite, you could use the
kunit_test_suite macro instead.
Moreover, it would be nice to run the checkpatch script on this test, as
there are a couple of problems with the code style.
Best Regards,
- Maíra Canal
valid formats.
Moreover, note that this check is only valid for atomic drivers,
because, for non-atomic drivers, checking drm_any_plane_has_format() is
not possible since the format list for the primary plane is fake, and
we'd therefore reject valid formats.
Signed-off-by: Maíra Canal
---
Doc
test passes,
showing the correct behavior of the check.
This patchset was tested on i915, amdgpu, and vc4 with the IGT tests.
[1]
https://lore.kernel.org/dri-devel/20230103125322.855089-1-mca...@igalia.com/T/
Best Regards,
- Maíra Canal
Maíra Canal (5):
drm/framebuffer: Check for valid formats
m the framebuffer validation.
Signed-off-by: Maíra Canal
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index b22471b3bd63..611b7a4b086c 100644
uffer validation.
Signed-off-by: Maíra Canal
---
drivers/gpu/drm/i915/display/intel_fb.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c
b/drivers/gpu/drm/i915/display/intel_fb.c
index 63137ae5ab21..230b729e42d6 100644
--- a/drivers/gpu/drm/i915/di
tting framebuffer_check() perform the framebuffer
validation.
Signed-off-by: Maíra Canal
---
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 18 --
1 file changed, 18 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 257f090071f1..05b8d8f
: Maíra Canal
---
drivers/gpu/drm/drm_plane.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 24e7998d1731..67c0ab60c7b6 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -837,7 +837,6 @@ bool
Hi,
On 1/12/23 09:43, Ville Syrjälä wrote:
On Mon, Jan 09, 2023 at 07:58:06AM -0300, Maíra Canal wrote:
Now that framebuffer_check() verifies that the format is properly
supported, there is no need to check it again on i915's inside
helpers.
Therefore, remove the redundant framebuffer f
On 4/8/24 16:06, Ville Syrjala wrote:
From: Ville Syrjälä
Replace the open coded drm_crtc_vblank_crtc() with the real
thing.
Cc: Rodrigo Siqueira
Cc: Melissa Wen
Cc: "Maíra Canal"
Cc: Haneen Mohammed
Cc: Daniel Vetter
Signed-off-by: Ville Syrjälä
Reviewed-by: Maíra Ca
_unlock(&vc4->power_lock);
For vc4,
Reviewed-by: Maíra Canal
Best Regards,
- Maíra
19 matches
Mail list logo