Re: [git pull] drm fixes for 5.11-rc1

2020-12-29 Thread Rodrigo Siqueira
iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4gcQRS3HI4u1UEWu35Ze1w5CLWmAof5nouCFQoKEQD0%3D&reserved=0 > > References > >Visible links > 1. > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&data=04%7C01%7Cbindu.r%40amd.com%7Cae8f547c9287426b9b9408d8ac0b7b73%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637448512618562550%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4gcQRS3HI4u1UEWu35Ze1w5CLWmAof5nouCFQoKEQD0%3D&reserved=0 -- Rodrigo Siqueira https://siqueira.tech signature.asc Description: PGP signature

[PATCH] drm/amd/display: Initialize stack variable

2020-12-29 Thread Rodrigo Siqueira
Ramamurthy Signed-off-by: Wesley Chalmers Reviewed-by: Martin Leung Reviewed-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c b/drivers/gpu/drm/amd/displa

Re: 8353d30e747f ("drm/amd/display: disable stream if pixel clock changed with link active")

2020-12-15 Thread Rodrigo Siqueira
a%40amd.com%7C08fad887df0d48130c5008d8a12943dc%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637436546148511884%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RSzl0BfkNzJy%2BJwphMSgwX1u9cehN%2FW2fTML3VnfTQY%3D&reserved=0 -- Rodrigo Siqueira

Re: 8353d30e747f ("drm/amd/display: disable stream if pixel clock changed with link active")

2020-12-15 Thread Rodrigo Siqueira
On 12/15, Alex Deucher wrote: > On Tue, Dec 15, 2020 at 11:07 AM Rodrigo Siqueira > wrote: > > > > Hi, > > > > Could you try on Alex's repo? > > > > git://people.freedesktop.org/~agd5f/linux > > branch: amd-staging-drm-next > > > &

Re: 8353d30e747f ("drm/amd/display: disable stream if pixel clock changed with link active")

2020-12-15 Thread Rodrigo Siqueira
Hi, Could you try on Alex's repo? git://people.freedesktop.org/~agd5f/linux branch: amd-staging-drm-next My patch should apply without any issue on top of this branch. Thanks On 12/15, Borislav Petkov wrote: > On Tue, Dec 15, 2020 at 10:47:03AM -0500, Rodrigo Siqueira wrote: >

Re: 8353d30e747f ("drm/amd/display: disable stream if pixel clock changed with link active")

2020-12-15 Thread Rodrigo Siqueira
a1d89%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637435793657547591%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Cpb2l3OjKBeFwx%2FHIf%2F0d%2BSFiJL46p7Bct3JAIThSZ8%3D&reserved=0 > > ___ > > amd-gfx mailing list > > amd-...@lists.freedesktop.org > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CRodrigo.Siqueira%40amd.com%7C36709b101b6e4c353e7e08d8a07a1d89%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637435793657547591%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XdoPAac6FCjulOvtOsdzO4rh5Qd9wwNIi%2B%2F5lvkaUoI%3D&reserved=0 -- Rodrigo Siqueira https://siqueira.tech signature.asc Description: PGP signature

Re: 8353d30e747f ("drm/amd/display: disable stream if pixel clock changed with link active")

2020-12-15 Thread Rodrigo Siqueira
Ftglx%2Fnotes-about-netiquette&data=04%7C01%7CRodrigo.Siqueira%40amd.com%7C9c55e386aad44fc9531608d89ded4100%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637432989642100749%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WVk3xRmBn3A75KLQKaBG7FzktecRG6GS7rXJE7bEPBg%3D&reserved=0 -- Rodrigo Siqueira https://siqueira.tech signature.asc Description: PGP signature

[PATCH v2 0/4] Enlarge tracepoints in the display component

2020-09-11 Thread Rodrigo Siqueira
originally made by Nicholas Kazlauskas. Change in V2: - I added another patch for capturing the clock state for different display architecture. Rodrigo Siqueira (4): drm/amd/display: Rework registers tracepoint drm/amd/display: Add tracepoint for amdgpu_dm drm/amd/display: Add pipe_state

[PATCH v2 2/4] drm/amd/display: Add tracepoint for amdgpu_dm

2020-09-11 Thread Rodrigo Siqueira
Debug amdgpu_dm could be a complicated task, therefore, this commit adds tracepoints in some convenient functions such as plane and connector check inside amdgpu_dm. Co-developed-by: Nicholas Kazlauskas Signed-off-by: Nicholas Kazlauskas Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd

[PATCH v2 3/4] drm/amd/display: Add pipe_state tracepoint

2020-09-11 Thread Rodrigo Siqueira
to other DCN architecture. Co-developed-by: Nicholas Kazlauskas Signed-off-by: Nicholas Kazlauskas Signed-off-by: Rodrigo Siqueira --- .../amd/display/amdgpu_dm/amdgpu_dm_trace.h | 172 ++ drivers/gpu/drm/amd/display/dc/core/dc.c | 11 ++ .../amd/display/dc/dcn10

[PATCH v2 1/4] drm/amd/display: Rework registers tracepoint

2020-09-11 Thread Rodrigo Siqueira
amdgpu_dc_rreg and amdgpu_dc_wreg are very similar, for this reason, this commits abstract these two events by using DECLARE_EVENT_CLASS and create an instance of it for each one of these events. Signed-off-by: Rodrigo Siqueira --- .../amd/display/amdgpu_dm/amdgpu_dm_trace.h | 55

