summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_rd.c
Commit message (Collapse)AuthorAgeFilesLines
* Backmerge tag 'v4.14-rc7' into drm-nextDave Airlie2017-11-021-2/+10
|\ | | | | | | | | | | | | | | Linux 4.14-rc7 Requested by Ben Skeggs for nouveau to avoid major conflicts, and things were getting a bit conflicty already, esp around amdgpu reverts.
| * drm/msm: use proper memory barriers for updating tail/headRob Clark2017-10-121-2/+10
| | | | | | | | | | | | Fixes intermittent corruption of cmdstream dump. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm/rd: allow adding addition msg to top of dumpRob Clark2017-10-281-2/+13
| | | | | | | | | | | | | | For faults or hangs, it is nice to be able to include a bit more information. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm: split rd debugfs fileRob Clark2017-10-281-26/+75
| | | | | | | | | | | | | | | | | | Split into two instances, the existing $debugfs/rd which continues to dump all submits, and $debugfs/hangrd which will be used to dump just submits that cause gpu hangs (and eventually faults, but that will require some iommu framework enhancements). Signed-off-by: Rob Clark <robdclark@gmail.com>
* | drm/msm: add special _get_vaddr_active() for cmdstream dumpsRob Clark2017-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | drm/msm: dump a rd GPUADDR header for all buffers in the commandJordan Crouse2017-10-281-15/+15
|/ | | | | | | | | | | | | | Currently the rd dump avoids any buffers marked as WRITE under the assumption that the contents are not interesting. While it is true that the contents are uninteresting we should still print the iova and size for all buffers so that any listening replay tools can correctly construct the submission. Print the header for all buffers but only dump the contents for buffers marked as READ. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: Separate locking of buffer resources from struct_mutexSushmita Susheelendra2017-06-171-2/+2
| | | | | | | | | | | | | | Buffer object specific resources like pages, domains, sg list need not be protected with struct_mutex. They can be protected with a buffer object level lock. This simplifies locking and makes it easier to avoid potential recursive locking scenarios for SVM involving mmap_sem and struct_mutex. This also removes unnecessary serialization when creating buffer objects, and also between buffer object creation and GPU command submission. Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org> [robclark: squash in handling new locking for shrinker] Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: Support 64 bit iova in RD_CMDSTREAM_ADDRJordan Crouse2017-04-081-2/+2
| | | | | | | | | Output the upper 32 bits of a 64 bit iova in the RD_CMDSTREAM_ADDR section while maintaining backwards compatibility for tools that only understand 32 bit iovas. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: Remove msm_debugfs_cleanup()Noralf Trønnes2017-03-081-3/+2
| | | | | | | | | | | | Move the contents of msm_debugfs_cleanup() to msm_drm_uninit() to free up the drm_driver->debugfs_cleanup callback. Also remove the mdp_kms_funcs->debugfs_cleanup callback which has no users. Cc: robdclark@gmail.com Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170307204924.1002-2-noralf@tronnes.org
* drm/msm: Remove drm_debugfs_remove_files() callsNoralf Trønnes2017-03-011-28/+3
| | | | | | | | | | | | | drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so it's not necessary to call drm_debugfs_remove_files(). Additionally it uses debugfs_remove_recursive() to clean up the debugfs files, so no need to do that. Cc: robdclark@gmail.com Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-10-noralf@tronnes.org
* drm/msm/rd: support for 64b iovaRob Clark2016-11-281-2/+2
| | | | | | | For backwards compat, the rd format puts the high 32b after the size field in the GPUADDR packet. Signed-off-by: Rob Clark <robdclark@gmail.com>
* gpu: use %pdAl Viro2016-08-071-2/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* drm/msm: return -EFAULT instead of bytes remainingDan Carpenter2016-07-161-2/+3
| | | | | | | | copy_to/from_user returns the number of bytes remaining to be copied but we want to return -EFAULT. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/rd: add module param to dump all bo'sRob Clark2016-07-161-7/+31
| | | | | | | | | By default, if using $debugfs/.../rd to log cmdstream, only the cmdstream buffers themselves are logged. But in some cases we want to capture other buffers in the submit (to see VBO's or shaders). So add a mod-param knob to control this. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/rd: split out snapshot_buf helperRob Clark2016-07-161-14/+22
| | | | | | (reduce the noise in next patch) Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: change gem->vmap() to get/putRob Clark2016-07-161-1/+3
| | | | | | | | Before we can add vmap shrinking, we really need to know which vmap'ings are currently being used. So switch to get/put interface. Stubbed put fxns for now. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: deal with exhausted vmap space betterRob Clark2016-06-041-0/+3
| | | | | | | | Some, but not all, callers of obj->vmap() would check if return IS_ERR(). So let's actually return an error if vmap() fails. And fixup the call-sites that were not handling this properly. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: 'struct fence' conversionRob Clark2016-05-081-1/+1
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: add rd logging debugfsRob Clark2014-06-021-0/+337
To ease debugging, add debugfs file which can be cat/tail'd to log submits, along with fence #. If GPU hangs, you can look at 'gpu' debugfs file to find last completed fence and current register state, and compare with logged rd file to narrow down the DRAW_INDX which triggered the GPU hang. Signed-off-by: Rob Clark <robdclark@gmail.com>
OpenPOWER on IntegriCloud