Re: [PATCH v3 5/5] drm: don't block fb changes for async plane updates

2019-06-03 Thread Helen Koike
On 5/7/19 5:18 PM, Sean Paul wrote: > On Wed, Mar 13, 2019 at 09:20:26PM -0300, Helen Koike wrote: >> In the case of a normal sync update, the preparation of framebuffers (be >> it calling drm_atomic_helper_prepare_planes() or doing setups with >> drm_framebuffer_get())

Re: [PATCH v3 3/5] drm/msm: fix fb references in async update

2019-05-31 Thread Helen Koike
Hello, On 3/13/19 9:20 PM, Helen Koike wrote: > Async update callbacks are expected to set the old_fb in the new_state > so prepare/cleanup framebuffers are balanced. > > Cc: # v4.14+ > Fixes: 224a4c970987 ("drm/msm: update cursors asynchronously through atomic") > S

Re: [PATCH v3 2/4] drm/atomic: rename async_{update,check} to amend_{update,check}

2019-04-12 Thread Helen Koike
Hi Boris, On 4/12/19 10:49 AM, Boris Brezillon wrote: > Hi Helen, > > On Fri, 12 Apr 2019 09:58:25 -0300 > Helen Koike wrote: > >> Asynchronous update is the ability change the hw state at any time, not >> only during vblank. >> >> Amend mode is th

Re: [PATCH RFC v3 4/4] drm/atomic: hook atomic_async_{check,update} with PAGE_FLIP_ASYNC flag

2019-04-12 Thread Helen Koike
On 4/12/19 9:58 AM, Helen Koike wrote: > Add atomic_async_{check,update} hooks in drm_plane_helper_funcs. > These hooks are called when userspace requests asyncronous page flip in > the atomic api through the flag DRM_MODE_PAGE_FLIP_ASYNC. > > Update those hooks in the drivers

[PATCH v3 1/4] drm/uapi: add documentation for atomic flags

2019-04-12 Thread Helen Koike
add a brief description of the flags used in an atomic commit Signed-off-by: Helen Koike --- Changes in v3: None Changes in v2: None Changes in v1: None include/uapi/drm/drm_mode.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/uapi/drm

[PATCH v3 0/4] async vs amend - UAPI

2019-04-12 Thread Helen Koike
ny pending commit to amend Changes in v1: - https://patchwork.freedesktop.org/patch/243088/ - Only enable it if userspace requests it. - Only allow async update for cursor type planes. - Rename ASYNC_UPDATE for ATOMIC_AMEND. Helen Koike (4): drm/uapi: add documentation for atomic flags drm/a

[PATCH RFC v3 3/4] drm/atomic: add ATOMIC_AMEND flag to the Atomic IOCTL.

2019-04-12 Thread Helen Koike
stavo Padovan Signed-off-by: Enric Balletbo i Serra [updated for upstream] Signed-off-by: Helen Koike --- Hi, This is the third attempt to introduce the new ATOMIC_AMEND flag for atomic operations, see the commit message for a more detailed description. I am sending this patch in the series as an RFC

[PATCH RFC v3 4/4] drm/atomic: hook atomic_async_{check, update} with PAGE_FLIP_ASYNC flag

2019-04-12 Thread Helen Koike
flag in the normal path, and rockchip who doesn't support async page flip. Signed-off-by: Helen Koike --- Hi, This patch is an attempt to expose the implementation that already exist for true async page flips updates through atomic api when the DRM_MODE_PAGE_FLIP_ASYNC is used. In this commi

[PATCH v3 2/4] drm/atomic: rename async_{update, check} to amend_{update, check}

2019-04-12 Thread Helen Koike
. &drm_plane_helper_funcs.atomic_async_{update,check}() was being used by drivers to implement amend and not async. So rename them to amend. Also improve docs explaining the difference. If asynchronous is required, normal page flip can be performed using DRM_MODE_PAGE_FLIP_ASYNC flag. Signed-off-by: Helen K

Re: [PATCH v3 3/5] drm/msm: fix fb references in async update

2019-04-03 Thread Helen Koike
Hi Rob, On 3/27/19 11:52 AM, Rob Clark wrote: > On Wed, Mar 13, 2019 at 8:21 PM Helen Koike wrote: >> >> Async update callbacks are expected to set the old_fb in the new_state >> so prepare/cleanup framebuffers are balanced. >> >> Cc: # v4.14+ >> Fixes:

Re: [PATCH v2 1/5] drm/rockchip: fix fb references in async update