[PATCH v2 4/4] drm/amd/display: Add tracepoint for capturing clocks state

2020-09-11 Thread Rodrigo Siqueira
Signed-off-by: Rodrigo Siqueira --- .../amd/display/amdgpu_dm/amdgpu_dm_trace.h | 198 ++ .../dc/clk_mgr/dce112/dce112_clk_mgr.c| 5 + .../display/dc/clk_mgr/dcn10/rv1_clk_mgr.c| 4 + .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 + .../amd/display/dc/clk_mgr

[PATCH 2/3] drm/amd/display: Add tracepoint for amdgpu_dm

2020-09-09 Thread Rodrigo Siqueira
Debug amdgpu_dm could be a complicated task, therefore, this commit adds tracepoints in some convenient functions such as plane and connector check inside amdgpu_dm. Co-developed-by: Nicholas Kazlauskas Signed-off-by: Nicholas Kazlauskas Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd

[PATCH 0/3] Enlarge tracepoints in the display component

2020-09-09 Thread Rodrigo Siqueira
originally made by Nicholas Kazlauskas. Rodrigo Siqueira (3): drm/amd/display: Rework registers tracepoint drm/amd/display: Add tracepoint for amdgpu_dm drm/amd/display: Add pipe_state tracepoint .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 + .../amd/display/amdgpu_dm

[PATCH 3/3] drm/amd/display: Add pipe_state tracepoint

2020-09-09 Thread Rodrigo Siqueira
to other DCN architecture. Co-developed-by: Nicholas Kazlauskas Signed-off-by: Nicholas Kazlauskas Signed-off-by: Rodrigo Siqueira --- .../amd/display/amdgpu_dm/amdgpu_dm_trace.h | 172 ++ drivers/gpu/drm/amd/display/dc/core/dc.c | 11 ++ .../amd/display/dc/dcn10

[PATCH 1/3] drm/amd/display: Rework registers tracepoint

2020-09-09 Thread Rodrigo Siqueira
amdgpu_dc_rreg and amdgpu_dc_wreg are very similar, for this reason, this commits abstract these two events by using DECLARE_EVENT_CLASS and create an instance of it for each one of these events. Signed-off-by: Rodrigo Siqueira --- .../amd/display/amdgpu_dm/amdgpu_dm_trace.h | 55

Re: [PATCH] MAINTAINERS: add entry for VKMS

2020-09-04 Thread Rodrigo Siqueira
AINTAINERS > +++ b/MAINTAINERS > @@ -5640,6 +5640,7 @@ F: drivers/gpu/drm/udl/ > > DRM DRIVER FOR VIRTUAL KERNEL MODESETTING (VKMS) > M: Rodrigo Siqueira > +M: Melissa Wen > R: Haneen Mohammed > R: Daniel Vetter > L: dri-de...@lists.freedesktop.org &g

[PATCH v6 0/3] drm/vkms: Introduces writeback support

2020-08-30 Thread Rodrigo Siqueira
poser). V6: - Rebase and tiny fixes Best regards Rodrigo Siqueira (3): drm/vkms: Decouple crc operations from composer drm/vkms: Compute CRC without change input data drm/vkms: Add support for writeback drivers/gpu/drm/vkms/Makefile | 9 +- drivers/gpu/drm/vkms/vkms_composer.c

[PATCH v6 3/3] drm/vkms: Add support for writeback

2020-08-30 Thread Rodrigo Siqueira
ff-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/Makefile | 9 +- drivers/gpu/drm/vkms/vkms_composer.c | 21 +++- drivers/gpu/drm/vkms/vkms_drv.h | 11 +- drivers/gpu/drm/vkms/vkms_output.c| 4 + drivers/gpu/drm/vkms/vkms_writeback.c | 142 ++ 5

[PATCH v6 2/3] drm/vkms: Compute CRC without change input data

2020-08-30 Thread Rodrigo Siqueira
and drop bitmap for alpha Change in V4 (Emil): - Move bitmap_clear operation and comments to get_pixel function Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_composer.c | 34 ++-- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/gpu

[PATCH v6 1/3] drm/vkms: Decouple crc operations from composer

2020-08-30 Thread Rodrigo Siqueira
. Tested-by: Melissa Wen Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_composer.c | 49 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c index eaecc5a6c5db

Re: [PATCH v2] drm/vkms: add alpha-premultiplied color blending

2020-08-30 Thread Rodrigo Siqueira
Reviewed-by: Rodrigo Siqueira On 08/25, Melissa Wen wrote: > The VKMS blend function was ignoring the alpha channel and just > overwriting vaddr_src with vaddr_dst. This XRGB approach triggers a > warning when running the kms_cursor_crc/cursor-alpha-transparent test >

Re: [PATCH] drm/vkms: Use alpha value to blend values.

2020-08-24 Thread Rodrigo Siqueira
Hi Sidong, Thanks a lot for your patch and effort to improve VKMS. On 08/18, Sidong Yang wrote: > I wrote this patch for TODO list in vkms documentation. > > Use alpha value to blend source value and destination value Instead of > just overwrite with source value. > > Cc

Re: [PATCH] drm/vkms: add alpha-premultiplied color blending

