Re: [PATCH v6 0/7] Adds support for ConfigFS to VKMS!

2024-05-13 Thread José Expósito
On Mon, May 13, 2024 at 12:03:07PM +0300, Marius Vlad wrote: > Hi all, > On Mon, May 13, 2024 at 10:08:38AM +0200, José Expósito wrote: > > On Fri, May 10, 2024 at 06:19:45PM +0200, Louis Chauvet wrote: > > > Le 09/05/24 - 18:18, Jim Shargo a écrit : > > > > Sima-

Re: [PATCH v6 0/7] Adds support for ConfigFS to VKMS!

2024-05-13 Thread José Expósito
make it much easier to develop this thing. Marius has > > posted the most recent patches: > > https://lore.kernel.org/igt-dev/?q=configfs > > > > Thanks! > > -- Jim > > > > > > > > On Wed, May 8, 2024 at 2:17 PM José Expósito &g

Re: [PATCH v6 0/7] Adds support for ConfigFS to VKMS!

2024-05-08 Thread José Expósito
on it. Please let me know. I'm working on a Mutter feature that'd greatly benefit from this uapi and I'm sure other compositors would find it useful. I'll start working on a new version in a few days if nobody else is already working on it. Best wishes, José Expósito

Re: [PATCH v2 09/13] drm/format-helper: Add conversion from XRGB8888 to 15-bit RGB555 formats

