Re: [Freedreno] [PATCH] drm/msm: use proper memory barriers for updating tail/head

2017-10-03 Thread Daniel Vetter
On Mon, Oct 02, 2017 at 10:37:11AM -0400, Rob Clark wrote: > Fixes intermittent corruption of cmdstream dump. > > Signed-off-by: Rob Clark Rule of memory barriers: They always need to come in pairs, and you should put a comment to each one explaining where the other side is. I.e. for all the sto

Re: [Freedreno] [PATCH] drm/msm: use proper memory barriers for updating tail/head

2017-10-03 Thread Rob Clark
On Tue, Oct 3, 2017 at 4:08 AM, Daniel Vetter wrote: > On Mon, Oct 02, 2017 at 10:37:11AM -0400, Rob Clark wrote: >> Fixes intermittent corruption of cmdstream dump. >> >> Signed-off-by: Rob Clark > > Rule of memory barriers: They always need to come in pairs, and you should > put a comment to ea

[Freedreno] [PATCH 5/6] drm/msm: Change MSM_DRM_SUBMITQUEUE_CLOSE

2017-10-03 Thread Jordan Crouse
Instead of passing a mostly unused struct to MSM_DRM_SUBMITQEUUE_CLOSE we only need to pass the u32 value of the queue ID. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 4 ++-- drivers/gpu/drm/msm/msm_gpu.h | 1 - include/uapi/drm/msm_drm.h| 2 +- 3 files changed, 3 insert

[Freedreno] [PATCH 1/6] drm/msm: Fix race condition in the submit path

2017-10-03 Thread Jordan Crouse
From: Sharat Masetty There is a race condition issue between the IRQ context trying to trigger preemption and the user context trying to submit commands to the GPU. The check in a5xx_flush() API only updates the wptr if the GPU is not in preemption. In the cases where we move from PREEMPT_START t

[Freedreno] [PATCH 2/6] drm/msm: dump a rd GPUADDR header for all buffers in the command

2017-10-03 Thread Jordan Crouse
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 submissio

[Freedreno] [PATCH 0/6] drm/msm: Fixes and updates for 4.15

2017-10-03 Thread Jordan Crouse
A handful of minor updates and bugfixes. Includes an UAPI change to MSM_DRM_SUBMITQUEUE_CLOSE API as suggested by Rob, a tweak to rd to dump all iova addresses from a submission and a few performance tweaks for user submissions that don't use relocs. Jordan Crouse (3): drm/msm: dump a rd GPUADDR

[Freedreno] [PATCH 3/6] drm/msm: Map command buffers to kernel only if required

2017-10-03 Thread Jordan Crouse
From: Sushmita Susheelendra Map command buffers to the kernel address space only if relocs are specified for the submission. This reduces some overhead on the submission path. Signed-off-by: Sushmita Susheelendra Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gem_submit.c | 3 +++ 1

[Freedreno] [PATCH 6/6] drm/msm: Do priority checking during submitqueue create

2017-10-03 Thread Jordan Crouse
Now that the priority must be set in the submitqueue we can check at create time that the requested priority is valid. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gem_submit.c | 8 +--- drivers/gpu/drm/msm/msm_submitqueue.c | 25 +++-- 2 files changed, 24 i

[Freedreno] [PATCH 4/6] drm/msm: Map buffers on demand on the submit path

2017-10-03 Thread Jordan Crouse
From: Sushmita Susheelendra Map and pin buffers on demand on the submission path. This ensures that we only map buffers whose iova are actually needed for submission as opposed to all buffers in the buffer list. For instance, the command buffers, and the reloc buffers for processing relocs. Also

Re: [Freedreno] [PATCH] drm/msm: use proper memory barriers for updating tail/head

2017-10-03 Thread Daniel Vetter
On Tue, Oct 3, 2017 at 2:59 PM, Rob Clark wrote: > On Tue, Oct 3, 2017 at 4:08 AM, Daniel Vetter wrote: >> On Mon, Oct 02, 2017 at 10:37:11AM -0400, Rob Clark wrote: >>> Fixes intermittent corruption of cmdstream dump. >>> >>> Signed-off-by: Rob Clark >> >> Rule of memory barriers: They always n