2 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
3 * Copyright (C) 2017 Linaro Ltd.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 and
7 * only version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #ifndef __VENUS_HFI_MSGS_H__
16 #define __VENUS_HFI_MSGS_H__
19 #define HFI_MSG_SYS_INIT 0x20001
20 #define HFI_MSG_SYS_PC_PREP 0x20002
21 #define HFI_MSG_SYS_RELEASE_RESOURCE 0x20003
22 #define HFI_MSG_SYS_DEBUG 0x20004
23 #define HFI_MSG_SYS_SESSION_INIT 0x20006
24 #define HFI_MSG_SYS_SESSION_END 0x20007
25 #define HFI_MSG_SYS_IDLE 0x20008
26 #define HFI_MSG_SYS_COV 0x20009
27 #define HFI_MSG_SYS_PROPERTY_INFO 0x2000a
29 #define HFI_MSG_EVENT_NOTIFY 0x21001
30 #define HFI_MSG_SESSION_GET_SEQUENCE_HEADER 0x21002
32 #define HFI_MSG_SYS_PING_ACK 0x220002
33 #define HFI_MSG_SYS_SESSION_ABORT 0x220004
35 #define HFI_MSG_SESSION_LOAD_RESOURCES 0x221001
36 #define HFI_MSG_SESSION_START 0x221002
37 #define HFI_MSG_SESSION_STOP 0x221003
38 #define HFI_MSG_SESSION_SUSPEND 0x221004
39 #define HFI_MSG_SESSION_RESUME 0x221005
40 #define HFI_MSG_SESSION_FLUSH 0x221006
41 #define HFI_MSG_SESSION_EMPTY_BUFFER 0x221007
42 #define HFI_MSG_SESSION_FILL_BUFFER 0x221008
43 #define HFI_MSG_SESSION_PROPERTY_INFO 0x221009
44 #define HFI_MSG_SESSION_RELEASE_RESOURCES 0x22100a
45 #define HFI_MSG_SESSION_PARSE_SEQUENCE_HEADER 0x22100b
46 #define HFI_MSG_SESSION_RELEASE_BUFFERS 0x22100c
48 #define HFI_PICTURE_I 0x00000001
49 #define HFI_PICTURE_P 0x00000002
50 #define HFI_PICTURE_B 0x00000004
51 #define HFI_PICTURE_IDR 0x00000008
52 #define HFI_FRAME_NOTCODED 0x7f002000
53 #define HFI_FRAME_YUV 0x7f004000
54 #define HFI_UNUSED_PICT 0x10000000
57 struct hfi_msg_event_notify_pkt
{
58 struct hfi_session_hdr_pkt shdr
;
62 u32 ext_event_data
[1];
65 struct hfi_msg_event_release_buffer_ref_pkt
{
71 struct hfi_msg_sys_init_done_pkt
{
72 struct hfi_pkt_hdr hdr
;
78 struct hfi_msg_sys_pc_prep_done_pkt
{
79 struct hfi_pkt_hdr hdr
;
83 struct hfi_msg_sys_release_resource_done_pkt
{
84 struct hfi_pkt_hdr hdr
;
89 struct hfi_msg_session_init_done_pkt
{
90 struct hfi_session_hdr_pkt shdr
;
96 struct hfi_msg_session_end_done_pkt
{
97 struct hfi_session_hdr_pkt shdr
;
101 struct hfi_msg_session_get_sequence_hdr_done_pkt
{
102 struct hfi_session_hdr_pkt shdr
;
108 struct hfi_msg_sys_session_abort_done_pkt
{
109 struct hfi_session_hdr_pkt shdr
;
113 struct hfi_msg_sys_idle_pkt
{
114 struct hfi_pkt_hdr hdr
;
117 struct hfi_msg_sys_ping_ack_pkt
{
118 struct hfi_pkt_hdr hdr
;
122 struct hfi_msg_sys_property_info_pkt
{
123 struct hfi_pkt_hdr hdr
;
128 struct hfi_msg_session_load_resources_done_pkt
{
129 struct hfi_session_hdr_pkt shdr
;
133 struct hfi_msg_session_start_done_pkt
{
134 struct hfi_session_hdr_pkt shdr
;
138 struct hfi_msg_session_stop_done_pkt
{
139 struct hfi_session_hdr_pkt shdr
;
143 struct hfi_msg_session_suspend_done_pkt
{
144 struct hfi_session_hdr_pkt shdr
;
148 struct hfi_msg_session_resume_done_pkt
{
149 struct hfi_session_hdr_pkt shdr
;
153 struct hfi_msg_session_flush_done_pkt
{
154 struct hfi_session_hdr_pkt shdr
;
159 struct hfi_msg_session_empty_buffer_done_pkt
{
160 struct hfi_session_hdr_pkt shdr
;
166 u32 extradata_buffer
;
170 struct hfi_msg_session_fbd_compressed_pkt
{
171 struct hfi_session_hdr_pkt shdr
;
186 u32 extradata_buffer
;
190 struct hfi_msg_session_fbd_uncompressed_plane0_pkt
{
191 struct hfi_session_hdr_pkt shdr
;
213 u32 extradata_buffer
;
217 struct hfi_msg_session_fbd_uncompressed_plane1_pkt
{
226 struct hfi_msg_session_fbd_uncompressed_plane2_pkt
{
235 struct hfi_msg_session_parse_sequence_header_done_pkt
{
236 struct hfi_session_hdr_pkt shdr
;
242 struct hfi_msg_session_property_info_pkt
{
243 struct hfi_session_hdr_pkt shdr
;
248 struct hfi_msg_session_release_resources_done_pkt
{
249 struct hfi_session_hdr_pkt shdr
;
253 struct hfi_msg_session_release_buffers_done_pkt
{
254 struct hfi_session_hdr_pkt shdr
;
260 struct hfi_msg_sys_debug_pkt
{
261 struct hfi_pkt_hdr hdr
;
269 struct hfi_msg_sys_coverage_pkt
{
270 struct hfi_pkt_hdr hdr
;
280 void hfi_process_watchdog_timeout(struct venus_core
*core
);
281 u32
hfi_process_msg_packet(struct venus_core
*core
, struct hfi_pkt_hdr
*hdr
);