2019-03-15 Thread Helen Koike
On 3/15/19 8:29 AM, Michel Dänzer wrote: > On 2019-03-15 11:25 a.m., Boris Brezillon wrote: >> On Fri, 15 Mar 2019 11:11:36 +0100 >> Michel Dänzer wrote: >> >>> On 2019-03-14 6:51 p.m., Helen Koike wrote: >>>> On 3/14/19 6:15 AM, Michel Dänzer wrote:

Re: [PATCH v2 1/5] drm/rockchip: fix fb references in async update

2019-03-14 Thread Helen Koike
On 3/14/19 6:15 AM, Michel Dänzer wrote: > On 2019-03-13 7:08 p.m., Helen Koike wrote: >> On 3/13/19 6:58 AM, Michel Dänzer wrote: >>> On 2019-03-13 4:42 a.m., Tomasz Figa wrote: >>>> On Wed, Mar 13, 2019 at 12:52 AM Boris Brezillon >>>> wrote

[PATCH v3 5/5] drm: don't block fb changes for async plane updates

2019-03-13 Thread Helen Koike
ldfb = fb1, newfb = fb2, prepare fb2, cleanup fb1 - Non-async commit, oldfb = fb2, newfb = fb1, prepare fb1, cleanup fb2 Where calls to prepare/cleanup are balanced. Cc: # v4.14+ Fixes: 25dc194b34dd ("drm: Block fb changes for async plane updates") Suggested-by: Boris Brezillon Signed

[PATCH v3 3/5] drm/msm: fix fb references in async update

2019-03-13 Thread Helen Koike
Async update callbacks are expected to set the old_fb in the new_state so prepare/cleanup framebuffers are balanced. Cc: # v4.14+ Fixes: 224a4c970987 ("drm/msm: update cursors asynchronously through atomic") Suggested-by: Boris Brezillon Signed-off-by: Helen Koike --- Hello, As me

[PATCH v3 2/5] drm/amd: fix fb references in async update

2019-03-13 Thread Helen Koike
lling drm_atomic_helper_update_plane(). Suggested-by: Boris Brezillon Signed-off-by: Helen Koike Reviewed-by: Nicholas Kazlauskas --- Changes in v3: None Changes in v2: - added reviewed-by tag drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 dele

[PATCH v3 4/5] drm/vc4: fix fb references in async update

2019-03-13 Thread Helen Koike
lling drm_atomic_helper_update_plane(). Cc: # v4.19+ Fixes: 539c320bfa97 ("drm/vc4: update cursors asynchronously through atomic") Suggested-by: Boris Brezillon Signed-off-by: Helen Koike Reviewed-by: Boris Brezillon --- Hello, I tested on a Raspberry Pi model B rev2 with igt plane_cu

[PATCH v3 1/5] drm/rockchip: fix fb references in async update

2019-03-13 Thread Helen Koike
t has no effect and trows a WARN_ON(). Calling drm_atomic_set_fb_for_plane() (which get a referent of the new fb and pus the old fb) is not required, as it is taken care by drm_mode_cursor_universal() when calling drm_atomic_helper_update_plane(). Signed-off-by: Helen Koike --- Hello, I tested o

[PATCH v3 0/5] drm: Fix fb changes for async updates

2019-03-13 Thread Helen Koike
Changes in v2: - added reviewed-by tag - update CC stable and Fixes tag - Added reviewed-by tag - updated CC stable and Fixes tag - Change the order of the patch in the series, add this as the last one. - Add documentation - s/ballanced/balanced Helen Koike (5): drm/rockchip: fix fb references in

Re: [PATCH v2 1/5] drm/rockchip: fix fb references in async update

2019-03-13 Thread Helen Koike
On 3/13/19 6:58 AM, Michel Dänzer wrote: > On 2019-03-13 4:42 a.m., Tomasz Figa wrote: >> On Wed, Mar 13, 2019 at 12:52 AM Boris Brezillon >> wrote: >>> >>> On Tue, 12 Mar 2019 12:34:45 -0300 >>> Helen Koike wrote: >>> >>>> On 3/

Re: [PATCH v2 1/5] drm/rockchip: fix fb references in async update

2019-03-12 Thread Helen Koike
On 3/12/19 3:34 AM, Boris Brezillon wrote: > On Mon, 11 Mar 2019 23:21:59 -0300 > Helen Koike wrote: > >> In the case of async update, modifications are done in place, i.e. in the >> current plane state, so the new_state is prepared and the new_state is >> cleanup u