2020-08-24 Thread Rodrigo Siqueira
nt warning: > Suspicious CRC: All values are 0. > > Cc: Daniel Vetter > Cc: Rodrigo Siqueira > Cc: Haneen Mohammed > > Signed-off-by: Melissa Wen > --- > drivers/gpu/drm/vkms/vkms_composer.c | 43 +--- > 1 file changed, 33 insertions(+),

[PATCH v5 2/3] drm/vkms: Compute CRC without change input data

2020-08-24 Thread Rodrigo Siqueira
bitmap_clear operation and comments to get_pixel function Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_composer.c | 38 ++-- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms

[PATCH v5 3/3] drm/vkms: Add support for writeback

2020-08-24 Thread Rodrigo Siqueira
uffer instead of CRC private buffer - Guarantees that the CRC will match exactly what we have in the writeback buffer. Change in V2: - Rework signal completion (Brian) - Integrates writeback with active_planes (Daniel) - Compose cursor (Daniel) Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm

[PATCH v5 1/3] drm/vkms: Decouple crc operations from composer

2020-08-24 Thread Rodrigo Siqueira
. Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_composer.c | 49 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c index 4f3b07a32b60..4d8bc04bb6ee 100644 --- a

[PATCH v5 0/3] drm/vkms: Introduces writeback support

2020-08-24 Thread Rodrigo Siqueira
poser). Best Regard Rodrigo Siqueira (3): drm/vkms: Decouple crc operations from composer drm/vkms: Compute CRC without change input data drm/vkms: Add support for writeback drivers/gpu/drm/vkms/Makefile | 9 +- drivers/gpu/drm/vkms/vkms_composer.c | 102 +++--- driver

Re: [PATCH] drm/vkms: change the max cursor width/height

2020-07-12 Thread Rodrigo Siqueira
Applied to drm-misc-next. Thanks On 07/12, Rodrigo Siqueira wrote: > Hi Melissa, > > First of all, thanks a lot for your patch! This is a nice change since > it increases the code coverage. > > Reviewed-by: Rodrigo Siqueira > > On 07/10, Melissa Wen wrote: >

Re: [PATCH] drm/vkms: change the max cursor width/height

2020-07-12 Thread Rodrigo Siqueira
Hi Melissa, First of all, thanks a lot for your patch! This is a nice change since it increases the code coverage. Reviewed-by: Rodrigo Siqueira On 07/10, Melissa Wen wrote: > This change expands the coverage for the IGT kms_cursor_crc test, where > the size varies between 64 and 512

Re: [PATCH] drm/vkms: Optimize compute_crc(), blend()

2020-05-31 Thread Rodrigo Siqueira
omething similar [1] mostly for cosmetic > purposes - doubt there's much benefits beyond that. > > HTH > -Emil > [1] https://patchwork.freedesktop.org/patch/365177/#comment_674314 -- Rodrigo Siqueira https://siqueira.tech signature.asc Description: PGP signature

[PATCH V4 1/3] drm/vkms: Decouple crc operations from composer

2020-05-11 Thread Rodrigo Siqueira
From: Rodrigo Siqueira In the vkms_composer.c, some of the functions related to CRC and compose have interdependence between each other. This patch reworks some functions inside vkms_composer to make crc and composer computation decoupled. This patch is preparation work for making vkms able to

[PATCH V4 2/3] drm/vkms: Compute CRC without change input data

2020-05-11 Thread Rodrigo Siqueira
From: Rodrigo Siqueira The compute_crc() function is responsible for calculating the framebuffer CRC value; due to the XRGB format, this function has to ignore the alpha channel during the CRC computation. Therefore, compute_crc() set zero to the alpha channel directly in the input framebuffer

[PATCH V4 3/3] drm/vkms: Add support for writeback

2020-05-11 Thread Rodrigo Siqueira
From: Rodrigo Siqueira This patch implements the necessary functions to add writeback support for vkms. This feature is useful for testing compositors if you don't have hardware with writeback support. Change in V3 (Daniel): - If writeback is enabled, compose everything into the writ

[PATCH V4 0/3] drm/vkms: Introduces writeback support

2020-05-11 Thread Rodrigo Siqueira
as can be seen at: IGT writeback tests: https://patchwork.freedesktop.org/series/68352/ Best Regards Rodrigo Siqueira (3): drm/vkms: Decouple crc operations from composer drm/vkms: Compute CRC without change input data drm/vkms: Add support for writeback drivers/gpu/drm/vkms/Makefile

Re: [PATCH] drm/vkms: enable cursor by default

2020-05-06 Thread Rodrigo Siqueira
Applied to drm-misc-next. On 03/24, Rodrigo Siqueira wrote: > Hi Melissa, > > First of all, thanks for your patch. > > I agree with you, it makes more sense to me if we enable cursors by > default. I don't remember why we decided to add it as a disabled by > default.

Re: [PATCH] amdgpu: fix gcc-4.8 build warnings

2020-04-28 Thread Rodrigo Siqueira
Thanks for your patch. Reviewed-by: Rodrigo Siqueira On 04/28, Arnd Bergmann wrote: > Older compilers warn about initializers with incorrect curly > braces: > > drivers/gpu/drm/drm_dp_mst_topology.c: In function > 'drm_dp_mst_dsc_aux_for_port': > drivers/gpu/drm/

