[Freedreno] [PATCH 8/9] drm/msm: Removed unused struct_mutex_task

2017-10-20 Thread Jordan Crouse
Recent changes to locking have rendered struct_mutex_task unused. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.h| 6 -- drivers/gpu/drm/msm/msm_gem_submit.c | 2 -- 2 files changed, 8 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_d

[Freedreno] [PATCH 5/9] drm/msm: Shadow current pointer in the ring until command is complete

2017-10-20 Thread Jordan Crouse
Add a shadow pointer to track the current command being written into the ring. Don't commit it as 'cur' until the command is submitted. Because 'cur' is used to construct the software copy of the wptr this ensures that somebody peeking in on the ring doesn't assume that a command is inflight while

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

2017-10-20 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 3/9] drm/msm: Support multiple ringbuffers

2017-10-20 Thread Jordan Crouse
Add the infrastructure to support the idea of multiple ringbuffers. Assign each ringbuffer an id and use that as an index for the various ring specific operations. The biggest delta is to support legacy fences. Each fence gets its own sequence number but the legacy functions expect to use a unique

[Freedreno] [PATCH 2/9] drm/msm: Move memptrs to msm_gpu

2017-10-20 Thread Jordan Crouse
When we move to multiple ringbuffers we're going to store the data in the memptrs on a per-ring basis. In order to prepare for that move the current memptrs from the adreno namespace into msm_gpu. This is way cleaner and immediately lets us kill off some sub functions so there is much less cost lat

[Freedreno] [PATCH 7/9] drm/msm: Implement preemption for A5XX targets

2017-10-20 Thread Jordan Crouse
Implement preemption for A5XX targets - this allows multiple ringbuffers for different priorities with automatic preemption of a lower priority ringbuffer if a higher one is ready. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/adreno/a5xx

[Freedreno] [PATCH v2 0/9] drm/msm for 4.15 (resend)

2017-10-20 Thread Jordan Crouse
(Resending for more visibility) Here are the refreshed submitqueue/ringbuffer/preemption changes for 4.15. These are the original changes with bug fixes, improvements and suggestions squashed in: - Moved SUBMITQUEUE_CLOSE param to a u32 instead of reusing the struct - Changed to use per-ring f

[Freedreno] [PATCH 4/9] drm/msm: Add a parameter query for the number of ringbuffers

2017-10-20 Thread Jordan Crouse
In order to manage ringbuffer priority to its fullest userspace should know how many ringbuffers it has to work with. Add a parameter to return the number of active rings. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +++ include/uapi/drm/msm_drm.h |

[Freedreno] [PATCH 6/9] drm/msm: Make the value of RB_CNTL (almost) generic

2017-10-20 Thread Jordan Crouse
We use a global ringbuffer size and block size for all targets and at least for 5XX preemption we need to know the value the RB_CNTL in several locations so it makes sense to calculate it once and use it everywhere. The only monkey wrench is that we need to disable the RPTR shadow for A430 targets

[Freedreno] [PATCH 1/9] drm/msm: Add per-instance submit queues

2017-10-20 Thread Jordan Crouse
Currently the behavior of a command stream is provided by the user application during submission and the application is expected to internally maintain the settings for each 'context' or 'rendering queue' and specify the correct ones. This works okay for simple cases but as applications become mor

Re: [Freedreno] [PATCH] drm/msm/mdp5: restore cursor state when enabling crtc

2017-10-20 Thread Archit Taneja
On 10/20/2017 01:30 AM, Rob Clark wrote: Since we enabled runtime PM, we cannot count on cursor registers to retain their values. This can result in situations where we think the cursor is enabled when we enable the CRTC but it is trying to scan out null (and the rest of cursor position/size i

Re: [Freedreno] [PATCH] drm/msm/mdp5: don't use autosuspend

2017-10-20 Thread Archit Taneja
On 10/20/2017 05:47 PM, Rob Clark wrote: It's only likely to paper over bugs. Unlike the gpu, where we want to keep things alive a bit longer in expectation of the next frame's submit, when the display is shut down we can power off immediately. Acked-by: Archit Taneja Signed-off-by: Rob

[Freedreno] [PATCH] drm/msm/mdp5: don't use autosuspend

2017-10-20 Thread Rob Clark
It's only likely to paper over bugs. Unlike the gpu, where we want to keep things alive a bit longer in expectation of the next frame's submit, when the display is shut down we can power off immediately. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 2 +- drive