2022-12-23 Thread José Expósito
dbuf16 = dbuf; > + const __le32 *sbuf32 = sbuf; > + unsigned int x; > + u16 val16; > + u32 pix; > + > + for (x = 0; x < pixels; x++) { > + pix = le32_to_cpu(sbuf32[x]); > + val16 = ((pix & 0x00f8) >> 8) | &

Re: [PATCH v2 08/13] drm/format-helper: Add conversion from XRGB8888 to ARGB2101010

2022-12-23 Thread José Expósito
use cpubuf_to_le32() > * type fixes > > Signed-off-by: Thomas Zimmermann > Reviewed-by: Javier Martinez Canillas Reviewed-by: José Expósito > --- > drivers/gpu/drm/drm_format_helper.c | 58 - > .../gpu/drm/tests/drm_format_helper_test.c

Re: [PATCH v2 07/13] drm/format-helper: Add conversion from XRGB8888 to ARGB8888

2022-12-23 Thread José Expósito
gt; + pix |= GENMASK(31, 24); /* fill alpha bits */ > + dbuf32[x] = cpu_to_le32(pix); - dbuf32[x] = cpu_to_le32(pix); + dbuf32[x] = (__force u32)cpu_to_le32(pix); Other than that: Reviewed-by: José Expósito > + } > +} > + > +/** > + * drm_fb_xrgb_

Re: [PATCH v2 05/13] drm/format-helper: Type fixes in format-helper tests

2022-12-23 Thread José Expósito
omas Zimmermann Reviewed-by: José Expósito > --- > drivers/gpu/drm/tests/drm_format_helper_test.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c > b/drivers/gpu/drm/tests/drm_format_h

Re: [PATCH v2 04/13] drm/format-helper: Store RGB565 in little-endian order

2022-12-23 Thread José Expósito
On Tue, Dec 20, 2022 at 05:11:36PM +0100, Thomas Zimmermann wrote: > Fix to-RGB565 conversion helpers to store the result in little- > endian byte order. Update test cases as well. > > Signed-off-by: Thomas Zimmermann Reviewed-by: José Expósito > --- > drivers/gpu/drm/d

Re: [PATCH v2 03/13] drm/format-helper: Fix test-input format conversion

2022-12-23 Thread José Expósito
omas Zimmermann Reviewed-by: José Expósito > --- > .../gpu/drm/tests/drm_format_helper_test.c| 35 +-- > 1 file changed, 25 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c > b/drivers/gpu/drm/tests/drm_format_h

Re: [PATCH v2 02/13] drm/format-helper: Comment on RGB888 byte order

2022-12-23 Thread José Expósito
omas Zimmermann Reviewed-by: José Expósito > --- > drivers/gpu/drm/drm_format_helper.c| 1 + > drivers/gpu/drm/tests/drm_format_helper_test.c | 4 > 2 files changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/drm_format_helper.c > b/drivers

Re: [PATCH 5/9] drm/format-helper: Add conversion from XRGB8888 to 15-bit RGB555 formats

2022-12-19 Thread José Expósito
sbuf; > + unsigned int x; > + u16 val16; > + u32 pix; > + > + for (x = 0; x < pixels; x++) { > + pix = le32_to_cpu(sbuf32[x]); > + val16 = ((pix & 0x00f8) >> 8) | > + ((pix & 0xf800) >

Re: [bug report] Merge branch 'for-linux-next' of git://anongit.freedesktop.org/drm/drm-misc

2022-11-19 Thread José Expósito
Hi Dan, On Fri, Nov 18, 2022 at 02:17:34PM +0300, Dan Carpenter wrote: > Hello Stephen Rothwell, > > The patch 23b727d76bda: "Merge branch 'for-linux-next' of > git://anongit.freedesktop.org/drm/drm-misc" from Nov 17, 2022, leads > to the following Smatch static checker warning: > >

[PATCH v2 1/2] drm/vc4: hdmi: Pass vc4_hdmi to vc4_hdmi_supports_scrambling()

2022-11-10 Thread José Expósito
Simplify vc4_hdmi_supports_scrambling() by changing its first parameter from struct drm_encoder to struct vc4_hdmi. Signed-off-by: José Expósito --- drivers/gpu/drm/vc4/vc4_hdmi.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b

[PATCH v2 2/2] drm/vc4: hdmi: Fix pointer dereference before check

2022-11-10 Thread José Expósito
quot;drm/vc4: hdmi: Reset link on hotplug") Signed-off-by: José Expósito --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index a49f88e5d2b9..6b223a5fcf6f 100644 --- a/

[PATCH v2 0/2] drm/vc4: hdmi: Fix pointer dereference before check

2022-11-10 Thread José Expósito
v1 -> v2: As suggested by Maxime, I simplified a bit vc4_hdmi_supports_scrambling() making it receive a struct vc4_hdmi as argument instead of a struct drm_encoder. Also, variables are initialized close to where they are used in the second patch. José Expósito (2): drm/vc4: hdmi: P

Re: [PATCH] drm/vc4: hdmi: Fix pointer dereference before check

2022-11-02 Thread José Expósito
Hi Maxime, Thanks a lot for looking into the patch. On Wed, Nov 02, 2022 at 10:01:53AM +0100, Maxime Ripard wrote: > Hi, > > On Sat, Oct 29, 2022 at 11:34:13AM +0200, José Expósito wrote: > > Commit 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") introduced &g

[PATCH] drm/vc4: hdmi: Fix pointer dereference before check

2022-10-29 Thread José Expósito
quot;drm/vc4: hdmi: Reset link on hotplug") Signed-off-by: José Expósito --- drivers/gpu/drm/vc4/vc4_hdmi.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 4a73fafca51b..07d058b6afb7 100644 --- a/

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-19 Thread José Expósito
test, memcmp(buf, result->expected, dst_size), 0); > } Thanks a lot for fixing this bug David, I just tested it and worked as expected. Do you think that we should update the other calls to le32buf_to_cpu() to follow a similar approach? Regardless of a possible follow up patch: Reviewed-by: José Expósito Jose > > -- > 2.38.0.413.g74048e4d9e-goog >

[PATCH v5 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()

2022-09-26 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to grayscale. Tested-by: Maíra Canal Reviewed-by: David Gow Acked-by: Maxime Ripard Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 62 +++ 1 file changed, 62 insertions

[PATCH v5 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()

2022-09-26 Thread José Expósito
-by: José Expósito --- drivers/gpu/drm/drm_format_helper.c | 1 + .../gpu/drm/tests/drm_format_helper_test.c| 63 +++ 2 files changed, 64 insertions(+) diff --git a/drivers/gpu/drm/drm_format_helper.c b/drivers/gpu/drm/drm_format_helper.c index 4afc4ac27342

[PATCH v5 1/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb888()

2022-09-26 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to RGB888. Tested-by: Maíra Canal Reviewed-by: David Gow Acked-by: Maxime Ripard Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 65 +++ 1 file changed, 65 insertions(+) diff

[PATCH v5 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-09-26 Thread José Expósito
symbol drm_fb_xrgb_to_xrgb2101010() v3 -> v4: Rebased on top of Maíra's prefix renaming work: https://lore.kernel.org/dri-devel/20220911191756.203118-1-mairaca...@riseup.net/T/ v4 -> v5: Acked-by: Maxime Ripard Remove reduntant "_test" suffix Sort test alphabetically Jo

Re: [PATCH v4 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()

2022-09-19 Thread José Expósito
On Mon, Sep 19, 2022 at 10:25:19AM +0200, Maxime Ripard wrote: > On Mon, Sep 19, 2022 at 10:18:01AM +0200, José Expósito wrote: > > Hi Maxime, > > > > Thanks for looking into the patches. > > > > On Mon, Sep 19, 2022 at 09:36:45AM +0200, Maxime Ripard wrote: >

Re: [PATCH v4 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()

2022-09-19 Thread José Expósito
Hi Maxime, Thanks for looking into the patches. On Mon, Sep 19, 2022 at 09:36:45AM +0200, Maxime Ripard wrote: > Hi, > > On Mon, Sep 19, 2022 at 09:15:31AM +0200, José Expósito wrote: > > Extend the existing test cases to test the conversion from XRGB to > > grays

[PATCH v4 1/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb888()

2022-09-19 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to RGB888. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 65 +++ 1 file changed, 65 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v4 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()

2022-09-19 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to XRGB2101010. In order to be able to call drm_fb_xrgb_to_xrgb2101010() when compiling CONFIG_DRM_KMS_HELPER as a module export the symbol. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito

[PATCH v4 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()

2022-09-19 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to grayscale. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/gpu

[PATCH v4 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-09-19 Thread José Expósito
symbol drm_fb_xrgb_to_xrgb2101010() v3 -> v4: Rebased on top of Maíra's prefix renaming work: https://lore.kernel.org/dri-devel/20220911191756.203118-1-mairaca...@riseup.net/T/ José Expósito (3): drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_rgb888() drm/format-helper: Add KU

Re: [PATCH v3 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-09-19 Thread José Expósito
On Sun, Sep 18, 2022 at 01:26:06PM -0300, Maíra Canal wrote: > Hi Jose, > > On 9/18/22 10:22, José Expósito wrote: > > Hi! > > > > On Sun, Aug 28, 2022 at 06:45:14PM +0200, José Expósito wrote: > >> Hello everyone, > >> > >> This series is a

Re: [PATCH v3 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-09-18 Thread José Expósito
Hi! On Sun, Aug 28, 2022 at 06:45:14PM +0200, José Expósito wrote: > Hello everyone, > > This series is a follow up on my work adding KUnit test to the XRGB > conversion functions. This time RGB888, XRGB2101010 and gray8 are added. > > Best wishes, > Jose > >

Re: [PATCH] drm/doc: Custom Kconfig for KUnit is no longer needed

2022-09-07 Thread José Expósito
Hi Michał, On Mon, Sep 05, 2022 at 08:47:11PM +0200, Michał Winiarski wrote: > When built for UML, KUnit provides virtio/PCI, which means that the > DMA/IOMEM UML emulation needed by DRM is already present and does not > need to be manually added with --kconfig_add. > > References: commit

[PATCH v3 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()

2022-08-28 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to XRGB2101010. In order to be able to call drm_fb_xrgb_to_xrgb2101010() when compiling CONFIG_DRM_KMS_HELPER as a module export the symbol. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito

[PATCH v3 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()

2022-08-28 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to grayscale. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/gpu

[PATCH v3 1/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb888()

2022-08-28 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to RGB888. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 65 +++ 1 file changed, 65 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v3 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-08-28 Thread José Expósito
symbol drm_fb_xrgb_to_xrgb2101010() José Expósito (3): drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_rgb888() drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_xrgb2101010() drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_gray8() drivers/gpu/drm/drm_format_he

[PATCH v2 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()

2022-08-28 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to grayscale. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/gpu

[PATCH v2 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()

2022-08-28 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to XRGB2101010. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 63 +++ 1 file changed, 63 insertions(+) diff --git a/drivers/gpu

[PATCH v2 1/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb888()

2022-08-28 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to RGB888. Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 65 +++ 1 file changed, 65 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v2 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-08-28 Thread José Expósito
Hello everyone, This series is a follow up on my work adding KUnit test to the XRGB conversion functions. This time RGB888, XRGB2101010 and gray8 are added. Best wishes, Jose v1 -> v2: Tested-by: Maíra Canal Reviewed-by: David Gow José Expósito (3): drm/format-helper:

Re: [PATCH 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-08-28 Thread José Expósito
On Tue, Aug 16, 2022 at 10:37:49AM -0300, Maíra Canal wrote: > Hi José, > > Tested the whole series on UML, x86, i386 and PPC. All looks fine! > > Tested-by: Maíra Canal > > Best Regards, > - Maíra Canal > > On 8/16/22 07:29, José Expósito wrote: > >

[PATCH 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()

2022-08-16 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to XRGB2101010. Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 63 +++ 1 file changed, 63 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers

[PATCH 1/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb888()

2022-08-16 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to RGB888. Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 65 +++ 1 file changed, 65 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu

[PATCH 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()

2022-08-16 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to grayscale. Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu

[PATCH 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-08-16 Thread José Expósito
Hello everyone, This series is a follow up on my work adding KUnit test to the XRGB conversion functions. This time RGB888, XRGB2101010 and gray8 are added. Best wishes, Jose José Expósito (3): drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_rgb888() drm/format-helper: Add

Re: [PATCH v2 4/4] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb565()

2022-08-13 Thread José Expósito
On Wed, Aug 10, 2022 at 09:41:18AM -0700, Daniel Latypov wrote: > On Sun, Jul 17, 2022 at 10:01 AM José Expósito > wrote: > > > > José Expósito wrote: > > > I already fixed the warning and added the reviewed by tags, however, I > > > noticed that rebasing th

Re: [PATCH 05/12] drm/format-helper: Rework XRGB8888-to-RGBG565 conversion

2022-07-30 Thread José Expósito
nsistency with > drm_fb_blit(). > > Signed-off-by: Thomas Zimmermann Tested-by: José Expósito Reviewed-by: José Expósito In order to continue working on the missing tests for drm_format_helper I rebased your series on top of drm-misc-next and fixed the conflicts in the tests [1]. It is an easy

Re: [PATCH 12/12] drm/format-helper: Move destination-buffer handling into internal helper

2022-07-28 Thread José Expósito
On Thu, Jul 28, 2022 at 09:45:27AM +0200, Thomas Zimmermann wrote: > Hi > > Am 28.07.22 um 09:26 schrieb José Expósito: > > Hi! > > > > On Wed, Jul 27, 2022 at 01:33:12PM +0200, Thomas Zimmermann wrote: > > > The format-convertion helpers handle seve

Re: [PATCH v3 0/4] KUnit tests for RGB565 conversion

2022-07-28 Thread José Expósito
On Wed, Jul 27, 2022 at 01:09:12AM +0200, José Expósito wrote: > Hello everyone, > > This series is a follow up of the XRGB to RGB332 conversion KUnit > tests. > > As I mentioned in v2 [1] I suspected that the inconsistency handling > the endian might need to be fixed.

Re: [PATCH 04/12] drm/format-helper: Rework XRGB8888-to-RGBG332 conversion

2022-07-28 Thread José Expósito
On Thu, Jul 28, 2022 at 09:27:52AM +0200, Thomas Zimmermann wrote: > Hi > > Am 28.07.22 um 09:13 schrieb José Expósito: > > Hi Thomas, > > > > On Wed, Jul 27, 2022 at 01:33:04PM +0200, Thomas Zimmermann wrote: > > > Update XRGB-to-RGB332 co

Re: [PATCH 12/12] drm/format-helper: Move destination-buffer handling into internal helper

2022-07-28 Thread José Expósito
Hi! On Wed, Jul 27, 2022 at 01:33:12PM +0200, Thomas Zimmermann wrote: > The format-convertion helpers handle several cases for different > values of destination buffer and pitch. Move that code into the > internal helper drm_fb_xfrm() and avoid quite a bit of duplucation. > > Signed-off-by:

Re: [PATCH 04/12] drm/format-helper: Rework XRGB8888-to-RGBG332 conversion

2022-07-28 Thread José Expósito
nsistency with > drm_fb_blit(). > > Signed-off-by: Thomas Zimmermann Tested-by: José Expósito Reviewed-by: José Expósito I just ran the tests in x86_64 and UML and they work as expected. I need to find some time to review all patches, but this one LGTM. This series will cause conflicts with [1].

[PATCH v3 4/4] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb565()

2022-07-26 Thread José Expósito
Zimmermann Reviewed-by: David Gow Signed-off-by: José Expósito Link: http://www.barth-dev.de/online/rgb565-color-picker/ # [1] --- .../gpu/drm/tests/drm_format_helper_test.c| 78 +++ 1 file changed, 78 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b

[PATCH v3 3/4] drm/format-helper: Support multiple target formats results

2022-07-26 Thread José Expósito
In order to support multiple destination format conversions, store the destination pitch and the expected result in its own structure. Tested-by: Tales L. Aparecida Acked-by: Thomas Zimmermann Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c

[PATCH v3 1/4] drm/format-helper: Fix test on big endian architectures

2022-07-26 Thread José Expósito
function to avoid this error. Fixes: 8f456104915f ("drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_rgb332()") Reported-by: David Gow Reviewed-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 23 +-- 1 file c

[PATCH v3 2/4] drm/format-helper: Rename test cases to make them more generic

2022-07-26 Thread José Expósito
. Aparecida Acked-by: Thomas Zimmermann Reviewed-by: David Gow Signed-off-by: José Expósito --- drivers/gpu/drm/tests/drm_format_helper_test.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests

[PATCH v3 0/4] KUnit tests for RGB565 conversion

2022-07-26 Thread José Expósito
ps://lore.kernel.org/dri-devel/20220709115837.560877-1-jose.exposit...@gmail.com/ José Expósito (4): drm/format-helper: Fix test on big endian architectures drm/format-helper: Rename test cases to make them more generic drm/format-helper: Support multiple target formats results drm/format-hel

Re: [PATCH v2 4/4] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb565()

2022-07-17 Thread José Expósito
José Expósito wrote: > I already fixed the warning and added the reviewed by tags, however, I > noticed that rebasing the series on the latest drm-misc-next show this > error: > [...] Sorry for the extra email. I forgot to mention that the error is only present in UML. Runn

Re: [PATCH v2 4/4] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb565()

2022-07-17 Thread José Expósito
Hi David, On Sat, Jul 16, 2022 at 05:32:51PM +0800, David Gow wrote: > On Sat, Jul 9, 2022 at 7:58 PM José Expósito > wrote: > > > > Extend the existing test cases to test the conversion from XRGB to > > RGB565. > > > > The documentation and the colo

[PATCH v2 4/4] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb565()

2022-07-09 Thread José Expósito
Zimmermann Signed-off-by: José Expósito Link: http://www.barth-dev.de/online/rgb565-color-picker/ # [1] --- .../gpu/drm/tests/drm_format_helper_test.c| 76 ++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu

[PATCH v2 1/4] drm/format-helper: Fix test on big endian architectures

2022-07-09 Thread José Expósito
function to avoid this error. Fixes: 8f456104915f ("drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_rgb332()") Reported-by: David Gow Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 23 +-- 1 file changed, 21 insertions(+), 2

[PATCH v2 3/4] drm/format-helper: Support multiple target formats results

2022-07-09 Thread José Expósito
In order to support multiple destination format conversions, store the destination pitch and the expected result in its own structure. Tested-by: Tales L. Aparecida Acked-by: Thomas Zimmermann Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 53

[PATCH v2 2/4] drm/format-helper: Rename test cases to make them more generic

2022-07-09 Thread José Expósito
. Aparecida Acked-by: Thomas Zimmermann Signed-off-by: José Expósito --- drivers/gpu/drm/tests/drm_format_helper_test.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c

[PATCH v2 0/4] KUnit tests for RGB565 conversion

2022-07-09 Thread José Expósito
the opinion of the maintainers on this topic. Patches 2 and 3 make the test generic and the last one tests drm_fb_xrgb_to_rgb565(). Best wishes, José Expósito Changes since v1: - Fix a bug reported by David Gow in the XRGB to RGB332 tests - Simplify the test structure as suggested by David Gow

Re: [PATCH 0/4] KUnit tests for RGB565 conversion

2022-07-04 Thread José Expósito
Hi David, Sorry for not getting back to you sooner, I've been swamped with work this week. On Wed, Jun 29, 2022 at 03:27:44PM +0800, David Gow wrote: > These look pretty good overall to me, but there is one big issue > (which is actually with the previous series -- oops!), and a few small >

[PATCH 2/4] drm/format-helper: Transform tests to be agnostic of target format

2022-06-27 Thread José Expósito
In order to support multiple destination format conversions, store the target format, conversion function, parameters and expected result in its own structure. Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 88 ++- 1 file changed, 64 insertions

[PATCH 4/4] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb565()

2022-06-27 Thread José Expósito
/ Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 100 +- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c index 52dc41cc7c60

[PATCH 3/4] drm/format-helper: Add support for conversion functions with swab

2022-06-27 Thread José Expósito
function pointer. Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 44 ++- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c index 732

[PATCH 1/4] drm/format-helper: Rename test cases to make them more generic

2022-06-27 Thread José Expósito
The tests available at the moment only check the conversion from XRGB to RGB332. However, more conversion will be tested in the future. In order to make the struct and functions present in the tests more generic, rename xrgb_to_rgb332_* to convert_xrgb_*. Signed-off-by: José Expósito

[PATCH 0/4] KUnit tests for RGB565 conversion

2022-06-27 Thread José Expósito
re formats will be easily added in the future. Thank you very much in advance for your feedback, José Expósito José Expósito (4): drm/format-helper: Rename test cases to make them more generic drm/format-helper: Transform tests to be agnostic of target format drm/format-helper: Add support for

Re: [PATCH v3 3/3] drm/doc: Add KUnit documentation

2022-06-27 Thread José Expósito
Hi Javier, Daniel, On Fri, Jun 24, 2022 at 11:18:40PM +0200, Javier Martinez Canillas wrote: > Hello Daniel, > > On 6/24/22 23:01, Daniel Vetter wrote: > > > > [...] > > > > Hey so since you have a bunch of patches merged into drm already but seem > > to lack drm-misc commit rights to push

Re:[PATCH] drm/vc4: perfmon: Fix variable dereferenced before check

2022-06-27 Thread José Expósito
hings in the proper order. > > Reported-by: kernel test robot > Reported-by: Dan Carpenter > Fixes: 30f8c74ca9b7 ("drm/vc4: Warn if some v3d code is run on BCM2711") > Signed-off-by: Maxime Ripard Reviewed-by: José Expósito I was about to send the same patch because Coverit

Re: [PATCH v4 3/3] drm/doc: Add KUnit documentation

2022-06-21 Thread José Expósito
Hi David, On Tue, Jun 21, 2022 at 05:38:38PM +0800, David Gow wrote: > On Tue, Jun 21, 2022 at 12:06 AM José Expósito > wrote: > > > > Explain how to run the KUnit tests present in the DRM subsystem and > > clarify why the UML-only options were not added to the config

Re: [PATCH v4 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-06-21 Thread José Expósito
Hi David, On Tue, Jun 21, 2022 at 05:38:33PM +0800, David Gow wrote: > On Tue, Jun 21, 2022 at 12:06 AM José Expósito > wrote: > > > > Test the conversion from XRGB to RGB332. > > > > What is tested? > > > > - Different values for th

[PATCH v4 3/3] drm/doc: Add KUnit documentation

2022-06-20 Thread José Expósito
/ [2] https://lore.kernel.org/dri-devel/CAGS_qxqpiCim_sy1LDK7PLwVgWf-LKW+uNFTGM=t7ydk-dy...@mail.gmail.com/ Reviewed-by: Maxime Ripard Reviewed-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Signed-off-by: José Expósito --- Documentation/gpu/drm-internals.rst | 32

[PATCH v4 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-06-20 Thread José Expósito
Martinez Canillas Acked-by: Thomas Zimmermann Signed-off-by: José Expósito --- drivers/gpu/drm/Kconfig | 16 ++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/tests/.kunitconfig| 3 + drivers/gpu/drm/tests/Makefile| 3

[PATCH v4 1/3] drm/rect: Add DRM_RECT_INIT() macro

2022-06-20 Thread José Expósito
Add a helper macro to initialize a rectangle from x, y, width and height information. Reviewed-by: Jani Nikula Acked-by: Thomas Zimmermann Signed-off-by: José Expósito --- include/drm/drm_rect.h | 16 1 file changed, 16 insertions(+) diff --git a/include/drm/drm_rect.h b

[PATCH v4 0/3] KUnit tests for drm_format_helper

2022-06-20 Thread José Expósito
not clear yet whether we want to have one or multiple Kconfig symbols and select which test should be built. However, refactoring from one approach to the other is quite simple, so I think we should be fine choosing the simpler option now and refactoring if required. Thanks a lot, José Expósito

Re: [PATCH v3 0/3] KUnit tests for drm_format_helper

2022-06-16 Thread José Expósito
Hi! Javier Martinez Canillas wrote: > Before merging this, could you please reach the folks working on [0] ? > I think that would be good to have some consistency with regard to KUnit > tests from the start to avoid future refactorings. For instance, you are > adding the tests under a `kunit`

Re: [PATCH v3 3/3] drm/doc: Add KUnit documentation

2022-06-14 Thread José Expósito
Hi Javier, On Tue, Jun 14, 2022 at 02:58:29PM +0200, Javier Martinez Canillas wrote: > Hello José, > > On 6/13/22 19:17, José Expósito wrote: > > [snip] > > > +KUnit (Kernel unit testing framework) provides a common framework for unit > > tests > > +within

Re: [PATCH] drm/bridge: anx7625: Zero error variable when panel bridge not present

2022-06-13 Thread José Expósito
On Mon, Jun 13, 2022 at 12:37:05PM -0400, Nícolas F. R. A. Prado wrote: > While parsing the DT, the anx7625 driver checks for the presence of a > panel bridge on endpoint 1. If it is missing, pdata->panel_bridge stores > the error pointer and the function returns successfully without first >

Re: [PATCH v2 1/3] drm/rect: Add DRM_RECT_INIT() macro

2022-06-13 Thread José Expósito
On Mon, Jun 13, 2022 at 10:53:57AM +0300, Jani Nikula wrote: > On Sun, 12 Jun 2022, José Expósito wrote: > > Add a helper macro to initialize a rectangle from x, y, width and > > height information. > > > > Signed-off-by: José Expósito > > --- > > include/

[PATCH v3 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-06-13 Thread José Expósito
Martinez Canillas Signed-off-by: José Expósito --- drivers/gpu/drm/Kconfig | 16 ++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/kunit/.kunitconfig| 3 + drivers/gpu/drm/kunit/Makefile| 3 + .../gpu/drm/kunit

[PATCH v3 1/3] drm/rect: Add DRM_RECT_INIT() macro

2022-06-13 Thread José Expósito
Add a helper macro to initialize a rectangle from x, y, width and height information. Signed-off-by: José Expósito --- include/drm/drm_rect.h | 16 1 file changed, 16 insertions(+) diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h index 6f6e19bd4dac..e8d94fca2703

[PATCH v3 3/3] drm/doc: Add KUnit documentation

2022-06-13 Thread José Expósito
/ [2] https://lore.kernel.org/dri-devel/CAGS_qxqpiCim_sy1LDK7PLwVgWf-LKW+uNFTGM=t7ydk-dy...@mail.gmail.com/ Reviewed-by: Maxime Ripard Signed-off-by: José Expósito --- Documentation/gpu/drm-internals.rst | 32 + 1 file changed, 32 insertions(+) diff --git

[PATCH v3 0/3] KUnit tests for drm_format_helper

2022-06-13 Thread José Expósito
Hello everyone, Here is the v3 of the series, including the documentation, previously sent as a standalone patch [1], and changes suggested during review. Thanks a lot, José Expósito RFC -> v1: https://lore.kernel.org/dri-devel/20220530102017.471865-1-jose.exposit...@gmail.com/T/ -

[PATCH v2 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-06-12 Thread José Expósito
Martinez Canillas Signed-off-by: José Expósito --- drivers/gpu/drm/Kconfig | 16 ++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/kunit/.kunitconfig| 3 + drivers/gpu/drm/kunit/Makefile| 3 + .../gpu/drm/kunit

[PATCH v2 3/3] drm/doc: Add KUnit documentation

2022-06-12 Thread José Expósito
/ [2] https://lore.kernel.org/dri-devel/CAGS_qxqpiCim_sy1LDK7PLwVgWf-LKW+uNFTGM=t7ydk-dy...@mail.gmail.com/ Reviewed-by: Maxime Ripard Signed-off-by: José Expósito --- Documentation/gpu/drm-internals.rst | 32 + 1 file changed, 32 insertions(+) diff --git

[PATCH v2 1/3] drm/rect: Add DRM_RECT_INIT() macro

2022-06-12 Thread José Expósito
Add a helper macro to initialize a rectangle from x, y, width and height information. Signed-off-by: José Expósito --- include/drm/drm_rect.h | 12 1 file changed, 12 insertions(+) diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h index 6f6e19bd4dac..945696323c69 100644

[PATCH v2 0/3] KUnit tests for drm_format_helper

2022-06-12 Thread José Expósito
Hello everyone, Here is the v2 of the series, including the documentation, previously sent as a standalone patch [1], and changes suggested during review. Thanks a lot, José Expósito RFC -> v1: https://lore.kernel.org/dri-devel/20220530102017.471865-1-jose.exposit...@gmail.com/T/ -

Re: [PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-06-07 Thread José Expósito
Hi Thomas, Thanks a lot for your review. On Tue, Jun 07, 2022 at 09:22:38AM +0200, Thomas Zimmermann wrote: > Hi, > > ading Kunit tests for the conversion helpers is pretty cool. Thanks for > doing that. > > Am 06.06.22 um 11:55 schrieb José Expósito: > > Test the

[PATCH] drm/doc: Add KUnit documentation

2022-06-06 Thread José Expósito
/ [2] https://lore.kernel.org/dri-devel/CAGS_qxqpiCim_sy1LDK7PLwVgWf-LKW+uNFTGM=t7ydk-dy...@mail.gmail.com/ Signed-off-by: José Expósito --- Documentation/gpu/drm-internals.rst | 31 + 1 file changed, 31 insertions(+) diff --git a/Documentation/gpu/drm-internals.rst

Re: [PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-06-06 Thread José Expósito
Hi! Javier Martinez Canillas wrote: > Hello José, > > On 6/6/22 11:55, José Expósito wrote: > > Test the conversion from XRGB to RGB332. > > > > What is tested? > > > > - Different values for the X in XRGB to make sure it is ignored > > -

[PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-06-06 Thread José Expósito
: Randomly picked - Destination pitch How to run the tests? $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm \ --kconfig_add CONFIG_VIRTIO_UML=y \ --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y Suggested-by: Javier Martinez Canillas Signed-off-by: José Expósito

[PATCH 0/1] KUnit tests for drm_format_helper

2022-06-06 Thread José Expósito
Hello everyone, Recently Javier added a new task in the ToDo list [1] to create KUnit tests for the functions present in "drm_format_helper". This patch includes the changes suggested in the RFC version [2]. Best wishes, José Expósito [1] https://cgit.freedesktop.org/drm/drm-misc/

Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-06-06 Thread José Expósito
eekend. I'll send v1 of the patch to the mailing list including them so we have an up to date code to comment on. Thanks a lot for all of your comments and help, José Expósito

Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-05-31 Thread José Expósito
/doc/html/latest/dev-tools/kunit/running_tips.html#defining-a-set-of-tests > You can create a drivers/gpu/drm/.kunitconfig file and run with > $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm > --arch=x86_86 > > The contents of that file would be just like > CONFI

Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-05-30 Thread José Expósito
Hi Maxime, On Mon, May 30, 2022 at 03:11:58PM +0200, Maxime Ripard wrote: > > Hi, > > On Mon, May 30, 2022 at 12:20:17PM +0200, José Expósito wrote: > > Test the conversion from XRGB to RGB332. > > > > What is tested? > > > > - Different

[RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-05-30 Thread José Expósito
: Randomly picked - Destination pitch Suggested-by: Javier Martinez Canillas Signed-off-by: José Expósito --- drivers/gpu/drm/Kconfig | 12 ++ drivers/gpu/drm/Makefile | 3 + drivers/gpu/drm/drm_format_helper_test.c | 166 +++ 3 files changed

[RFC PATCH 0/1] KUnit tests for drm_format_helper

2022-05-30 Thread José Expósito
s? My .kunitconfig: CONFIG_KUNIT=y CONFIG_DRM=y CONFIG_DRM_FORMAR_HELPER_TEST=y $ ./tools/testing/kunit/kunit.py run --arch=x86_64 Feedback? It'd be great to know your ideas about what else we could test, if you think that we should make the functions safer by checking the buffers and cl

[PATCH 4/5] drm/sti/sti_hdmi: Replace drm_detect_hdmi_monitor() with is_hdmi

2022-04-21 Thread José Expósito
drm_display_info.is_hdmi instead and also remove sti_hdmi.hdmi_monitor as it is no longer necessary. Signed-off-by: José Expósito --- drivers/gpu/drm/sti/sti_hdmi.c | 7 --- drivers/gpu/drm/sti/sti_hdmi.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/sti

  1   2   >