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>
This commit is contained in:
Rob Clark 2016-02-10 12:27:33 -05:00
parent bc5497d061
commit 9b77443f63
3 changed files with 6 additions and 0 deletions

View file

@ -50,6 +50,7 @@ enum fd_param_id {
FD_GMEM_SIZE, FD_GMEM_SIZE,
FD_GPU_ID, FD_GPU_ID,
FD_CHIP_ID, FD_CHIP_ID,
FD_MAX_FREQ,
}; };
/* bo flags: */ /* bo flags: */

View file

@ -50,6 +50,9 @@ static int kgsl_pipe_get_param(struct fd_pipe *pipe,
case FD_CHIP_ID: case FD_CHIP_ID:
*value = kgsl_pipe->devinfo.chip_id; *value = kgsl_pipe->devinfo.chip_id;
return 0; return 0;
case FD_MAX_FREQ:
/* unsupported on kgsl */
return -1;
default: default:
ERROR_MSG("invalid param id: %d", param); ERROR_MSG("invalid param id: %d", param);
return -1; return -1;

View file

@ -67,6 +67,8 @@ static int msm_pipe_get_param(struct fd_pipe *pipe,
case FD_CHIP_ID: case FD_CHIP_ID:
*value = msm_pipe->chip_id; *value = msm_pipe->chip_id;
return 0; return 0;
case FD_MAX_FREQ:
return query_param(pipe, MSM_PARAM_MAX_FREQ, value);
default: default:
ERROR_MSG("invalid param id: %d", param); ERROR_MSG("invalid param id: %d", param);
return -1; return -1;