Re: [PATCH 3/4] drm/msm: Fix debugfs deadlock

2021-03-31 Thread Rob Clark
On Wed, Mar 31, 2021 at 4:13 PM Doug Anderson wrote: > > Hi, > > On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > > > @@ -111,23 +111,15 @@ static const struct file_operations msm_gpu_fops = { > > static int msm_gem_show(struct drm_device *dev, struct seq_file *m) > > { > > struct

Re: [PATCH 3/4] drm/msm: Fix debugfs deadlock

2021-03-31 Thread Doug Anderson
Hi, On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > @@ -111,23 +111,15 @@ static const struct file_operations msm_gpu_fops = { > static int msm_gem_show(struct drm_device *dev, struct seq_file *m) > { > struct msm_drm_private *priv = dev->dev_private; > - struct msm_gpu *gpu

[PATCH 3/4] drm/msm: Fix debugfs deadlock

2021-03-31 Thread Rob Clark
From: Rob Clark In normal cases the gem obj lock is acquired first before mm_lock. The exception is iterating the various object lists. In the shrinker path, deadlock is avoided by using msm_gem_trylock() and skipping over objects that cannot be locked. But for debugfs the straightforward