drm/msm: Add a parameter query for the number of ringbuffers
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 <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
f97decac5f
commit
a6e29a0eea
@ -57,6 +57,9 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
case MSM_PARAM_NR_RINGS:
|
||||||
|
*value = gpu->nr_rings;
|
||||||
|
return 0;
|
||||||
default:
|
default:
|
||||||
DBG("%s: invalid param: %u", gpu->name, param);
|
DBG("%s: invalid param: %u", gpu->name, param);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -73,6 +73,7 @@ struct drm_msm_timespec {
|
|||||||
#define MSM_PARAM_MAX_FREQ 0x04
|
#define MSM_PARAM_MAX_FREQ 0x04
|
||||||
#define MSM_PARAM_TIMESTAMP 0x05
|
#define MSM_PARAM_TIMESTAMP 0x05
|
||||||
#define MSM_PARAM_GMEM_BASE 0x06
|
#define MSM_PARAM_GMEM_BASE 0x06
|
||||||
|
#define MSM_PARAM_NR_RINGS 0x07
|
||||||
|
|
||||||
struct drm_msm_param {
|
struct drm_msm_param {
|
||||||
__u32 pipe; /* in, MSM_PIPE_x */
|
__u32 pipe; /* in, MSM_PIPE_x */
|
||||||
|
Loading…
Reference in New Issue
Block a user