Revision tags: v4.19.19, v4.19.18, v4.19.17, v4.19.16, v4.19.15 |
|
#
388a515f |
| 09-Jan-2019 |
Rob Clark <robdclark@gmail.com> |
drm/msm: honor GPU_READONLY flag
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
#
bbc2cd07 |
| 09-Jan-2019 |
Rob Clark <robdclark@gmail.com> |
drm/msm: honor GPU_READONLY flag
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
#
a3115621 |
| 09-Jan-2019 |
Dave Airlie <airlied@redhat.com> |
drm/msm: fix build warning for 64-bit seqno
Fixes: b312d8ca3a7c ("dma-buf: make fence sequence numbers 64 bit v2") Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redha
drm/msm: fix build warning for 64-bit seqno
Fixes: b312d8ca3a7c ("dma-buf: make fence sequence numbers 64 bit v2") Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
show more ...
|
Revision tags: v4.19.14, v4.19.13, v4.19.12, v4.19.11, v4.19.10, v4.19.9, v4.19.8, v4.19.7, v4.19.6, v4.19.5, v4.19.4, v4.18.20, v4.19.3 |
|
#
c2052a4e |
| 14-Nov-2018 |
Jonathan Marek <jonathan@marek.ca> |
drm/msm: implement a2xx mmu
A2XX has its own very simple MMU.
Added a msm_use_mmu() function because we can't rely on iommu_present to decide to use MMU or not.
Signed-off-by: Jonathan Marek <jona
drm/msm: implement a2xx mmu
A2XX has its own very simple MMU.
Added a msm_use_mmu() function because we can't rely on iommu_present to decide to use MMU or not.
Signed-off-by: Jonathan Marek <jonathan@marek.ca> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
86f46f25 |
| 21-Nov-2018 |
Jonathan Marek <jonathan@marek.ca> |
drm/msm: use contiguous vram for MSM_BO_SCANOUT when possible
Makes it possible to have MMU for GPU but not display.
Signed-off-by: Jonathan Marek <jonathan@marek.ca> Signed-off-by: Rob Clark <robd
drm/msm: use contiguous vram for MSM_BO_SCANOUT when possible
Makes it possible to have MMU for GPU but not display.
Signed-off-by: Jonathan Marek <jonathan@marek.ca> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
Revision tags: v4.18.19, v4.19.2, v4.18.18 |
|
#
0815d774 |
| 07-Nov-2018 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Add a name field for gem objects
For debugging purposes it is useful to assign descriptions to buffers so that we know what they are used for. Add a field to the buffer object and use that
drm/msm: Add a name field for gem objects
For debugging purposes it is useful to assign descriptions to buffers so that we know what they are used for. Add a field to the buffer object and use that to name the various kernel side allocations which ends up looking like like this in /d/dri/X/gem:
flags id ref offset kaddr size madv name 00040000: I 0 ( 1) 00000000 0000000070b79eca 00004096 memptrs vmas: [gpu: 01000000,mapped,inuse=1] 00020000: I 0 ( 1) 00000000 0000000031ed4074 00032768 ring0
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
7ad0e8cf |
| 07-Nov-2018 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Count how many times iova memory is pinned
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
drm/msm: Count how many times iova memory is pinned
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 given vma is now valid for the life of the buffer and what we are really focusing on is the use of that iova.
For now the unmappings are lazy; once the reference counts go to zero they *COULD* be unmapped dynamically but that will require an outside force such as a shrinker or mm_notifiers. For now, we're just focusing on getting the counting right and setting ourselves up to be ready for the future.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
9fe041f6 |
| 07-Nov-2018 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Add msm_gem_get_and_pin_iova()
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 all
drm/msm: Add msm_gem_get_and_pin_iova()
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 that the memory be immediately available.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
575f0485 |
| 07-Nov-2018 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Clean up and enhance the output of the 'gem' debugfs node
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
drm/msm: Clean up and enhance the output of the 'gem' debugfs node
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 <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
c0ee9794 |
| 07-Nov-2018 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Split msm_gem_get_iova into two steps
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 s
drm/msm: Split msm_gem_get_iova into two steps
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 <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
70dc51b4 |
| 07-Nov-2018 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Remove sgt from the mmu unmap function
The scatter gather table doesn't need to be passed in for the MMU unmap function.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by
drm/msm: Remove sgt from the mmu unmap function
The scatter gather table doesn't need to be passed in for the MMU unmap function.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
1e29dff0 |
| 07-Nov-2018 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Add a common function to free kernel buffer objects
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 functio
drm/msm: Add a common function to free kernel buffer objects
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 <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
Revision tags: v4.18.17, v4.19.1 |
|
#
93f7abf1 |
| 02-Nov-2018 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Gracefully handle failure in _msm_gem_kernel_new
If any of the function calls in _msm_gem_kernel_new fail we need to make sure to dereference the GEM object with the appropriate function fo
drm/msm: Gracefully handle failure in _msm_gem_kernel_new
If any of the function calls in _msm_gem_kernel_new fail we need to make sure to dereference the GEM object with the appropriate function for the current locking state.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
Revision tags: v4.19 |
|
#
6a41da17 |
| 20-Oct-2018 |
Mamta Shukla <mamtashukla555@gmail.com> |
drm: msm: Use DRM_DEV_* instead of dev_*
Use DRM_DEV_INFO/ERROR/WARN instead of dev_info/err/debug to generate drm-formatted specific log messages so that it will be easy to differentiate in case of
drm: msm: Use DRM_DEV_* instead of dev_*
Use DRM_DEV_INFO/ERROR/WARN instead of dev_info/err/debug to generate drm-formatted specific log messages so that it will be easy to differentiate in case of multiple instances of driver.
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
Revision tags: v4.18.16, v4.18.15, v4.18.14, v4.18.13, v4.18.12, v4.18.11, v4.18.10, v4.18.9, v4.18.7, v4.18.6, v4.18.5, v4.17.18, v4.18.4, v4.18.3, v4.17.17, v4.18.2, v4.17.16, v4.17.15, v4.18.1, v4.18, v4.17.14, v4.17.13, v4.17.12, v4.17.11, v4.17.10, v4.17.9, v4.17.8, v4.17.7, v4.17.6, v4.17.5, v4.17.4, v4.17.3, v4.17.2, v4.17.1, v4.17 |
|
#
a5f74ec7 |
| 21-May-2018 |
Souptick Joarder <jrdr.linux@gmail.com> |
gpu: drm: msm: Change return type to vm_fault_t
Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. O
gpu: drm: msm: Change return type to vm_fault_t
Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type.
Ref- commit 1c8f422059ae ("mm: change return type to vm_fault_t")
Previously vm_insert_mixed() returns err which driver mapped into VM_FAULT_* type. The new function vmf_insert_mixed() will replace this inefficiency by returning VM_FAULT_* type.
vmf_error() is the newly introduce inline function in 4.17-rc6.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
03c94d60 |
| 03-Apr-2018 |
Ben Hutchings <ben.hutchings@codethink.co.uk> |
drm/msm: Fix possible null dereference on failure of get_pages()
Commit 62e3a3e342af changed get_pages() to initialise msm_gem_object::pages before trying to initialise msm_gem_object::sgt, so that
drm/msm: Fix possible null dereference on failure of get_pages()
Commit 62e3a3e342af changed get_pages() to initialise msm_gem_object::pages before trying to initialise msm_gem_object::sgt, so that put_pages() would properly clean up pages in the failure case.
However, this means that put_pages() now needs to check that msm_gem_object::sgt is not null before trying to clean it up, and this check was only applied to part of the cleanup code. Move it all into the conditional block. (Strictly speaking we don't need to make the kfree() conditional, but since we can't avoid checking for null ourselves we may as well do so.)
Fixes: 62e3a3e342af ("drm/msm: fix leak in failed get_pages") Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
3976626e |
| 03-Apr-2018 |
Ben Hutchings <ben.hutchings@codethink.co.uk> |
drm/msm: Fix possible null dereference on failure of get_pages()
Commit 62e3a3e342af changed get_pages() to initialise msm_gem_object::pages before trying to initialise msm_gem_object::sgt, so that
drm/msm: Fix possible null dereference on failure of get_pages()
Commit 62e3a3e342af changed get_pages() to initialise msm_gem_object::pages before trying to initialise msm_gem_object::sgt, so that put_pages() would properly clean up pages in the failure case.
However, this means that put_pages() now needs to check that msm_gem_object::sgt is not null before trying to clean it up, and this check was only applied to part of the cleanup code. Move it all into the conditional block. (Strictly speaking we don't need to make the kfree() conditional, but since we can't avoid checking for null ourselves we may as well do so.)
Fixes: 62e3a3e342af ("drm/msm: fix leak in failed get_pages") Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
Revision tags: v4.16 |
|
#
d71b6bd8 |
| 14-Feb-2018 |
Rob Clark <robdclark@gmail.com> |
drm/msm/dsi: fix direct caller of msm_gem_free_object()
This should be using drm_gem_object_put(). Also since this is done only in driver unload path, we don't need to synchronize setting tx_gem_ob
drm/msm/dsi: fix direct caller of msm_gem_free_object()
This should be using drm_gem_object_put(). Also since this is done only in driver unload path, we don't need to synchronize setting tx_gem_obj to NULL, so juse use the _unlocked() variant.
Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
Revision tags: v4.15 |
|
#
dc9a9b32 |
| 25-Jan-2018 |
Steve Kowalik <steven@wedontsleep.org> |
drm/msm: Replace gem_object deprecated functions
drm_gem_object_{reference,unreference,unreference_unlocked} are deprecated functions, and merely alias to the get/put functions. Switch to the new na
drm/msm: Replace gem_object deprecated functions
drm_gem_object_{reference,unreference,unreference_unlocked} are deprecated functions, and merely alias to the get/put functions. Switch to the new names.
Signed-off-by: Steve Kowalik <steven@wedontsleep.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
62e3a3e3 |
| 04-Dec-2017 |
Prakash Kamliya <pkamliya@codeaurora.org> |
drm/msm: fix leak in failed get_pages
get_pages doesn't keep a reference of the pages allocated when it fails later in the code path. This can lead to a memory leak. Keep reference of the allocated
drm/msm: fix leak in failed get_pages
get_pages doesn't keep a reference of the pages allocated when it fails later in the code path. This can lead to a memory leak. Keep reference of the allocated pages so that it can be freed when msm_gem_free_object gets called later during cleanup.
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org> Signed-off-by: Sharat Masetty <smasetty@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
Revision tags: v4.13.16, v4.14, v4.13.5 |
|
#
fad33f4b |
| 15-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
drm/msm: add special _get_vaddr_active() for cmdstream dumps
Prep work for adding a debugfs file that dumps just submits which trigger hangs/faults. In this case the bo may already be in the MADV_D
drm/msm: add special _get_vaddr_active() for cmdstream dumps
Prep work for adding a debugfs file that dumps just submits which trigger hangs/faults. In this case the bo may already be in the MADV_DONTNEED state, but will be still on the active list (since the submit hasn't completed yet). So the normal check that the bo is in the WILLNEED state does not apply. (But of course the bo should definitely not be in the PURGED state!)
Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
ad5149c4 |
| 12-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
drm/msm: fix _NO_IMPLICIT fencing case
We need to call reservation_object_reserve_shared() in both cases, but this wasn't happening in the _NO_IMPLICIT submit case.
Fixes: f0a42bb ("drm/msm: submit
drm/msm: fix _NO_IMPLICIT fencing case
We need to call reservation_object_reserve_shared() in both cases, but this wasn't happening in the _NO_IMPLICIT submit case.
Fixes: f0a42bb ("drm/msm: submit support for in-fences") Reported-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
06451a3d |
| 12-Sep-2017 |
Rob Clark <robdclark@gmail.com> |
drm/msm: fix _NO_IMPLICIT fencing case
We need to call reservation_object_reserve_shared() in both cases, but this wasn't happening in the _NO_IMPLICIT submit case.
Fixes: f0a42bb ("drm/msm: submit
drm/msm: fix _NO_IMPLICIT fencing case
We need to call reservation_object_reserve_shared() in both cases, but this wasn't happening in the _NO_IMPLICIT submit case.
Fixes: f0a42bb ("drm/msm: submit support for in-fences") Reported-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
#
c9811d0f |
| 11-Oct-2017 |
Wei Yongjun <weiyongjun1@huawei.com> |
drm/msm: fix return value check in _msm_gem_kernel_new()
In case of error, the function msm_gem_get_vaddr() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should b
drm/msm: fix return value check in _msm_gem_kernel_new()
In case of error, the function msm_gem_get_vaddr() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR().
Fixes: 8223286d62e2 ("drm/msm: Add a helper function for in-kernel buffer allocations") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|
Revision tags: v4.13 |
|
#
8223286d |
| 27-Jul-2017 |
Jordan Crouse <jcrouse@codeaurora.org> |
drm/msm: Add a helper function for in-kernel buffer allocations
Nearly all of the buffer allocations for kernel allocate an buffer object, virtual address and GPU iova at the same time. Make a helpe
drm/msm: Add a helper function for in-kernel buffer allocations
Nearly all of the buffer allocations for kernel allocate an buffer object, virtual address and GPU iova at the same time. Make a helper function to handle the details.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> [dropped msm_fbdev conversion to new helper, since it interferes with display-handover work, where we want to separate allocation and mapping] Signed-off-by: Rob Clark <robdclark@gmail.com>
show more ...
|