[Freedreno] [PATCH] drm/msm/a6xx: Poll for HFI responses

2018-09-20 Thread Jordan Crouse
The only HFI communication with the GMU on sdm845 happens during initialization and all commands are synchronous. A fancy interrupt tasklet and associated infrastructure is entirely not eeded and puts us at the mercy of the scheduler. Instead poll for the message signal and handle the response

Re: [Freedreno] [PATCH v2 6/7] drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void

2018-09-20 Thread Jordan Crouse
On Thu, Sep 20, 2018 at 12:49:23PM -0400, Bruce Wang wrote: > Removed all impossible checks from the function, which eliminates > the need for a return value. This function is also never used > outside of dpu_plane.c, so the function is made static. > > Signed-off-by: Bruce Wang > --- >

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

2018-09-20 Thread Jordan Crouse
On Thu, Sep 20, 2018 at 12:49:21PM -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 v2 1/7] drm/msm/dpu: Remove unneeded checks in dpu_plane.c

2018-09-20 Thread Jordan Crouse
On Thu, Sep 20, 2018 at 12:49:18PM -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. Unused variables are removed. > > Signed-off-by: Bruce Wang > --- >

[Freedreno] [PATCH v2 6/7] drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void

2018-09-20 Thread Bruce Wang
Removed all impossible checks from the function, which eliminates the need for a return value. This function is also never used outside of dpu_plane.c, so the function is made static. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 27 +-- 1 file

[Freedreno] [PATCH v2 7/7] drm/msm/dpu: Make _dpu_plane_get_aspace void

2018-09-20 Thread Bruce Wang
Remove unneeded checks from _dpu_plane_get_aspace. The function no longer needs to return anything so it is changed to void. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 25 --- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git

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

2018-09-20 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 v2 3/7] drm/msm/dpu: Remove unneeded checks in dpu_crtc.c

2018-09-20 Thread Bruce Wang
Removes impossible checks in 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 | 170 +++ 1 file changed, 23

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

2018-09-20 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 v2 2/7] drm/msm/dpu: Clean up plane atomic disable/update

2018-09-20 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 v2 1/7] drm/msm/dpu: Remove unneeded checks in dpu_plane.c

2018-09-20 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. Unused variables are removed. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 190 ++ 1

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

2018-09-20 Thread Bruce Wang
Removes uneeded checks and unused variables. Changes some function that do not need return values to void. Bruce Wang (7): drm/msm/dpu: Remove unneeded checks in dpu_plane.c drm/msm/dpu: Clean up plane atomic disable/update drm/msm/dpu: Remove unneeded checks in dpu_crtc.c drm/msm/dpu:

[Freedreno] [PATCH 2/6] drm/msm: dpu: Remove unused functions from msm_media_info.h

2018-09-20 Thread Sean Paul
From: Sean Paul These functions aren't used anywhere, remove them. Signed-off-by: Sean Paul --- .../gpu/drm/msm/disp/dpu1/msm_media_info.h| 171 -- 1 file changed, 171 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/msm_media_info.h

[Freedreno] [PATCH 3/6] drm/msm: dpu: Remove _dpu_encoder_power_enable()

2018-09-20 Thread Sean Paul
From: Sean Paul It's unused, remove it. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 33 - 1 file changed, 33 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index

[Freedreno] [PATCH 5/6] drm/msm: dpu: Remove empty/useless labels

2018-09-20 Thread Sean Paul
From: Sean Paul I noticed an empty label while driving by and decided to use coccinelle to see if there were any more. Here's the spatch and the invocation: --- @@ identifier lbl; expression E; @@ - goto lbl; + return E; ... - lbl: return E; @@ identifier lbl; @@ - goto lbl; +

[Freedreno] [PATCH 1/6] drm/msm: Remove dpu_encoder_phys_ops->hw_reset()

2018-09-20 Thread Sean Paul
From: Sean Paul We call out of the virt encoder into phys only to call back into the virt for hw reset. So remove the indirection and just call the virt function directly. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 6 ++

[Freedreno] [PATCH 4/6] drm/msm: dpu: Remove 'inline' from several functions

2018-09-20 Thread Sean Paul
From: Sean Paul Per chapter 15 of coding-style, removing 'inline' keyword from functions that are larger than a typical macro. In a couple of cases I've simplified the function and kept the inline. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 4 ++--

[Freedreno] [PATCH 6/6] drm/msm: dpu: Clean up _dpu_core_video_mode_intf_connected()

2018-09-20 Thread Sean Paul
From: Sean Paul Local variable is not needed and condition can't be hit. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c

[Freedreno] [PATCH 0/6] drm/msm: dpu: Various cleanup patches

2018-09-20 Thread Sean Paul
From: Sean Paul I kept notes of things to revisit while I was working on the cursor. These are the low-hanging fruit that I noticed. Sean Sean Paul (6): drm/msm: Remove dpu_encoder_phys_ops->hw_reset() drm/msm: dpu: Remove unused functions from msm_media_info.h drm/msm: dpu: Remove