summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_submitqueue.c (follow)
Commit message (Collapse)AuthorAge
* drm/msm: Change the priority order of the ringbuffersJordan Crouse2017-07-03
| | | | | | | | | | | | | | | | | | | | | | | | When we first did preemption the priority was set at submission time. In order to be properly backwards compatible we made ring id 0 the lowest priority ring so that when a legacy app made a submission it didn't get itself onto the highest priority ring by accident. Now that we set the priority with submitqueues this is no longer a concern and ordering priorities this way goes against long standing convention in similar GPU drivers. Declare a flag day and invert the priority algorithm so that priority '0' is the highest priority and it descends from there. The lowest prority ring is 'number of rings - 1' where the number of active rings can be acquired through a parameter query of MSM_PARAM_NR_RINGS. This change also ensures that the legacy submitqueue id '0' will use the next-to-lowest ring buffer by default for legacy submissions. Change-Id: Ic0dedbadeea522e4f07babc4395cbf5fb7143fe3 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
* drm/msm: Add submit queue queriesJordan Crouse2017-06-19
| | | | | | | | | | | Add the capability to query information from a submit queue. The first available parameter is to query the number of GPU faults that have been caused by the queue. The driver can periodically query this value to see if it has caused a fault and take action accordingly. Change-Id: Ic0dedbadc68d5782c0b8b71d89722742aa6aaf1a Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
* drm/msm: Add per-instance submit queuesJordan Crouse2017-06-12
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 applications become more complex we will want to set context specific flags and do various permisson checks to allow certain contexts to enable additional privileges. Add kernel-side submit queues to be analogous to 'contexts' or 'rendering queues' on the application side. Each file descriptor instance will maintain its own list of queues. Queues cannot be shared between file descriptors. For backwards compatibility context id '0' is defined as a default context specifying middle priority and no special flags. This is intended to be the usual configuration for 99% of applications so that a garden variety application can function correctly without creating a queue. Only those applications requiring the specific benefit of different queues need create one. In addition to the basic infrastructure, allow the user to specify the queue priority - this will be used in lieu of the legacy flags to set priority during the submission. Only the master DRM instance can set the highest priority, but all the others are open to all processes. Change-Id: Ic0dedbad02fa27c0ba20c1157a05ddb143e46357 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>