Re: [Freedreno] [PATCH 3/3] drm/msm: dpu: Don't store/deref pointers in trace ringbuffer

2018-09-19 Thread Sean Paul
On Wed, Sep 19, 2018 at 01:04:42PM -0700, Abhinav Kumar wrote: > On 2018-09-19 11:33, Sean Paul wrote: > > From: Sean Paul > > > > TP_printk is not synchronous, so storing pointers and then later > > derferencing them is a Bad Idea. This patch stores everything locally to > minor typo

Re: [Freedreno] [PATCH 1/3] drm/msm: dpu: Clear frame_busy_mask bit after trace

2018-09-19 Thread Abhinav Kumar
On 2018-09-19 11:33, Sean Paul wrote: From: Sean Paul We're printing the frame_busy_mask in a trace, but after it's been cleared. This, as it turns out, is pretty pointless. Signed-off-by: Sean Paul Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- 1 file

Re: [Freedreno] [PATCH 2/3] drm/msm: dpu: Add extra_flush_bits to trigger_flush trace

2018-09-19 Thread Abhinav Kumar
On 2018-09-19 11:33, Sean Paul wrote: From: Sean Paul It's useful to know which bits of the flush come from "extra_flush_bits" Signed-off-by: Sean Paul Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 14

[Freedreno] [PATCH 1/5] drm/msm/dpu: Remove unneeded checks from dpu_plane

2018-09-19 Thread Bruce Wang
Removes some checks from dpu_plane.c that will never result in an error. Subsequent variable assignments become part of the initialization wherever possible. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 53 +++ 1 file changed, 6 insertions(+), 47

[Freedreno] [PATCH 2/5] drm/msm/dpu: Clean up plane atomic disable/update

2018-09-19 Thread Bruce Wang
Removes unnecessary checks from dpu_plane_atomic_disable, old_state argument for both dpu_plane_atomic_disable and dpu_plane_sspp_atomic_update is removed as it is no longer used. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 31 +-- 1 file

[Freedreno] [PATCH 4/5] drm/msm/dpu: Change _dpu_crtc_power_enable to void

2018-09-19 Thread Bruce Wang
All checks for _dpu_crtc_power_enable are not true, so the function can never return an error code. All calls of the function have also been changed so that they don't expect a return value. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 35 1

[Freedreno] [PATCH 0/5] drm/msm/dpu: Clean up dpu code

2018-09-19 Thread Bruce Wang
Removes unneeded checks and unused variables. Changes some functions that do not need return values to void. Bruce Wang (5): [patch 1/5] drm/msm/dpu: Remove unneeded checks from dpu_plane [patch 2/5] drm/msm/dpu: Clean up plane atomic disable/update [patch 3/5] drm/msm/dpu: Remove

[Freedreno] [PATCH 3/5] drm/msm/dpu: Remove impossible checks

2018-09-19 Thread Bruce Wang
Removes additional impossible checks in dpu_plane.c and dpu_crtc.c. Variable assignments are moved up to be initializations where possible. Some variables are no longer used, these are removed. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 121 +++---

[Freedreno] [PATCH 5/5] drm/msm/dpu: Change _dpu_crtc_vblank_enable_no_lock to void

2018-09-19 Thread Bruce Wang
Removes redundant tests for _dpu_crtc_vblank_enable_no_lock. Function return type is now void and all function calls have been changed accordingly. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 42 1 file changed, 7 insertions(+), 35

[Freedreno] [PATCH 2/3] drm/msm: dpu: Add extra_flush_bits to trigger_flush trace

2018-09-19 Thread Sean Paul
From: Sean Paul It's useful to know which bits of the flush come from "extra_flush_bits" Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 14 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff

[Freedreno] [PATCH 1/3] drm/msm: dpu: Clear frame_busy_mask bit after trace

