VKMS: New plane formats

2021-09-01 Thread Igor Matheus Andrade Torrente
Hi, I'm working to add new plane formats to vkms. But I don't know what should be the behavior in the situation that we received multiple planes with different formats from the users-space. For example, if the user chooses: - DRM_FORMAT_ARGB16161616 to the primary plane - DRM_FORMAT_ARGB

Re: VKMS: New plane formats

2021-09-02 Thread Igor Matheus Andrade Torrente
On 9/1/21 5:24 PM, Simon Ser wrote: Ideally the final composition format would have enough precision for all of the planes. I think it'd make sense to use ARGB16161616 if the primary plane uses ARGB and an overlay plane uses ARGB16161616. To simplify the code, maybe it's fine to always use A

Re: [PATCH 5/6] drm: vkms: Prepare `vkms_wb_encoder_atomic_check` to accept multiple formats

2021-10-18 Thread Igor Matheus Andrade Torrente
Hello, On 10/18/21 7:14 AM, Thomas Zimmermann wrote: Hi Am 05.10.21 um 22:16 schrieb Igor Matheus Andrade Torrente: Currently, the vkms atomic check only goes through the first position of the `vkms_wb_formats` vector. This change prepares the atomic_check to check the entire vector. Signed

Re: [PATCH 0/6] Refactor the vkms to accept new formats

2021-10-18 Thread Igor Matheus Andrade Torrente
Hi pq, On 10/18/21 4:53 AM, Pekka Paalanen wrote: On Tue, 5 Oct 2021 17:16:31 -0300 Igor Matheus Andrade Torrente wrote: XRGB to ARGB behavior = During the development, I decided to always fill the alpha channel of the output pixel whenever the conversion from a format

Re: [PATCH 1/6] drm: vkms: Replace the deprecated drm_mode_config_init

2021-10-18 Thread Igor Matheus Andrade Torrente
Hi Thomas, On 10/18/21 7:02 AM, Thomas Zimmermann wrote: Hi Am 05.10.21 um 22:16 schrieb Igor Matheus Andrade Torrente: The `drm_mode_config_init` was deprecated since c3b790e commit, and it's being replaced by the `drmm_mode_config_init`. Signed-off-by: Igor Matheus Andrade Tor

Re: [PATCH 6/6] drm: vkms: Refactor the plane composer to accept new formats

2021-10-18 Thread Igor Matheus Andrade Torrente
Hi Pekka, On 10/18/21 5:30 AM, Pekka Paalanen wrote: On Tue, 5 Oct 2021 17:16:37 -0300 Igor Matheus Andrade Torrente wrote: Currently the blend function only accepts XRGB_ and ARGB_ as a color input. This patch refactors all the functions related to the plane composition to

Re: [PATCH 5/6] drm: vkms: Prepare `vkms_wb_encoder_atomic_check` to accept multiple formats

2021-10-18 Thread Igor Matheus Andrade Torrente
Hi Thomas, On 10/18/21 3:06 PM, Thomas Zimmermann wrote: Hi Am 18.10.21 um 19:41 schrieb Igor Matheus Andrade Torrente: Hello, On 10/18/21 7:14 AM, Thomas Zimmermann wrote: Hi Am 05.10.21 um 22:16 schrieb Igor Matheus Andrade Torrente: Currently, the vkms atomic check only goes through the

Re: [PATCH 5/6] drm: vkms: Prepare `vkms_wb_encoder_atomic_check` to accept multiple formats

2021-10-19 Thread Igor Matheus Andrade Torrente
Hi Thomas, On 10/19/21 4:17 AM, Thomas Zimmermann wrote: Hi Am 18.10.21 um 21:32 schrieb Igor Matheus Andrade Torrente: Hi Thomas, On 10/18/21 3:06 PM, Thomas Zimmermann wrote: Hi Am 18.10.21 um 19:41 schrieb Igor Matheus Andrade Torrente: Hello, On 10/18/21 7:14 AM, Thomas Zimmermann

Re: [PATCH 6/6] drm: vkms: Refactor the plane composer to accept new formats