[PATCH v2 5/5] drm: don't block fb changes for async plane updates

2019-03-11 Thread Helen Koike
ldfb = fb1, newfb = fb2, prepare fb2, cleanup fb1 - Non-async commit, oldfb = fb2, newfb = fb1, prepare fb1, cleanup fb2 Where calls to prepare/cleanup are balanced. Cc: # v4.14+ Fixes: 25dc194b34dd ("drm: Block fb changes for async plane updates") Suggested-by: Boris Brezillon Signed

[PATCH v2 4/5] drm/vc4: fix fb references in async update

2019-03-11 Thread Helen Koike
lling drm_atomic_helper_update_plane(). Cc: # v4.19+ Fixes: 539c320bfa97 ("drm/vc4: update cursors asynchronously through atomic") Suggested-by: Boris Brezillon Signed-off-by: Helen Koike Reviewed-by: Boris Brezillon --- Hello, I tested on a Raspberry Pi model B rev2 with igt plane_cu

[PATCH v2 3/5] drm/msm: fix fb references in async update

2019-03-11 Thread Helen Koike
Async update callbacks are expected to set the old_fb in the new_state so prepare/cleanup framebuffers are balanced. Cc: # v4.14+ Fixes: 224a4c970987 ("drm/msm: update cursors asynchronously through atomic") Suggested-by: Boris Brezillon Signed-off-by: Helen Koike --- Hello, As me

[PATCH v2 1/5] drm/rockchip: fix fb references in async update

2019-03-11 Thread Helen Koike
t has no effect and trows a WARN_ON(). Calling drm_atomic_set_fb_for_plane() (which get a referent of the new fb and pus the old fb) is not required, as it is taken care by drm_mode_cursor_universal() when calling drm_atomic_helper_update_plane(). Signed-off-by: Helen Koike --- Hello, I tested o

[PATCH v2 2/5] drm/amd: fix fb references in async update

2019-03-11 Thread Helen Koike
lling drm_atomic_helper_update_plane(). Suggested-by: Boris Brezillon Signed-off-by: Helen Koike Reviewed-by: Nicholas Kazlauskas --- Changes in v2: - added reviewed-by tag drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dr

[PATCH v2 0/5] drm: Fix fb changes for async updates

2019-03-11 Thread Helen Koike
- update CC stable and Fixes tag - Added reviewed-by tag - updated CC stable and Fixes tag - Change the order of the patch in the series, add this as the last one. - Add documentation - s/ballanced/balanced Helen Koike (5): drm/rockchip: fix fb references in async update drm/amd: fix fb refer

Re: [PATCH 5/5] drm/vc4: fix fb references in async update

2019-03-11 Thread Helen Koike
On 3/11/19 6:56 AM, Boris Brezillon wrote: > +Eric (the VC4 driver maintainer) > > Hello Helen, > > On Mon, 4 Mar 2019 11:49:09 -0300 > Helen Koike wrote: > >> Async update callbacks are expected to set the old_fb in the new_state >> so prepare/

Re: [PATCH v8 1/2] drm/i915: Introduce async plane update to i915

2019-03-08 Thread Helen Koike
lock fb changes for async plane updates" Regards, Helen > > BR, > Jani. > > > On Thu, 07 Mar 2019, Helen Koike wrote: >> From: Gustavo Padovan >> >> Add implementation for async plane update callbacks >> >> Signed-off-by: Gustavo Padovan

[PATCH v8 2/2] drm/i915: update cursors asynchronously through atomic

2019-03-07 Thread Helen Koike
From: Gustavo Padovan Replace the legacy cursor implementation by the async callbacks Signed-off-by: Gustavo Padovan Signed-off-by: Enric Balletbo i Serra Signed-off-by: Helen Koike --- Changes in v8: - v7: https://lkml.org/lkml/2018/6/8/168 - v7 was splited in two, one that adds the

[PATCH v8 1/2] drm/i915: Introduce async plane update to i915

2019-03-07 Thread Helen Koike
From: Gustavo Padovan Add implementation for async plane update callbacks Signed-off-by: Gustavo Padovan Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tina Zhang Signed-off-by: Helen Koike --- Hi, This patch just adds the callbacks for atomic async update, the next in the series

Re: [PATCH 0/5] drm: Fix fb changes for async updates

2019-03-05 Thread Helen Koike
On 3/4/19 11:49 AM, Helen Koike wrote: > Hello, > > This series is a first attempt to fix the slow down in performance introduced > by > "[PATCH v2] drm: Block fb changes for async plane updates" where async update > falls back to a sync update, causing igt failures