2018-09-19 Thread Sean Paul
From: Sean Paul We're printing the frame_busy_mask in a trace, but after it's been cleared. This, as it turns out, is pretty pointless. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Freedreno] [PATCH 3/3] drm/msm: dpu: Don't store/deref pointers in trace ringbuffer

2018-09-19 Thread Sean Paul
From: Sean Paul TP_printk is not synchronous, so storing pointers and then later derferencing them is a Bad Idea. This patch stores everything locally to avoid display stomped memory. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 98 +-- 1 file

[Freedreno] [PATCH 0/2] drm/msm: dpu: Fix cursor updates

2018-09-19 Thread Sean Paul
From: Sean Paul Hey all, So here's the async cursor patchset, it works pretty well on my device (video mode dsi). I do have a couple of concerns that hopefully people might have solutions for. The first patch masks off the flush register to exclude inactive bits. I think it'd be nicer to clear

[Freedreno] [PATCH 1/2] drm/msm: dpu: Only check flush register against pending flushes

2018-09-19 Thread Sean Paul
From: Sean Paul There exists a case where a flush of a plane/dma may have been triggered & started from an async commit. If that plane/dma is subsequently disabled by the next commit, the flush register will continue to hold the flush bit for the disabled plane. Since the bit remains active,

[Freedreno] [PATCH 2/2] drm/msm: dpu: Make legacy cursor updates asynchronous

2018-09-19 Thread Sean Paul
From: Sean Paul This patch sprinkles a few async/legacy_cursor_update checks through commit to ensure that cursor updates aren't blocked on vsync. There are 2 main components to this, the first is that we don't want to wait_for_commit_done in msm_atomic before returning from atomic_complete.

Re: [Freedreno] [PATCH 1/5] drm/msm/dpu: Remove unneeded checks from dpu_plane

2018-09-19 Thread Sean Paul
On Wed, Sep 19, 2018 at 11:44:11AM -0400, Bruce Wang wrote: > Removes some checks from dpu_plane.c that will never result in an error. > Subsequent variable assignments become part of the initialization wherever > possible. > > Signed-off-by: Bruce Wang > --- >

Re: [Freedreno] [PATCH 2/5] drm/msm/dpu: Clean up plane atomic disable/update

2018-09-19 Thread Sean Paul
On Wed, Sep 19, 2018 at 11:44:12AM -0400, Bruce Wang wrote: > Removes unnecessary checks from dpu_plane_atomic_disable, old_state > argument for both dpu_plane_atomic_disable and > dpu_plane_sspp_atomic_update is removed as it is no longer used. > > Signed-off-by: Bruce Wang Reviewed-by: Sean

Re: [Freedreno] [PATCH 3/5] drm/msm/dpu: Remove impossible checks

2018-09-19 Thread Sean Paul
On Wed, Sep 19, 2018 at 11:44:13AM -0400, Bruce Wang wrote: > Removes additional impossible checks in dpu_plane.c and dpu_crtc.c. > Variable assignments are moved up to be initializations where > possible. Some variables are no longer used, these are removed. > > Signed-off-by: Bruce Wang > ---

Re: [Freedreno] [PATCH 4/5] drm/msm/dpu: Change _dpu_crtc_power_enable to void

2018-09-19 Thread Sean Paul
On Wed, Sep 19, 2018 at 11:44:14AM -0400, Bruce Wang wrote: > All checks for _dpu_crtc_power_enable are not true, so the function > can never return an error code. All calls of the function have also > been changed so that they don't expect a return value. > > Signed-off-by: Bruce Wang > --- >

Re: [Freedreno] [PATCH 4/5] drm/msm/dpu: Change _dpu_crtc_power_enable to void

2018-09-19 Thread Sean Paul
On Wed, Sep 19, 2018 at 03:13:12PM -0400, Sean Paul wrote: > On Wed, Sep 19, 2018 at 11:44:14AM -0400, Bruce Wang wrote: > > All checks for _dpu_crtc_power_enable are not true, so the function > > can never return an error code. All calls of the function have also > > been changed so that they