[PATCH v4 RESEND 4/9] drm/tests: Add test case for drm_internal_framebuffer_create()

2024-09-10 Thread Carlos Eduardo Gallo Filho
Introduce a test to cover the creation of framebuffer with modifier on a device that doesn't support it. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. v3: - Replace the use of void pointer on drm_framebuffer_test_priv struct. - Test return val

[PATCH v4 RESEND 9/9] drm/tests: Add test for drm_framebuffer_free()

2024-09-10 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_free function. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2: - Reorder kunit cases alphabetically. v3: - Replace the use of void pointer on drm_framebuffer_test_priv struct. - Remove the test with

[PATCH v4 RESEND 6/9] drm/tests: Add test for drm_framebuffer_cleanup()

2024-09-10 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_cleanup function. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2: - Reorder kunit cases alphabetically. - Rely on drm_kunit_helper_alloc_device() for mock initialization. v3: - Init framebuffers using

[PATCH v4 RESEND 5/9] drm/tests: Add test for drm_framebuffer_check_src_coords()

2024-09-10 Thread Carlos Eduardo Gallo Filho
Add a parametrized test for the drm_framebuffer_check_src_coords function. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2: - Order kunit cases alphabetically. - Rename check_src_coords_case to drm_framebuffer_check_src_coords_case. - Remove unnecessary comments

[PATCH v4 RESEND 2/9] drm/tests: Add parameters to the drm_test_framebuffer_create test

2024-09-10 Thread Carlos Eduardo Gallo Filho
Extend the existing test case to cover: 1. Invalid flag atribute in the struct drm_mode_fb_cmd2. 2. Pixel format which requires non-linear modifier with DRM_FORMAT_MOD_LINEAR set. 3. Buffer offset for inexistent plane Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2

[PATCH v4 RESEND 1/9] drm/tests: Stop using deprecated dev_private member on drm_framebuffer tests

2024-09-10 Thread Carlos Eduardo Gallo Filho
using drm_kunit_helper_alloc_drm_device() for allocating the drm_device mock. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2: - Start using drm_kunit_helper_alloc_drm_device() for drm_device mock. - Rename struct drm_mock to drm_framebuffer_test_priv v3: - Replace the

[PATCH v4 RESEND 0/9] Increase coverage on drm_framebuffer.c

2024-09-10 Thread Carlos Eduardo Gallo Filho
: - drm_framebuffer_check_src_coords() - drm_framebuffer_cleanup() - drm_framebuffer_lookup() - drm_framebuffer_init() - drm_framebuffer_free() --- v3: - Drop drm_mode_addfb2 and drm_fb_release tests (patches 10 and 11 from v2) --- Carlos Eduardo Gallo Filho (9): drm/tests: Stop using deprecated

[PATCH v4 RESEND 7/9] drm/tests: Add test for drm_framebuffer_lookup()

2024-09-10 Thread Carlos Eduardo Gallo Filho
Add two KUnit test cases for the drm_framebuffer_lookup function, one for the base case, that tests if the lookup finds the correct framebuffer object and another that tests the lookup for an inexistent framebuffer. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2

[PATCH v4 RESEND 8/9] drm/tests: Add test for drm_framebuffer_init()

2024-09-10 Thread Carlos Eduardo Gallo Filho
argument and the one pointed by fb->dev. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. - Let fb1.dev unset instead of set it to wrong_drm to test mismatched drm_device passed as drm_framebuffer_init() argument. - Clean the framebuffer object.

[PATCH v4 RESEND 3/9] drm/tests: Replace strcpy to strscpy on drm_test_framebuffer_create test

2024-09-10 Thread Carlos Eduardo Gallo Filho
Replace the use of strcpy to strscpy on the test_to_desc of the drm_test_framebuffer_create test for better security and reliability. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v4 9/9] drm/tests: Add test for drm_framebuffer_free()

2024-08-05 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_free function. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2: - Reorder kunit cases alphabetically. v3: - Replace the use of void pointer on drm_framebuffer_test_priv struct. - Remove the test with

[PATCH v4 8/9] drm/tests: Add test for drm_framebuffer_init()