Re: [PATCH 5/5] drm/vc4: fix fb references in async update

2019-03-05 Thread Helen Koike
On 3/4/19 11:49 AM, Helen Koike wrote: > Async update callbacks are expected to set the old_fb in the new_state > so prepare/cleanup framebuffers are balanced. > > Calling drm_atomic_set_fb_for_plane() (which gets a reference of the new > fb and put the old fb) is not required

[PATCH 5/5] drm/vc4: fix fb references in async update

2019-03-04 Thread Helen Koike
rezillon Signed-off-by: Helen Koike --- Hello, As mentioned in the cover letter, I tested on the rockchip and on i915 using igt plane_cursor_legacy and kms_cursor_legacy and I didn't see any regressions. But I couldn't test on VC4. I have a Raspberry pi model B rev2, when FB_SIMPLE

[PATCH 4/5] drm/msm: fix fb references in async update

2019-03-04 Thread Helen Koike
b34dd ("drm: Block fb changes for async plane updates") Suggested-by: Boris Brezillon Signed-off-by: Helen Koike --- Hello, As mentioned in the cover letter, I tested on the rockchip and on i915 using igt plane_cursor_legacy and kms_cursor_legacy and I didn't see any regressions. Bu

[PATCH 3/5] drm/amd: fix fb references in async update

2019-03-04 Thread Helen Koike
lling drm_atomic_helper_update_plane(). Suggested-by: Boris Brezillon Signed-off-by: Helen Koike --- Hello, As mentioned in the cover letter, I tested on the rockchip and on i915 using igt plane_cursor_legacy and kms_cursor_legacy and I didn't see any regressions. But I couldn't test o

[PATCH 1/5] drm: don't block fb changes for async plane updates

2019-03-04 Thread Helen Koike
for async plane updates") Suggested-by: Boris Brezillon Signed-off-by: Helen Koike --- Hello, As mentioned in the cover letter, I tested on the rockchip and on i915 (with a patch I am still working on for replacing cursors by async update), with igt plane_cursor_legacy and kms_cursor_legacy

[PATCH 0/5] drm: Fix fb changes for async updates

2019-03-04 Thread Helen Koike
e. I also separated the patches per platform to be easier to get the tested-by tags, please let me know if it should be a single patch. Also, I added CC stable (as the "drm: Block fb changes for async plane updates" was also CCed to stable). I am not used to CC stable, please let me know if any

[PATCH 2/5] drm/rockchip: fix fb references in async update

2019-03-04 Thread Helen Koike
t has no effect and trows a WARN_ON(). Calling drm_atomic_set_fb_for_plane() (which get a referent of the new fb and pus the old fb) is not required, as it is taken care by drm_mode_cursor_universal() when calling drm_atomic_helper_update_plane(). Signed-off-by: Helen Koike --- Hello, I tested o

Cursors uAPI vs async update - questions

2019-02-18 Thread Helen Koike
Hello, After some discussions I had with some people I would like to discuss some design choices regarding uAPI to expose async updates. The plan is to allow userspace to update the cursor plane through the atomic API instead of the legacy cursor API. The steps I was following were: 1) Make

Re: question about replacing legacy_cursor_flag by async_update

2019-02-16 Thread Helen Koike via dri-devel
On 2/15/19 2:45 PM, Daniel Vetter wrote: > On Fri, Feb 15, 2019 at 10:25:03AM -0200, Helen Koike wrote: >> Hello, >> >> The legacy_cursor_update flag in the drm_atomic_state struct was being >> used to track if the update was asyncronous or not for the cursor plane. &g

question about replacing legacy_cursor_flag by async_update

2019-02-15 Thread Helen Koike via dri-devel
Hello, The legacy_cursor_update flag in the drm_atomic_state struct was being used to track if the update was asyncronous or not for the cursor plane. Which is really similar to what the async_update flag do, so I was trying to get rid of the legacy_cursor_update flag (just for cleanup). So I did

Re: [PATCH v2] drm: Block fb changes for async plane updates

2019-02-14 Thread Helen Koike via dri-devel
On 2/14/19 6:21 AM, Daniel Vetter wrote: > On Wed, Feb 13, 2019 at 09:32:43PM -0200, Helen Koike wrote: >> >> >> On 2/13/19 7:21 PM, Helen Koike wrote: >>> >>> >>> On 2/13/19 5:18 PM, Nicholas Kazlauskas wrote: >>>> The prep