[PATCH 1/2] drm/vkms: Add enable/disable functions per connector

2019-06-30 Thread Rodrigo Siqueira
Currently, virtual and writeback connectors have the code responsible for initialization and cleanup spread around different places in vkms. This patch creates an enable and disable function per connector which allows vkms to hotplug connectors easily. Signed-off-by: Rodrigo Siqueira

[PATCH 2/2] drm/vkms: Introduce configfs for enabling/disabling connectors

2019-06-30 Thread Rodrigo Siqueira
-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/Makefile| 3 +- drivers/gpu/drm/vkms/vkms_configfs.c | 229 +++ drivers/gpu/drm/vkms/vkms_drv.c | 6 + drivers/gpu/drm/vkms/vkms_drv.h | 12 ++ 4 files changed, 249 insertions(+), 1 deletion(-) create mode

[PATCH 0/2] drm/vkms: Introduce basic support for configfs

2019-06-30 Thread Rodrigo Siqueira
ector was loaded with the modules. However, the user may disable the writeback connector with: echo 0 > /mnt/vkms/connectors/Writeback/enable Rodrigo Siqueira (2): drm/vkms: Add enable/disable functions per connector drm/vkms: Introduce configfs for enabling/disabling connectors d

Re: [Intel-gfx] [PATCH V4] drm/drm_vblank: Change EINVAL by the correct errno

2019-06-26 Thread Rodrigo Siqueira
On Wed, Jun 26, 2019 at 4:53 AM Daniel Vetter wrote: > > On Wed, Jun 26, 2019 at 4:00 AM Rodrigo Siqueira > wrote: > > > > On 06/19, Daniel Vetter wrote: > > > On Wed, Jun 19, 2019 at 09:48:56AM +0200, Daniel Vetter wrote: > > > > On Tue, Jun 18, 2019 a

[RESEND PATCH V3] drm/drm_vblank: Change EINVAL by the correct errno

2019-06-13 Thread Rodrigo Siqueira
Vetter and Chris Wilson - Replace ENOTTY by EOPNOTSUPP - Return EINVAL if the parameters are wrong Signed-off-by: Rodrigo Siqueira --- Update: Now IGT has a way to validate if a driver has vblank support or not. See: https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/2d244aed69165753f

[PATCH] drm/vkms: Remove useless call to drm_connector_register()

2019-03-10 Thread Rodrigo Siqueira
eld is false. The connector register happens when drm_dev_register() is invoked. Therefore, this commit removes the drm_connector_register() from vkms_output_init(). Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_output.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/d

[PATCH] drm/bochs: Fix NULL dereference on atomic_disable helper

2019-03-10 Thread Rodrigo Siqueira
NULL pointer dereference. Fixes: 0f0eb98e33c6 ("drm/bochs: atomic: add atomic_flush+atomic_enable callbacks") Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/bochs/bochs_kms.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu

Re: [PATCH] drm/vkms: Solve bug on kms_crc_cursor tests

