From: Jordan Crouse <jcrouse@codeaurora.org>
To: freedreno@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org
Subject: [PATCH 4/9] drm/msm: Add a parameter query for the number of ringbuffers
Date: Fri, 20 Oct 2017 11:06:58 -0600 [thread overview]
Message-ID: <1508519223-10631-5-git-send-email-jcrouse@codeaurora.org> (raw)
In-Reply-To: <1508519223-10631-1-git-send-email-jcrouse@codeaurora.org>
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>
---
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +++
include/uapi/drm/msm_drm.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index fad946946..cf91840 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -57,6 +57,9 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
return ret;
}
return -EINVAL;
+ case MSM_PARAM_NR_RINGS:
+ *value = gpu->nr_rings;
+ return 0;
default:
DBG("%s: invalid param: %u", gpu->name, param);
return -EINVAL;
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 42fa781..6363d94 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -73,6 +73,7 @@ struct drm_msm_timespec {
#define MSM_PARAM_MAX_FREQ 0x04
#define MSM_PARAM_TIMESTAMP 0x05
#define MSM_PARAM_GMEM_BASE 0x06
+#define MSM_PARAM_NR_RINGS 0x07
struct drm_msm_param {
__u32 pipe; /* in, MSM_PIPE_x */
--
1.9.1
next prev parent reply other threads:[~2017-10-20 17:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 17:06 [PATCH v2 0/9] drm/msm for 4.15 (resend) Jordan Crouse
2017-10-20 17:06 ` [PATCH 1/9] drm/msm: Add per-instance submit queues Jordan Crouse
2017-10-20 17:06 ` [PATCH 2/9] drm/msm: Move memptrs to msm_gpu Jordan Crouse
[not found] ` <1508519223-10631-1-git-send-email-jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-10-20 17:06 ` [PATCH 3/9] drm/msm: Support multiple ringbuffers Jordan Crouse
2017-10-20 17:06 ` [PATCH 5/9] drm/msm: Shadow current pointer in the ring until command is complete Jordan Crouse
2017-10-20 17:07 ` [PATCH 8/9] drm/msm: Removed unused struct_mutex_task Jordan Crouse
2017-10-20 17:07 ` [PATCH 9/9] drm/msm: dump a rd GPUADDR header for all buffers in the command Jordan Crouse
2017-10-20 17:06 ` Jordan Crouse [this message]
2017-10-20 17:07 ` [PATCH 6/9] drm/msm: Make the value of RB_CNTL (almost) generic Jordan Crouse
2017-10-20 17:07 ` [PATCH 7/9] drm/msm: Implement preemption for A5XX targets Jordan Crouse
-- strict thread matches above, loose matches on Subject: below --
2017-10-11 15:14 [PATCH v2 0/9] drm/msm for 4.15 Jordan Crouse
2017-10-11 15:14 ` [PATCH 4/9] drm/msm: Add a parameter query for the number of ringbuffers Jordan Crouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508519223-10631-5-git-send-email-jcrouse@codeaurora.org \
--to=jcrouse@codeaurora.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).