Re: [Freedreno] [PATCH] iommu: arm-smmu: Set SCTLR.HUPCF bit

2018-11-12 Thread Will Deacon
On Fri, Nov 09, 2018 at 01:01:55PM -0500, Rob Clark wrote: > On Mon, Oct 29, 2018 at 3:09 PM Will Deacon wrote: > > On Thu, Sep 27, 2018 at 06:46:07PM -0400, Rob Clark wrote: > > > We seem to need to set either this or CFCFG (stall), otherwise gpu > > > faults trigger problems with other in-flight

Re: [Freedreno] [PATCH 12/12] drm/msm: dpu: Move crtc runtime resume to encoder

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul The crtc runtime resume doesn't actually operate on the crtc, but rather its encoders. The problem with this is that we need to inspect the crtc state to get the currently connected encoders. Since runtime resume isn't guaranteed to be cal

Re: [Freedreno] [PATCH 11/12] drm/msm: dpu: Add ->enabled to dpu_encoder_virt

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul Add a bool to dpu_encoder_virt to track whether the encoder is enabled or not. Repurpose the enc_lock mutex to ensure that it is consistent with the hw state. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 27 +

Re: [Freedreno] [PATCH 10/12] drm/msm: dpu: Fix typo in dpu_encoder

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul enc_spinlock instead of enc_spin_lock. Signed-off-by: Sean Paul --- Reviewed-by: Jeykumar Sankaran drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/di

Re: [Freedreno] [PATCH 04/12] drm/msm: dpu: Don't use power_event for vbif_init_memtypes

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 17:06, Jeykumar Sankaran wrote: On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul power_events are only used for pm_runtime, and that's all handled in dpu_kms. So just call vbif_init_memtypes at the correct times. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/

Re: [Freedreno] [PATCH 09/12] drm/msm: dpu: Remove dpu_power_handle

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul Now that we don't have any event handlers, remove dpu_power_handle! Signed-off-by: Sean Paul Reviewed-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1

Re: [Freedreno] [PATCH 08/12] drm/msm: dpu: Move DPU_POWER_HANDLE_DBUS_ID to core_perf

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul It's only used in core_perf, so stick it there (and change the name to reflect that). Signed-off-by: Sean Paul --- Reviewed-by: Jeykumar Sankaran drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 34 +-- drivers/gpu/drm

Re: [Freedreno] [PATCH 07/12] drm/msm: dpu: Include dpu_io_util.h directly in dpu_kms.h

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul It's needed for struct dss_module_power, and is currently being pulled in by dpu_power_handle.h Signed-off-by: Sean Paul --- Reviewed-by: Jeykumar Sankaran drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 + 1 file changed, 1 insertion(+)

Re: [Freedreno] [PATCH 06/12] drm/msm: dpu: Remove power_handle from core_perf

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul It's unused Signed-off-by: Sean Paul --- Reviewed-by: Jeykumar Sankaran drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 3 --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 5 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1

Re: [Freedreno] [PATCH 05/12] drm/msm: dpu: Handle crtc pm_runtime_resume() directly

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul Instead of registering through dpu_power_handle just to get a call on runtime_resume, call the crtc function directly. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 23 ++- drivers/gpu/drm/ms

Re: [Freedreno] [PATCH 04/12] drm/msm: dpu: Don't use power_event for vbif_init_memtypes

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul power_events are only used for pm_runtime, and that's all handled in dpu_kms. So just call vbif_init_memtypes at the correct times. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 21 +++-- drivers/g

Re: [Freedreno] [PATCH 04/12] drm/msm: dpu: Don't use power_event for vbif_init_memtypes

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul power_events are only used for pm_runtime, and that's all handled in dpu_kms. So just call vbif_init_memtypes at the correct times. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 21 +++-- drivers/g

