Lines Matching full:vdev

92 int ivpu_jsm_register_db(struct ivpu_device *vdev, u32 ctx_id, u32 db_id,  in ivpu_jsm_register_db()  argument
104 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_REGISTER_DB_DONE, &resp, in ivpu_jsm_register_db()
105 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_register_db()
107 ivpu_err_ratelimited(vdev, "Failed to register doorbell %u: %d\n", db_id, ret); in ivpu_jsm_register_db()
112 int ivpu_jsm_unregister_db(struct ivpu_device *vdev, u32 db_id) in ivpu_jsm_unregister_db() argument
120 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_UNREGISTER_DB_DONE, &resp, in ivpu_jsm_unregister_db()
121 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_unregister_db()
123 ivpu_warn_ratelimited(vdev, "Failed to unregister doorbell %u: %d\n", db_id, ret); in ivpu_jsm_unregister_db()
128 int ivpu_jsm_get_heartbeat(struct ivpu_device *vdev, u32 engine, u64 *heartbeat) in ivpu_jsm_get_heartbeat() argument
139 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_QUERY_ENGINE_HB_DONE, &resp, in ivpu_jsm_get_heartbeat()
140 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_get_heartbeat()
142 ivpu_err_ratelimited(vdev, "Failed to get heartbeat from engine %d: %d\n", in ivpu_jsm_get_heartbeat()
151 int ivpu_jsm_reset_engine(struct ivpu_device *vdev, u32 engine) in ivpu_jsm_reset_engine() argument
162 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_ENGINE_RESET_DONE, &resp, in ivpu_jsm_reset_engine()
163 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_reset_engine()
165 ivpu_err_ratelimited(vdev, "Failed to reset engine %d: %d\n", engine, ret); in ivpu_jsm_reset_engine()
170 int ivpu_jsm_preempt_engine(struct ivpu_device *vdev, u32 engine, u32 preempt_id) in ivpu_jsm_preempt_engine() argument
182 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_ENGINE_PREEMPT_DONE, &resp, in ivpu_jsm_preempt_engine()
183 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_preempt_engine()
185 ivpu_err_ratelimited(vdev, "Failed to preempt engine %d: %d\n", engine, ret); in ivpu_jsm_preempt_engine()
190 int ivpu_jsm_dyndbg_control(struct ivpu_device *vdev, char *command, size_t size) in ivpu_jsm_dyndbg_control() argument
198 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_DYNDBG_CONTROL_RSP, &resp, in ivpu_jsm_dyndbg_control()
199 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_dyndbg_control()
201 ivpu_warn_ratelimited(vdev, "Failed to send command \"%s\": ret %d\n", in ivpu_jsm_dyndbg_control()
207 int ivpu_jsm_trace_get_capability(struct ivpu_device *vdev, u32 *trace_destination_mask, in ivpu_jsm_trace_get_capability() argument
214 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_TRACE_GET_CAPABILITY_RSP, &resp, in ivpu_jsm_trace_get_capability()
215 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_trace_get_capability()
217 ivpu_warn_ratelimited(vdev, "Failed to get trace capability: %d\n", ret); in ivpu_jsm_trace_get_capability()
227 int ivpu_jsm_trace_set_config(struct ivpu_device *vdev, u32 trace_level, u32 trace_destination_mask, in ivpu_jsm_trace_set_config() argument
238 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_TRACE_SET_CONFIG_RSP, &resp, in ivpu_jsm_trace_set_config()
239 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_trace_set_config()
241 ivpu_warn_ratelimited(vdev, "Failed to set config: %d\n", ret); in ivpu_jsm_trace_set_config()
246 int ivpu_jsm_context_release(struct ivpu_device *vdev, u32 host_ssid) in ivpu_jsm_context_release() argument
254 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_SSID_RELEASE_DONE, &resp, in ivpu_jsm_context_release()
255 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_context_release()
257 ivpu_warn_ratelimited(vdev, "Failed to release context: %d\n", ret); in ivpu_jsm_context_release()
262 int ivpu_jsm_pwr_d0i3_enter(struct ivpu_device *vdev) in ivpu_jsm_pwr_d0i3_enter() argument
273 ret = ivpu_ipc_send_receive_active(vdev, &req, VPU_JSM_MSG_PWR_D0I3_ENTER_DONE, in ivpu_jsm_pwr_d0i3_enter()
275 vdev->timeout.d0i3_entry_msg); in ivpu_jsm_pwr_d0i3_enter()
279 return ivpu_hw_wait_for_idle(vdev); in ivpu_jsm_pwr_d0i3_enter()
282 int ivpu_jsm_hws_create_cmdq(struct ivpu_device *vdev, u32 ctx_id, u32 cmdq_group, u32 cmdq_id, in ivpu_jsm_hws_create_cmdq() argument
297 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_CREATE_CMD_QUEUE_RSP, &resp, in ivpu_jsm_hws_create_cmdq()
298 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_hws_create_cmdq()
300 ivpu_warn_ratelimited(vdev, "Failed to create command queue: %d\n", ret); in ivpu_jsm_hws_create_cmdq()
305 int ivpu_jsm_hws_destroy_cmdq(struct ivpu_device *vdev, u32 ctx_id, u32 cmdq_id) in ivpu_jsm_hws_destroy_cmdq() argument
314 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_DESTROY_CMD_QUEUE_RSP, &resp, in ivpu_jsm_hws_destroy_cmdq()
315 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_hws_destroy_cmdq()
317 ivpu_warn_ratelimited(vdev, "Failed to destroy command queue: %d\n", ret); in ivpu_jsm_hws_destroy_cmdq()
322 int ivpu_jsm_hws_register_db(struct ivpu_device *vdev, u32 ctx_id, u32 cmdq_id, u32 db_id, in ivpu_jsm_hws_register_db() argument
335 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_REGISTER_DB_DONE, &resp, in ivpu_jsm_hws_register_db()
336 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_hws_register_db()
338 ivpu_err_ratelimited(vdev, "Failed to register doorbell %u: %d\n", db_id, ret); in ivpu_jsm_hws_register_db()
343 int ivpu_jsm_hws_resume_engine(struct ivpu_device *vdev, u32 engine) in ivpu_jsm_hws_resume_engine() argument
354 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_HWS_RESUME_ENGINE_DONE, &resp, in ivpu_jsm_hws_resume_engine()
355 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_hws_resume_engine()
357 ivpu_err_ratelimited(vdev, "Failed to resume engine %d: %d\n", engine, ret); in ivpu_jsm_hws_resume_engine()
362 int ivpu_jsm_hws_set_context_sched_properties(struct ivpu_device *vdev, u32 ctx_id, u32 cmdq_id, in ivpu_jsm_hws_set_context_sched_properties() argument
378 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_SET_CONTEXT_SCHED_PROPERTIES_RSP, &resp, in ivpu_jsm_hws_set_context_sched_properties()
379 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_hws_set_context_sched_properties()
381 ivpu_warn_ratelimited(vdev, "Failed to set context sched properties: %d\n", ret); in ivpu_jsm_hws_set_context_sched_properties()
386 int ivpu_jsm_hws_set_scheduling_log(struct ivpu_device *vdev, u32 engine_idx, u32 host_ssid, in ivpu_jsm_hws_set_scheduling_log() argument
400 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_HWS_SET_SCHEDULING_LOG_RSP, &resp, in ivpu_jsm_hws_set_scheduling_log()
401 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_hws_set_scheduling_log()
403 ivpu_warn_ratelimited(vdev, "Failed to set scheduling log: %d\n", ret); in ivpu_jsm_hws_set_scheduling_log()
408 int ivpu_jsm_hws_setup_priority_bands(struct ivpu_device *vdev) in ivpu_jsm_hws_setup_priority_bands() argument
433 ret = ivpu_ipc_send_receive_active(vdev, &req, VPU_JSM_MSG_SET_PRIORITY_BAND_SETUP_RSP, in ivpu_jsm_hws_setup_priority_bands()
434 &resp, VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_hws_setup_priority_bands()
436 ivpu_warn_ratelimited(vdev, "Failed to set priority bands: %d\n", ret); in ivpu_jsm_hws_setup_priority_bands()
441 int ivpu_jsm_metric_streamer_start(struct ivpu_device *vdev, u64 metric_group_mask, in ivpu_jsm_metric_streamer_start() argument
453 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_METRIC_STREAMER_START_DONE, &resp, in ivpu_jsm_metric_streamer_start()
454 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_metric_streamer_start()
456 ivpu_warn_ratelimited(vdev, "Failed to start metric streamer: ret %d\n", ret); in ivpu_jsm_metric_streamer_start()
463 int ivpu_jsm_metric_streamer_stop(struct ivpu_device *vdev, u64 metric_group_mask) in ivpu_jsm_metric_streamer_stop() argument
471 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_METRIC_STREAMER_STOP_DONE, &resp, in ivpu_jsm_metric_streamer_stop()
472 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_metric_streamer_stop()
474 ivpu_warn_ratelimited(vdev, "Failed to stop metric streamer: ret %d\n", ret); in ivpu_jsm_metric_streamer_stop()
479 int ivpu_jsm_metric_streamer_update(struct ivpu_device *vdev, u64 metric_group_mask, in ivpu_jsm_metric_streamer_update() argument
490 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_METRIC_STREAMER_UPDATE_DONE, &resp, in ivpu_jsm_metric_streamer_update()
491 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_metric_streamer_update()
493 ivpu_warn_ratelimited(vdev, "Failed to update metric streamer: ret %d\n", ret); in ivpu_jsm_metric_streamer_update()
498 ivpu_warn_ratelimited(vdev, "MS buffer overflow: bytes_written %#llx > buffer_size %#llx\n", in ivpu_jsm_metric_streamer_update()
508 int ivpu_jsm_metric_streamer_info(struct ivpu_device *vdev, u64 metric_group_mask, u64 buffer_addr, in ivpu_jsm_metric_streamer_info() argument
519 ret = ivpu_ipc_send_receive(vdev, &req, VPU_JSM_MSG_METRIC_STREAMER_INFO_DONE, &resp, in ivpu_jsm_metric_streamer_info()
520 VPU_IPC_CHAN_ASYNC_CMD, vdev->timeout.jsm); in ivpu_jsm_metric_streamer_info()
522 ivpu_warn_ratelimited(vdev, "Failed to get metric streamer info: ret %d\n", ret); in ivpu_jsm_metric_streamer_info()
527 ivpu_warn_ratelimited(vdev, "Invalid sample size\n"); in ivpu_jsm_metric_streamer_info()
539 int ivpu_jsm_dct_enable(struct ivpu_device *vdev, u32 active_us, u32 inactive_us) in ivpu_jsm_dct_enable() argument
547 return ivpu_ipc_send_receive_active(vdev, &req, VPU_JSM_MSG_DCT_ENABLE_DONE, in ivpu_jsm_dct_enable()
549 vdev->timeout.jsm); in ivpu_jsm_dct_enable()
552 int ivpu_jsm_dct_disable(struct ivpu_device *vdev) in ivpu_jsm_dct_disable() argument
557 return ivpu_ipc_send_receive_active(vdev, &req, VPU_JSM_MSG_DCT_DISABLE_DONE, in ivpu_jsm_dct_disable()
559 vdev->timeout.jsm); in ivpu_jsm_dct_disable()