Re: [Freedreno] [PATCH] drm/msm: gpu: Enable zap shader for A5XX

2017-05-08 Thread kbuild test robot
Hi Jordan, [auto build test ERROR on robclark/msm-next] [also build test ERROR on v4.11 next-20170509] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jordan-Crouse/drm-msm-gpu-Enable-zap-shader-

Re: [Freedreno] [PATCH 01/13] drm/msm: Take the mutex before calling msm_gem_new_impl

2017-05-08 Thread Rob Clark
On Mon, May 8, 2017 at 4:34 PM, Jordan Crouse wrote: > Amongst its other duties, msm_gem_new_impl adds the newly created > GEM object to the shared inactive list which may also be actively > modifiying the list during submission. All the paths to modify > the list are protected by the mutex excep

[Freedreno] [PATCH 10/13] drm/msm: Support multiple ringbuffers

2017-05-08 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 12/13] drm/msm: Make the value of RB_CNTL (almost) generic

2017-05-08 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 caculate it once and use it everywhere. The only monkey wrench is that we need to disable the RPTR shadow for A430 targets

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

2017-05-08 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 11/13] drm/msm: Shadow current pointer in the ring until command is complete

2017-05-08 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 02/13] drm/msm: Fix the check for the command size

2017-05-08 Thread Jordan Crouse
The overrun check for the size of submitted commands is off by one. It should allow the offset plus the size to be equal to the size of the memory object when the command stream is very tightly constructed. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gem_submit.c | 5 +++-- 1 file c

[Freedreno] [PATCH 03/13] drm/msm: Remove DRM_MSM_NUM_IOCTLS

2017-05-08 Thread Jordan Crouse
The ioctl array is sparsely populated but the compiler will make sure that it is sufficiently sized for all the values that we have so we can safely use ARRAY_SIZE() instead of having a constantly changing #define in the uapi header. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c

[Freedreno] [PATCH 09/13] drm/msm: Add drawqueues

2017-05-08 Thread Jordan Crouse
Currently the priority and other 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 appl

[Freedreno] [PATCH 08/13] drm/msm: Remove memptrs->wptr

2017-05-08 Thread Jordan Crouse
memptrs->wptr seems to be unused. Remove it to avoid confusing the upcoming preemption code. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 --- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a

[Freedreno] [PATCH 04/13] drm/msm: Remove idle function hook

2017-05-08 Thread Jordan Crouse
There isn't any generic code that uses ->idle so remove it. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 4 ++-- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 4 ++-- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 9 - drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 1 + d

[Freedreno] [PATCH 00/13] Adreno code for 4.13

2017-05-08 Thread Jordan Crouse
Hey Rob, here is a newly refreshed chunk of my active stack starting with some bug fixes and cleanups and culminating in A5XX preemption. Not everything here is 100% production ready - I would definately like a comment on the drawqueue idea (like for example, is drawqueue a stupid name?). There are

[Freedreno] [PATCH 05/13] drm/msm: Add hint to DRM_IOCTL_MSM_GEM_INFO to return an object IOVA

2017-05-08 Thread Jordan Crouse
Modify the 'pad' member of struct drm_msm_gem_info to 'hint'. If the user sets 'hint' to non-zero it means that they want a IOVA for the GEM object instead of a mmap() offset. Return the iova in the 'offset' member. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 23

[Freedreno] [PATCH 07/13] drm/msm: Add a struct to pass configuration to msm_gpu_init()

2017-05-08 Thread Jordan Crouse
The amount of information that we need to pass into msm_gpu_init() is steadily increasing, so add a new struct to stabilize the function call and make it easier to add new configuration down the line. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++-- dri

[Freedreno] [PATCH 06/13] drm/msm: get an iova from the address space instead of an id

2017-05-08 Thread Jordan Crouse
In the future we won't have a fixed set of addresses spaces. Instead of going through the effort of assigning a ID for each address space just use the address space itself as a token for getting / putting an iova. This forces a few changes in the gem object however: instead of using a simple index

[Freedreno] [PATCH 01/13] drm/msm: Take the mutex before calling msm_gem_new_impl

2017-05-08 Thread Jordan Crouse
Amongst its other duties, msm_gem_new_impl adds the newly created GEM object to the shared inactive list which may also be actively modifiying the list during submission. All the paths to modify the list are protected by the mutex except for the one through msm_gem_import which can end up causing

[Freedreno] [PATCH] drm/msm: gpu: Enable zap shader for A5XX

2017-05-08 Thread Jordan Crouse
The A5XX GPU powers on in "secure" mode. In secure mode the GPU can only render to buffers that are marked as secure and inaccessible to the kernel and user through a series of hardware protections. In practice secure mode is used to draw things like a UI on a secure video frame. In order to switc