2024-08-05 Thread Carlos Eduardo Gallo Filho
argument and the one pointed by fb->dev. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. - Let fb1.dev unset instead of set it to wrong_drm to test mismatched drm_device passed as drm_framebuffer_init() argument. - Clean the framebuffer object.

[PATCH v4 7/9] drm/tests: Add test for drm_framebuffer_lookup()

2024-08-05 Thread Carlos Eduardo Gallo Filho
Add two KUnit test cases for the drm_framebuffer_lookup function, one for the base case, that tests if the lookup finds the correct framebuffer object and another that tests the lookup for an inexistent framebuffer. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2

[PATCH v4 5/9] drm/tests: Add test for drm_framebuffer_check_src_coords()

2024-08-05 Thread Carlos Eduardo Gallo Filho
Add a parametrized test for the drm_framebuffer_check_src_coords function. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2: - Order kunit cases alphabetically. - Rename check_src_coords_case to drm_framebuffer_check_src_coords_case. - Remove unnecessary comments

[PATCH v4 6/9] drm/tests: Add test for drm_framebuffer_cleanup()

2024-08-05 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_cleanup function. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2: - Reorder kunit cases alphabetically. - Rely on drm_kunit_helper_alloc_device() for mock initialization. v3: - Init framebuffers using

[PATCH v4 4/9] drm/tests: Add test case for drm_internal_framebuffer_create()

2024-08-05 Thread Carlos Eduardo Gallo Filho
Introduce a test to cover the creation of framebuffer with modifier on a device that doesn't support it. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. v3: - Replace the use of void pointer on drm_framebuffer_test_priv struct. - Test return val

[PATCH v4 3/9] drm/tests: Replace strcpy to strscpy on drm_test_framebuffer_create test

2024-08-05 Thread Carlos Eduardo Gallo Filho
Replace the use of strcpy to strscpy on the test_to_desc of the drm_test_framebuffer_create test for better security and reliability. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v4 2/9] drm/tests: Add parameters to the drm_test_framebuffer_create test

2024-08-05 Thread Carlos Eduardo Gallo Filho
Extend the existing test case to cover: 1. Invalid flag atribute in the struct drm_mode_fb_cmd2. 2. Pixel format which requires non-linear modifier with DRM_FORMAT_MOD_LINEAR set. 3. Buffer offset for inexistent plane Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2

[PATCH v4 1/9] drm/tests: Stop using deprecated dev_private member on drm_framebuffer tests

2024-08-05 Thread Carlos Eduardo Gallo Filho
using drm_kunit_helper_alloc_drm_device() for allocating the drm_device mock. Signed-off-by: Carlos Eduardo Gallo Filho Acked-by: Maxime Ripard --- v2: - Start using drm_kunit_helper_alloc_drm_device() for drm_device mock. - Rename struct drm_mock to drm_framebuffer_test_priv v3: - Replace the

[PATCH v4 0/9] Increase coverage on drm_framebuffer.c

2024-08-05 Thread Carlos Eduardo Gallo Filho
: - drm_framebuffer_check_src_coords() - drm_framebuffer_cleanup() - drm_framebuffer_lookup() - drm_framebuffer_init() - drm_framebuffer_free() --- v3: - Drop drm_mode_addfb2 and drm_fb_release tests (patches 10 and 11 from v2) --- Carlos Eduardo Gallo Filho (9): drm/tests: Stop using deprecated

[PATCH v3 4/9] drm/tests: Add test case for drm_internal_framebuffer_create()

2024-07-03 Thread Carlos Eduardo Gallo Filho
Introduce a test to cover the creation of framebuffer with modifier on a device that doesn't support it. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. v3: - Replace the use of void pointer on drm_framebuffer_test_priv struct. - Test return val

[PATCH v3 9/9] drm/tests: Add test for drm_framebuffer_free()

2024-07-03 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_free function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. v3: - Replace the use of void pointer on drm_framebuffer_test_priv struct. - Remove the test with unregistered framebuffer object

[PATCH v3 1/9] drm/tests: Stop using deprecated dev_private member on drm_framebuffer tests

2024-07-03 Thread Carlos Eduardo Gallo Filho
using drm_kunit_helper_alloc_drm_device() for allocating the drm_device mock. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Start using drm_kunit_helper_alloc_drm_device() for drm_device mock. - Rename struct drm_mock to drm_framebuffer_test_priv v3: - Replace the use of void pointer on

