aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/drm/msm_pipe.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-04-30 10:03:54 -0700
committerRob Clark <[email protected]>2019-05-02 11:19:22 -0700
commit0704ddb2e5845ed296586a19c3eccd83cac74182 (patch)
tree910b451052caabf85d03b1762aff292c4100a518 /src/freedreno/drm/msm_pipe.c
parenta99c360a463019a4aca9b551bd79c9c84f297468 (diff)
freedreno/drm: expose GMEM_BASE address
Needed for sampling from tile buffer (GMEM). Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/freedreno/drm/msm_pipe.c')
-rw-r--r--src/freedreno/drm/msm_pipe.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/freedreno/drm/msm_pipe.c b/src/freedreno/drm/msm_pipe.c
index e42d3b9af65..718becbf782 100644
--- a/src/freedreno/drm/msm_pipe.c
+++ b/src/freedreno/drm/msm_pipe.c
@@ -80,6 +80,9 @@ static int msm_pipe_get_param(struct fd_pipe *pipe,
case FD_GMEM_SIZE:
*value = msm_pipe->gmem;
return 0;
+ case FD_GMEM_BASE:
+ *value = msm_pipe->gmem_base;
+ return 0;
case FD_CHIP_ID:
*value = msm_pipe->chip_id;
return 0;
@@ -227,6 +230,9 @@ struct fd_pipe * msm_pipe_new(struct fd_device *dev,
msm_pipe->gmem = get_param(pipe, MSM_PARAM_GMEM_SIZE);
msm_pipe->chip_id = get_param(pipe, MSM_PARAM_CHIP_ID);
+ if (fd_device_version(pipe->dev) >= FD_VERSION_GMEM_BASE)
+ msm_pipe->gmem_base = get_param(pipe, MSM_PARAM_GMEM_BASE);
+
if (! msm_pipe->gpu_id)
goto fail;