broadcom/simulator: Add DRM_V3D_PARAM_MAX_PERF_COUNTERS parameter support
As this new parameter was introduced in the kernel, mirror the change in the simulator. Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29154>
This commit is contained in:
@@ -1074,7 +1074,9 @@ v3d_simulator_ioctl(int fd, unsigned long request, void *args)
|
||||
return 0;
|
||||
|
||||
case DRM_IOCTL_V3D_GET_PARAM:
|
||||
return v3d_X_simulator(get_param_ioctl)(sim_state.v3d, args);
|
||||
return v3d_X_simulator(get_param_ioctl)(sim_state.v3d,
|
||||
sim_state.perfcnt_total,
|
||||
args);
|
||||
|
||||
case DRM_IOCTL_GEM_CLOSE:
|
||||
return v3d_simulator_gem_close_ioctl(fd, args);
|
||||
|
@@ -251,6 +251,7 @@ v3dX(simulator_submit_csd_ioctl)(struct v3d_hw *v3d,
|
||||
|
||||
int
|
||||
v3dX(simulator_get_param_ioctl)(struct v3d_hw *v3d,
|
||||
uint32_t perfcnt_total,
|
||||
struct drm_v3d_get_param *args)
|
||||
{
|
||||
static const uint32_t reg_map[] = {
|
||||
@@ -286,6 +287,9 @@ v3dX(simulator_get_param_ioctl)(struct v3d_hw *v3d,
|
||||
case DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE:
|
||||
args->value = 1;
|
||||
return 0;
|
||||
case DRM_V3D_PARAM_MAX_PERF_COUNTERS:
|
||||
args->value = perfcnt_total;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (args->param < ARRAY_SIZE(reg_map) && reg_map[args->param]) {
|
||||
|
@@ -35,6 +35,7 @@ struct drm_v3d_submit_csd;
|
||||
|
||||
void v3dX(simulator_init_regs)(struct v3d_hw *v3d);
|
||||
int v3dX(simulator_get_param_ioctl)(struct v3d_hw *v3d,
|
||||
uint32_t perfcnt_total,
|
||||
struct drm_v3d_get_param *args);
|
||||
void v3dX(simulator_submit_cl_ioctl)(struct v3d_hw *v3d,
|
||||
struct drm_v3d_submit_cl *args,
|
||||
|
Reference in New Issue
Block a user