[PATCH v3 6/9] drm/tests: Add test for drm_framebuffer_cleanup()

2024-07-03 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_cleanup function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. - Rely on drm_kunit_helper_alloc_device() for mock initialization. v3: - Init framebuffers using drm_framebuffer_init(). - Add

[PATCH v3 2/9] drm/tests: Add parameters to the drm_test_framebuffer_create test

2024-07-03 Thread Carlos Eduardo Gallo Filho
Extend the existing test case to cover: 1. Invalid flag atribute in the struct drm_mode_fb_cmd2. 2. Pixel format which requires non-linear modifier with DRM_FORMAT_MOD_LINEAR set. 3. Buffer offset for inexistent plane Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Remove strcpy to strscpy

[PATCH v3 0/9] Increase coverage on drm_framebuffer.c

2024-07-03 Thread Carlos Eduardo Gallo Filho
: - drm_framebuffer_check_src_coords() - drm_framebuffer_cleanup() - drm_framebuffer_lookup() - drm_framebuffer_init() - drm_framebuffer_free() --- v3: - Drop drm_mode_addfb2 and drm_fb_release tests (patches 10 and 11 from v2) --- Carlos Eduardo Gallo Filho (9): drm/tests: Stop using deprecated

[PATCH v3 3/9] drm/tests: Replace strcpy to strscpy on drm_test_framebuffer_create test

2024-07-03 Thread Carlos Eduardo Gallo Filho
Replace the use of strcpy to strscpy on the test_to_desc of the drm_test_framebuffer_create test for better security and reliability. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v3 7/9] drm/tests: Add test for drm_framebuffer_lookup()

2024-07-03 Thread Carlos Eduardo Gallo Filho
Add two KUnit test cases for the drm_framebuffer_lookup function, one for the base case, that tests if the lookup finds the correct framebuffer object and another that tests the lookup for an inexistent framebuffer. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases

[PATCH v3 8/9] drm/tests: Add test for drm_framebuffer_init()

2024-07-03 Thread Carlos Eduardo Gallo Filho
argument and the one pointed by fb->dev. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. - Let fb1.dev unset instead of set it to wrong_drm to test mismatched drm_device passed as drm_framebuffer_init() argument. - Clean the framebuffer object.

[PATCH v3 5/9] drm/tests: Add test for drm_framebuffer_check_src_coords()

2024-07-03 Thread Carlos Eduardo Gallo Filho
Add a parametrized test for the drm_framebuffer_check_src_coords function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Order kunit cases alphabetically. - Rename check_src_coords_case to drm_framebuffer_check_src_coords_case. - Remove unnecessary comments. - Add framebuffer size

[PATCH v2 11/11] drm/tests: Add test for drm_fb_release()

2023-10-24 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_fb_release function, which also implicitly test the static legacy_remove_fb function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Rely on drm_kunit_helper_alloc_device() for mock initialization. --- drivers/gpu/drm/tests/drm_framebuffer_test.c

[PATCH v2 10/11] drm/tests: Add test for drm_mode_addfb2()

2023-10-24 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_mode_addfb2 function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. - Rely on drm_kunit_helper_alloc_device() for mock initialization. --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 104

[PATCH v2 09/11] drm/tests: Add test for drm_framebuffer_free()

2023-10-24 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_free function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 49 1 file changed, 49 insertions(+) diff --git a/drivers/gpu

[PATCH v2 08/11] drm/tests: Add test for drm_framebuffer_init()

2023-10-24 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_init function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. - Let fb1.dev unset instead of set it to wrong_drm to test mismatched drm_device passed as drm_framebuffer_init() argument

[PATCH v2 07/11] drm/tests: Add test for drm_framebuffer_lookup()

2023-10-24 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_lookup function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. - Replace drm_mode_object_add() call to drm_framebuffer_init(). - Rely on drm_kunit_helper_alloc_device() for mock initialization

[PATCH v2 06/11] drm/tests: Add test for drm_framebuffer_cleanup()

2023-10-24 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_cleanup function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. - Rely on drm_kunit_helper_alloc_device() for mock initialization. --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 37

