[Freedreno] [PATCH 00/13] drm/msm+PM+icc: Make job_run() reclaim-safe

2023-03-12 Thread Rob Clark
From: Rob Clark Inspired by https://lore.kernel.org/dri-devel/20200604081224.863494-10-daniel.vet...@ffwll.ch/ it seemed like a good idea to get rid of memory allocation in job_run() and use lockdep annotations to yell at us about anything that could deadlock against shrinker/reclaim. Anything

[Freedreno] [PATCH 03/13] drm/msm/gpu: Move fw loading out of hw_init() path

2023-03-12 Thread Rob Clark
From: Rob Clark It is already a no-op, since we've already loaded the fw from adreno_load_gpu(), so drop the redundant call. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/adre

[Freedreno] [PATCH 02/13] drm/msm: Embed the hw_fence in msm_gem_submit

2023-03-12 Thread Rob Clark
From: Rob Clark Avoid allocating memory in job_run() by embedding the fence in the submit object. Since msm gpu fences are always 1:1 with msm_gem_submit we can just use the fence's refcnt to track the submit. And since we can get the fence ctx from the submit we can just drop the msm_fence str

[Freedreno] [PATCH 04/13] drm/msm/gpu: Move BO allocation out of hw_init

2023-03-12 Thread Rob Clark
From: Rob Clark These allocations are only done the first (successful) time through hw_init() so they won't actually happen in the job_run() path. But lockdep doesn't know this. So dis-entangle them from the hw_init() path. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c

[Freedreno] [PATCH 05/13] drm/msm/a6xx: Move ioremap out of hw_init path

2023-03-12 Thread Rob Clark
From: Rob Clark Move the one-time RPMh setup to a6xx_gmu_init(). To get rid of the hack for one-time init vs start, add in an extra a6xx_rpmh_stop() at the end of the init sequence. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 18 -- 1 file changed, 8 i

Re: [Freedreno] [PATCH 1/2] drm/lima: Use drm_sched_job_add_syncobj_dependency()

2023-03-12 Thread Qiang Yu
Patch is: Reviewed-by: Qiang Yu On Sat, Feb 25, 2023 at 5:41 AM Maíra Canal wrote: > > As lima_gem_add_deps() performs the same steps as > drm_sched_job_add_syncobj_dependency(), replace the open-coded > implementation in Lima in order to simply use the DRM function. > > Signed-off-by: Maíra Can