Re: [Freedreno] [PATCH 03/12] drm/msm: dpu: Remove dpu_power_client

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul There's only one client -- core, and it's only used for runtime pm which is already refcounted. Signed-off-by: Sean Paul Reviewed-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 22 + drivers/gpu/drm/m

Re: [Freedreno] [PATCH 02/12] drm/msm: dpu: Remove unused trace_dpu_perf_update_bus()

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul Signed-off-by: Sean Paul --- Reviewed-by: Jeykumar Sankaran drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 21 - 1 file changed, 21 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h b/drivers/gpu/dr

Re: [Freedreno] [PATCH 01/12] drm/msm: dpu: Remove dpu_power_handle_get_dbus_name()

2018-11-12 Thread Jeykumar Sankaran
On 2018-11-12 11:42, Sean Paul wrote: From: Sean Paul It's only used for debugfs, so just output the enum value instead. Signed-off-by: Sean Paul --- Reviewed-by: Jeykumar Sankaran drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_power_hand

[Freedreno] [PATCH 2/3] drm/msm: dpu: Stop using encoder->crtc pointer

2018-11-12 Thread Sean Paul
From: Sean Paul It's for legacy drivers, for atomic drivers crtc->state->encoder_mask should be used to map encoder to crtc. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 46 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 19 +++--- 2 files ch

[Freedreno] [PATCH 3/3] drm/msm: dpu: Add modeset lock checks where applicable

2018-11-12 Thread Sean Paul
From: Sean Paul Add modeset lock checks to functions that could be called outside the core atomic stack. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/

[Freedreno] [PATCH 1/3] drm/msm: dpu: Grab the modeset locks in frame_event

2018-11-12 Thread Sean Paul
From: Sean Paul This patch wraps dpu_core_perf_crtc_release_bw() with modeset locks since it digs into the state objects. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/driv

