summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2016-02-10 12:27:33 -0500
committerRob Clark <robclark@freedesktop.org>2016-02-12 18:32:22 -0500
commit9b77443f6344791851a6c2067e4081b7f43618ea (patch)
treecd1287fe0cbc73849bd6169cf2ae859626aa59a8
parentbc5497d061aaaf31e6b38109443c20e1ebfd21a3 (diff)
downloadlibdrm-9b77443f6344791851a6c2067e4081b7f43618ea.tar.gz
libdrm-9b77443f6344791851a6c2067e4081b7f43618ea.tar.xz
freedreno: add support for FD_MAX_FREQ
Only msm backend supports this. Sorry, if you are using kgsl, no time-elapsed query for you. Signed-off-by: Rob Clark <robclark@freedesktop.org>
-rw-r--r--freedreno/freedreno_drmif.h1
-rw-r--r--freedreno/kgsl/kgsl_pipe.c3
-rw-r--r--freedreno/msm/msm_pipe.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/freedreno/freedreno_drmif.h b/freedreno/freedreno_drmif.h
index 5547e94..950fd63 100644
--- a/freedreno/freedreno_drmif.h
+++ b/freedreno/freedreno_drmif.h
@@ -50,6 +50,7 @@ enum fd_param_id {
FD_GMEM_SIZE,
FD_GPU_ID,
FD_CHIP_ID,
+ FD_MAX_FREQ,
};
/* bo flags: */
diff --git a/freedreno/kgsl/kgsl_pipe.c b/freedreno/kgsl/kgsl_pipe.c
index 58b3b4d..5569da0 100644
--- a/freedreno/kgsl/kgsl_pipe.c
+++ b/freedreno/kgsl/kgsl_pipe.c
@@ -50,6 +50,9 @@ static int kgsl_pipe_get_param(struct fd_pipe *pipe,
case FD_CHIP_ID:
*value = kgsl_pipe->devinfo.chip_id;
return 0;
+ case FD_MAX_FREQ:
+ /* unsupported on kgsl */
+ return -1;
default:
ERROR_MSG("invalid param id: %d", param);
return -1;
diff --git a/freedreno/msm/msm_pipe.c b/freedreno/msm/msm_pipe.c
index 38db21d..f539b9a 100644
--- a/freedreno/msm/msm_pipe.c
+++ b/freedreno/msm/msm_pipe.c
@@ -67,6 +67,8 @@ static int msm_pipe_get_param(struct fd_pipe *pipe,
case FD_CHIP_ID:
*value = msm_pipe->chip_id;
return 0;
+ case FD_MAX_FREQ:
+ return query_param(pipe, MSM_PARAM_MAX_FREQ, value);
default:
ERROR_MSG("invalid param id: %d", param);
return -1;