[PATCH v2 05/11] drm/tests: Add test for drm_framebuffer_check_src_coords()

2023-10-24 Thread Carlos Eduardo Gallo Filho
Add a parametrized test for the drm_framebuffer_check_src_coords function. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Order kunit cases alphabetically. - Rename check_src_coords_case to drm_framebuffer_check_src_coords_case. - Remove unnecessary comments. - Add framebuffer size

[PATCH v2 04/11] drm/tests: Add test case for drm_internal_framebuffer_create()

2023-10-24 Thread Carlos Eduardo Gallo Filho
Introduce a test to cover the creation of framebuffer with modifier on a device that doesn't support it. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Reorder kunit cases alphabetically. --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 28 1 file change

[PATCH v2 03/11] drm/tests: Replace strcpy to strscpy on drm_test_framebuffer_create test

2023-10-24 Thread Carlos Eduardo Gallo Filho
Replace the use of strcpy to strscpy on the test_to_desc of the drm_test_framebuffer_create test for better security and reliability. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v2 02/11] drm/tests: Add parameters to the drm_test_framebuffer_create test

2023-10-24 Thread Carlos Eduardo Gallo Filho
and reliability. Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Remove strcpy to strscpy change. --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 21 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu/drm/tests

[PATCH v2 01/11] drm/tests: Stop using deprecated dev_private member on drm_framebuffer tests

2023-10-24 Thread Carlos Eduardo Gallo Filho
-off-by: Carlos Eduardo Gallo Filho --- v2: - Start using drm_kunit_helper_alloc_drm_device() for drm_device mock. - Rename struct drm_mock to drm_framebuffer_test_priv --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 42 ++-- 1 file changed, 29 insertions(+), 13 deletions

[PATCH v2 00/11] Increase coverage on drm_framebuffer.c

2023-10-24 Thread Carlos Eduardo Gallo Filho
: - drm_framebuffer_check_src_coords() - drm_framebuffer_cleanup() - drm_framebuffer_lookup() - drm_framebuffer_init() - drm_framebuffer_free() - drm_mode_addfb2() - drm_fb_release() Signed-off-by: Carlos Eduardo Gallo Filho --- v2: - Split strcpy to strscpy change on drm_test_framebuffer_create

[PATCH v2 2/2] drm: Replace drm_framebuffer plane size functions with its equivalents

2023-09-26 Thread Carlos Eduardo Gallo Filho
drm_format_info_plane_{width,height} and remove them. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/drm_framebuffer.c | 64 ++--- drivers/gpu/drm/i915/display/intel_fb.c | 2 +- include/drm/drm_framebuffer.h | 5 -- 3 files changed, 5 insertions(+), 66

[PATCH v2 1/2] drm: Remove plane hsub/vsub alignment requirement for core helpers

2023-09-26 Thread Carlos Eduardo Gallo Filho
/20211026225105.2783797-2-imre.d...@intel.com Signed-off-by: Carlos Eduardo Gallo Filho --- include/drm/drm_fourcc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index 532ae78ca747..ccf91daa4307 100644 --- a/include/drm

[RESEND PATCH v2 0/2] drm: Refactor plane size calculation by core helper functions

2023-09-26 Thread Carlos Eduardo Gallo Filho
table against the drivers. Thanks, Carlos --- v2: - New patch "[PATCH v2 1/2] drm: Remove plane hsub/vsub alignment requirement for core helpers". Carlos Eduardo Gallo Filho (2): drm: Remove plane hsub/vsub alignment requirement for core helpers drm: Replace drm_framebuffer plane

[PATCH 09/10] drm/tests: Add test for drm_mode_addfb2()

2023-08-25 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_mode_addfb2 function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 100 ++- 1 file changed, 98 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b

[PATCH 08/10] drm/tests: Add test for drm_framebuffer_free()

2023-08-25 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_free function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 49 1 file changed, 49 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu

[PATCH 07/10] drm/tests: Add test for drm_framebuffer_init()

2023-08-25 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_init function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 52 1 file changed, 52 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu

[PATCH 06/10] drm/tests: Add test for drm_framebuffer_lookup()

2023-08-25 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_lookup function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu

[PATCH 05/10] drm/tests: Add test for drm_framebuffer_cleanup()

