[Freedreno] [PATCH 11/21] drm/msm: Use drm_atomic_helper_shutdown

2018-10-04 Thread Daniel Vetter
drm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs). Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter

[Freedreno] [PATCH v2] drm/msm: adreno: Fix improper u64 division

2018-10-04 Thread Sean Paul
From: Sean Paul This patch uses the proper do_div() macro to perform u64 division and guards against overflow if the result is too large for the unsigned long return type Changes in v2: - Added a6xx to the patch - Removed parens from denominator in a5xx Fixes: de0a3d094de0 drm/msm: re-factor

[Freedreno] [PATCH] drm/msm: a5xx: Fix improper u64 division

2018-10-04 Thread Sean Paul
From: Sean Paul This patch uses the proper do_div() macro to perform u64 division and guards against overflow if the result is too large for the unsigned long return type Fixes: de0a3d094de0 drm/msm: re-factor devfreq code Cc: Sharat Masetty Signed-off-by: Sean Paul ---

[Freedreno] [PATCH 2/2] drm/msm: dpu: Remove checks from dpu_plane_destroy_state()

2018-10-04 Thread Sean Paul
From: Sean Paul They're not needed. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index

[Freedreno] [PATCH 1/2] drm/msm: dpu: Fix memory leak caused by dropped reference

2018-10-04 Thread Sean Paul
From: Sean Paul We are currently leaking a drm_crtc_commit struct for every atomic commit containing plane state. The dpu plane destroy function cleans up the fb reference manually, but fails to release the commit ref. As a result, we just keep allocating drm_crtc_commits without ever freeing

Re: [Freedreno] [v4 4/4] drm/msm/a6xx: Add devfreq support for a6xx

2018-10-04 Thread Jordan Crouse
On Thu, Oct 04, 2018 at 03:11:43PM +0530, Sharat Masetty wrote: > Implement routines to estimate GPU busy time and fetching the > current frequency for the polling interval. This is required by > the devfreq framework which recommends a frequency change if needed. > The driver code then tries to

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

2018-10-04 Thread Sharat Masetty
The devfreq framework requires the drivers to provide busy time estimations. The GPU driver relies on the hardware performance counteres 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

[Freedreno] [v4 2/4] drm/msm/a6xx: Add gmu_read64() register read op

2018-10-04 Thread Sharat Masetty
Add a simple function to read 64 registers in the GMU domain Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h b/drivers/gpu/drm/msm/adreno/a6xx_gmu.h index

[Freedreno] [v4 4/4] drm/msm/a6xx: Add devfreq support for a6xx

2018-10-04 Thread Sharat Masetty
Implement routines to estimate GPU busy time and fetching the current frequency for the polling interval. This is required by the devfreq framework which recommends a frequency change if needed. The driver code then tries to set this new frequency on the GPU by sending an Out Of Band(OOB) request

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

2018-10-04 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