2021-10-19 Thread Igor Matheus Andrade Torrente
Hi Pekka, On 10/19/21 5:05 AM, Pekka Paalanen wrote: On Mon, 18 Oct 2021 16:26:06 -0300 Igor Matheus Andrade Torrente wrote: Hi Pekka, On 10/18/21 5:30 AM, Pekka Paalanen wrote: On Tue, 5 Oct 2021 17:16:37 -0300 Igor Matheus Andrade Torrente wrote: Currently the blend function only

[PATCH 0/6] Refactor the vkms to accept new formats

2021-10-05 Thread Igor Matheus Andrade Torrente
16 is necessary. Therefore, I ignore the value received from the XRGB and overwrite the value with 0x. My question is, is this behavior acceptable? [1] https://lists.freedesktop.org/archives/igt-dev/2021-October/036125.html Igor Matheus Andrade Torrente (6): drm: vkms: Replace the deprecated

[PATCH 1/6] drm: vkms: Replace the deprecated drm_mode_config_init

2021-10-05 Thread Igor Matheus Andrade Torrente
The `drm_mode_config_init` was deprecated since c3b790e commit, and it's being replaced by the `drmm_mode_config_init`. Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/vkms/vkms_drv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH 2/6] drm: vkms: Alloc the compose frame using vzalloc

2021-10-05 Thread Igor Matheus Andrade Torrente
testing some pixel formats like ARGB16161616. This problem is addessed by allocating the memory using kvzalloc that circunvents this limitation. Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 3/6] drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES

2021-10-05 Thread Igor Matheus Andrade Torrente
The `map` vector at `vkms_composer` uses a hardcoded value to define its size. If someday the maximum number of planes increases, this hardcoded value can be a problem. This value is being replaced with the DRM_FORMAT_MAX_PLANES macro. Signed-off-by: Igor Matheus Andrade Torrente --- drivers

[PATCH 4/6] drm: vkms: Add fb information to `vkms_writeback_job`

2021-10-05 Thread Igor Matheus Andrade Torrente
wb format types. Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/vkms/vkms_drv.h | 10 +- drivers/gpu/drm/vkms/vkms_writeback.c | 16 +--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm

[PATCH 5/6] drm: vkms: Prepare `vkms_wb_encoder_atomic_check` to accept multiple formats

2021-10-05 Thread Igor Matheus Andrade Torrente
Currently, the vkms atomic check only goes through the first position of the `vkms_wb_formats` vector. This change prepares the atomic_check to check the entire vector. Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/vkms/vkms_writeback.c | 11 ++- 1 file changed, 10

[PATCH 6/6] drm: vkms: Refactor the plane composer to accept new formats

2021-10-05 Thread Igor Matheus Andrade Torrente
blend function will receive two ARGB_16161616 pixels, x, y, and the vkms_composer of the output buffer. The method should perform the blend operation and store output to the format aforementioned ARGB_16161616. Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/vkms/vkms_composer.c

Re: [RESEND v6 6/9] drm: vkms: Refactor the plane composer to accept new formats

2022-08-22 Thread Igor Matheus Andrade Torrente
Hi Melissa, On 8/20/22 07:51, Melissa Wen wrote: On 08/19, Igor Torrente wrote: Currently the blend function only accepts XRGB_ and ARGB_ as a color input. This patch refactors all the functions related to the plane composition to overcome this limitation. The pixels blend is done usi

Re: [RESEND v6 2/9] drm: vkms: Rename `vkms_composer` to `vkms_frame_info`

2022-08-22 Thread Igor Matheus Andrade Torrente
Hi Mellisa, On 8/20/22 08:00, Melissa Wen wrote: On 08/19, Igor Torrente wrote: Changes the name of this struct to a more meaningful name. A name that represents better what this struct is about. Composer is the code that do the compositing of the planes. This struct contains information on th

Re: [RESEND v6 2/9] drm: vkms: Rename `vkms_composer` to `vkms_frame_info`

2022-08-22 Thread Igor Matheus Andrade Torrente
On 8/22/22 15:37, Melissa Wen wrote: On 08/22, Igor Matheus Andrade Torrente wrote: Hi Mellisa, On 8/20/22 08:00, Melissa Wen wrote: On 08/19, Igor Torrente wrote: Changes the name of this struct to a more meaningful name. A name that represents better what this struct is about. Composer is

Re: [RESEND v6 6/9] drm: vkms: Refactor the plane composer to accept new formats

2022-08-22 Thread Igor Matheus Andrade Torrente
On 8/22/22 16:01, Melissa Wen wrote: On 08/22, Igor Matheus Andrade Torrente wrote: Hi Melissa, On 8/20/22 07:51, Melissa Wen wrote: On 08/19, Igor Torrente wrote: Currently the blend function only accepts XRGB_ and ARGB_ as a color input. This patch refactors all the functions

Re: build failure of next-20220906 due to 396369d67549 ("drm: vkms: Add support to the RGB565 format")

2022-09-06 Thread Igor Matheus Andrade Torrente
On 9/6/22 18:26, Sudip Mukherjee wrote: On Tue, Sep 6, 2022 at 4:59 PM Sudip Mukherjee (Codethink) wrote: Hi All, The builds of next-20220906 fails for mips, xtensa and arm allmodconfig. The errors in mips and xtensa are: ERROR: modpost: "__divdi3" [drivers/gpu/drm/vkms/vkms.ko] undefined!

Re: [PATCH] drm/vkms: fix 32bit compilation error by replacing macros

2022-09-09 Thread Igor Matheus Andrade Torrente
Hi Mellisa, Thanks for the patch fixing my mistakes. On 9/9/22 08:41, Melissa Wen wrote: Replace vkms_formats macros for fixed-point operations with functions from drm/drm_fixed.h to do the same job and fix 32-bit compilation errors. Fixes: a19c2ac9858 ("drm: vkms: Add support to the RGB565 fo

Re: [PATCH] drm/vkms: fix 32bit compilation error by replacing macros

2022-09-11 Thread Igor Matheus Andrade Torrente
On 9/10/22 16:10, Melissa Wen wrote: On 09/09, Igor Matheus Andrade Torrente wrote: Hi Mellisa, Thanks for the patch fixing my mistakes. On 9/9/22 08:41, Melissa Wen wrote: Replace vkms_formats macros for fixed-point operations with functions from drm/drm_fixed.h to do the same job and fix

Re: [PATCH v2] drm/vkms: fix 32bit compilation error by replacing macros

2022-09-11 Thread Igor Matheus Andrade Torrente
Reviewed-by: Igor Torrente On 9/10/22 16:03, Melissa Wen wrote: Replace vkms_formats macro for fixed-point operations with functions from drm/drm_fixed.h to do the same job and fix 32-bit compilation errors. v2: - don't cast results to s32 (Igor) - add missing drm_fixp2int conversion (Igor) F

[PATCH] Staging: drm_gem: Fix a misaligned comment block

2020-03-17 Thread Igor Matheus Andrade Torrente
Fix a checkpatch warning caused by a misaligned comment block. Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/drm_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 000fa4a1899f

[PATCH v2] drm: Alligne a comment block

2020-03-17 Thread Igor Matheus Andrade Torrente
Fix a checkpatch warning caused by a misaligned comment block. Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/drm_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 000fa4a1899f

[PATCH v2] drm: Correct a typo in a function comment

2020-03-17 Thread Igor Matheus Andrade Torrente
Replace "pionter" with "pointer" in the drm_gem_handle_create description. Changes in v2: - Change subject text Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm

[PATCH v2] drm: Alligne a comment block

2020-03-20 Thread Igor Matheus Andrade Torrente
Fix a checkpatch warning caused by a misaligned comment block. Changes in v2: - Change subject text Signed-off-by: Igor Matheus Andrade Torrente --- drivers/gpu/drm/drm_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm

[PATCH v3] drm: Align a comment block

2020-03-20 Thread Igor Matheus Andrade Torrente
Fix a checkpatch warning caused by a misaligned comment block. Signed-off-by: Igor Matheus Andrade Torrente --- Changes in v2: - Change subject text Changes in V3 - Fix a typo in the commit message drivers/gpu/drm/drm_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff