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
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
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
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
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
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
:
- 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
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
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.
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
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
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.
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
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
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
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
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
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
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
:
- 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
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
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
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
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
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
:
- 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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
-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
:
- 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
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
/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
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
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
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
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
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
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
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/
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
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
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
()
- 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
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
/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
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
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/
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
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
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
)
- 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
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
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
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
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
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
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
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
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/
;
| ^
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
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;
73 matches
Mail list logo