Re: [Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Liviu Dudau
On Mon, Nov 12, 2018 at 04:01:14PM +0100, Maarten Lankhorst wrote: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own __drm_a

[Freedreno] [PATCH 12/12] drm/msm: dpu: Move crtc runtime resume to encoder

2018-11-12 Thread Sean Paul
From: Sean Paul The crtc runtime resume doesn't actually operate on the crtc, but rather its encoders. The problem with this is that we need to inspect the crtc state to get the currently connected encoders. Since runtime resume isn't guaranteed to be called while holding the modeset locks (altho

[Freedreno] [PATCH 11/12] drm/msm: dpu: Add ->enabled to dpu_encoder_virt

2018-11-12 Thread Sean Paul
From: Sean Paul Add a bool to dpu_encoder_virt to track whether the encoder is enabled or not. Repurpose the enc_lock mutex to ensure that it is consistent with the hw state. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 27 + 1 file changed, 22

[Freedreno] [PATCH 10/12] drm/msm: dpu: Fix typo in dpu_encoder

2018-11-12 Thread Sean Paul
From: Sean Paul enc_spinlock instead of enc_spin_lock. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 8

[Freedreno] [PATCH 09/12] drm/msm: dpu: Remove dpu_power_handle

2018-11-12 Thread Sean Paul
From: Sean Paul Now that we don't have any event handlers, remove dpu_power_handle! Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 11 -- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 3 - .../gpu/drm/msm

[Freedreno] [PATCH 08/12] drm/msm: dpu: Move DPU_POWER_HANDLE_DBUS_ID to core_perf

2018-11-12 Thread Sean Paul
From: Sean Paul It's only used in core_perf, so stick it there (and change the name to reflect that). Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 34 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 17 -- drivers/gpu/drm/msm/disp/dpu

[Freedreno] [PATCH 07/12] drm/msm: dpu: Include dpu_io_util.h directly in dpu_kms.h

2018-11-12 Thread Sean Paul
From: Sean Paul It's needed for struct dss_module_power, and is currently being pulled in by dpu_power_handle.h Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/ms

[Freedreno] [PATCH 06/12] drm/msm: dpu: Remove power_handle from core_perf

2018-11-12 Thread Sean Paul
From: Sean Paul It's unused Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 3 --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 5 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 - 3 files changed, 9 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/d

[Freedreno] [PATCH 05/12] drm/msm: dpu: Handle crtc pm_runtime_resume() directly

2018-11-12 Thread Sean Paul
From: Sean Paul Instead of registering through dpu_power_handle just to get a call on runtime_resume, call the crtc function directly. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 23 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 10 ++

[Freedreno] [PATCH 04/12] drm/msm: dpu: Don't use power_event for vbif_init_memtypes

2018-11-12 Thread Sean Paul
From: Sean Paul power_events are only used for pm_runtime, and that's all handled in dpu_kms. So just call vbif_init_memtypes at the correct times. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 21 +++-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 - 2

[Freedreno] [PATCH 03/12] drm/msm: dpu: Remove dpu_power_client

2018-11-12 Thread Sean Paul
From: Sean Paul There's only one client -- core, and it's only used for runtime pm which is already refcounted. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 22 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 - .../gpu/drm/msm/disp/dpu1/dpu_power_handl

[Freedreno] [PATCH 01/12] drm/msm: dpu: Remove dpu_power_handle_get_dbus_name()

2018-11-12 Thread Sean Paul
From: Sean Paul It's only used for debugfs, so just output the enum value instead. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_power_handle.c | 14 -- drivers/gpu/drm/msm/disp/dpu1/dpu_power_handle.h |

[Freedreno] [PATCH 02/12] drm/msm: dpu: Remove unused trace_dpu_perf_update_bus()

2018-11-12 Thread Sean Paul
From: Sean Paul Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 21 - 1 file changed, 21 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h index 0c122e173892..7ab0ba8224f6 100644 --- a/d

[Freedreno] [PATCH 00/12] drm/msm: dpu: Clean up runtime power handling

2018-11-12 Thread Sean Paul
From: Sean Paul I started pulling a thread last week when looking at dpu locking. It led me into the power_handle code and eventually runtime suspend/resume. This set removes the power_handle stuff entirely. I'm sure it's more useful when there are multiple clients/handles/events, but for our ca

Re: [Freedreno] [Intel-gfx] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Ville Syrjälä
On Mon, Nov 12, 2018 at 04:01:14PM +0100, Maarten Lankhorst wrote: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own __drm_a

Re: [Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Maarten Lankhorst
Op 12-11-18 om 17:11 schreef Sean Paul: > On Mon, Nov 12, 2018 at 04:01:14PM +0100, Maarten Lankhorst wrote: >> We already have __drm_atomic_helper_connector_reset() and >> __drm_atomic_helper_plane_reset(), extend this to crtc as well. >> >> Most drivers already have a gpu reset hook, correct it.

Re: [Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Sean Paul
On Mon, Nov 12, 2018 at 04:01:14PM +0100, Maarten Lankhorst wrote: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own __drm_a

Re: [Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Wentland, Harry
On 2018-11-12 10:01 a.m., Maarten Lankhorst wrote: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own __drm_atomic_helper_c

Re: [Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Heiko Stuebner
Am Montag, 12. November 2018, 16:01:14 CET schrieb Maarten Lankhorst: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own __dr

Re: [Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Li, Sun peng (Leo)
On 2018-11-12 10:01 AM, Maarten Lankhorst wrote: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own __drm_atomic_helper_crt

Re: [Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Thierry Reding
On Mon, Nov 12, 2018 at 04:01:14PM +0100, Maarten Lankhorst wrote: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own __drm_a

Re: [Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Boris Brezillon
On Mon, 12 Nov 2018 16:01:14 +0100 Maarten Lankhorst wrote: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own __drm_atomic

[Freedreno] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Maarten Lankhorst
We already have __drm_atomic_helper_connector_reset() and __drm_atomic_helper_plane_reset(), extend this to crtc as well. Most drivers already have a gpu reset hook, correct it. Nouveau already implemented its own __drm_atomic_helper_crtc_reset(), convert it to the common one. Signed-off-by: Maar