mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 04:30:10 +01:00
freedreno/drm: Add FD_VA_SIZE param
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17947>
This commit is contained in:
parent
32d0dfc462
commit
2bc1d08c48
3 changed files with 7 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ enum fd_param_id {
|
|||
FD_GLOBAL_FAULTS, /* # of global (all context) faults */
|
||||
FD_SUSPEND_COUNT, /* # of times the GPU has suspended, and potentially lost state */
|
||||
FD_SYSPROF, /* Settable (for CAP_SYS_ADMIN) param for system profiling */
|
||||
FD_VA_SIZE, /* GPU virtual address size */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -139,6 +140,7 @@ enum fd_version {
|
|||
FD_VERSION_MEMORY_FD = 2, /* supports shared memory objects */
|
||||
FD_VERSION_SUSPENDS = 7, /* Adds MSM_PARAM_SUSPENDS to detect device suspend */
|
||||
FD_VERSION_CACHED_COHERENT = 8, /* Adds cached-coherent support (a6xx+) */
|
||||
FD_VERSION_VA_SIZE = 9,
|
||||
};
|
||||
enum fd_version fd_device_version(struct fd_device *dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ msm_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
|
|||
return query_param(pipe, MSM_PARAM_FAULTS, value);
|
||||
case FD_SUSPEND_COUNT:
|
||||
return query_param(pipe, MSM_PARAM_SUSPENDS, value);
|
||||
case FD_VA_SIZE:
|
||||
return query_param(pipe, MSM_PARAM_VA_SIZE, value);
|
||||
default:
|
||||
ERROR_MSG("invalid param id: %d", param);
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,9 @@ virtio_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
|
|||
return query_param(pipe, MSM_PARAM_FAULTS, value);
|
||||
case FD_SUSPEND_COUNT:
|
||||
return query_param(pipe, MSM_PARAM_SUSPENDS, value);
|
||||
case FD_VA_SIZE:
|
||||
*value = virtio_dev->caps.u.msm.va_size;
|
||||
return 0;
|
||||
default:
|
||||
ERROR_MSG("invalid param id: %d", param);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue