Mysterious operations in sysimgblt.c and sysimgblt.c

2021-05-15 Thread Igor Torrente
Hello everybody, I'm Igor, I'm participating in the Linux kernel mentorship program and working to fix some bugs found by the syzbot. I'm currently working on this bug below: https://syzkaller.appspot.com/bug?id=071122e4f772c1ec834c7a6facc0b5058d215481 The bug consists of an out-of-bound acc

Re: [PATCH] video: hgafb: correctly handle card detect failure during probe

2021-05-17 Thread Igor Torrente
Hi, On 5/16/21 4:27 PM, Anirudh Rayabharam wrote: The return value of hga_card_detect() is not properly handled causing the probe to succeed even though hga_card_detect() failed. Since probe succeeds, hgafb_open() can be called which will end up operating on an unmapped hga_vram. This results in

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

2022-02-20 Thread Igor Torrente
Hi Melissa, On 2/9/22 18:45, Melissa Wen wrote: On 02/08, Igor Torrente wrote: Hi Melissa, On 2/8/22 07:40, Melissa Wen wrote: On 01/21, Igor Torrente wrote: Currently the blend function only accepts XRGB_ and ARGB_ as a color input. This patch refactors all the functions related

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

2022-02-21 Thread Igor Torrente
Hi Pekka, On 2/21/22 06:18, Pekka Paalanen wrote: On Sun, 20 Feb 2022 22:02:12 -0300 Igor Torrente wrote: Hi Melissa, On 2/9/22 18:45, Melissa Wen wrote: On 02/08, Igor Torrente wrote: Hi Melissa, On 2/8/22 07:40, Melissa Wen wrote: On 01/21, Igor Torrente wrote: Currently the blend

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

2022-02-24 Thread Igor Torrente
Hi Pekka, On 2/10/22 06:37, Pekka Paalanen wrote: > On Fri, 21 Jan 2022 18:38:29 -0300 > 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

Re: [PATCH v4 9/9] drm: vkms: Add support to the RGB565 format

2022-02-24 Thread Igor Torrente
Hi Pekka, On Thu, Feb 10, 2022 at 6:50 AM Pekka Paalanen wrote: > On Fri, 21 Jan 2022 18:38:31 -0300 > Igor Torrente wrote: > > > Adds this common format to vkms. > > > > This commit also adds new helper macros to deal with fixed-point > > arithmetic. &

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

2022-02-27 Thread Igor Torrente
Hi Pekka, On 2/25/22 05:38, Pekka Paalanen wrote: > On Thu, 24 Feb 2022 21:43:01 -0300 > Igor Torrente wrote: > >> Hi Pekka, >> >> On 2/10/22 06:37, Pekka Paalanen wrote: >>> On Fri, 21 Jan 2022 18:38:29 -0300 >>> Igor Torrente wrote: >>> &g

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

2021-10-25 Thread Igor 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 Torrente --- V2: Change the code style(Thomas Zimmermann). --- drivers/gpu/drm/vkms/vkms_drv.c | 6 +- 1 file changed, 5 insertions(+), 1 del

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

2021-10-25 Thread Igor 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 Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

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

2021-10-25 Thread Igor 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 Torrente --- drivers/gpu/drm/vkms

[PATCH v2 7/8] drm: vkms: Exposes ARGB_1616161616 and adds XRGB_16161616 formats

2021-10-25 Thread Igor Torrente
-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 4 drivers/gpu/drm/vkms/vkms_formats.h | 25 + drivers/gpu/drm/vkms/vkms_plane.c | 5 - drivers/gpu/drm/vkms/vkms_writeback.c | 2 ++ 4 files changed, 35 insertions(+), 1 deletion(-) diff

[PATCH v2 8/8] drm: vkms: Add support the RGB565 format

2021-10-25 Thread Igor Torrente
Adds this common format to vkms. This commit also adds new helper macros to deal with fixed-point arithmetic. It was done to improve the precision of the conversion to ARGB16161616 since the "conversion ratio" is not an integer. Signed-off-by: Igor Torrente --- drivers/gp

[PATCH v2 0/8] Add new formats support to vkms

2021-10-26 Thread Igor Torrente
161616 is necessary. Therefore, I ignore the value received from the XRGB and overwrite the value with 0x. --- Igor Torrente (8): drm: vkms: Replace the deprecated drm_mode_config_init drm: vkms: Alloc the compose frame using vzalloc drm: vkms: Replace hardcoded value of `vkms_composer.map

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

2021-10-26 Thread Igor 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 Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

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

2021-10-26 Thread Igor 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 Torrente --- V2: Change the code style(Thomas Zimmermann). --- drivers/gpu/drm/vkms/vkms_drv.c | 6 +- 1 file changed, 5 insertions(+), 1 del

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

2021-10-26 Thread Igor Torrente
wb format types. Signed-off-by: Igor Torrente --- V2: Change the code to get the drm_framebuffer reference and not copy its contents(Thomas Zimmermann). --- drivers/gpu/drm/vkms/vkms_composer.c | 4 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 12 ++-- drivers/gpu/drm/vkms

[PATCH v2 5/8] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2021-10-26 Thread Igor Torrente
Add a helper function to validate the connector configuration receive in the encoder atomic_check by the drivers. So the drivers don't need do these common validations themselves. Signed-off-by: Igor Torrente --- V2: Move the format verification to a new helper at the drm_atomic_hel

[PATCH v2 7/8] drm: vkms: Exposes ARGB_1616161616 and adds XRGB_16161616 formats

2021-10-26 Thread Igor Torrente
-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 4 drivers/gpu/drm/vkms/vkms_formats.h | 25 + drivers/gpu/drm/vkms/vkms_plane.c | 5 - drivers/gpu/drm/vkms/vkms_writeback.c | 2 ++ 4 files changed, 35 insertions(+), 1 deletion(-) diff

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

2021-10-26 Thread Igor 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 Torrente --- drivers/gpu/drm/vkms

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

2021-10-26 Thread Igor Torrente
| 10.0 ms | 35.8 ms | 8.6 ms | Reported-by: kernel test robot Signed-off-by: Igor Torrente --- V2: Improves the performance drastically, by perfoming the operations per-line and not per-pixel(Pekka Paalanen). Minor improvements(Pekka Paalanen). --- drivers/gpu/drm/vkms/vkms_composer.c

[PATCH v2 8/8] drm: vkms: Add support the RGB565 format

2021-10-26 Thread Igor Torrente
Adds this common format to vkms. This commit also adds new helper macros to deal with fixed-point arithmetic. It was done to improve the precision of the conversion to ARGB16161616 since the "conversion ratio" is not an integer. Signed-off-by: Igor Torrente --- drivers/gp

[PATCH v2 8/8] drm: vkms: Add support to the RGB565 format

2021-10-26 Thread Igor Torrente
Adds this common format to vkms. This commit also adds new helper macros to deal with fixed-point arithmetic. It was done to improve the precision of the conversion to ARGB16161616 since the "conversion ratio" is not an integer. Signed-off-by: Igor Torrente --- drivers/gp

[PATCH v4 0/9] Add new formats support to vkms

2022-01-21 Thread Igor Torrente
l of the output pixel whenever the conversion from a format without an alpha channel to ARGB16161616 is necessary. Therefore, I ignore the value received from the XRGB and overwrite the value with 0x. --- Igor Torrente (9): drm: vkms: Replace the deprecated drm_mode_config_init drm: vkms:

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

2022-01-21 Thread Igor Torrente
`drm_mode_config_init` is deprecated since commit c3b790ea07a1 ("drm: Manage drm_mode_config_init with drmm_") in favor of `drmm_mode_config_init`. Update the former to the latter. Signed-off-by: Igor Torrente --- V2: Change the code style(Thomas Zimmermann). V4: Update the comm

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

2022-01-21 Thread Igor 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 Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

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

2022-01-21 Thread Igor 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 Torrente --- drivers/gpu/drm/vkms

[PATCH v4 4/9] drm: vkms: Rename `vkms_composer` to `vkms_frame_info`

2022-01-21 Thread Igor Torrente
better name to represent this. Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 87 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 6 +- drivers/gpu/drm/vkms/vkms_plane.c| 38 ++-- 3 files changed, 66 insertions(+), 65 deletions(-) diff

[PATCH v4 5/9] drm: vkms: Add fb information to `vkms_writeback_job`

2022-01-21 Thread Igor Torrente
wb format types. Signed-off-by: Igor Torrente --- V2: Change the code to get the drm_framebuffer reference and not copy its contents(Thomas Zimmermann). V3: Drop the refcount in the wb code(Thomas Zimmermann). --- drivers/gpu/drm/vkms/vkms_composer.c | 4 ++-- drivers/gpu/drm/vkms

[PATCH v4 7/9] drm: vkms: Refactor the plane composer to accept new formats

2022-01-21 Thread Igor Torrente
robot Signed-off-by: Igor Torrente --- V2: Improves the performance drastically, by perfoming the operations per-line and not per-pixel(Pekka Paalanen). Minor improvements(Pekka Paalanen). V3: Changes the code to blend the planes all at once. This improves performance, memory consumption

[PATCH v4 6/9] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2022-01-21 Thread Igor Torrente
Add a helper function to validate the connector configuration receive in the encoder atomic_check by the drivers. So the drivers don't need do these common validations themselves. Signed-off-by: Igor Torrente --- V2: Move the format verification to a new helper at the drm_atomic_hel

[PATCH v4 9/9] drm: vkms: Add support to the RGB565 format

2022-01-21 Thread Igor Torrente
Adds this common format to vkms. This commit also adds new helper macros to deal with fixed-point arithmetic. It was done to improve the precision of the conversion to ARGB16161616 since the "conversion ratio" is not an integer. Signed-off-by: Igor Torrente --- V3: Adapt the handl

[PATCH v4 8/9] drm: vkms: Adds XRGB_16161616 and ARGB_1616161616 formats

2022-01-21 Thread Igor Torrente
This will be useful to write tests that depends on these formats. ARGB and XRGB follows the a similar implementation of the former formats. Just adjusting for 16 bits per channel. Signed-off-by: Igor Torrente --- V3: Adapt the handlers to the new format introduced in patch 7 V3. --- drivers

Re: [PATCH v2 5/8] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2021-11-03 Thread Igor Torrente
Hi Leandro, On 10/28/21 6:38 PM, Leandro Ribeiro wrote: Hi, On 10/26/21 08:34, Igor Torrente wrote: Add a helper function to validate the connector configuration receive in the encoder atomic_check by the drivers. So the drivers don't need do these common validations themselves. Signe

Re: [PATCH v2 5/8] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2021-11-03 Thread Igor Torrente
Hi Thomas, On 11/3/21 12:37 PM, Thomas Zimmermann wrote: Hi Am 03.11.21 um 16:11 schrieb Leandro Ribeiro: Hi, On 11/3/21 12:03, Igor Torrente wrote: Hi Leandro, On 10/28/21 6:38 PM, Leandro Ribeiro wrote: Hi, On 10/26/21 08:34, Igor Torrente wrote: Add a helper function to validate the

Re: [PATCH v2 4/8] drm: vkms: Add fb information to `vkms_writeback_job`

2021-11-03 Thread Igor Torrente
Hi Thomas, On 11/3/21 12:45 PM, Thomas Zimmermann wrote: Hi Am 26.10.21 um 13:34 schrieb Igor Torrente: This commit is the groundwork to introduce new formats to the planes and writeback buffer. As part of it, a new buffer metadata field is added to `vkms_writeback_job`, this metadata is

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

2021-11-10 Thread Igor Torrente
26 Oct 2021 08:34:06 -0300 > 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 th

Re: [PATCH v2 0/8] Add new formats support to vkms

2021-11-10 Thread Igor Torrente
Hi Pekka, On Tue, Nov 9, 2021 at 6:32 AM Pekka Paalanen wrote: > > On Tue, 26 Oct 2021 08:34:00 -0300 > Igor Torrente wrote: > > > Summary > > === > > This series of patches refactor some vkms components in order to introduce > > new formats t

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

2021-11-11 Thread Igor Torrente
Hi Pekka, On Thu, Nov 11, 2021 at 6:33 AM Pekka Paalanen wrote: > > On Wed, 10 Nov 2021 13:56:54 -0300 > Igor Torrente wrote: > > > On Tue, Nov 9, 2021 at 8:40 AM Pekka Paalanen wrote: > > > > > > Hi Igor, > > > > > > again, that is

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

2021-11-12 Thread Igor Torrente
Hi Pekka, On Thu, Nov 11, 2021 at 11:37 AM Pekka Paalanen wrote: > > On Thu, 11 Nov 2021 11:07:21 -0300 > Igor Torrente wrote: > > > Hi Pekka, > > > > On Thu, Nov 11, 2021 at 6:33 AM Pekka Paalanen wrote: > > > > > > On Wed, 10 No

[PATCH v3 0/9] Add new formats support to vkms

2021-11-22 Thread Igor Torrente
l of the output pixel whenever the conversion from a format without an alpha channel to ARGB16161616 is necessary. Therefore, I ignore the value received from the XRGB and overwrite the value with 0x. --- Igor Torrente (9): drm: vkms: Replace the deprecated drm_mode_config_init drm: vkms:

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

2021-11-22 Thread Igor 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 Torrente --- V2: Change the code style(Thomas Zimmermann). --- drivers/gpu/drm/vkms/vkms_drv.c | 6 +- 1 file changed, 5 insertions(+), 1 del

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

2021-11-22 Thread Igor 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 Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

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

2021-11-22 Thread Igor 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 Torrente --- drivers/gpu/drm/vkms

[PATCH v3 4/9] drm: vkms: Rename `vkms_composer` to `vkms_frame_info`

2021-11-22 Thread Igor Torrente
better name to represent this. Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 87 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 6 +- drivers/gpu/drm/vkms/vkms_plane.c| 38 ++-- 3 files changed, 66 insertions(+), 65 deletions(-) diff

[PATCH v3 5/9] drm: vkms: Add fb information to `vkms_writeback_job`

2021-11-22 Thread Igor Torrente
wb format types. Signed-off-by: Igor Torrente --- V2: Change the code to get the drm_framebuffer reference and not copy its contents(Thomas Zimmermann). V3: Drop the refcount in the wb code(Thomas Zimmermann). --- drivers/gpu/drm/vkms/vkms_composer.c | 4 ++-- drivers/gpu/drm/vkms

[PATCH v3 7/9] drm: vkms: Refactor the plane composer to accept new formats

2021-11-22 Thread Igor Torrente
robot Signed-off-by: Igor Torrente --- V2: Improves the performance drastically, by perfoming the operations per-line and not per-pixel(Pekka Paalanen). Minor improvements(Pekka Paalanen). V3: Changes the code to blend the planes all at once. This improves performance, memory consumption

[PATCH v3 6/9] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2021-11-22 Thread Igor Torrente
Add a helper function to validate the connector configuration receive in the encoder atomic_check by the drivers. So the drivers don't need do these common validations themselves. Signed-off-by: Igor Torrente --- V2: Move the format verification to a new helper at the drm_atomic_hel

[PATCH v3 8/9] drm: vkms: Adds XRGB_16161616 and ARGB_1616161616 formats

2021-11-22 Thread Igor Torrente
This will be useful to write tests that depends on these formats. ARGB and XRGB follows the a similar implementation of the former formats. Just adjusting for 16 bits per channel. Signed-off-by: Igor Torrente --- V3: Adapt the handlers to the new format introduced in patch 7 V3. --- drivers

[PATCH v3 9/9] drm: vkms: Add support to the RGB565 format

2021-11-22 Thread Igor Torrente
Adds this common format to vkms. This commit also adds new helper macros to deal with fixed-point arithmetic. It was done to improve the precision of the conversion to ARGB16161616 since the "conversion ratio" is not an integer. Signed-off-by: Igor Torrente --- V3: Adapt the handl

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

2021-11-29 Thread Igor Torrente
Hi Nícolas, On Thu, Nov 25, 2021 at 1:37 AM Nícolas F. R. A. Prado wrote: > > Hi Igor, > > just some nits on the commit message. > > On Mon, Nov 22, 2021 at 04:43:52PM -0300, Igor Torrente wrote: > > The `drm_mode_config_init` was deprecated since c3b790e commit, and it

Re: [PATCH v5 0/9] Add new formats support to vkms

2022-06-13 Thread Igor Torrente
Hi Melissa, On 6/13/22 06:52, Melissa Wen wrote: On 04/04, Igor Torrente wrote: Summary === This series of patches refactor some vkms components in order to introduce new formats to the planes and writeback connector. Now in the blend function, the plane's pixels are convert

[PATCH v6 0/9] Add new formats support to vkms

2022-06-13 Thread Igor Torrente
Open issue: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/118 --- Igor Torrente (9): drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES drm: vkms: Rename `vkms_composer` to `vkms_frame_info` drm: drm_atomic_helper: Add a new helper to deal with

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

2022-06-13 Thread Igor Torrente
represent this. V5: Fix a commit message typo(Melissa Wen). Reviewed-by: Melissa Wen Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 87 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 6 +- drivers/gpu/drm/vkms/vkms_plane.c| 38 ++-- 3

[PATCH v6 1/9] drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES

2022-06-13 Thread Igor Torrente
Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h index 91e63b12f60f..36fbab5989d1 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.h +++ b/drivers/gpu/drm

[PATCH v6 3/9] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2022-06-13 Thread Igor Torrente
ormat check improvements (Leandro Ribeiro). Minor improvements(Thomas Zimmermann). V5: Fix some grammar issues in the commit message (André Almeida). Signed-off-by: Igor Torrente --- drivers/gpu/drm/drm_atomic_helper.c | 39 +++ drivers/gpu/drm/vkms/vkms_writeback.c

[PATCH v6 4/9] drm: vkms: get the reference to `drm_framebuffer` instead if coping it

2022-06-13 Thread Igor Torrente
Instead of coping `drm_framebuffer` - which can cause problems - we just get the reference and add the ref count. Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 4 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- drivers/gpu/drm/vkms/vkms_plane.c| 10

[PATCH v6 5/9] drm: vkms: Add fb information to `vkms_writeback_job`

2022-06-13 Thread Igor Torrente
(Pekka Paalanen) V6: Improvements to some struct/struct members names (Pekka Paalanen). Splits this patch in two (Pekka Paalanen). Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_drv.h | 29 ++- drivers/gpu/drm/vkms/vkms_writeback.c | 20

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

2022-06-13 Thread Igor Torrente
Pekka Paalanen). V6: Fix a mismatch of some variable sizes (Pekka Paalanen). Several minor improvements (Pekka Paalanen). Reported-by: kernel test robot Signed-off-by: Igor Torrente --- Documentation/gpu/vkms.rst| 4 - drivers/gpu/drm/vkms/Makefile | 1 + drivers/gpu/drm

[PATCH v6 7/9] drm: vkms: Supports to the case where primary plane doesn't match the CRTC

2022-06-13 Thread Igor Torrente
: Improve the commit description (Pekka Paalanen). Update some comments (Pekka Paalanen). Remove some fields from `vkms_crtc_state` and move where some variables are set (Pekka Paalanen). Signed-off-by: Igor Torrente --- Documentation/gpu/vkms.rst| 3 +- drivers/gpu/drm/vkms

[PATCH v6 8/9] drm: vkms: Adds XRGB_16161616 and ARGB_1616161616 formats

2022-06-13 Thread Igor Torrente
/cpu_to_le16 to the 16 bits color read/writes. Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_formats.c | 77 +++ drivers/gpu/drm/vkms/vkms_plane.c | 5 +- drivers/gpu/drm/vkms/vkms_writeback.c | 2 + 3 files changed, 83 insertions(+), 1 deletion(-) diff

[PATCH v6 9/9] drm: vkms: Add support to the RGB565 format

2022-06-13 Thread Igor Torrente
V6: Minor improvements (Pekka Paalanen) Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_formats.c | 70 +++ drivers/gpu/drm/vkms/vkms_plane.c | 6 ++- drivers/gpu/drm/vkms/vkms_writeback.c | 3 +- 3 files changed, 76 insertions(+), 3 deletions(-) di

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

2022-02-08 Thread Igor Torrente
Hi Melissa, On 2/8/22 07:40, Melissa Wen wrote: On 01/21, 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. A new internal format

Re: [PATCH v5 5/9] drm: vkms: Add fb information to `vkms_writeback_job`

2022-04-23 Thread Igor Torrente
Hi Pekka, On 4/20/22 08:23, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:11 -0300 Igor Torrente wrote: This commit is the groundwork to introduce new formats to the planes and writeback buffer. As part of it, a new buffer metadata field is added to `vkms_writeback_job`, this metadata is

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

2022-04-23 Thread Igor Torrente
Hi Pekka, On 4/20/22 09:36, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:12 -0300 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

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

2022-04-23 Thread Igor Torrente
I forgot to respond some points from your review. On 4/23/22 13:04, Igor Torrente wrote: Hi Pekka, On 4/20/22 09:36, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:12 -0300 Igor Torrente wrote: Currently the blend function only accepts XRGB_ and ARGB_ as a color input. This patch

Re: [PATCH v5 7/9] drm: vkms: Supports to the case where primary plane doesn't match the CRTC

2022-04-23 Thread Igor Torrente
Hi Pekka, On 4/20/22 10:13, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:13 -0300 Igor Torrente wrote: We will break the current assumption that the primary plane has the Hi, I'd say "remove" rather than "break". Breaking sounds bad but this is good. :-) Yea

Re: [PATCH v5 5/9] drm: vkms: Add fb information to `vkms_writeback_job`

2022-04-25 Thread Igor Torrente
Hi Pekka, On 4/25/22 04:56, Pekka Paalanen wrote: On Sat, 23 Apr 2022 12:12:51 -0300 Igor Torrente wrote: Hi Pekka, On 4/20/22 08:23, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:11 -0300 Igor Torrente wrote: This commit is the groundwork to introduce new formats to the planes and

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

2022-04-25 Thread Igor Torrente
Hi Pekka, On 4/25/22 05:10, Pekka Paalanen wrote: On Sat, 23 Apr 2022 15:53:20 -0300 Igor Torrente wrote: I forgot to respond some points from your review. On 4/23/22 13:04, Igor Torrente wrote: Hi Pekka, On 4/20/22 09:36, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:12 -0300 Igor

Re: [PATCH v5 5/9] drm: vkms: Add fb information to `vkms_writeback_job`

2022-04-26 Thread Igor Torrente
On 4/26/22 04:09, Pekka Paalanen wrote: On Mon, 25 Apr 2022 21:56:12 -0300 Igor Torrente wrote: Hi Pekka, On 4/25/22 04:56, Pekka Paalanen wrote: On Sat, 23 Apr 2022 12:12:51 -0300 Igor Torrente wrote: Hi Pekka, On 4/20/22 08:23, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:11

Re: [PATCH v5 9/9] drm: vkms: Add support to the RGB565 format

2022-04-26 Thread Igor Torrente
Hi Pekka, On 4/21/22 07:58, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:15 -0300 Igor Torrente wrote: Adds this common format to vkms. This commit also adds new helper macros to deal with fixed-point arithmetic. It was done to improve the precision of the conversion to ARGB16161616

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

2022-04-26 Thread Igor Torrente
On 4/25/22 22:54, Igor Torrente wrote: Hi Pekka, On 4/25/22 05:10, Pekka Paalanen wrote: On Sat, 23 Apr 2022 15:53:20 -0300 Igor Torrente wrote: I forgot to respond some points from your review. On 4/23/22 13:04, Igor Torrente wrote: Hi Pekka, On 4/20/22 09:36, Pekka Paalanen wrote

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

2022-04-26 Thread Igor Torrente
On April 26, 2022 10:03:09 PM GMT-03:00, Igor Torrente wrote: > > >On 4/25/22 22:54, Igor Torrente wrote: >> Hi Pekka, >> >> On 4/25/22 05:10, Pekka Paalanen wrote: >>> On Sat, 23 Apr 2022 15:53:20 -0300 >>> Igor Torrente wrote: >>>

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

2022-04-27 Thread Igor Torrente
On 4/27/22 04:43, Pekka Paalanen wrote: On Tue, 26 Apr 2022 22:22:22 -0300 Igor Torrente wrote: On April 26, 2022 10:03:09 PM GMT-03:00, Igor Torrente wrote: On 4/25/22 22:54, Igor Torrente wrote: Hi Pekka, On 4/25/22 05:10, Pekka Paalanen wrote: On Sat, 23 Apr 2022 15:53:20 -0300

[RESEND v6 0/9] Add new formats support to vkms

2022-08-19 Thread Igor Torrente
Open issue: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/118 --- Igor Torrente (9): drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES drm: vkms: Rename `vkms_composer` to `vkms_frame_info` drm: drm_atomic_helper: Add a new helper to deal with

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

2022-08-19 Thread Igor Torrente
represent this. V5: Fix a commit message typo(Melissa Wen). Reviewed-by: Melissa Wen Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 87 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 6 +- drivers/gpu/drm/vkms/vkms_plane.c| 38 ++-- 3

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

2022-08-19 Thread Igor Torrente
Pekka Paalanen). V6: Fix a mismatch of some variable sizes (Pekka Paalanen). Several minor improvements (Pekka Paalanen). Reported-by: kernel test robot Signed-off-by: Igor Torrente --- Documentation/gpu/vkms.rst| 4 - drivers/gpu/drm/vkms/Makefile | 1 + drivers/gpu/drm

[RESEND v6 1/9] drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES

2022-08-19 Thread Igor Torrente
Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h index 91e63b12f60f..36fbab5989d1 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.h +++ b/drivers/gpu/drm

[RESEND v6 3/9] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2022-08-19 Thread Igor Torrente
ormat check improvements (Leandro Ribeiro). Minor improvements(Thomas Zimmermann). V5: Fix some grammar issues in the commit message (André Almeida). Signed-off-by: Igor Torrente --- drivers/gpu/drm/drm_atomic_helper.c | 39 +++ drivers/gpu/drm/vkms/vkms_writeback.c

[RESEND v6 8/9] drm: vkms: Adds XRGB_16161616 and ARGB_1616161616 formats

2022-08-19 Thread Igor Torrente
/cpu_to_le16 to the 16 bits color read/writes. Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_formats.c | 77 +++ drivers/gpu/drm/vkms/vkms_plane.c | 5 +- drivers/gpu/drm/vkms/vkms_writeback.c | 2 + 3 files changed, 83 insertions(+), 1 deletion(-) diff

[RESEND v6 7/9] drm: vkms: Supports to the case where primary plane doesn't match the CRTC

2022-08-19 Thread Igor Torrente
: Improve the commit description (Pekka Paalanen). Update some comments (Pekka Paalanen). Remove some fields from `vkms_crtc_state` and move where some variables are set (Pekka Paalanen). Signed-off-by: Igor Torrente --- Documentation/gpu/vkms.rst| 3 +- drivers/gpu/drm/vkms

[RESEND v6 9/9] drm: vkms: Add support to the RGB565 format

2022-08-19 Thread Igor Torrente
V6: Minor improvements (Pekka Paalanen) Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_formats.c | 70 +++ drivers/gpu/drm/vkms/vkms_plane.c | 6 ++- drivers/gpu/drm/vkms/vkms_writeback.c | 3 +- 3 files changed, 76 insertions(+), 3 deletions(-) di

[RESEND v6 4/9] drm: vkms: get the reference to `drm_framebuffer` instead if coping it

2022-08-19 Thread Igor Torrente
Instead of coping `drm_framebuffer` - which can cause problems - we just get the reference and add the ref count. Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 4 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- drivers/gpu/drm/vkms/vkms_plane.c| 10

[RESEND v6 5/9] drm: vkms: Add fb information to `vkms_writeback_job`

2022-08-19 Thread Igor Torrente
(Pekka Paalanen) V6: Improvements to some struct/struct members names (Pekka Paalanen). Splits this patch in two (Pekka Paalanen). Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_drv.h | 29 ++- drivers/gpu/drm/vkms/vkms_writeback.c | 20

Re: [PATCH v5 9/9] drm: vkms: Add support to the RGB565 format

2022-05-06 Thread Igor Torrente
Hi Pekka, On 4/27/22 04:55, Pekka Paalanen wrote: On Tue, 26 Apr 2022 21:53:19 -0300 Igor Torrente wrote: Hi Pekka, On 4/21/22 07:58, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:15 -0300 Igor Torrente wrote: Adds this common format to vkms. This commit also adds new helper

Re: [PATCH v5 9/9] drm: vkms: Add support to the RGB565 format

2022-05-10 Thread Igor Torrente
On 5/9/22 04:53, Pekka Paalanen wrote: On Fri, 6 May 2022 20:05:39 -0300 Igor Torrente wrote: Hi Pekka, On 4/27/22 04:55, Pekka Paalanen wrote: On Tue, 26 Apr 2022 21:53:19 -0300 Igor Torrente wrote: Hi Pekka, On 4/21/22 07:58, Pekka Paalanen wrote: On Mon, 4 Apr 2022 17:45:15

Re: [PATCH v5 8/9] drm: vkms: Adds XRGB_16161616 and ARGB_1616161616 formats

2022-05-10 Thread Igor Torrente
Hi Thomas On 5/7/22 04:32, Thomas Zimmermann wrote: Hi Am 04.04.22 um 22:45 schrieb Igor Torrente: This will be useful to write tests that depends on these formats. ARGB and XRGB follows the a similar implementation of the former formats. Just adjusting for 16 bits per channel. V3: Adapt

[PATCH v5 0/9] Add new formats support to vkms

2022-04-04 Thread Igor Torrente
This patch series reworks the blend function to accept a primary plane with a different size and position from CRTC. Because now we need to fill the background, we had a loss in performance with this change --- Igor Torrente (9): drm: vkms: Alloc the compose frame usi

[PATCH v5 1/9] drm: vkms: Alloc the compose frame using vzalloc

2022-04-04 Thread Igor Torrente
circunvents this limitation. V5: Improve the commit message and drop the debugging issues in VKMS TO-DO(Melissa Wen). Reviewed-by: Melissa Wen Signed-off-by: Igor Torrente --- Documentation/gpu/vkms.rst | 6 -- drivers/gpu/drm/vkms/vkms_composer.c | 6 +++--- 2 files changed, 3 insertions

[PATCH v5 2/9] drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES

2022-04-04 Thread Igor Torrente
Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h index 9496fdc900b8..0eeea6f93733 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.h +++ b/drivers/gpu/drm

[PATCH v5 3/9] drm: vkms: Rename `vkms_composer` to `vkms_frame_info`

2022-04-04 Thread Igor Torrente
represent this. V5: Fix a commit message typo(Melissa Wen). Reviewed-by: Melissa Wen Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 87 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 6 +- drivers/gpu/drm/vkms/vkms_plane.c| 38 ++-- 3

[PATCH v5 4/9] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2022-04-04 Thread Igor Torrente
ormat check improvements (Leandro Ribeiro). Minor improvements(Thomas Zimmermann). Signed-off-by: Igor Torrente --- drivers/gpu/drm/drm_atomic_helper.c | 39 +++ drivers/gpu/drm/vkms/vkms_writeback.c | 9 +++ include/drm/drm_atomic_helper.h | 3 +++ 3 files ch

[PATCH v5 5/9] drm: vkms: Add fb information to `vkms_writeback_job`

2022-04-04 Thread Igor Torrente
wb code(Thomas Zimmermann). V5: Add {wb,plane}_format_transform_func to vkms_writeback_job and vkms_plane_state (Pekka Paalanen) Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_composer.c | 4 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 31 +-- drivers

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

2022-04-04 Thread Igor Torrente
a Wen). Several security/robustness improvents(Pekka Paalanen). Removes check_planes_x_bounds function and allows partial partly off-screen(Pekka Paalanen). Signed-off-by: Igor Torrente --- Documentation/gpu/vkms.rst| 4 - drivers/gpu/drm/vkms/Makefile | 1 + drivers/gp

[PATCH v5 7/9] drm: vkms: Supports to the case where primary plane doesn't match the CRTC

2022-04-04 Thread Igor Torrente
| |:---:|:-:|:--:| | frametime range | 5~18 ms | 10~22 ms | | Average | 8.47 ms | 12.32 ms | [1] IGT commit id: bc3f6833a12221a46659535dac06ebb312490eb4 Signed-off-by: Igor Torrente --- Documentation/gpu/vkms.rst | 3 +-- drivers/gpu/drm/vkms/vkms_composer.c | 32

[PATCH v5 8/9] drm: vkms: Adds XRGB_16161616 and ARGB_1616161616 formats

2022-04-04 Thread Igor Torrente
/cpu_to_le16 to the 16 bits color read/writes. Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_formats.c | 77 +++ drivers/gpu/drm/vkms/vkms_plane.c | 5 +- drivers/gpu/drm/vkms/vkms_writeback.c | 2 + 3 files changed, 83 insertions(+), 1 deletion(-) diff

[PATCH v5 9/9] drm: vkms: Add support to the RGB565 format

2022-04-04 Thread Igor Torrente
patch 7 V3. V5: Minor improvements Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_formats.c | 70 +++ drivers/gpu/drm/vkms/vkms_plane.c | 6 ++- drivers/gpu/drm/vkms/vkms_writeback.c | 3 +- 3 files changed, 76 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v5 1/9] drm: vkms: Alloc the compose frame using vzalloc

2022-04-05 Thread Igor Torrente
Hi André, On 4/5/22 11:05, André Almeida wrote: Hi Igor, Thanks for your patch! Às 17:45 de 04/04/22, Igor Torrente escreveu: Currently, the memory to the composition frame is being allocated using the kzmalloc. This comes with the limitation of maximum size of one page size(which in the

Re: [PATCH v5 4/9] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation

2022-04-05 Thread Igor Torrente
Hi André, On 4/5/22 11:21, André Almeida wrote: Às 17:45 de 04/04/22, Igor Torrente escreveu: Add a helper function to validate the connector configuration receive in Maybe it should be "received" the encoder atomic_check by the drivers. So the drivers don't need

[PATCH v7 0/9] Add new formats support to vkms

2022-09-05 Thread Igor Torrente
Open issue: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/118 --- Igor Torrente (9): drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES drm: vkms: Rename `vkms_composer` to `vkms_frame_info` drm: drm_atomic_helper: Add a new helper to deal with

[PATCH v7 1/9] drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES

2022-09-05 Thread Igor Torrente
Signed-off-by: Igor Torrente --- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h index 1d60654b553b..ae6c5a3d356c 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.h +++ b/drivers/gpu/drm

  1   2   >