Re: [Freedreno] [PATCH v3 00/23] drm/msm: de-struct_mutex-ification

2020-10-23 Thread Kristian Høgsberg
On Mon, Oct 19, 2020 at 10:45 PM Rob Clark wrote: > > From: Rob Clark > > This doesn't remove *all* the struct_mutex, but it covers the worst > of it, ie. shrinker/madvise/free/retire. The submit path still uses > struct_mutex, but it still needs *something* serialize a portion of > the submit p

Re: [Freedreno] [PATCH v3 07/23] drm/msm/submit: Move copy_from_user ahead of locking bos

2020-10-23 Thread Kristian Høgsberg
On Mon, Oct 19, 2020 at 10:45 PM Rob Clark wrote: > > From: Rob Clark > > We cannot switch to using obj->resv for locking without first moving all > the copy_from_user() ahead of submit_lock_objects(). Otherwise in the > mm fault path we aquire mm->mmap_sem before obj lock, but in the submit > p

Re: [Freedreno] [PATCH v3 06/23] drm/msm/gem: Move locking in shrinker path

2020-10-23 Thread Kristian Høgsberg
On Mon, Oct 19, 2020 at 10:45 PM Rob Clark wrote: > > From: Rob Clark > > Move grabbing the bo lock into shrinker, with a msm_gem_trylock() to > skip over bo's that are already locked. This gets rid of the nested > lock classes. > > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_gem.

Re: [Freedreno] [PATCH 00/14] drm/msm: de-struct_mutex-ification

2020-10-05 Thread Kristian Høgsberg
On Sun, Oct 4, 2020 at 9:21 PM Rob Clark wrote: > > From: Rob Clark > > This doesn't remove *all* the struct_mutex, but it covers the worst > of it, ie. shrinker/madvise/free/retire. The submit path still uses > struct_mutex, but it still needs *something* serialize a portion of > the submit pat

Re: [Freedreno] [PATCH 13/14] drm/msm: Drop struct_mutex in shrinker path

2020-10-05 Thread Kristian Høgsberg
On Mon, Oct 5, 2020 at 4:02 PM Daniel Vetter wrote: > > On Mon, Oct 05, 2020 at 05:24:19PM +0800, Hillf Danton wrote: > > > > On Sun, 4 Oct 2020 12:21:45 > > > From: Rob Clark > > > > > > Now that the inactive_list is protected by mm_lock, and everything > > > else on per-obj basis is protected

Re: [Freedreno] [PATCH 2/3] drm/msm: Convert shrinker msgs to tracepoints

2020-09-03 Thread Kristian Høgsberg
On Tue, Sep 1, 2020 at 8:41 AM Rob Clark wrote: > > From: Rob Clark > > This reduces the spam in dmesg when we start hitting the shrinker, and > replaces it with something we can put on a timeline while profiling or > debugging system issues. That is a good solution, Reviewed-by: Kristian H. Kr

Re: [Freedreno] [PATCH] drm/msm: Add syncobj support.

2020-01-14 Thread Kristian Høgsberg
On Tue, Jan 14, 2020 at 8:41 AM Rob Clark wrote: > > On Tue, Jan 14, 2020 at 7:58 AM Jordan Crouse wrote: > > > > On Tue, Jan 14, 2020 at 01:40:11AM +0100, Bas Nieuwenhuizen wrote: > > > On Tue, Jan 14, 2020 at 12:41 AM Jordan Crouse > > > wrote: > > > > > > > > On Mon, Jan 13, 2020 at 09:25:57

Re: [Freedreno] [PATCH 2/2] drm/msm: Add MSM_WAIT_IOVA ioctl

2020-01-13 Thread Kristian Høgsberg
On Mon, Jan 13, 2020 at 3:17 PM Rob Clark wrote: > > On Mon, Jan 13, 2020 at 2:55 PM Brian Ho wrote: > > > > On Mon, Jan 13, 2020 at 09:57:43AM -0800, Kristian Kristensen wrote: > > > On Mon, Jan 13, 2020 at 8:25 AM Rob Clark wrote: > > > > > > > On Mon, Jan 13, 2020 at 7:37 AM Brian Ho wrote:

Re: [Freedreno] [PATCH 2/3] drm/msm/dpu: Avoid a null de-ref while recovering from kms init fail

2019-05-09 Thread Kristian Høgsberg
On Tue, May 7, 2019 at 12:18 PM Jordan Crouse wrote: > > In the failure path for dpu_kms_init() it is possible to get to the MMU > destroy function with uninitialized MMU structs. Check for NULl and skip s/NULl/NULL > if needed. > > Signed-off-by: Jordan Crouse Reviewed-by: Kristian H. Kristen

Re: [Freedreno] [PATCH v1 2/3] drm/msm: Print all 64 bits of the faulting IOMMU address

2019-05-09 Thread Kristian Høgsberg
On Tue, May 7, 2019 at 11:02 AM Jordan Crouse wrote: > > When we move to 64 bit addressing for a5xx and a6xx targets we will start > seeing pagefaults at larger addresses so format them appropriately in the > log message for easier debugging. Yes please, this has confused me more than once. Revi

Re: [Freedreno] [PATCH] drm/msm: fix handling of cmdstream offset

2018-10-16 Thread Kristian Høgsberg
On Mon, Oct 15, 2018 at 10:33 AM Rob Clark wrote: > > Userspace hasn't used submit cmds with submit_offset != 0 for a while, > but this starts cropping up again with cmdstream sub-buffer-allocation > in libdrm_freedreno. > > Doesn't do much good to increment the buf ptr before assigning it. Revie

Re: [Freedreno] [PATCH] drm/msm/adreno/a6xx: Set the GPU frequency after turning on the GMU

2018-08-03 Thread Kristian Høgsberg
On Fri, Aug 3, 2018 at 8:43 PM Rob Clark wrote: > > On Fri, Aug 3, 2018 at 5:06 PM Jordan Crouse wrote: > > > > Set the correct initial GPU frequency on the GMU just after turning on > > or resetting the GMU so it doesn't keep running at a horribly slow > > speed. > > > > Signed-off-by: Jordan Cr

Re: [Freedreno] [PATCH 1/5] drm/msm: Remove pm_runtime operations from msm_iommu

2018-06-12 Thread Kristian Høgsberg
On Mon, Jun 11, 2018 at 11:26 AM Jordan Crouse wrote: > > Now that the IOMMU is the master of it's own power we don't need to bring > up the GPU to do IOMMU operations. This is good because bringing up a6xx > requires the GMU so calling pm_runtime_get_sync() too early in the process > gets us into