: 8b25320887d7 ("drm: Add fixed-point helper to get rounded integer
values")
Suggested-by: Pekka Paalanen
Reviewed-by: Harry Wentland
Signed-off-by: Arthur Grillo
---
Changes in v2:
- Add Fixes tag (Melissa Wen)
- Remove DRM_FIXED_POINT_HALF (Melissa Wen)
- Link to v1:
https://lore.kern
On 12/03/24 15:27, Melissa Wen wrote:
> On 03/06, Arthur Grillo wrote:
>> As well noted by Pekka[1], the rounding of drm_fixp2int_round is wrong.
>> To round a number, you need to add 0.5 to the number and floor that,
>> drm_fixp2int_round() is adding 0.076. Make
On 12/03/24 15:27, Melissa Wen wrote:
> On 03/06, Arthur Grillo wrote:
>> As well noted by Pekka[1], the rounding of drm_fixp2int_round is wrong.
>> To round a number, you need to add 0.5 to the number and floor that,
>> drm_fixp2int_round() is adding 0.076. Make
On 06/03/24 21:03, Louis Chauvet wrote:
> Le 06/03/24 - 17:03, Arthur Grillo a écrit :
>> Signed-off-by: Arthur Grillo
>> ---
>> drivers/gpu/drm/vkms/tests/vkms_format_test.c | 2 +-
>> drivers/gpu/drm/vkms/vkms_drv.h | 4
>> 2 files cha
On 04/03/24 13:51, Arthur Grillo wrote:
>
>
> On 04/03/24 12:48, Louis Chauvet wrote:
[...]
>>>
>>>> Regarding the YUV part, I don't feel confortable adressing Pekka's
>>>> comments, would you mind doing it?
>>>
>>> I'
Now that we have KUnit tests, add instructions on how to run them.
Signed-off-by: Arthur Grillo
---
Documentation/gpu/vkms.rst | 11 +++
1 file changed, 11 insertions(+)
diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.rst
index 13b866c3617c..5ef5ef2e6a21 100644
--- a
Using the drm_fixed calls, this needs to be changed. Which in fact is
more correct, colour.YCbCr_to_RGB() gives 0x8080 for same the yuv
parameters.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/tests/vkms_format_test.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/tests/vkms_format_test.c | 67 +++
1 file changed, 67 insertions(+)
diff --git a/drivers/gpu/drm/vkms/tests/vkms_format_test.c
b/drivers/gpu/drm/vkms/tests/vkms_format_test.c
index 3522ecee960f..66cdd83c3d25 100644
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/tests/vkms_format_test.c | 2 +-
drivers/gpu/drm/vkms/vkms_drv.h | 4
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vkms/tests/vkms_format_test.c
b/drivers/gpu/drm/vkms/tests
With the new 32.32 values it makes more sense to use drm_fixed functions
than trying to recreate the wheel.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_formats.c | 54 +++--
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/drivers
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_formats.c | 47 +
1 file changed, 47 insertions(+)
diff --git a/drivers/gpu/drm/vkms/vkms_formats.c
b/drivers/gpu/drm/vkms/vkms_formats.c
index 44d9b9b3bdc3..55ed3f598bd7 100644
--- a/drivers/gpu/drm
/
Suggested-by: Pekka Paalanen
Signed-off-by: Arthur Grillo
---
include/drm/drm_fixed.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h
index 0c9f917a4d4b..de3a79909ac9 100644
--- a/include/drm/drm_fixed.h
+++ b/include/drm/drm_fixed.h
.petazz...@bootlin.com
Cc: seanp...@google.com
Cc: marc...@google.com
Cc: nicolejade...@google.com
Signed-off-by: Arthur Grillo
---
Arthur Grillo (7):
drm: Fix drm_fixp2int_round() making it add 0.5
drm/vkms: Add comments
drm/vkmm: Use drm_fixed api
drm/vkms: Fix compilat
send those changes? I reply to
>> your series, like a did before?
>
> Yes, simply reply to my series, so I can rebase everything on the
> line-by-line work.
OK, I will do that.
Best Regards,
~Arthur Grillo
> Kind regards,
> Louis Chauvet
>
>> Best Regards,
>> ~Arthur Grillo
>>
>>>
>>> Kind regards,
>>> Louis Chauvet
>>>
>>> [...]
>>>
>
On 04/03/24 12:28, Louis Chauvet wrote:
> Le 29/02/24 - 14:12, Pekka Paalanen a écrit :
>> On Wed, 28 Feb 2024 22:52:09 -0300
>> Arthur Grillo wrote:
>>
>>> On 27/02/24 17:01, Arthur Grillo wrote:
>>>>
>>>>
>>>> On 27/02/24 12:
On 01/03/24 08:53, Pekka Paalanen wrote:
> On Thu, 29 Feb 2024 14:57:06 -0300
> Arthur Grillo wrote:
>
>> On 29/02/24 09:12, Pekka Paalanen wrote:
>>> On Wed, 28 Feb 2024 22:52:09 -0300
>>> Arthur Grillo wrote:
>>>
>>>> On 27/02/24 17
On 29/02/24 14:52, Sebastian Wick wrote:
> On Wed, Feb 28, 2024 at 08:42:41PM -0300, Arthur Grillo wrote:
>>
>>
>> On 15/01/24 12:06, Sebastian Wick wrote:
>>> On Wed, Jan 10, 2024 at 02:44:00PM -0300, Arthur Grillo wrote:
>>>> This patchset aims to add
On 29/02/24 09:12, Pekka Paalanen wrote:
> On Wed, 28 Feb 2024 22:52:09 -0300
> Arthur Grillo wrote:
>
>> On 27/02/24 17:01, Arthur Grillo wrote:
>>>
>>>
>>> On 27/02/24 12:02, Louis Chauvet wrote:
>>>> Hi Pekka,
>>>>
>
On 27/02/24 17:01, Arthur Grillo wrote:
>
>
> On 27/02/24 12:02, Louis Chauvet wrote:
>> Hi Pekka,
>>
>> For all the comment related to the conversion part, maybe Arthur have an
>> opinion on it, I took his patch as a "black box" (I did not want t
On 15/01/24 12:06, Sebastian Wick wrote:
> On Wed, Jan 10, 2024 at 02:44:00PM -0300, Arthur Grillo wrote:
>> This patchset aims to add support for additional buffer YUV formats.
>> More specifically, it adds support to:
>>
>> Semi-planar formats:
>>
>&g
nen a écrit :
>> On Fri, 23 Feb 2024 12:37:26 +0100
>> Louis Chauvet wrote:
>>
>>> From: Arthur Grillo
>>>
>>> Add support to the YUV formats bellow:
>>>
>>> - NV12
>>> - NV16
>>> - NV24
>>> - NV21
>>&g
On 27/02/24 12:02, Louis Chauvet wrote:
> Le 26/02/24 - 10:07, Arthur Grillo a écrit :
>>
>>
>> On 26/02/24 05:46, Louis Chauvet wrote:
>>> Add some documentation on pixel conversion functions.
>>> Update of outdated comments for pixel_write function
On 27/02/24 12:02, Louis Chauvet wrote:
> Le 27/02/24 - 15:26, Pekka Paalanen a écrit :
>> On Tue, 27 Feb 2024 09:29:58 -0300
>> Arthur Grillo wrote:
>>
>>> On 27/02/24 08:55, Pekka Paalanen wrote:
>>>> On Tue, 27 Feb 2024 08:44:52 -0300
>>>&
On 27/02/24 08:55, Pekka Paalanen wrote:
> On Tue, 27 Feb 2024 08:44:52 -0300
> Arthur Grillo wrote:
>
>> On 27/02/24 06:19, Pekka Paalanen wrote:
>>> On Mon, 26 Feb 2024 17:42:11 -0300
>>> Arthur Grillo wrote:
>>>
>>>> Now that w
v3:
> - Use include way of testing static functions (Arthur)
>
> Signed-off-by: Harry Wentland
> Cc: Arthur Grillo
> ---
> drivers/gpu/drm/vkms/Kconfig | 5 +
> drivers/gpu/drm/vkms/tests/.kunitconfig | 4 +
> drivers/gpu/drm/vkms/tests/vkms_color_
On 27/02/24 06:19, Pekka Paalanen wrote:
> On Mon, 26 Feb 2024 17:42:11 -0300
> Arthur Grillo wrote:
>
>> Now that we have a defined benchmark for testing the driver, add
>> documentation on how to run it.
>>
>> Signed-off-by: Arthur Grillo
>>
Now that we have a defined benchmark for testing the driver, add
documentation on how to run it.
Signed-off-by: Arthur Grillo
---
Documentation/gpu/vkms.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.rst
index ba04ac7c2167
On 23/02/24 08:37, Louis Chauvet wrote:
> From: Arthur Grillo
>
> Create KUnit tests to test the conversion between YUV and RGB. Test each
> conversion and range combination with some common colors.
>
> Signed-off-by: Arthur Grillo
> [Louis Chauvet: fix minor formati
struct vkms_plane_state *current_plane = plane[i];
>
> - if (!check_limit(plane[i]->frame_info, y_pos))
> + /* Avoid rendering useless lines */
> + if (y < current_plane->frame_info->dst.y1 ||
>
t's good to give more context, like:
"The planes are composed line-by-line, instead of pixel-by-pixel"
Best Regards,
~Arthur Grillo
> + */
> for (size_t y = 0; y < crtc_y_limit; y++) {
> fill_background(&background_color, output_buffer);
>
xel_read = pixel_read;
> }
>
> static int vkms_plane_atomic_check(struct drm_plane *plane,
> diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c
> b/drivers/gpu/drm/vkms/vkms_writeback.c
> index c8582df1f739..c92b9f06c4a4 100644
> --- a/drivers/gpu/drm/vkms/vkms_writeback.c
&g
ead_line one pixel at a time to achieve the same.
>
> Would need to benchmark if this is significantly slower than your
> suggestion for dir=RIGHT, though. If it's roughly the same, then it
> would probably be worth it.
>
>
>> This way:
>> - It's simple to read for the general case (usage of drm_rect_* instead of
>> manually rewriting the logic)
>> - Each pixel format can be quickly implemented with "pixel-by-pixel"
>> methods
>> - The performances should be good if no rotation is implied for some
>> formats
>>
>> I also created some helpers for conversions between formats to avoid code
>> duplication between pixel and line algorithms (and also between argb and
>> xrgb variants).
>>
>> The only flaw with this, is that most of the read_line functions will
>> look like:
>>
>> void read_line(...) {
>> int increment = x_start < x_stop ? 1: -1;
>> while(x_start != x_stop) {
>> out += 1;
>> [...] /* color conversion */
>> x_start += increment;
>> }
>> }
>>
>> But as Pekka explained, it's probably the most efficient way to do it.
>
> Yes, I expect them to look roughly like that. It's necessary for moving
> as much of the setup computations and real function calls out of the
> inner-most loop as possible. The middle (over KMS planes) and outer
> (over y) loops are less sensitive to wasted cycles on redundant
> computations.
>
>> Is there a way to save the output of vkms to a folder (something like
>> "one image per frame")? It's a bit complex to debug graphics without
>> seeing them.
>>
>> I have something which (I think) should work, but some tests are failing
>> and I don't find why in my code (I don't find the reason why the they are
>> failing and the hexdump I added to debug seems normal).
>>
>> I think my issue is a simple mistake in the "translation managment" or
>> maybe just a wrong offset, but I don't see my error in the code. I think a
>> quick look on the final image would help me a lot.
>
> I don't know anything about the kernel unit testing frameworks, maybe
> they could help?
>
> But if you drive the test through UAPI from userspace, use a writeback
> connector to fetch the resulting image. I'm sure IGT has code doing
> that somewhere, although many IGT tests rely on CRC instead because CRC
> is more widely available in hardware.
>
> Arthur's new benchmark seems to be using writeback, you just need to
> make it save to file:
> https://lore.kernel.org/all/20240207-bench-v1-1-7135ad426...@riseup.net/
Hi,
I just found that the IGT's test kms_writeback has a flag '--dump' that
does that, maybe you can use it or copy the logic to the benchmark.
Best Regards,
~Arthur Grillo
>
>
> Thanks,
> pq
On 13/02/24 15:06, Kamil Konieczny wrote:
> Hi Arthur,
> On 2024-02-09 at 16:39:09 -0300, Arthur Grillo wrote:
>
> I will merge this with different description:
>
> [PATCH i-g-t v3] benchmarks: Add KMS frambuffer stress benchmark
>
> Is this ok?
Its ok
Best
/lore.kernel.org/all/20240202214527.1d97c881@ferris.localdomain/
Suggested-by: Pekka Paalanen
Acked-by: Pekka Paalanen
Acked-by: Maíra Canal
Acked-by: Kamil Konieczny
Signed-off-by: Arthur Grillo
---
Changes in v3:
- Change primary plane width to not extend outside the CRTC size
- Explicitly set a
On 09/02/24 05:32, Pekka Paalanen wrote:
> On Thu, 8 Feb 2024 16:38:31 -0300
> Arthur Grillo wrote:
>
>> On 08/02/24 06:50, Pekka Paalanen wrote:
>>> On Wed, 07 Feb 2024 17:17:15 -0300
>>> Arthur Grillo wrote:
>>>
>>>> Create
/lore.kernel.org/all/20240202214527.1d97c881@ferris.localdomain/
Suggested-by: Pekka Paalanen
Acked-by: Pekka Paalanen
Signed-off-by: Arthur Grillo
---
Changes in v2:
- Zero initialize data
- Don't wrap igt_create_* functions (Juha-Pekka Heikkila)
- Add a `break;` when a pipe is found (Pekka P
On 08/02/24 06:50, Pekka Paalanen wrote:
> On Wed, 07 Feb 2024 17:17:15 -0300
> Arthur Grillo wrote:
>
>> Create a benchmark for the VKMS driver. Use a KMS layout with deliberate
>> odd sizes to try to avoid alignment accidents and run it for FRAME_COUNT
>> fram
On 07/02/24 13:03, Louis Chauvet wrote:
> Hello Pekka, Arthur,
>
> [...]
>
Would it be possible to have a standardised benchmark specifically
for performance rather than correctness, in IGT or where-ever it
would make sense? Then it would be simple to tell contributors to
r
Signed-off-by: Arthur Grillo
---
This benchmark was suggested by Pekka Paalanen on [1] to better analyse
possible performance regression on the Virtual Kernel Modesetting(VKMS)
driver.
With this benchmark I was able to determine two performance regression:
- 322d716a3e8a ("drm/vkms: is
finished writing this proposal using IGT.
I got pretty interesting results:
The mentioned commit 8356b97906503a02125c8d03c9b88a61ea46a05a took
around 13 seconds. While drm-misc/drm-misc-next took 36 seconds.
I'm currently bisecting to be certain that the change to the
pixel-by-pixel is the cul
um
> drm_color_range range);
> + pixel_read_t pixel_read;
Hi,
Please Cc me on the next versions,
You added the argument 'y' to the function but did not change the calls
to it, resulting in a compiler error. I think this argument addition
would be better on patch #2.
Best Reg
ation used in those cases. They might
> perhaps call the original read_line() implementations pixel-by-pixel or
> plane-by-plane (i.e. YUV planes) per pixel. Chroma-siting complicates
> things even further. That way one could compose any
> rotation-format-siting combination by chaining f
elieve it still is an intersting trade-off.
>
> In the future, if performance is actally critical, the whole composition
> loop will have to be specialized for each pixel formats: some can be
> treated line by line (as it's done today), but with blocks or packed
> pixels it's more complex.
>
>> +for (size_t i = 0; i < frame_format->num_planes; i++)
>> +src_pixels[i] += frame_format->cpp[i];
>
> This is likely working with format with block_w != 1, see explanation
> above.
I think you meant that is _not_ working. Yeah, as I already explained,
it was never my plan to add support for packed or tiled formats.
Best Regards,
~Arthur Grillo
Create KUnit tests to test the conversion between YUV and RGB. Test each
conversion and range combination with some common colors.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/Kconfig | 15 +++
drivers/gpu/drm/vkms/Makefile | 1 +
drivers/gpu/drm
VKMS has support for YUV formats now. Remove the task from the TODO
list.
Signed-off-by: Arthur Grillo
---
Documentation/gpu/vkms.rst | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.rst
index ba04ac7c2167..13b866c3617c
avoid the use of fixed point operations.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_formats.c | 147
drivers/gpu/drm/vkms/vkms_formats.h | 4 +
drivers/gpu/drm/vkms/vkms_plane.c | 14 +++-
3 files changed, 164 insertions(+), 1 deletion
Add support to chroma subsampling. This should be noop, as all supported
formats do not have chroma subsampling.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_formats.c | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/vkms
Create range and encoding properties. This should be noop, as none of
the conversion functions need those properties.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_drv.h | 3 ++-
drivers/gpu/drm/vkms/vkms_formats.c | 20 ++--
drivers/gpu/drm/vkms/vkms_plane.c
Add support to multy-planar formats by adding an index argument to the
framebuffer data access functions.
Also, give all the planes to the conversion functions. This, for now,
should be noop, as all the supported formats have only one plane.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm
Remove intermidiary variables and access the variables directly from
drm_frame. These changes should be noop.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_drv.h | 3 ---
drivers/gpu/drm/vkms/vkms_formats.c | 12 +++-
drivers/gpu/drm/vkms/vkms_plane.c | 3
lore.kernel.org/dri-devel/20230414135151.75975-2-mca...@igalia.com/
Signed-off-by: Arthur Grillo
---
Changes in v2:
- Use EXPORT_SYMBOL_IF_KUNIT instead of including the .c test
file (Maxime)
- Link to v1:
https://lore.kernel.org/r/20240105-vkms-yuv-v1-0-34c4cd345...@riseup.net
---
Arthur Grillo
On 08/01/24 07:15, Maxime Ripard wrote:
> Hi Arthur,
>
> On Fri, Jan 05, 2024 at 01:35:08PM -0300, Arthur Grillo wrote:
>> diff --git a/drivers/gpu/drm/vkms/vkms_formats.c
>> b/drivers/gpu/drm/vkms/vkms_formats.c
>> index b654b6661a20..11df990a0fa9 100644
&g
Add support to chroma subsampling. This should be noop, as all supported
formats do not have chroma subsampling.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_formats.c | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/vkms
lore.kernel.org/dri-devel/20230414135151.75975-2-mca...@igalia.com/
Signed-off-by: Arthur Grillo
---
Arthur Grillo (7):
drm/vkms: Use drm_frame directly
drm/vkms: Add support for multy-planar framebuffers
drm/vkms: Add range and encoding properties to pixel_read function
drm/vkm
Create KUnit tests to test the conversion between YUV and RGB. Test each
conversion and range combination with some common colors.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/Kconfig | 15 +++
drivers/gpu/drm/vkms/tests/.kunitconfig | 4 +
drivers/gpu/drm
Create range and encoding properties. This should be noop, as none of
the conversion functions need those properties.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_drv.h | 3 ++-
drivers/gpu/drm/vkms/vkms_formats.c | 20 ++--
drivers/gpu/drm/vkms/vkms_plane.c
Add support to multy-planar formats by adding an index argument to the
framebuffer data access functions.
Also, give all the planes to the conversion functions. This, for now,
should be noop, as all the supported formats have only one plane.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm
VKMS has support for YUV formats now. Remove the task from the TODO
list.
Signed-off-by: Arthur Grillo
---
Documentation/gpu/vkms.rst | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.rst
index ba04ac7c2167..13b866c3617c
Remove intermidiary variables and access the variables directly from
drm_frame. These changes should be noop.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_drv.h | 3 ---
drivers/gpu/drm/vkms/vkms_formats.c | 12 +++-
drivers/gpu/drm/vkms/vkms_plane.c | 3
avoid the use of fixed point operations.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/vkms/vkms_formats.c | 151
drivers/gpu/drm/vkms/vkms_plane.c | 14 +++-
2 files changed, 164 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vkms
On 09/11/23 19:05, Arthur Grillo wrote:
>
>
> On 08/11/23 13:36, Harry Wentland wrote:
>> Debugging LUT math is much easier when we can unit test
>> it. Add kunit functionality to VKMS and add tests for
>> - get_lut_index
>> - lerp_u16
>>
>>
gt; - Drop bits from commit description that didn't contribute
>anything of value
>
> Signed-off-by: Harry Wentland
> Cc: Arthur Grillo
LGTM
Reviewed-by: Arthur Grillo
Best Regards,
~Arthur Grillo
> ---
> drivers/gpu/drm/vkms/vkms_composer.c | 14 ++
>
ff-by: Harry Wentland
> Cc: Arthur Grillo
> ---
> drivers/gpu/drm/vkms/Kconfig | 5 ++
> drivers/gpu/drm/vkms/tests/.kunitconfig | 4 ++
> drivers/gpu/drm/vkms/tests/vkms_color_tests.c | 62 +++
> drivers/gpu/drm/vkms/vkms_compos
> Cc: Uma Shankar
> Cc: Naseer Ahmed
> Cc: Christopher Braga
> Cc: Abhinav Kumar
> Cc: Arthur Grillo
> Cc: Hector Martin
> Cc: Liviu Dudau
> Cc: Sasha McIntosh
> ---
> drivers/gpu/drm/vkms/Kconfig | 5 ++
> drivers/gpu/drm/vkms/Makefile
On 27/09/23 19:47, Maira Canal wrote:
> Hi Arthur,
>
> On 9/20/23 03:11, Arthur Grillo wrote:
>> The kunit_action_platform_driver_unregister is added with
>> &fake_platform_driver as ctx, but the kunit_release_action is called
>> pdev as ctx. Fix that by replacin
On 20/09/23 03:40, Maxime Ripard wrote:
> Hi,
>
> On Wed, Sep 20, 2023 at 03:11:38AM -0300, Arthur Grillo wrote:
>> In __drm_kunit_helper_alloc_drm_device_with_driver(), a drm_driver is
>> allocated with kunit_kzalloc. If the dev argument was allocated by
>> drm_kun
000122
raw: 80080008 0001
page dumped because: kasan: bad access detected
Memory state around the buggy address:
63194d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
63194d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>0
) || free(A) |
+-++-+
| ... | -> | free(B) |
+-++-+
| free(A) || ... |
+-++-+
Signed-off-by: Arthur Grillo
---
include/kunit/resource.h | 17 +
lib/kunit/resourc
The kunit_action_platform_driver_unregister is added with
&fake_platform_driver as ctx, but the kunit_release_action is called
pdev as ctx. Fix that by replacing it with &fake_platform_driver.
Fixes: 4f2b0b583baa ("drm/tests: helpers: Switch to kunit actions")
Signed-off
.
Patches #2 and #3 solve the use-after-free bug. This error was a bit
trickier to find. Basically, the usual order in which the kunit_actions
run is the culprit, so #2 creates a helper function to reorder actions,
and #3 uses that helper.
Signed-off-by: Arthur Grillo
---
Arthur Grillo (3
To fully cover drm_fb_blit(), add format conversion tests that are only
supported through drm_fb_blit().
Signed-off-by: Arthur Grillo
Reviewed-by: Maíra Canal
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 142 +
1 file changed, 142 insertions(+)
diff --git a
Add a call to drm_fb_blit() on existing format conversion tests that
has support.
Signed-off-by: Arthur Grillo
Reviewed-by: Maíra Canal
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 143 +
1 file changed, 143 insertions(+)
diff --git a/drivers/gpu/drm/tests
drm_fb_blit(). The second patch
adds those format conversion tests.
Signed-off-by: Arthur Grillo
---
Changes in v3:
- Fix memset sizes to avoid out-of-bound access
- Link to v2:
https://lore.kernel.org/r/20230905-final-gsoc-v2-0-b52e8cb06...@riseup.net
Changes in v2:
- Split the patch into two (Maíra
On 18/09/23 19:57, Arthur Grillo wrote:
> This patchset tests the drm_fb_blit() function.
>
> As this function can be used with already tested formats, the first
> patch adds calls to drm_fb_blit() on the tests of supported formats.
>
> Some supported formats were not
Add a call to drm_fb_blit() on existing format conversion tests that
has support.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 143 +
1 file changed, 143 insertions(+)
diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c
b
drm_fb_blit(). The second patch
adds those format conversion tests.
Signed-off-by: Arthur Grillo
---
Changes in v3:
- Fix memset sizes to avoid out-of-bound access
- Link to v2:
https://lore.kernel.org/r/20230905-final-gsoc-v2-0-b52e8cb06...@riseup.net
Changes in v2:
- Split the patch into two (Maíra
To fully cover drm_fb_blit(), add format conversion tests that are only
supported through drm_fb_blit().
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 142 +
1 file changed, 142 insertions(+)
diff --git a/drivers/gpu/drm/tests
Add a call to drm_fb_blit() on existing format conversion tests that
has support.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 142 +
1 file changed, 142 insertions(+)
diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c
b
drm_fb_blit(). The second patch
adds those format conversion tests.
Signed-off-by: Arthur Grillo
---
Changes in v2:
- Split the patch into two (Maíra Canal)
- Link to v1:
https://lore.kernel.org/r/20230901-final-gsoc-v1-1-e310c7685...@riseup.net
---
Arthur Grillo (2):
drm/tests: Add calls to
tests for
drm_fb_build_fourcc_list()")
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c
b/drivers/gpu/drm/tests/drm_format_helper_test.c
ind
.feakbzej-...@intel.com/
Signed-off-by: Arthur Grillo
---
include/drm/drm_drv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 9850fe73b739..e2640dc64e08 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -584,7
Insert parameterized test for the drm_fb_blit() to ensure correctness
and prevent future regressions.
The test is done by adding a call to drm_fb_blit() on every format
that has support. Also, to fully test the function, add new format
conversion tests.
Signed-off-by: Arthur Grillo
---
drivers
Insert parameterized test for the drm_fb_memcpy() to ensure correctness
and prevent future regressions. The test case can accept different
formats.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 362 +
1 file changed, 362 insertions
The drm_fb_memcpy() supports multi-plane formats. To fully test it in
the future, add multi-plane support to the conversion_buf_size() helper.
Signed-off-by: Arthur Grillo
Reviewed-by: Maíra Canal
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 28 +-
1 file
Insert parameterized test for the drm_fb_build_fourcc_list() to ensure
correctness and prevent future regressions.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 144 +
1 file changed, 144 insertions(+)
diff --git a/drivers/gpu/drm
Insert parameterized test for the drm_fb_clip_offset() to ensure
correctness and prevent future regressions.
Signed-off-by: Arthur Grillo
Reviewed-by: Maíra Canal
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 91 ++
1 file changed, 91 insertions(+)
diff --git a
Insert parameterized test for the drm_fb_swab() to ensure correctness
and prevent future regressions.
Each expected color has it bytes reversed in order, so xrgb would be
bgrx.
Signed-off-by: Arthur Grillo
Reviewed-by: Maíra Canal
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 66
Test the default pitch fallback when NULL is passed as the dst_pitch on
the conversion procedures.
Reviewed-by: Maíra Canal
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 126 -
1 file changed, 81 insertions(+), 45 deletions(-)
diff
://grillo-0.github.io/coverage-reports/gsoc-drm-format-test/drivers/gpu/drm/drm_format_helper.c.gcov.html
Signed-off-by: Arthur Grillo
---
v1->v2:
https://lore.kernel.org/r/20230721182316.560649-1-arthurgri...@riseup.net
- Change patch prefix to "drm/tests" (Maíra Canal)
- Simplif
On 13/08/23 10:30, Maira Canal wrote:
> Hi Arthur,
>
> On 8/11/23 15:17, Arthur Grillo wrote:
>> Insert parameterized test for the drm_fb_memcpy() to ensure correctness
>> and prevent future regressions. The test case can accept different
>> formats.
>>
Insert parameterized test for the drm_fb_memcpy() to ensure correctness
and prevent future regressions. The test case can accept different
formats.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 391 +
1 file changed, 391 insertions
The drm_fb_memcpy() supports multi-plane formats. To fully test it in
the future, add multi-plane support to the conversion_buf_size() helper.
Signed-off-by: Arthur Grillo
Reviewed-by: Maíra Canal
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 28 +-
1 file
Insert parameterized test for the drm_fb_swab() to ensure correctness
and prevent future regressions.
Each expected color has it bytes reversed in order, so xrgb would be
bgrx.
Signed-off-by: Arthur Grillo
Reviewed-by: Maíra Canal
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 66
Insert parameterized test for the drm_fb_clip_offset() to ensure
correctness and prevent future regressions.
Signed-off-by: Arthur Grillo
Reviewed-by: Maíra Canal
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 91 ++
1 file changed, 91 insertions(+)
diff --git a
Insert parameterized test for the drm_fb_build_fourcc_list() to ensure
correctness and prevent future regressions.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 148 +
1 file changed, 148 insertions(+)
diff --git a/drivers/gpu/drm
Test the default pitch fallback when NULL is passed as the dst_pitch on
the conversion procedures.
Signed-off-by: Arthur Grillo
---
drivers/gpu/drm/tests/drm_format_helper_test.c | 126 -
1 file changed, 81 insertions(+), 45 deletions(-)
diff --git a/drivers/gpu/drm
://grillo-0.github.io/coverage-reports/gsoc-drm-format-test/drivers/gpu/drm/drm_format_helper.c.gcov.html
Signed-off-by: Arthur Grillo
---
v1->v2:
https://lore.kernel.org/r/20230721182316.560649-1-arthurgri...@riseup.net
- Change patch prefix to "drm/tests" (Maíra Canal)
- Simplif
On 05/08/23 10:26, Maira Canal wrote:
> On 7/21/23 15:23, Arthur Grillo wrote:
>> Insert parameterized test for the drm_fb_memcpy() to ensure correctness
>> and prevent future regressions. The test case can accept different
>> formats.
>>
>> Signed-off-by: Arthu
ff-by: Ruan Jinjie
> ---
> .../gpu/drm/tests/drm_format_helper_test.c| 28 +--
> 1 file changed, 14 insertions(+), 14 deletions(-)
Reviewed-by: Arthur Grillo
Best Regards,
~Arthur Grillo
>
> diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c
> b/drivers/gp
previously had DRM=y
> and FB=n now has FB_CORE=y and FRAMEBUFFER_CONSOLE=y.
>
> This leads to unmet direct dependencies detected for FRAMEBUFFER_CONSOLE
> as reported by Arthur Grillo, e.g:
>
> WARNING: unmet direct dependencies detected for FRAMEBUFFER_CONSOLE
> Depends on
1 - 100 of 192 matches
Mail list logo