Re: [Freedreno] [PATCH] drm/msm: Fix NULL deref on bind/probe deferral

2018-05-31 Thread abhinavk
On 2018-05-31 11:48, Sean Paul wrote: This patch avoids dereferencing msm_host->dev when it is NULL. If we find ourselves tearing down dsi before calling (mdp4|mdp5|dpu)_kms_init(), we'll end up in a state where the dev pointer is NULL and trying to extract priv from it will fail. This was intr

Re: [Freedreno] [PATCH] gpu: drm: msm: Change return type to vm_fault_t

2018-05-31 Thread Souptick Joarder
On Thu, May 31, 2018 at 11:29 PM, Jordan Crouse wrote: > On Mon, May 28, 2018 at 12:38:41PM +0530, Souptick Joarder wrote: >> On Mon, May 21, 2018 at 10:59 PM, Souptick Joarder >> wrote: >> > Use new return type vm_fault_t for fault handler. For >> > now, this is just documenting that the functi

[Freedreno] [PATCH] drm/msm: Fix NULL deref on bind/probe deferral

2018-05-31 Thread Sean Paul
This patch avoids dereferencing msm_host->dev when it is NULL. If we find ourselves tearing down dsi before calling (mdp4|mdp5|dpu)_kms_init(), we'll end up in a state where the dev pointer is NULL and trying to extract priv from it will fail. This was introduced in a seemingly innocuous commit t

Re: [Freedreno] [PATCH] gpu: drm: msm: Change return type to vm_fault_t

2018-05-31 Thread Jordan Crouse
On Mon, May 28, 2018 at 12:38:41PM +0530, Souptick Joarder wrote: > On Mon, May 21, 2018 at 10:59 PM, Souptick Joarder > wrote: > > Use new return type vm_fault_t for fault handler. For > > now, this is just documenting that the function returns > > a VM_FAULT value rather than an errno. Once all

Re: [Freedreno] [PATCH] drm/msm: Add OUT_RING64() helper macro

2018-05-31 Thread Jordan Crouse
On Thu, May 31, 2018 at 04:01:51PM +0530, Sharat Masetty wrote: > This patch adds a simple helper function to help write 64 bit payloads > to the ringbuffer. > > Signed-off-by: Sharat Masetty > --- > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12 > drivers/gpu/drm/msm/adreno/a5xx_pow

Re: [Freedreno] [PATCH v2 2/3] drm/msm: move suspend/resume devfreq to their own functions

2018-05-31 Thread Jordan Crouse
On Thu, May 31, 2018 at 12:52:03PM +0530, Sharat Masetty wrote: > This is needed for hardware revisions which do not rely on the generic > suspend, resume handlers for power management. > > Signed-off-by: Sharat Masetty > --- > drivers/gpu/drm/msm/msm_gpu.c | 23 +++ > driver

Re: [Freedreno] [DPU PATCH 10/11] drm/msm/dpu: correct dpu_io_util.h include path

2018-05-31 Thread ryadav
On 2018-05-30 22:00, Jordan Crouse wrote: On Wed, May 30, 2018 at 08:19:47PM +0530, Rajesh Yadav wrote: dpu_io_util.h is moved from standard include path to driver folder, correct the include path in code. Signed-off-by: Rajesh Yadav If the previous patch doesn't compile without this fix you

[Freedreno] [PATCH] drm/msm: Add OUT_RING64() helper macro

2018-05-31 Thread Sharat Masetty
This patch adds a simple helper function to help write 64 bit payloads to the ringbuffer. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12 drivers/gpu/drm/msm/adreno/a5xx_power.c | 3 +-- drivers/gpu/drm/msm/msm_ringbuffer.h| 6 ++ 3 files ch

[Freedreno] [PATCH v3 0/4] re-factor devfreq common code

2018-05-31 Thread Sharat Masetty
This series re-factors the devfreq code a bit in preparation for the upcoming A6x related devfreq changes. The code applies cleanly on 4.17 and has been verified on DB820C. V2: Addressed code review comments from Jordan Crouse. V3: Added a new patch for devfreq cleanup. Sharat Masetty (4): drm/

[Freedreno] [PATCH v3 4/4] drm/msm: unregister devfreq upon clean up

2018-05-31 Thread Sharat Masetty
Call the devfreq_remove_device() API to remove the GPU devfreq instance during GPU driver cleanup. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/msm_gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 43e36d7..ef

[Freedreno] [PATCH v3 3/4] drm/msm: re-factor devfreq code

2018-05-31 Thread Sharat Masetty
devfreq framework requires the drivers to provide busy time estimations. The GPU driver relies on the hardware performance counters for the busy time estimations, but different hardware revisions have counters which can be sourced from different clocks. So the busy time estimation will be target de

[Freedreno] [PATCH v3 1/4] drm/msm: suspend devfreq on init

2018-05-31 Thread Sharat Masetty
Devfreq turns on and starts recommending power level as soon as it is initialized. The GPU is still not powered on by the time the devfreq init happens and this leads to problems on GPU's where register access is needed to get/set power levels. So we start suspended and only restart devfreq when GP

[Freedreno] [PATCH v3 2/4] drm/msm: move suspend/resume devfreq to their own functions

2018-05-31 Thread Sharat Masetty
This is needed for hardware revisions which do not rely on the generic suspend, resume handlers for power management. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/msm_gpu.c | 23 +++ drivers/gpu/drm/msm/msm_gpu.h | 2 ++ 2 files changed, 17 insertions(+), 8 deletion

[Freedreno] [PATCH v2 1/3] drm/msm: suspend devfreq on init

2018-05-31 Thread Sharat Masetty
Devfreq turns on and starts recommending power level as soon as it is initialized. The GPU is still not powered on by the time the devfreq init happens and this leads to problems on GPU's where register access is needed to get/set power levels. So we start suspended and only restart devfreq when GP

[Freedreno] [PATCH v2 3/3] drm/msm: re-factor devfreq code

2018-05-31 Thread Sharat Masetty
devfreq framework requires the drivers to provide busy time estimations. The GPU driver relies on the hardware performance counters for the busy time estimations, but different hardware revisions have counters which can be sourced from different clocks. So the busy time estimation will be target de

[Freedreno] [PATCH v2 2/3] drm/msm: move suspend/resume devfreq to their own functions

2018-05-31 Thread Sharat Masetty
This is needed for hardware revisions which do not rely on the generic suspend, resume handlers for power management. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/msm_gpu.c | 23 +++ drivers/gpu/drm/msm/msm_gpu.h | 2 ++ 2 files changed, 17 insertions(+), 8 deletion

[Freedreno] [PATCH v2 0/3] drm/msm: re-factor devfreq common code

2018-05-31 Thread Sharat Masetty
This series re-factors the devfreq code a bit in preparation for the upcoming A6x related devfreq changes. The code applies cleanly on 4.17 and has been verified on DB820C. V2: Addressed code review comments from Jordan Crouse. Sharat Masetty (3): drm/msm: suspend devfreq on init drm/msm: mov