Re: [Freedreno] [PATCH 07/11] drm/msm/a6xx: Add a6xx gpu state

2018-10-31 Thread Sharat Masetty
On 10/17/2018 9:58 PM, Jordan Crouse wrote: Add support for gathering and dumping the a6xx GPU state including registers, GMU registers, indexed registers, shader blocks, context clusters and debugbus. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/Makefile|1 + d

Re: [Freedreno] [Mesa-dev] [RFC] freedreno: import libdrm_freedreno + redesign submit

2018-10-31 Thread Emil Velikov
On Tue, 30 Oct 2018 at 18:15, Rob Clark wrote: > > On Tue, Oct 30, 2018 at 1:34 PM Emil Velikov wrote: > > > > On Tue, 30 Oct 2018 at 17:19, Rob Clark wrote: > > > On Tue, Oct 30, 2018 at 11:27 AM Emil Velikov > > > wrote: > > > > > > > > NOTE: if bisecting a build error takes you hear, try a

[Freedreno] [PATCH 0/6] RFC: drm/msm: separate iova allocation and mapping

2018-10-31 Thread Jordan Crouse
Currently in the msm driver iova addresses are mapped in the IOMMU at allocation time and stay there for the life of the buffer. This may not be desirable for long lived user space buffers that could be temporarily swapped or moved. This first set of patches breaks up the allocation and mapping in

[Freedreno] [PATCH 1/6] drm/msm: Add a common function to free kernel buffer objects

2018-10-31 Thread Jordan Crouse
Buffer objects allocated with msm_gem_kernel_new() are mostly freed the same way so we can save a few lines of code with a common function. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 13 ++--- drivers/gpu/drm/msm/adreno/a5xx_power.c | 13 +

[Freedreno] [PATCH 2/6] drm/msm: Remove sgt from the mmu unmap function

2018-10-31 Thread Jordan Crouse
The scatter gather table doesn't need to be passed in for the MMU unmap function. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.h | 2 +- drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/msm/msm_gem_vma.c | 4 ++-- drivers/gpu/drm/msm/msm_iommu.c | 3 +-- drivers/gp

[Freedreno] [PATCH 4/6] drm/msm: Clean up and enhance the output of the 'gem' debugfs node

2018-10-31 Thread Jordan Crouse
Add headers for the 'gem' debugfs file to make it easier to remember what all the values mean and move the list of virtual address regions to the next line and add the name and map status to make it clearer what we are looking at. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gem.c |

[Freedreno] [PATCH 5/6] drm/msm: Add msm_gem_get_and_pin_iova()

2018-10-31 Thread Jordan Crouse
Add a new function to get and pin the iova memory in one step (basically renaming the old msm_gem_get_iova function) and switch msm_gem_get_iova() to only allocate an iova but not map it in the IOMMU. This is only currently used by msm_ioctl_gem_info() since all other users of of the iova expect th

[Freedreno] [PATCH 3/6] drm/msm: Split msm_gem_get_iova into two steps

2018-10-31 Thread Jordan Crouse
Split the operation of msm_gem_get_iova into two operations: 1) allocate an iova and 2) map (pin) the backing memory int the iommu. This is the first step toward allowing memory pinning to occur independently of the iova management. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.h

[Freedreno] [PATCH 6/6] drm/msm: Count how many times iova memory is pinned

2018-10-31 Thread Jordan Crouse
Add a reference count to track how many times a particular chunk of iova memory is pinned (mapped) in the iomu and add msm_gem_unpin_iova to give up references. It is important to note that msm_gem_unpin_iova replaces msm_gem_put_iova because the new implicit behavior that an assigned iova in a gi

[Freedreno] [PATCH 2/2] drm/msm: subclass work object for vblank events

2018-10-31 Thread Jeykumar Sankaran
msm maintains a separate structure to define vblank work definitions and a list to track events submitted to the display worker thread. We can avoid these redundant list and its protection mechanism, if we subclass the work object to encapsulate vblank event parameters. Signed-off-by: Jeykumar San

[Freedreno] [PATCH 1/2] drm/msm: use common display thread for dispatching vblank events

2018-10-31 Thread Jeykumar Sankaran
DPU was using one thread per display to dispatch async commits and vblank requests. Since clean up already happened in msm to use the common thread for all the display commits, display threads are only used to cater vblank requests. Single thread is sufficient to do the job without any performance