2023-08-25 Thread Carlos Eduardo Gallo Filho
Add a single KUnit test case for the drm_framebuffer_cleanup function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 49 1 file changed, 49 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu

[PATCH 03/10] drm/tests: Add test case for drm_internal_framebuffer_create()

2023-08-25 Thread Carlos Eduardo Gallo Filho
Introduce a test to cover the creation of framebuffer with modifier on a device that doesn't support it. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/

[PATCH 04/10] drm/tests: Add test for drm_framebuffer_check_src_coords()

2023-08-25 Thread Carlos Eduardo Gallo Filho
Add a parametrized test for the drm_framebuffer_check_src_coords function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/drm_framebuffer.c| 1 + drivers/gpu/drm/tests/drm_framebuffer_test.c | 61 2 files changed, 62 insertions(+) diff --git a

[PATCH 02/10] drm/tests: Add parameters to the drm_test_framebuffer_create test

2023-08-25 Thread Carlos Eduardo Gallo Filho
and reliability. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 23 +++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu/drm/tests/drm_framebuffer_test.c index

[PATCH 01/10] drm/tests: Stop using deprecated dev_private member on drm_framebuffer tests

2023-08-25 Thread Carlos Eduardo Gallo Filho
The dev_private member of drm_device is deprecated and its use should be avoided. Stop using it by embedding the drm_device onto a mock struct with a void pointer like dev_private, using it instead. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 29

[PATCH 00/10] Increase coverage on drm_framebuffer.c

2023-08-25 Thread Carlos Eduardo Gallo Filho
() - drm_framebuffer_cleanup() - drm_framebuffer_lookup() - drm_framebuffer_init() - drm_framebuffer_free() - drm_mode_addfb2() - drm_fb_release() Signed-off-by: Carlos Eduardo Gallo Filho --- Carlos Eduardo Gallo Filho (10): drm/tests: Stop using deprecated dev_private member on drm_framebuffer tests drm/tests

[PATCH v2 2/2] drm: Replace drm_framebuffer plane size functions with its equivalents

2023-07-19 Thread Carlos Eduardo Gallo Filho
drm_format_info_plane_{width,height} and remove them. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/drm_framebuffer.c | 64 ++--- drivers/gpu/drm/i915/display/intel_fb.c | 2 +- include/drm/drm_framebuffer.h | 5 -- 3 files changed, 5 insertions(+), 66

[PATCH v2 1/2] drm: Remove plane hsub/vsub alignment requirement for core helpers

2023-07-19 Thread Carlos Eduardo Gallo Filho
/20211026225105.2783797-2-imre.d...@intel.com Signed-off-by: Carlos Eduardo Gallo Filho --- include/drm/drm_fourcc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index 532ae78ca747..ccf91daa4307 100644 --- a/include/drm

[PATCH v2 0/2] drm: Refactor plane size calculation by core helper functions

2023-07-19 Thread Carlos Eduardo Gallo Filho
table against the drivers. Thanks, Carlos --- v1 -> v2: https://lore.kernel.org/dri-devel/20230627182239.15676-1-gcar...@disroot.org/ - New patch "[PATCH v2 1/2] drm: Remove plane hsub/vsub alignment requirement for core helpers". --- Carlos Eduardo Gallo Filho (2): drm: Remo

[PATCH v2 4/4] drm/tests: Add test case for drm_internal_framebuffer_create()

2023-07-18 Thread Carlos Eduardo Gallo Filho
Introduce a test to cover the creation of framebuffer with modifier on a device that don't support it. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 29 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/

[PATCH v2 3/4] drm/tests: Add parameters to the drm_test_framebuffer_create test

2023-07-18 Thread Carlos Eduardo Gallo Filho
and reliability. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 23 +++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu/drm/tests/drm_framebuffer_test.c index

[PATCH v2 1/4] drm: Add kernel-doc for drm_framebuffer_check_src_coords()

2023-07-18 Thread Carlos Eduardo Gallo Filho
Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/drm_framebuffer.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index aff3746dedfb..49df3ca3b3ee 100644 --- a/drivers/gpu

[PATCH v2 2/4] drm/tests: Add test for drm_framebuffer_check_src_coords()

