Re: [Freedreno] [DPU PATCH 06/11] drm/msm: Remove msm_commit/kthread, use atomic helper commit

2018-02-28 Thread jsanka
On 2018-02-28 11:19, Sean Paul wrote: Moving further towards switching fully to the the atomic helpers, this patch removes the hand-rolled kthread nonblock commit code and uses the atomic helpers commit_work model. There's still a lot of copypasta here, but it's still needed to facilitate the sw

[Freedreno] [[RFC]DPU PATCH] drm/msm/dsi: Use one connector for dual DSI mode

2018-02-28 Thread Chandan Uddaraju
Current DSI driver uses two connectors for dual DSI case even though we only have one panel. Fix this by implementing one connector/bridge for dual DSI use case. Current patch is not yet tested on dual-dsi setup. Signed-off-by: Chandan Uddaraju --- drivers/gpu/drm/msm/dsi/dsi.c | 3 +

[Freedreno] [DPU PATCH 11/11] drm/msm: Remove dpu input fences

2018-02-28 Thread Sean Paul
These are already provided by drm atomic core. In conjunction with the output fences removed earlier, this obsoletes dpu_fence, and it can be entirely removed as well. Change-Id: Ida4924a09c455d7a84bfee569bd0d2fb436418de Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/Makefile |

[Freedreno] [DPU PATCH 09/11] drm/msm: Remove prepare_fence kms_function

2018-02-28 Thread Sean Paul
This is the last piece that is keeping us from matching the atomic helper commit function. By removing this (now unused) hook, we can switch to drm_atomic_helper_commit() Change-Id: I081056a6e1689807871f5deedc76499bb91b6969 Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/msm_atomic.c | 10 -

[Freedreno] [DPU PATCH 02/11] drm/msm: Don't duplicate modeset_enables atomic helper

2018-02-28 Thread Sean Paul
Instead, shuffle things around so we kickoff crtc after enabling encoder during modesets. Also moves the vblank wait to after the frame. Change-Id: I16c7b7f9390d04f6050aa20e17a5335fbf49eba3 Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c| 9 ++ drivers/gpu/drm/msm/dis

[Freedreno] [DPU PATCH 07/11] drm/msm: Use atomic private_obj instead of subclassing

2018-02-28 Thread Sean Paul
Instead of subclassing atomic state, store driver private data in private_obj/state. This allows us to remove the swap_state driver hook for mdp5 and get closer to using the atomic helpers entirely. Change-Id: I65a4a2887593ae257d584e00b352b5daf00e4e61 Signed-off-by: Sean Paul --- drivers/gpu/drm

[Freedreno] [DPU PATCH 04/11] drm/msm: Move implicit sync fence handling to prepare_fb

2018-02-28 Thread Sean Paul
This is another piece that can be moved out of atomic to facilitate using the atomic helpers. Change-Id: I6dc3c4e5df508942bbc378c73a44e46e511b8469 Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 8 drivers/gpu/drm/msm/msm_atomic.c | 13 - 2

[Freedreno] [DPU PATCH 05/11] drm/msm: Mark the crtc->state->event consumed

2018-02-28 Thread Sean Paul
Don't leave the event != NULL once it's consumed, this is used a signal to the atomic helpers that the event will be handled by the driver. Change-Id: Ib934fb2e97bacbb4a1f9c780cc7369c2bb98ed50 Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ drivers/gpu/drm/msm/disp

[Freedreno] [DPU PATCH 00/11] drm/msm: Use atomic helper functions for msm

2018-02-28 Thread Sean Paul
Hey! This set converts msm to using the atomic helper functions for commit. In order to do this, I needed to do the following: Relocate/remove the copied atomic helper code from msm_atomic: Most of this was to deal with seamless modesets introduced in the dpu. I'll need to revisit the seamles

[Freedreno] [DPU PATCH 06/11] drm/msm: Remove msm_commit/kthread, use atomic helper commit

2018-02-28 Thread Sean Paul
Moving further towards switching fully to the the atomic helpers, this patch removes the hand-rolled kthread nonblock commit code and uses the atomic helpers commit_work model. There's still a lot of copypasta here, but it's still needed to facilitate the swap_state and prepare_fence private funct

[Freedreno] [DPU PATCH 10/11] drm/msm: Switch to atomic_helper_commit()

2018-02-28 Thread Sean Paul
Now that all of the msm-specific goo is tucked safely away we can switch over to using the atomic helper commit directly. \o/ Change-Id: Ieab0bd0c526b2a9d3b3345eeba402ac4857fe418 Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/msm_atomic.c | 120 +-- drivers/gpu/drm/

[Freedreno] [DPU PATCH 01/11] drm/msm: Skip seamless disables in crtc/encoder

2018-02-28 Thread Sean Paul
Instead of duplicating whole swaths of atomic helper functions (which are already out-of-date), just skip the encoder/crtc disables in the .disable hooks. Change-Id: I7bd9183ae60624204fb1de9550656b776efc7202 Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c| 8 + driver

[Freedreno] [DPU PATCH 08/11] drm/msm: Remove hand-rolled out fences

2018-02-28 Thread Sean Paul
Remove release/output/retire fences from the dpu driver. These are already available via drm core's OUT_FENCE property. Change-Id: Id4238d0b5457f2c8ee2e87bb7814e1850a573623 Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_connector.c | 66 +-- drivers/gpu/drm/msm/disp/dpu1/dpu

[Freedreno] [DPU PATCH 03/11] drm/msm: Refactor complete_commit() to look more the helpers

2018-02-28 Thread Sean Paul
Factor out the commit_tail() portions of complete_commit() into a separate function to facilitate moving to the atomic helpers in future patches. Change-Id: I4b858ad9fe356b31ed0ed9eecdb394a61048e39c Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/msm_atomic.c | 25 - 1 f