aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2017-03-07 12:02:53 -0500
committerRob Clark <robdclark@gmail.com>2017-04-08 06:59:36 -0400
commite3689e470fa0d9ebaa9d13d069e8d73c8d82a11d (patch)
tree1324d7490b5e1346c9ad1a2d9cc8485bb2d4d81f
parentee546cd34ae846a8202b78d1834170e2b3ee063d (diff)
drm/msm: Add MSM_PARAM_GMEM_BASE
User space needs to know where the GMEM whole starts so that they can set up the addressing correctly. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r--drivers/gpu/drm/msm/adreno/adreno_gpu.c3
-rw-r--r--include/uapi/drm/msm_drm.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 9a92bcf982b8..4cac22633ce4 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -35,6 +35,9 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
35 case MSM_PARAM_GMEM_SIZE: 35 case MSM_PARAM_GMEM_SIZE:
36 *value = adreno_gpu->gmem; 36 *value = adreno_gpu->gmem;
37 return 0; 37 return 0;
38 case MSM_PARAM_GMEM_BASE:
39 *value = 0x100000;
40 return 0;
38 case MSM_PARAM_CHIP_ID: 41 case MSM_PARAM_CHIP_ID:
39 *value = adreno_gpu->rev.patchid | 42 *value = adreno_gpu->rev.patchid |
40 (adreno_gpu->rev.minor << 8) | 43 (adreno_gpu->rev.minor << 8) |
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 4d5d6a2bc59e..a4a189a240d7 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -72,6 +72,7 @@ struct drm_msm_timespec {
72#define MSM_PARAM_CHIP_ID 0x03 72#define MSM_PARAM_CHIP_ID 0x03
73#define MSM_PARAM_MAX_FREQ 0x04 73#define MSM_PARAM_MAX_FREQ 0x04
74#define MSM_PARAM_TIMESTAMP 0x05 74#define MSM_PARAM_TIMESTAMP 0x05
75#define MSM_PARAM_GMEM_BASE 0x06
75 76
76struct drm_msm_param { 77struct drm_msm_param {
77 __u32 pipe; /* in, MSM_PIPE_x */ 78 __u32 pipe; /* in, MSM_PIPE_x */