2023-07-18 Thread Carlos Eduardo Gallo Filho
Add a parametrized test for the drm_framebuffer_check_src_coords function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 126 +++ 1 file changed, 126 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b

[PATCH v2 0/4] Add documentation and KUnit tests for functions on drm_framebuffer.c

2023-07-18 Thread Carlos Eduardo Gallo Filho
) - Added comments (Maxime) - Ordered KUNIT_CASE_PARAM alphabetically (Maxime) - Replaced some parameter cases description with more verbose ones --- Carlos Eduardo Gallo Filho (4): drm: Add kernel-doc for drm_framebuffer_check_src_coords() drm/tests: Add test for

[PATCH 4/4] drm/tests: Add test case for drm_internal_framebuffer_create()

2023-07-14 Thread Carlos Eduardo Gallo Filho
Introduce a test to cover the creation of a framebuffer with a setted modifier and a driver that don't support modifiers. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 21 1 file changed, 21 insertions(+) diff --git a/dr

[PATCH 3/4] drm/tests: Add parameters to the drm_test_framebuffer_create test

2023-07-14 Thread Carlos Eduardo Gallo Filho
Extend the existing test case to cover: 1. Invalid flag atribute in the struct drm_mode_fb_cmd2. 2. Pixel format which requires non-linear modifier with DRM_FORMAT_MOD_LINEAR set. 3. Non-zero buffer offset for an unused plane Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests

[PATCH 2/4] drm/tests: Add test for drm_framebuffer_check_src_coords()

2023-07-14 Thread Carlos Eduardo Gallo Filho
Add a parametrized test for the drm_framebuffer_check_src_coords function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 107 +++ 1 file changed, 107 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b

[PATCH 1/4] drm: Add kernel-doc for drm_framebuffer_check_src_coords()

2023-07-14 Thread Carlos Eduardo Gallo Filho
Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/drm_framebuffer.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index aff3746dedfb..49df3ca3b3ee 100644 --- a/drivers/gpu

[PATCH 0/4] Add documentation and KUnit tests for functions on drm_framebuffer.c

2023-07-14 Thread Carlos Eduardo Gallo Filho
This series adds documentation and unit tests for drm_framebuffer_check_src_coords() and drm_internal_framebuffer_create() functions on drm_framebuffer.c, including new parameters to the, until then, only existent test. Many thanks, Carlos Carlos Eduardo Gallo Filho (4): drm: Add kernel-doc

[PATCH] drm: Replace drm_framebuffer plane size functions with its equivalents

2023-06-27 Thread Carlos Eduardo Gallo Filho
drm_format_info_plane_{width,height} and remove them. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/drm_framebuffer.c | 64 ++--- drivers/gpu/drm/i915/display/intel_fb.c | 2 +- include/drm/drm_framebuffer.h | 5 -- 3 files changed, 5 insertions(+), 66

[PATCH v2] drm/tests: Fix swapped drm_framebuffer tests parameter names

2023-06-24 Thread Carlos Eduardo Gallo Filho
Swap tests parameters names so they actually reflect what is being tested. v1: https://lore.kernel.org/all/20230623152518.8603-1-gcar...@disroot.org/ v2: Simplified commit message. Signed-off-by: Carlos Eduardo Gallo Filho Reviewed-by: André Almeida Reviewed-by: Maíra Canal --- drivers/gpu

[PATCH] drm/tests: Fix swapped test parameter names

2023-06-23 Thread Carlos Eduardo Gallo Filho
sted by the former, which also in turn fit in what "YVU320 Normal sizes" should be, meaning that they were swapped. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/

[PATCH v2] drm/amdgpu: Remove unused variable that holds a return value

2023-03-25 Thread Carlos Eduardo Gallo Filho
; | ^ That variable is used to hold the return value of amdgpu_bo_create_kernel() function call. Remove r to fix the warning. Signed-off-by: Carlos Eduardo Gallo Filho --- Changes in v2: - Fix missing Signed-off-by tag - Fix typo in the description --- drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: Remove ununsed variable that holds a return value

2023-03-25 Thread Carlos Eduardo Gallo Filho
Compiling amdgpu with W=1 get that unused-but-set-variable warning. drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function ‘amdgpu_mes_ctx_alloc_meta_data’: drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1099:13: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] 1099 | int r;