1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2017 Linaro Ltd.
6 #ifndef __VENUS_HFI_MSGS_H__
7 #define __VENUS_HFI_MSGS_H__
10 #define HFI_MSG_SYS_INIT 0x20001
11 #define HFI_MSG_SYS_PC_PREP 0x20002
12 #define HFI_MSG_SYS_RELEASE_RESOURCE 0x20003
13 #define HFI_MSG_SYS_DEBUG 0x20004
14 #define HFI_MSG_SYS_SESSION_INIT 0x20006
15 #define HFI_MSG_SYS_SESSION_END 0x20007
16 #define HFI_MSG_SYS_IDLE 0x20008
17 #define HFI_MSG_SYS_COV 0x20009
18 #define HFI_MSG_SYS_PROPERTY_INFO 0x2000a
20 #define HFI_MSG_EVENT_NOTIFY 0x21001
21 #define HFI_MSG_SESSION_GET_SEQUENCE_HEADER 0x21002
23 #define HFI_MSG_SYS_PING_ACK 0x220002
24 #define HFI_MSG_SYS_SESSION_ABORT 0x220004
26 #define HFI_MSG_SESSION_LOAD_RESOURCES 0x221001
27 #define HFI_MSG_SESSION_START 0x221002
28 #define HFI_MSG_SESSION_STOP 0x221003
29 #define HFI_MSG_SESSION_SUSPEND 0x221004
30 #define HFI_MSG_SESSION_RESUME 0x221005
31 #define HFI_MSG_SESSION_FLUSH 0x221006
32 #define HFI_MSG_SESSION_EMPTY_BUFFER 0x221007
33 #define HFI_MSG_SESSION_FILL_BUFFER 0x221008
34 #define HFI_MSG_SESSION_PROPERTY_INFO 0x221009
35 #define HFI_MSG_SESSION_RELEASE_RESOURCES 0x22100a
36 #define HFI_MSG_SESSION_PARSE_SEQUENCE_HEADER 0x22100b
37 #define HFI_MSG_SESSION_RELEASE_BUFFERS 0x22100c
39 #define HFI_PICTURE_I 0x00000001
40 #define HFI_PICTURE_P 0x00000002
41 #define HFI_PICTURE_B 0x00000004
42 #define HFI_PICTURE_IDR 0x00000008
43 #define HFI_FRAME_NOTCODED 0x7f002000
44 #define HFI_FRAME_YUV 0x7f004000
45 #define HFI_UNUSED_PICT 0x10000000
48 struct hfi_msg_event_notify_pkt
{
49 struct hfi_session_hdr_pkt shdr
;
53 u32 ext_event_data
[1];
56 struct hfi_msg_event_release_buffer_ref_pkt
{
62 struct hfi_msg_sys_init_done_pkt
{
63 struct hfi_pkt_hdr hdr
;
69 struct hfi_msg_sys_pc_prep_done_pkt
{
70 struct hfi_pkt_hdr hdr
;
74 struct hfi_msg_sys_release_resource_done_pkt
{
75 struct hfi_pkt_hdr hdr
;
80 struct hfi_msg_session_init_done_pkt
{
81 struct hfi_session_hdr_pkt shdr
;
87 struct hfi_msg_session_end_done_pkt
{
88 struct hfi_session_hdr_pkt shdr
;
92 struct hfi_msg_session_get_sequence_hdr_done_pkt
{
93 struct hfi_session_hdr_pkt shdr
;
99 struct hfi_msg_sys_session_abort_done_pkt
{
100 struct hfi_session_hdr_pkt shdr
;
104 struct hfi_msg_sys_idle_pkt
{
105 struct hfi_pkt_hdr hdr
;
108 struct hfi_msg_sys_ping_ack_pkt
{
109 struct hfi_pkt_hdr hdr
;
113 struct hfi_msg_sys_property_info_pkt
{
114 struct hfi_pkt_hdr hdr
;
119 struct hfi_msg_session_load_resources_done_pkt
{
120 struct hfi_session_hdr_pkt shdr
;
124 struct hfi_msg_session_start_done_pkt
{
125 struct hfi_session_hdr_pkt shdr
;
129 struct hfi_msg_session_stop_done_pkt
{
130 struct hfi_session_hdr_pkt shdr
;
134 struct hfi_msg_session_suspend_done_pkt
{
135 struct hfi_session_hdr_pkt shdr
;
139 struct hfi_msg_session_resume_done_pkt
{
140 struct hfi_session_hdr_pkt shdr
;
144 struct hfi_msg_session_flush_done_pkt
{
145 struct hfi_session_hdr_pkt shdr
;
150 struct hfi_msg_session_empty_buffer_done_pkt
{
151 struct hfi_session_hdr_pkt shdr
;
157 u32 extradata_buffer
;
161 struct hfi_msg_session_fbd_compressed_pkt
{
162 struct hfi_session_hdr_pkt shdr
;
177 u32 extradata_buffer
;
181 struct hfi_msg_session_fbd_uncompressed_plane0_pkt
{
182 struct hfi_session_hdr_pkt shdr
;
204 u32 extradata_buffer
;
208 struct hfi_msg_session_fbd_uncompressed_plane1_pkt
{
217 struct hfi_msg_session_fbd_uncompressed_plane2_pkt
{
226 struct hfi_msg_session_parse_sequence_header_done_pkt
{
227 struct hfi_session_hdr_pkt shdr
;
233 struct hfi_msg_session_property_info_pkt
{
234 struct hfi_session_hdr_pkt shdr
;
239 struct hfi_msg_session_release_resources_done_pkt
{
240 struct hfi_session_hdr_pkt shdr
;
244 struct hfi_msg_session_release_buffers_done_pkt
{
245 struct hfi_session_hdr_pkt shdr
;
251 struct hfi_msg_sys_debug_pkt
{
252 struct hfi_pkt_hdr hdr
;
260 struct hfi_msg_sys_coverage_pkt
{
261 struct hfi_pkt_hdr hdr
;
271 void hfi_process_watchdog_timeout(struct venus_core
*core
);
272 u32
hfi_process_msg_packet(struct venus_core
*core
, struct hfi_pkt_hdr
*hdr
);