2019-03-10 Thread Rodrigo Siqueira
gt; > /* queue_work can fail to schedule crc_work; add crc for > > > > > > > * missing frames > > > > > > > diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c > > > > > > > b/drivers/gpu/drm/vkms/vkms_crtc.c > > > > > > > index 8a9aeb0a9ea8..9bf3268e2e92 100644 > > > > > > > --- a/drivers/gpu/drm/vkms/vkms_crtc.c > > > > > > > +++ b/drivers/gpu/drm/vkms/vkms_crtc.c > > > > > > > @@ -10,6 +10,8 @@ static enum hrtimer_restart > > > > > > > vkms_vblank_simulate(struct hrtimer *timer) > > > > > > > vblank_hrtimer); > > > > > > > struct drm_crtc *crtc = &output->crtc; > > > > > > > struct vkms_crtc_state *state = > > > > > > > to_vkms_crtc_state(crtc->state); > > > > > > > + unsigned int pipe = drm_crtc_index(crtc); > > > > > > > + struct drm_vblank_crtc *vblank = &crtc->dev->vblank[pipe]; > > > > > > > u64 ret_overrun; > > > > > > > bool ret; > > > > > > > > > > > > > > @@ -20,7 +22,7 @@ static enum hrtimer_restart > > > > > > > vkms_vblank_simulate(struct hrtimer *timer) > > > > > > > DRM_ERROR("vkms failure on handling vblank"); > > > > > > > > > > > > > > if (state && output->crc_enabled) { > > > > > > > - u64 frame = drm_crtc_accurate_vblank_count(crtc); > > > > > > > + u64 frame = vblank->count; > > > > > > > > > > > > > > /* update frame_start only if a queued > > > > > > > vkms_crc_work_handle() > > > > > > > * has read the data > > > > > > > -- > > > > > > > 2.17.1 > > > > > > > > > > > > > > > > > > > -- > > > > > > Daniel Vetter > > > > > > Software Engineer, Intel Corporation > > > > > > http://blog.ffwll.ch > > > > > > ___ > > > > > > dri-devel mailing list > > > > > > dri-de...@lists.freedesktop.org > > > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > > > > > > > -- > > > > > Ville Syrjälä > > > > > Intel > > > > > > -- > > > Ville Syrjälä > > > Intel > > -- > Ville Syrjälä > Intel -- Rodrigo Siqueira https://siqueira.tech Graduate Student Department of Computer Science University of São Paulo

Re: [PATCH] drm/vkms: fix use-after-free when drm_gem_handle_create() fails

2019-03-10 Thread Rodrigo Siqueira
On 03/05, Dmitry Vyukov wrote: > On Tue, Mar 5, 2019 at 12:23 AM Rodrigo Siqueira > wrote: > > > > On 02/28, Dmitry Vyukov wrote: > > > On Thu, Feb 28, 2019 at 12:12 AM Rodrigo Siqueira > > > wrote: > > > > > > > >

Re: [PATCH v2] drm/vgem: fix use-after-free when drm_gem_handle_create() fails

2019-03-04 Thread Rodrigo Siqueira
R_PTR(ret); > } > > static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device > *dev, > -- > 2.21.0.rc2.261.ga7da99ff1b-goog > > _______ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/

Re: [PATCH] drm/vkms: fix use-after-free when drm_gem_handle_create() fails

2019-03-04 Thread Rodrigo Siqueira
On 02/28, Dmitry Vyukov wrote: > On Thu, Feb 28, 2019 at 12:12 AM Rodrigo Siqueira > wrote: > > > > On 02/26, Eric Biggers wrote: > > > From: Eric Biggers > > > > > > If drm_gem_handle_create() fails in vkms_gem_create(), then the > > > vkms

Re: [PATCH] drm/vkms: fix use-after-free when drm_gem_handle_create() fails

2019-02-27 Thread Rodrigo Siqueira
elease() and kfree(). > > Fix it by skipping the second release and free. > > This bug was originally found in the vgem driver by syzkaller using > fault injection, but I noticed it's also present in the vkms driver. > > Fixes: 559e50fd34d1 ("drm/vkms: Add dumb

Re: [PATCH] drm/vkms: Solve bug on kms_crc_cursor tests

2019-02-25 Thread Rodrigo Siqueira
state && output->crc_enabled) { > - u64 frame = drm_crtc_accurate_vblank_count(crtc); > + u64 frame = vblank->count; > > /* update frame_start only if a queued vkms_crc_work_handle() >* has read the data > -- > 2.17.1 > -- Rodrigo Siqueira https://siqueira.tech Graduate Student Department of Computer Science University of São Paulo signature.asc Description: PGP signature

Re: [PATCH] drm/vkms: WARN when hrtimer_forward_now fails

2019-02-10 Thread Rodrigo Siqueira
enum hrtimer_restart vkms_vblank_simulate(struct > hrtimer *timer) > > ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer, > output->period_ns); > + WARN_ON(ret_overrun != 1); > + > spin_unlock(&output->lo

Re: [PATCH V2] drm/vkms: Fix license inconsistent

2019-02-10 Thread Rodrigo Siqueira
On 02/06, Daniel Vetter wrote: > On Wed, Feb 06, 2019 at 12:01:16PM -0200, Rodrigo Siqueira wrote: > > Fixes license inconsistent related to the VKMS driver and remove the > > redundant boilerplate comment. > > > > Fixes: 854502fa0a38 ("drm/vkms: Add basic CRTC i

[PATCH V2] drm/vkms: Fix license inconsistent

2019-02-06 Thread Rodrigo Siqueira
Fixes license inconsistent related to the VKMS driver and remove the redundant boilerplate comment. Fixes: 854502fa0a38 ("drm/vkms: Add basic CRTC initialization") Cc: sta...@vger.kernel.org Signed-off-by: Rodrigo Siqueira --- Changes in V2: - Add "Cc: sta...@vger.kernel.org

Re: [PATCH 1/2] drm/vkms: Bugfix extra vblank frame

2019-02-03 Thread Rodrigo Siqueira
1..23146ff2a25b 100644 > --- a/drivers/gpu/drm/vkms/vkms_crtc.c > +++ b/drivers/gpu/drm/vkms/vkms_crtc.c > @@ -87,6 +87,9 @@ bool vkms_get_vblank_timestamp(struct drm_device *dev, > unsigned int pipe, > > *vblank_time = output->vblank_hrtimer.node.expires; > > +

Re: [PATCH 2/2] drm: vkms: Bugfix racing hrtimer vblank handle

2019-02-03 Thread Rodrigo Siqueira
vblank_hrtimer); > - int ret_overrun; > - > - _vblank_handle(output); > - > ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer, > output->period_ns); > + spin_unlock(&output->lock); > > return HRTIMER_RESTART; > } > -- > 2.17.1 > Reviewed-by: Rodrigo Siqueira -- Rodrigo Siqueira https://siqueira.tech Graduate Student Department of Computer Science University of São Paulo signature.asc Description: PGP signature

Re: [PATCH 0/2] drm/vkms: Bugfix for igt-tests

2019-02-03 Thread Rodrigo Siqueira
anks for the patchset :) The patchset worked like a charm; it fixes many of the tests in the kms_flip. \o/ I'll apply it. Thanks! Reviewed-by: Rodrigo Siqueira -- Rodrigo Siqueira https://siqueira.tech Graduate Student Department of Computer Science University of São Paulo signature.asc Description: PGP signature

[PATCH] drm/vkms: Fix license inconsistent

2019-01-21 Thread Rodrigo Siqueira
Fixes license inconsistent related to the VKMS driver and remove the redundant boilerplate comment. Fixes: 854502fa0a38 ("drm/vkms: Add basic CRTC initialization") Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_crc.c| 3 ++- drivers/gpu/drm/vkms/vkms_cr

Re: [PATCH v2] drm/drm_vblank: Change EINVAL by the correct errno

2019-01-14 Thread Rodrigo Siqueira
On 01/14, Maarten Lankhorst wrote: > Op 13-01-2019 om 21:23 schreef Rodrigo Siqueira: > > Hi, > > > > I resend this patch for CI via “intel-...@lists.freedesktop.org” as > > Daniel suggested, and I got a feedback that reported an issue as can be >

[RESEND] MAINTAINERS: Add entry for VKMS

2019-01-13 Thread Rodrigo Siqueira
Add maintainers and reviewers for VKMS driver Signed-off-by: Rodrigo Siqueira --- Changes in v2: - Insert the section in alphabetical order Resend: - Update patch due to changes in MAINTAINER file MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b

Re: [PATCH v2] drm/drm_vblank: Change EINVAL by the correct errno

2019-01-13 Thread Rodrigo Siqueira
h is correct, and the problem pointed out by CI is not related to this change. Make sense? Best Regards On 10/17, Daniel Vetter wrote: > On Wed, Oct 17, 2018 at 2:43 PM Rodrigo Siqueira > wrote: > > > > Hi, > > > > First of all, thanks to all for the reviewers and feedback

Re: [PATCH] staging: iio: ad5933: finalized device-tree support

2018-11-23 Thread Rodrigo Siqueira
om. > To view this discussion on the web visit > https://groups.google.com/d/msgid/kernel-usp/20181123235159.hh43xnvvwsil4on2%40smtp.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- Rodrigo Siqueira https://siqueira.tech https://twitter.com/siqueirajordao Graduate Student Department of Computer Science University of São Paulo signature.asc Description: PGP signature

Re: [PATCH] gpu/drm/vkms: Use new return type vm_fault_t

2018-07-25 Thread Rodrigo Siqueira
Hi, Thanks for the patch, I reviewed and tested it; everything is fine. I only suggest removing the "gpu" part from the patch title (i.e., "drm/vkms: Use new return type vm_fault_t"). On 07/23, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. > > Signed-off-by: Soupti

Re: [PATCH 0/3] stagging:iio:meter: Add essential IIO API structures for ADE7854

2018-04-23 Thread Rodrigo Siqueira
Hi Jonathan, Thanks for all the feedbacks and sorry for some basic mistakes, I will work on the second version based on all your comments. Best Regards Rodrigo Siqueira On 04/21, Jonathan Cameron wrote: > On Sat, 21 Apr 2018 08:54:45 -0300 > Rodrigo Siqueira wrote: > > > This p

[PATCH 3/3] stagging:iio:meter: Add ade7854_write_raw function

2018-04-21 Thread Rodrigo Siqueira
: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854.c | 60 - 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/drivers/staging/iio/meter/ade7854.c b/drivers/staging/iio/meter/ade7854.c index 242ecde75900..df19c8b4b5d7 100644 --- a/drivers/staging/iio

[PATCH 2/3] stagging:iio:meter: Add ade7854_read_raw function

2018-04-21 Thread Rodrigo Siqueira
disables the old approach for reading data. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854.c | 41 - 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/drivers/staging/iio/meter/ade7854.c b/drivers/staging/iio/meter/ade7854.c index

[PATCH 1/3] stagging:iio:meter: Add iio_chan_spec

2018-04-21 Thread Rodrigo Siqueira
This patch adds iio_chan_spec struct. Additionally, the channel adds the support for handling AIGAIN, BIGAIN, CIGAIN, NIGAIN, AVGAIN, BVGAIN, and CVGAIN. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854.c | 42 + 1 file changed, 42 insertions

[PATCH 0/3] stagging:iio:meter: Add essential IIO API structures for ADE7854

2018-04-21 Thread Rodrigo Siqueira
the write_raw function and remove the attributes used for handling the seven registers. This patchset has the contribution of John Syne, which was responsible for mapping the correct ABI name per element in the ADE7854; additionally, John provided codes that helped to shape these patches. Rodrigo

[PATCH v3 8/8] staging:iio:ade7854: Remove read_reg_* duplications

2018-03-23 Thread Rodrigo Siqueira
areas that calling the old interface by the new one. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Update commit message drivers/staging/iio/meter/ade7854-i2c.c | 33 +-- drivers/staging/iio/meter/ade7854-spi.c | 35 ++--- drivers

[PATCH v3 7/8] staging:iio:ade7854: Rework SPI read function

2018-03-23 Thread Rodrigo Siqueira
Rework read SPI function to reduce the code duplication and centralizes all the task in a single function. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Remove the use of defines that not improve the readability - Replace variable name "bytes" for "bits" - U

[PATCH v3 6/8] staging:iio:ade7854: Rework I2C read function

2018-03-23 Thread Rodrigo Siqueira
the things simple and working this patch maintain legacy interface. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Remove the use of defines that not improve the readability - Replace variable name "bytes" for "bits" - Update commit message drivers/staging/iio/meter

[PATCH v3 5/8] staging:iio:ade7854: Remove write_reg_* duplications

2018-03-23 Thread Rodrigo Siqueira
This patch removes code duplications related to the write_reg_* functions and centralizes them in a single function. Also, it eliminates the legacy functions and replaces them by a unique signature that is used by SPI and I2C. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Update commit

[PATCH v3 4/8] staging:iio:ade7854: Rework SPI write function

2018-03-23 Thread Rodrigo Siqueira
The write operation using SPI has a many code duplications (similar to I2C) and four different interfaces per data size. This patch introduces a single function that centralizes the main task related to SPI. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Remove the use of defines that not

[PATCH v3 3/8] staging:iio:ade7854: Rework I2C write function

2018-03-23 Thread Rodrigo Siqueira
, this patch does not remove any code signature for keeping the meter module work and make easier to review this patch. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Remove the use of defines that not improve the readability - Replace variable name "bytes" for "bits"

[PATCH v3 0/8] Cleanup on I2C/SPI code

2018-03-23 Thread Rodrigo Siqueira
larifications related to authorship. - Adds 'fixes' tag on the first two patches message. - Removes unnecessary defines. - Updates commit messages to better describe changes. John Syne (2): staging:iio:ade7854: Fix error handling on read/write staging:iio:ade7854: Fix the wrong number o

Re: [PATCH v2 1/8] staging:iio:ade7854: Fix error handling on read/write

2018-03-19 Thread Rodrigo Siqueira
On 03/18, Jonathan Cameron wrote: > On Fri, 16 Mar 2018 19:48:33 -0300 > Rodrigo Siqueira wrote: > > > The original code does not correctly handle the error related to I2C > > read and write. This patch fixes the error handling related to all > > read/write function

Re: [PATCH v2 1/3] staging:iio:ad2s1210: Add channel for fclkin and fexcit

2018-03-19 Thread Rodrigo Siqueira
Hi, On 03/17, Jonathan Cameron wrote: > On Tue, 13 Mar 2018 13:05:28 -0300 > Rodrigo Siqueira wrote: > > > The ad2s1210 does not contain any channel for the fclkin and fexcit. As > > a result, it uses IIO_DEVICE_ATTR to expose this information. This patch > > adds

[PATCH v2 6/8] staging:iio:ade7854: Rework I2C read function

2018-03-16 Thread Rodrigo Siqueira
32 bits as pointed by John Syne patches. It is possible to remove all the old interface to use the new one, however, for keeping the things simple and working this patch maintain legacy interface. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854

[PATCH v2 8/8] staging:iio:ade7854: Remove read_reg_* duplications

2018-03-16 Thread Rodrigo Siqueira
areas that calling the old interface by the new one. During the update for use a single function, some errors handlings were updated based on the John Syne patches. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854-i2c.c | 37

[PATCH v2 7/8] staging:iio:ade7854: Rework SPI read function

2018-03-16 Thread Rodrigo Siqueira
Rework read SPI function to reduce the code duplication and centralizes all the task in a single function. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854-spi.c | 140 +--- 1 file changed, 37 insertions(+), 103 deletions(-) diff --git a/drivers

[PATCH v2 4/8] staging:iio:ade7854: Rework SPI write function

2018-03-16 Thread Rodrigo Siqueira
The write operation using SPI has a many code duplications (similar to I2C) and four different interfaces per data size. This patch introduces a single function that centralizes the main task related to SPI. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854-spi.c | 108

[PATCH v2 5/8] staging:iio:ade7854: Replace many functions for one function

2018-03-16 Thread Rodrigo Siqueira
This patch removes code duplications related to the write_reg_* functions and centralizes them in a single function. Also, it eliminates the legacy functions and replaces them by a unique signature that is used by SPI and I2C. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter

[PATCH v2 2/8] staging:iio:ade7854: Fix the wrong number of bits to read

2018-03-16 Thread Rodrigo Siqueira
The function ade7854_i2c_read_reg_32() have to invoke the i2c_master_recv() for read 32 bits values, however, the counter is set to 3 which means 24 bits. This patch fixes the wrong size of 24 bits, to 32 bits. Finally, this patch is based on John Syne patches. Signed-off-by: Rodrigo Siqueira

[PATCH v2 3/8] staging:iio:ade7854: Rework I2C write function

2018-03-16 Thread Rodrigo Siqueira
, this patch does not remove any code signature for keeping the meter module work and make easier to review this patch. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854-i2c.c | 96 - drivers/staging/iio/meter/ade7854.h | 7 +++ 2 files

[PATCH v2 0/8] staging:iio:ade7854: Cleanup on I2C/SPI code

2018-03-16 Thread Rodrigo Siqueira
s two commits at the beginning of the patchset. First, fixes bugs related to wrong verification in read/write I2C operations. Second, adjust the incorrect amount of data read. - Removes unnecessary code in read/write functions for SPI and I2C during the rework. Rodrig

[PATCH v2 1/8] staging:iio:ade7854: Fix error handling on read/write

2018-03-16 Thread Rodrigo Siqueira
The original code does not correctly handle the error related to I2C read and write. This patch fixes the error handling related to all read/write functions for I2C. This patch is an adaptation of the John Syne patches. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers

Re: [PATCH 7/7] staging:iio:ade7854: Add proper error handling condition

2018-03-16 Thread Rodrigo Siqueira
On 03/16, Dan Carpenter wrote: > Generally, it's better to fix the bug in the existing code, and then > do the cleanup later. That way the fixes can be backported to stable > kernels more easily. Hummm... the backport argue make a lot of sense for me. I will generate a v2 with the bug fixes in th

Re: [PATCH 7/7] staging:iio:ade7854: Add proper error handling condition

2018-03-16 Thread Rodrigo Siqueira
On 03/16, Dan Carpenter wrote: > You're right that there is a bug but this is not the right fix. > > The ade7854_i2c_write_reg_32() function returns 6 on success which makes > no sense. It should be zero or negative error codes. All the write_reg > functions in drivers/staging/iio/meter/ade7854-

Re: [PATCH 7/7] staging:iio:ade7854: Add proper error handling condition

2018-03-15 Thread Rodrigo Siqueira
On 03/15, Dan Carpenter wrote: > On Wed, Mar 14, 2018 at 03:12:18PM -0300, Rodrigo Siqueira wrote: > > There is some improper error handling for IRQ and device register. This > > patch adds a proper verification. The IRQ correction was extracted from > > John Syne patches. &

Re: [PATCH 1/7] staging:iio:ade7854: Rework I2C write function

2018-03-15 Thread Rodrigo Siqueira
Hi, I will fixes all of these things here and in the other patches and send a v2. Thanks for the review. On 03/15, Dan Carpenter wrote: > On Wed, Mar 14, 2018 at 03:10:18PM -0300, Rodrigo Siqueira wrote: > > The write operation using I2C has many code duplications and four >

[PATCH 5/7] staging:iio:ade7854: Rework SPI read function

2018-03-14 Thread Rodrigo Siqueira
Rework read SPI function to reduce the code duplication and centralizes all the task in a single function. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854-spi.c | 132 ++-- 1 file changed, 41 insertions(+), 91 deletions(-) diff --git a/drivers

[PATCH 7/7] staging:iio:ade7854: Add proper error handling condition

2018-03-14 Thread Rodrigo Siqueira
There is some improper error handling for IRQ and device register. This patch adds a proper verification. The IRQ correction was extracted from John Syne patches. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854.c | 4 ++-- 1 file changed, 2

[PATCH 6/7] staging:iio:ade7854: Remove read_reg_* duplications

2018-03-14 Thread Rodrigo Siqueira
areas that calling the old interface by the new one. During the update for use a single function, some errors handlings were updated based on the John Syne patches. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854-i2c.c | 53

[PATCH 3/7] staging:iio:ade7854: Replace many functions for one function

2018-03-14 Thread Rodrigo Siqueira
This patch removes code duplications related to the write_reg_* functions and centralizes them in a single function. Also, it eliminates the legacy functions and replaces them by a unique signature that is used by SPI and I2C. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter

[PATCH 4/7] staging:iio:ade7854: Rework I2C read function

2018-03-14 Thread Rodrigo Siqueira
32 bits as pointed by John Syne patches. It is possible to remove all the old interface to use the new one, however, for keeping the things simple and working this patch maintain legacy interface. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854

[PATCH 2/7] staging:iio:ade7854: Rework SPI write function

2018-03-14 Thread Rodrigo Siqueira
The write operation using SPI has a many code duplications (similar to I2C) and four different interfaces per data size. This patch introduces a single function that centralizes the main task related to SPI. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854-spi.c | 100

[PATCH 1/7] staging:iio:ade7854: Rework I2C write function

2018-03-14 Thread Rodrigo Siqueira
, this patch does not remove any code signature for keeping the meter module work and make easier to review this patch. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854-i2c.c | 89 +++-- drivers/staging/iio/meter/ade7854.h | 7 +++ 2 files

[PATCH 0/7] staging:iio:ade7854: Cleanup on I2C/SPI code

2018-03-14 Thread Rodrigo Siqueira
g and interest to help to update the code [1]. As a result, this patchset represents the first work effort to update the meter module in the staging. 1 - https://marc.info/?l=linux-iio&m=152046885922153&w=2 Rodrigo Siqueira (7): staging:iio:ade7854: Rework I2C write function stagin

[PATCH v2 3/3] staging:iio:ad2s1210: Add write_raw to handle frequency

2018-03-13 Thread Rodrigo Siqueira
The write interface of AD2S1210 utilizes IIO_DEVICE_ATTR, which violate the official IIO ABI. This patch, add the write_raw function responsible for handling the fclkin and fexcit channel; also it removes the use of IIO_DEVICE_ATTR for fclkin and fexcit. Signed-off-by: Rodrigo Siqueira

[PATCH v2 2/3] staging:iio:ad2s1210: Add frequency handler in read_raw

2018-03-13 Thread Rodrigo Siqueira
Read data from fclkin and fexcit does not utilize the ad2s1210_read_raw function. This patch, append the required handler in the ad2s1210_read_raw to return the correct value. Also, this patch removes the legacy code related to the read function Signed-off-by: Rodrigo Siqueira --- drivers

[PATCH v2 1/3] staging:iio:ad2s1210: Add channel for fclkin and fexcit

2018-03-13 Thread Rodrigo Siqueira
The ad2s1210 does not contain any channel for the fclkin and fexcit. As a result, it uses IIO_DEVICE_ATTR to expose this information. This patch adds one channel for fclkin and another for fexcit. It also adds an enum to easily address the correct channel. Signed-off-by: Rodrigo Siqueira

  1   2   >