Re: [PATCH v2] drm: Block fb changes for async plane updates

2019-02-13 Thread Helen Koike via dri-devel
On 2/13/19 7:21 PM, Helen Koike wrote: > > > On 2/13/19 5:18 PM, Nicholas Kazlauskas wrote: >> The prepare_fb call always happens on new_plane_state. >> >> The drm_atomic_helper_cleanup_planes checks to see if >> plane state pointer has changed when deciding to

Re: [PATCH v2] drm: Block fb changes for async plane updates

2019-02-13 Thread Helen Koike via dri-devel
On 2/13/19 5:18 PM, Nicholas Kazlauskas wrote: > The prepare_fb call always happens on new_plane_state. > > The drm_atomic_helper_cleanup_planes checks to see if > plane state pointer has changed when deciding to call cleanup_fb on > either the new_plane_state or the old_plane_state. > > For a

Re: [PATCH v2] drm/atomic: add ATOMIC_AMEND flag to the Atomic IOCTL.

2018-12-16 Thread Helen Koike
Hello, On 12/13/18 7:01 AM, Daniel Vetter wrote: > On Thu, Dec 13, 2018 at 04:43:57PM +0900, Tomasz Figa wrote: >> Hi Helen, >> >> On Sat, Nov 24, 2018 at 6:54 AM Helen Koike >> wrote: >>> >>> This flag tells core to jump ahead the queued update if

Re: [PATCH] drm: add capability DRM_CAP_ASYNC_UPDATE

2018-12-16 Thread Helen Koike
Hi Tomasz, On 12/13/18 2:02 AM, Tomasz Figa wrote: > On Thu, Dec 6, 2018 at 1:12 AM Helen Koike wrote: >> >> Hi Ville >> >> On 11/27/18 11:34 AM, Ville Syrjälä wrote: >>> On Fri, Nov 23, 2018 at 07:53:26PM -0200, Helen Koike wrote: >>>> Allow us

[PATCH v4] drm/rockchip: update cursors asynchronously through atomic.

2018-12-06 Thread Helen Koike
From: Enric Balletbo i Serra Add support to async updates of cursors by using the new atomic interface for that. Signed-off-by: Enric Balletbo i Serra [updated for upstream] Signed-off-by: Helen Koike --- Hello, This is the forth version of the async-plane update suport to the Rockchip

Re: [PATCH] drm: add capability DRM_CAP_ASYNC_UPDATE

2018-12-06 Thread Helen Koike
Hi Ville On 11/27/18 11:34 AM, Ville Syrjälä wrote: > On Fri, Nov 23, 2018 at 07:53:26PM -0200, Helen Koike wrote: >> Allow userspace to identify if the driver supports async update. > > And what exactly is an "async update"? I agree we are lacking docs on this, I'

[PATCH v2] drm/atomic: add ATOMIC_AMEND flag to the Atomic IOCTL.

2018-11-24 Thread Helen Koike
igned-off-by: Gustavo Padovan Signed-off-by: Enric Balletbo i Serra [updated for upstream] Signed-off-by: Helen Koike --- Hi, This is the second attempt to introduce the new ATOMIC_AMEND flag for atomic operations, see the commit message for a more detailed description. This was tested using a

[PATCH] drm: add capability DRM_CAP_ASYNC_UPDATE

2018-11-24 Thread Helen Koike
Allow userspace to identify if the driver supports async update. Signed-off-by: Enric Balletbo i Serra [prepared for upstream] Signed-off-by: Helen Koike --- Hi, This patch introduces the ASYNC_UPDATE cap, which originated from the discussion regarding DRM_MODE_ATOMIC_AMEND on [1], to allow

[PATCH v3] drm/rockchip: update cursors asynchronously through atomic.

2018-11-22 Thread Helen Koike
Hi Tomasz, On 11/20/18 4:48 AM, Tomasz Figa wrote: > Hi Helen, > > On Tue, Nov 20, 2018 at 4:08 AM Helen Koike wrote: >> >> From: Enric Balletbo i Serra >> >> Add support to async updates of cursors by using the new atomic >> interface for that. >

[PATCH v3] drm/rockchip: update cursors asynchronously through atomic.

2018-11-20 Thread Helen Koike
From: Enric Balletbo i Serra Add support to async updates of cursors by using the new atomic interface for that. Signed-off-by: Enric Balletbo i Serra [updated for upstream] Signed-off-by: Helen Koike --- Hello, This is the third version of the async-plane update suport to the Rockchip

<    1   2   3