Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-12-16 Thread Viresh Kumar
On 07-12-20, 11:46, Viresh Kumar wrote: > On 19-11-20, 11:35, Viresh Kumar wrote: > > On 18-11-20, 08:53, Rob Clark wrote: > > > On Tue, Nov 17, 2020 at 9:28 PM Viresh Kumar > > > wrote: > > > > > > > > On 17-11-20, 09:02, Rob Clark wrote: > > > > > With that on top of the previous patch, > > >

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-12-07 Thread Viresh Kumar
On 19-11-20, 11:35, Viresh Kumar wrote: > On 18-11-20, 08:53, Rob Clark wrote: > > On Tue, Nov 17, 2020 at 9:28 PM Viresh Kumar > > wrote: > > > > > > On 17-11-20, 09:02, Rob Clark wrote: > > > > With that on top of the previous patch, > > > > > > Don't you still have this ? Which fixed the

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-19 Thread Viresh Kumar
On 18-11-20, 08:53, Rob Clark wrote: > On Tue, Nov 17, 2020 at 9:28 PM Viresh Kumar wrote: > > > > On 17-11-20, 09:02, Rob Clark wrote: > > > With that on top of the previous patch, > > > > Don't you still have this ? Which fixed the lockdep in the remove path. > > > >

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-18 Thread Rob Clark
On Tue, Nov 17, 2020 at 9:28 PM Viresh Kumar wrote: > > On 17-11-20, 09:02, Rob Clark wrote: > > With that on top of the previous patch, > > Don't you still have this ? Which fixed the lockdep in the remove path. > > https://lore.kernel.org/lkml/20201022080644.2ck4okrxygmkuatn@vireshk-i7/ > > To

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-18 Thread Viresh Kumar
On 17-11-20, 09:02, Rob Clark wrote: > With that on top of the previous patch, Don't you still have this ? Which fixed the lockdep in the remove path. https://lore.kernel.org/lkml/20201022080644.2ck4okrxygmkuatn@vireshk-i7/ To make it clear you need these patches to fix the OPP stuff: //From

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-18 Thread Viresh Kumar
On Fri, 6 Nov 2020 at 12:46, Viresh Kumar wrote: > > On 05-11-20, 11:24, Rob Clark wrote: > > On Tue, Nov 3, 2020 at 7:04 PM Viresh Kumar wrote: > > > > > > On 03-11-20, 08:50, Rob Clark wrote: > > > > sorry, it didn't apply cleanly (which I guess is due to some other > > > > dependencies that

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-17 Thread Rob Clark
On Thu, Nov 5, 2020 at 11:16 PM Viresh Kumar wrote: > > On 05-11-20, 11:24, Rob Clark wrote: > > On Tue, Nov 3, 2020 at 7:04 PM Viresh Kumar wrote: > > > > > > On 03-11-20, 08:50, Rob Clark wrote: > > > > sorry, it didn't apply cleanly (which I guess is due to some other > > > > dependencies

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-06 Thread Viresh Kumar
On 05-11-20, 11:24, Rob Clark wrote: > On Tue, Nov 3, 2020 at 7:04 PM Viresh Kumar wrote: > > > > On 03-11-20, 08:50, Rob Clark wrote: > > > sorry, it didn't apply cleanly (which I guess is due to some other > > > dependencies that need to be picked back to v5.4 product kernel), and > > > due to

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-05 Thread Rob Clark
On Tue, Nov 3, 2020 at 7:04 PM Viresh Kumar wrote: > > On 03-11-20, 08:50, Rob Clark wrote: > > sorry, it didn't apply cleanly (which I guess is due to some other > > dependencies that need to be picked back to v5.4 product kernel), and > > due to some other things I'm in middle of debugging I

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-04 Thread Viresh Kumar
On 03-11-20, 08:50, Rob Clark wrote: > sorry, it didn't apply cleanly (which I guess is due to some other > dependencies that need to be picked back to v5.4 product kernel), and > due to some other things I'm in middle of debugging I didn't have time > yet to switch to v5.10-rc or look at what

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-03 Thread Rob Clark
On Mon, Nov 2, 2020 at 9:47 PM Viresh Kumar wrote: > > On 27-10-20, 17:05, Viresh Kumar wrote: > > It isn't that straight forward unfortunately, we need to make sure the > > table doesn't get allocated for the same device twice, so > > find+allocate needs to happen within a locked region. > > > >

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-03 Thread Viresh Kumar
On 27-10-20, 17:05, Viresh Kumar wrote: > It isn't that straight forward unfortunately, we need to make sure the > table doesn't get allocated for the same device twice, so > find+allocate needs to happen within a locked region. > > I have taken, not so straight forward, approach to fixing this

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-28 Thread Viresh Kumar
On 25-10-20, 10:39, Rob Clark wrote: > Nope, I suspect any creation of debugfs files will be problematic. Yeah, so it only fixed part of the problem. > (btw, _add_opp_dev_unlocked() looks like it should be called > _add_opp_dev_locked()?) > > It does look like 'struct opp_table' is already

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-25 Thread Rob Clark
On Thu, Oct 22, 2020 at 1:06 AM Viresh Kumar wrote: > > On 20-10-20, 07:13, Rob Clark wrote: > > On Tue, Oct 20, 2020 at 4:24 AM Viresh Kumar > > wrote: > > > > > > On 20-10-20, 12:56, Daniel Vetter wrote: > > > > Yeah that's bad practice. Generally you shouldn't need to hold locks > > > > in

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-23 Thread Viresh Kumar
On 20-10-20, 07:13, Rob Clark wrote: > On Tue, Oct 20, 2020 at 4:24 AM Viresh Kumar wrote: > > > > On 20-10-20, 12:56, Daniel Vetter wrote: > > > Yeah that's bad practice. Generally you shouldn't need to hold locks > > > in setup/teardown code, since there's no other thread which can > > >

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-21 Thread Viresh Kumar
On 12-10-20, 08:43, Rob Clark wrote: > On Mon, Oct 12, 2020 at 7:35 AM Daniel Vetter wrote: > > > > On Sun, Oct 11, 2020 at 07:09:34PM -0700, Rob Clark wrote: > > > From: Rob Clark > > > > > > Unfortunately, due to an dev_pm_opp locking interaction with > > > mm->mmap_sem, we need to do pm get

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-21 Thread Viresh Kumar
On 20-10-20, 12:56, Daniel Vetter wrote: > Yeah that's bad practice. Generally you shouldn't need to hold locks > in setup/teardown code, since there's no other thread which can > possible hold a reference to anything your touching anymore. Ofc > excluding quickly grabbing/dropping a lock to

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-20 Thread Rob Clark
On Tue, Oct 20, 2020 at 4:24 AM Viresh Kumar wrote: > > On 20-10-20, 12:56, Daniel Vetter wrote: > > Yeah that's bad practice. Generally you shouldn't need to hold locks > > in setup/teardown code, since there's no other thread which can > > possible hold a reference to anything your touching

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-20 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 1:24 PM Viresh Kumar wrote: > > On 20-10-20, 12:56, Daniel Vetter wrote: > > Yeah that's bad practice. Generally you shouldn't need to hold locks > > in setup/teardown code, since there's no other thread which can > > possible hold a reference to anything your touching

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-20 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 11:07 AM Viresh Kumar wrote: > > On 12-10-20, 08:43, Rob Clark wrote: > > On Mon, Oct 12, 2020 at 7:35 AM Daniel Vetter wrote: > > > > > > On Sun, Oct 11, 2020 at 07:09:34PM -0700, Rob Clark wrote: > > > > From: Rob Clark > > > > > > > > Unfortunately, due to an

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-12 Thread Rob Clark
On Mon, Oct 12, 2020 at 7:35 AM Daniel Vetter wrote: > > On Sun, Oct 11, 2020 at 07:09:34PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > Unfortunately, due to an dev_pm_opp locking interaction with > > mm->mmap_sem, we need to do pm get before aquiring obj locks, > > otherwise we can have

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-12 Thread Daniel Vetter
On Sun, Oct 11, 2020 at 07:09:34PM -0700, Rob Clark wrote: > From: Rob Clark > > Unfortunately, due to an dev_pm_opp locking interaction with > mm->mmap_sem, we need to do pm get before aquiring obj locks, > otherwise we can have anger lockdep with the chain: tbh this sounds like a bug in that