Merge remote-tracking branches 'asoc/topic/stm32', 'asoc/topic/sun4i-i2s', 'asoc...
[sfrench/cifs-2.6.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / runtime / bufq / src / bufq.c
1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2015, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  */
14
15 #include "assert_support.h"             /* assert */
16 #include "ia_css_buffer.h"
17 #include "sp.h"
18 #include "ia_css_bufq.h"                /* Bufq API's */
19 #include "ia_css_queue.h"               /* ia_css_queue_t */
20 #include "sw_event_global.h"            /* Event IDs.*/
21 #include "ia_css_eventq.h"              /* ia_css_eventq_recv()*/
22 #include "ia_css_debug.h"               /* ia_css_debug_dtrace*/
23 #include "sh_css_internal.h"            /* sh_css_queue_type */
24 #include "sp_local.h"                   /* sp_address_of */
25 #include "ia_css_util.h"                /* ia_css_convert_errno()*/
26 #include "sh_css_firmware.h"            /* sh_css_sp_fw*/
27
28 #define BUFQ_DUMP_FILE_NAME_PREFIX_SIZE 256
29
30 static char prefix[BUFQ_DUMP_FILE_NAME_PREFIX_SIZE] = {0};
31
32 /*********************************************************/
33 /* Global Queue objects used by CSS                      */
34 /*********************************************************/
35
36 #ifndef ISP2401
37
38 struct sh_css_queues {
39         /* Host2SP buffer queue */
40         ia_css_queue_t host2sp_buffer_queue_handles
41                 [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
42         /* SP2Host buffer queue */
43         ia_css_queue_t sp2host_buffer_queue_handles
44                 [SH_CSS_MAX_NUM_QUEUES];
45
46         /* Host2SP event queue */
47         ia_css_queue_t host2sp_psys_event_queue_handle;
48
49         /* SP2Host event queue */
50         ia_css_queue_t sp2host_psys_event_queue_handle;
51
52 #if !defined(HAS_NO_INPUT_SYSTEM)
53         /* Host2SP ISYS event queue */
54         ia_css_queue_t host2sp_isys_event_queue_handle;
55
56         /* SP2Host ISYS event queue */
57         ia_css_queue_t sp2host_isys_event_queue_handle;
58 #endif
59         /* Tagger command queue */
60         ia_css_queue_t host2sp_tag_cmd_queue_handle;
61 };
62
63 #else
64
65 struct sh_css_queues {
66         /* Host2SP buffer queue */
67         ia_css_queue_t host2sp_buffer_queue_handles
68                 [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
69         /* SP2Host buffer queue */
70         ia_css_queue_t sp2host_buffer_queue_handles
71                 [SH_CSS_MAX_NUM_QUEUES];
72
73         /* Host2SP event queue */
74         ia_css_queue_t host2sp_psys_event_queue_handle;
75
76         /* SP2Host event queue */
77         ia_css_queue_t sp2host_psys_event_queue_handle;
78
79 #if !defined(HAS_NO_INPUT_SYSTEM)
80         /* Host2SP ISYS event queue */
81         ia_css_queue_t host2sp_isys_event_queue_handle;
82
83         /* SP2Host ISYS event queue */
84         ia_css_queue_t sp2host_isys_event_queue_handle;
85
86         /* Tagger command queue */
87         ia_css_queue_t host2sp_tag_cmd_queue_handle;
88 #endif
89 };
90
91 #endif
92
93 struct sh_css_queues  css_queues;
94
95
96 /*******************************************************
97 *** Static variables
98 ********************************************************/
99 static int buffer_type_to_queue_id_map[SH_CSS_MAX_SP_THREADS][IA_CSS_NUM_DYNAMIC_BUFFER_TYPE];
100 static bool queue_availability[SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
101
102 /*******************************************************
103 *** Static functions
104 ********************************************************/
105 static void map_buffer_type_to_queue_id(
106         unsigned int thread_id,
107         enum ia_css_buffer_type buf_type
108         );
109 static void unmap_buffer_type_to_queue_id(
110         unsigned int thread_id,
111         enum ia_css_buffer_type buf_type
112         );
113
114 static ia_css_queue_t *bufq_get_qhandle(
115         enum sh_css_queue_type type,
116         enum sh_css_queue_id id,
117         int thread
118         );
119
120 /*******************************************************
121 *** Public functions
122 ********************************************************/
123 void ia_css_queue_map_init(void)
124 {
125         unsigned int i, j;
126
127         for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++) {
128                 for (j = 0; j < SH_CSS_MAX_NUM_QUEUES; j++)
129                         queue_availability[i][j] = true;
130         }
131
132         for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++) {
133                 for (j = 0; j < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE; j++)
134                         buffer_type_to_queue_id_map[i][j] = SH_CSS_INVALID_QUEUE_ID;
135         }
136 }
137
138 void ia_css_queue_map(
139         unsigned int thread_id,
140         enum ia_css_buffer_type buf_type,
141         bool map)
142 {
143         assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
144         assert(thread_id < SH_CSS_MAX_SP_THREADS);
145
146         ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
147                 "ia_css_queue_map() enter: buf_type=%d, thread_id=%d\n", buf_type, thread_id);
148
149         if (map)
150                 map_buffer_type_to_queue_id(thread_id, buf_type);
151         else
152                 unmap_buffer_type_to_queue_id(thread_id, buf_type);
153 }
154
155 /*
156  * @brief Query the internal queue ID.
157  */
158 bool ia_css_query_internal_queue_id(
159         enum ia_css_buffer_type buf_type,
160         unsigned int thread_id,
161         enum sh_css_queue_id *val)
162 {
163         IA_CSS_ENTER("buf_type=%d, thread_id=%d, val = %p", buf_type, thread_id, val);
164
165         if ((val == NULL) || (thread_id >= SH_CSS_MAX_SP_THREADS) || (buf_type >= IA_CSS_NUM_DYNAMIC_BUFFER_TYPE)) {
166                 IA_CSS_LEAVE("return_val = false");
167                 return false;
168         }
169
170         *val = buffer_type_to_queue_id_map[thread_id][buf_type];
171         if ((*val == SH_CSS_INVALID_QUEUE_ID) || (*val >= SH_CSS_MAX_NUM_QUEUES)) {
172                 IA_CSS_LOG("INVALID queue ID MAP = %d\n", *val);
173                 IA_CSS_LEAVE("return_val = false");
174                 return false;
175         }
176         IA_CSS_LEAVE("return_val = true");
177         return true;
178 }
179
180 /*******************************************************
181 *** Static functions
182 ********************************************************/
183 static void map_buffer_type_to_queue_id(
184         unsigned int thread_id,
185         enum ia_css_buffer_type buf_type)
186 {
187         unsigned int i;
188
189         assert(thread_id < SH_CSS_MAX_SP_THREADS);
190         assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
191         assert(buffer_type_to_queue_id_map[thread_id][buf_type] == SH_CSS_INVALID_QUEUE_ID);
192
193         /* queue 0 is reserved for parameters because it doesn't depend on events */
194         if (buf_type == IA_CSS_BUFFER_TYPE_PARAMETER_SET) {
195                 assert(queue_availability[thread_id][IA_CSS_PARAMETER_SET_QUEUE_ID]);
196                 queue_availability[thread_id][IA_CSS_PARAMETER_SET_QUEUE_ID] = false;
197                 buffer_type_to_queue_id_map[thread_id][buf_type] = IA_CSS_PARAMETER_SET_QUEUE_ID;
198                 return;
199         }
200
201         /* queue 1 is reserved for per frame parameters because it doesn't depend on events */
202         if (buf_type == IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET) {
203                 assert(queue_availability[thread_id][IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID]);
204                 queue_availability[thread_id][IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID] = false;
205                 buffer_type_to_queue_id_map[thread_id][buf_type] = IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID;
206                 return;
207         }
208
209         for (i = SH_CSS_QUEUE_C_ID; i < SH_CSS_MAX_NUM_QUEUES; i++) {
210                 if (queue_availability[thread_id][i] == true) {
211                         queue_availability[thread_id][i] = false;
212                         buffer_type_to_queue_id_map[thread_id][buf_type] = i;
213                         break;
214                 }
215         }
216
217         assert(i != SH_CSS_MAX_NUM_QUEUES);
218         return;
219 }
220
221 static void unmap_buffer_type_to_queue_id(
222         unsigned int thread_id,
223         enum ia_css_buffer_type buf_type)
224 {
225         int queue_id;
226
227         assert(thread_id < SH_CSS_MAX_SP_THREADS);
228         assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
229         assert(buffer_type_to_queue_id_map[thread_id][buf_type] != SH_CSS_INVALID_QUEUE_ID);
230
231         queue_id = buffer_type_to_queue_id_map[thread_id][buf_type];
232         buffer_type_to_queue_id_map[thread_id][buf_type] = SH_CSS_INVALID_QUEUE_ID;
233         queue_availability[thread_id][queue_id] = true;
234 }
235
236
237 static ia_css_queue_t *bufq_get_qhandle(
238         enum sh_css_queue_type type,
239         enum sh_css_queue_id id,
240         int thread)
241 {
242         ia_css_queue_t *q = NULL;
243
244         switch (type) {
245         case sh_css_host2sp_buffer_queue:
246                 if ((thread >= SH_CSS_MAX_SP_THREADS) || (thread < 0) ||
247                         (id == SH_CSS_INVALID_QUEUE_ID))
248                         break;
249                 q = &css_queues.host2sp_buffer_queue_handles[thread][id];
250                 break;
251         case sh_css_sp2host_buffer_queue:
252                 if (id == SH_CSS_INVALID_QUEUE_ID)
253                         break;
254                 q = &css_queues.sp2host_buffer_queue_handles[id];
255                 break;
256         case sh_css_host2sp_psys_event_queue:
257                 q = &css_queues.host2sp_psys_event_queue_handle;
258                 break;
259         case sh_css_sp2host_psys_event_queue:
260                 q = &css_queues.sp2host_psys_event_queue_handle;
261                 break;
262 #if !defined(HAS_NO_INPUT_SYSTEM)
263         case sh_css_host2sp_isys_event_queue:
264                 q = &css_queues.host2sp_isys_event_queue_handle;
265                 break;
266         case sh_css_sp2host_isys_event_queue:
267                 q = &css_queues.sp2host_isys_event_queue_handle;
268                 break;
269 #endif          
270         case sh_css_host2sp_tag_cmd_queue:
271                 q = &css_queues.host2sp_tag_cmd_queue_handle;
272                 break;
273         default:
274                 break;
275         }
276
277         return q;
278 }
279
280 /* Local function to initialize a buffer queue. This reduces
281  * the chances of copy-paste errors or typos.
282  */
283 static inline void
284 init_bufq(unsigned int desc_offset,
285           unsigned int elems_offset,
286           ia_css_queue_t *handle)
287 {
288         const struct ia_css_fw_info *fw;
289         unsigned int q_base_addr;
290         ia_css_queue_remote_t remoteq;
291
292         fw = &sh_css_sp_fw;
293         q_base_addr = fw->info.sp.host_sp_queue;
294
295         /* Setup queue location as SP and proc id as SP0_ID */
296         remoteq.location = IA_CSS_QUEUE_LOC_SP;
297         remoteq.proc_id = SP0_ID;
298         remoteq.cb_desc_addr = q_base_addr + desc_offset;
299         remoteq.cb_elems_addr = q_base_addr + elems_offset;
300         /* Initialize the queue instance and obtain handle */
301         ia_css_queue_remote_init(handle, &remoteq);
302 }
303
304 void ia_css_bufq_init(void)
305 {
306         int i, j;
307
308         IA_CSS_ENTER_PRIVATE("");
309
310         /* Setup all the local queue descriptors for Host2SP Buffer Queues */
311         for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++)
312                 for (j = 0; j < SH_CSS_MAX_NUM_QUEUES; j++) {
313                         init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_buffer_queues_desc[i][j]),
314                                   (uint32_t)offsetof(struct host_sp_queues, host2sp_buffer_queues_elems[i][j]),
315                                   &css_queues.host2sp_buffer_queue_handles[i][j]);
316                 }
317
318         /* Setup all the local queue descriptors for SP2Host Buffer Queues */
319         for (i = 0; i < SH_CSS_MAX_NUM_QUEUES; i++) {
320                 init_bufq(offsetof(struct host_sp_queues, sp2host_buffer_queues_desc[i]),
321                           offsetof(struct host_sp_queues, sp2host_buffer_queues_elems[i]),
322                           &css_queues.sp2host_buffer_queue_handles[i]);
323         }
324
325         /* Host2SP event queue*/
326         init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_psys_event_queue_desc),
327                   (uint32_t)offsetof(struct host_sp_queues, host2sp_psys_event_queue_elems),
328                   &css_queues.host2sp_psys_event_queue_handle);
329
330         /* SP2Host event queue */
331         init_bufq((uint32_t)offsetof(struct host_sp_queues, sp2host_psys_event_queue_desc),
332                   (uint32_t)offsetof(struct host_sp_queues, sp2host_psys_event_queue_elems),
333                   &css_queues.sp2host_psys_event_queue_handle);
334
335 #if !defined(HAS_NO_INPUT_SYSTEM)
336         /* Host2SP ISYS event queue */
337         init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_isys_event_queue_desc),
338                   (uint32_t)offsetof(struct host_sp_queues, host2sp_isys_event_queue_elems),
339                   &css_queues.host2sp_isys_event_queue_handle);
340
341         /* SP2Host ISYS event queue*/
342         init_bufq((uint32_t)offsetof(struct host_sp_queues, sp2host_isys_event_queue_desc),
343                   (uint32_t)offsetof(struct host_sp_queues, sp2host_isys_event_queue_elems),
344                   &css_queues.sp2host_isys_event_queue_handle);
345
346         /* Host2SP tagger command queue */
347         init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_tag_cmd_queue_desc),
348                   (uint32_t)offsetof(struct host_sp_queues, host2sp_tag_cmd_queue_elems),
349                   &css_queues.host2sp_tag_cmd_queue_handle);
350 #endif
351
352         IA_CSS_LEAVE_PRIVATE("");
353 }
354
355 enum ia_css_err ia_css_bufq_enqueue_buffer(
356         int thread_index,
357         int queue_id,
358         uint32_t item)
359 {
360         enum ia_css_err return_err = IA_CSS_SUCCESS;
361         ia_css_queue_t *q;
362         int error;
363
364         IA_CSS_ENTER_PRIVATE("queue_id=%d", queue_id);
365         if ((thread_index >= SH_CSS_MAX_SP_THREADS) || (thread_index < 0) ||
366                         (queue_id == SH_CSS_INVALID_QUEUE_ID))
367                 return IA_CSS_ERR_INVALID_ARGUMENTS;
368
369         /* Get the queue for communication */
370         q = bufq_get_qhandle(sh_css_host2sp_buffer_queue,
371                 queue_id,
372                 thread_index);
373         if (q != NULL) {
374                 error = ia_css_queue_enqueue(q, item);
375                 return_err = ia_css_convert_errno(error);
376         } else {
377                 IA_CSS_ERROR("queue is not initialized");
378                 return_err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
379         }
380
381         IA_CSS_LEAVE_ERR_PRIVATE(return_err);
382         return return_err;
383 }
384
385 enum ia_css_err ia_css_bufq_dequeue_buffer(
386         int queue_id,
387         uint32_t *item)
388 {
389         enum ia_css_err return_err;
390         int error = 0;
391         ia_css_queue_t *q;
392
393         IA_CSS_ENTER_PRIVATE("queue_id=%d", queue_id);
394         if ((item == NULL) ||
395             (queue_id <= SH_CSS_INVALID_QUEUE_ID) ||
396             (queue_id >= SH_CSS_MAX_NUM_QUEUES)
397            )
398                 return IA_CSS_ERR_INVALID_ARGUMENTS;
399
400         q = bufq_get_qhandle(sh_css_sp2host_buffer_queue,
401                 queue_id,
402                 -1);
403         if (q != NULL) {
404                 error = ia_css_queue_dequeue(q, item);
405                 return_err = ia_css_convert_errno(error);
406         } else {
407                 IA_CSS_ERROR("queue is not initialized");
408                 return_err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
409         }
410
411         IA_CSS_LEAVE_ERR_PRIVATE(return_err);
412         return return_err;
413 }
414
415 enum ia_css_err ia_css_bufq_enqueue_psys_event(
416         uint8_t evt_id,
417         uint8_t evt_payload_0,
418         uint8_t evt_payload_1,
419         uint8_t evt_payload_2)
420 {
421         enum ia_css_err return_err;
422         int error = 0;
423         ia_css_queue_t *q;
424
425         IA_CSS_ENTER_PRIVATE("evt_id=%d", evt_id);
426         q = bufq_get_qhandle(sh_css_host2sp_psys_event_queue, -1, -1);
427         if (NULL == q) {
428                 IA_CSS_ERROR("queue is not initialized");
429                 return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
430         }
431
432         error = ia_css_eventq_send(q,
433                         evt_id, evt_payload_0, evt_payload_1, evt_payload_2);
434
435         return_err = ia_css_convert_errno(error);
436         IA_CSS_LEAVE_ERR_PRIVATE(return_err);
437         return return_err;
438 }
439
440 enum  ia_css_err ia_css_bufq_dequeue_psys_event(
441         uint8_t item[BUFQ_EVENT_SIZE])
442 {
443         enum ia_css_err;
444         int error = 0;
445         ia_css_queue_t *q;
446
447         /* No ENTER/LEAVE in this function since this is polled
448          * by some test apps. Enablign logging here floods the log
449          * files which may cause timeouts. */
450         if (item == NULL)
451                 return IA_CSS_ERR_INVALID_ARGUMENTS;
452
453         q = bufq_get_qhandle(sh_css_sp2host_psys_event_queue, -1, -1);
454         if (NULL == q) {
455                 IA_CSS_ERROR("queue is not initialized");
456                 return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
457         }
458         error = ia_css_eventq_recv(q, item);
459
460         return ia_css_convert_errno(error);
461
462 }
463
464 enum  ia_css_err ia_css_bufq_dequeue_isys_event(
465         uint8_t item[BUFQ_EVENT_SIZE])
466 {
467 #if !defined(HAS_NO_INPUT_SYSTEM)
468         enum ia_css_err;
469         int error = 0;
470         ia_css_queue_t *q;
471
472         /* No ENTER/LEAVE in this function since this is polled
473          * by some test apps. Enablign logging here floods the log
474          * files which may cause timeouts. */
475         if (item == NULL)
476                 return IA_CSS_ERR_INVALID_ARGUMENTS;
477
478         q = bufq_get_qhandle(sh_css_sp2host_isys_event_queue, -1, -1);
479         if (q == NULL) {
480                 IA_CSS_ERROR("queue is not initialized");
481                 return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
482         }
483         error = ia_css_eventq_recv(q, item);
484         return ia_css_convert_errno(error);
485 #else
486         (void)item;
487         return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
488 #endif
489 }
490
491 enum ia_css_err ia_css_bufq_enqueue_isys_event(uint8_t evt_id)
492 {
493 #if !defined(HAS_NO_INPUT_SYSTEM)
494         enum ia_css_err return_err;
495         int error = 0;
496         ia_css_queue_t *q;
497
498         IA_CSS_ENTER_PRIVATE("event_id=%d", evt_id);
499         q = bufq_get_qhandle(sh_css_host2sp_isys_event_queue, -1, -1);
500         if (q == NULL) {
501                 IA_CSS_ERROR("queue is not initialized");
502                 return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
503         }
504
505         error = ia_css_eventq_send(q, evt_id, 0, 0, 0);
506         return_err = ia_css_convert_errno(error);
507         IA_CSS_LEAVE_ERR_PRIVATE(return_err);
508         return return_err;
509 #else
510         (void)evt_id;
511         return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
512 #endif
513 }
514
515 enum ia_css_err ia_css_bufq_enqueue_tag_cmd(
516         uint32_t item)
517 {
518 #if !defined(HAS_NO_INPUT_SYSTEM)
519         enum ia_css_err return_err;
520         int error = 0;
521         ia_css_queue_t *q;
522
523         IA_CSS_ENTER_PRIVATE("item=%d", item);
524         q = bufq_get_qhandle(sh_css_host2sp_tag_cmd_queue, -1, -1);
525         if (NULL == q) {
526                 IA_CSS_ERROR("queue is not initialized");
527                 return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
528         }
529         error = ia_css_queue_enqueue(q, item);
530
531         return_err = ia_css_convert_errno(error);
532         IA_CSS_LEAVE_ERR_PRIVATE(return_err);
533         return return_err;
534 #else
535         (void)item;
536         return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
537 #endif
538 }
539
540 enum ia_css_err ia_css_bufq_deinit(void)
541 {
542         return IA_CSS_SUCCESS;
543 }
544
545 static void bufq_dump_queue_info(const char *prefix, ia_css_queue_t *qhandle)
546 {
547         uint32_t free = 0, used = 0;
548         assert(prefix != NULL && qhandle != NULL);
549         ia_css_queue_get_used_space(qhandle, &used);
550         ia_css_queue_get_free_space(qhandle, &free);
551         ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s: used=%u free=%u\n",
552                 prefix, used, free);
553
554 }
555
556 void ia_css_bufq_dump_queue_info(void)
557 {
558         int i, j;
559
560         ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Queue Information:\n");
561
562         for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++) {
563                 for (j = 0; j < SH_CSS_MAX_NUM_QUEUES; j++) {
564                         snprintf(prefix, BUFQ_DUMP_FILE_NAME_PREFIX_SIZE,
565                                 "host2sp_buffer_queue[%u][%u]", i, j);
566                         bufq_dump_queue_info(prefix,
567                                 &css_queues.host2sp_buffer_queue_handles[i][j]);
568                 }
569         }
570
571         for (i = 0; i < SH_CSS_MAX_NUM_QUEUES; i++) {
572                 snprintf(prefix, BUFQ_DUMP_FILE_NAME_PREFIX_SIZE,
573                         "sp2host_buffer_queue[%u]", i);
574                 bufq_dump_queue_info(prefix,
575                         &css_queues.sp2host_buffer_queue_handles[i]);
576         }
577         bufq_dump_queue_info("host2sp_psys_event",
578                 &css_queues.host2sp_psys_event_queue_handle);
579         bufq_dump_queue_info("sp2host_psys_event",
580                 &css_queues.sp2host_psys_event_queue_handle);
581
582 #if !defined(HAS_NO_INPUT_SYSTEM)
583         bufq_dump_queue_info("host2sp_isys_event",
584                 &css_queues.host2sp_isys_event_queue_handle);
585         bufq_dump_queue_info("sp2host_isys_event",
586                 &css_queues.sp2host_isys_event_queue_handle);
587         bufq_dump_queue_info("host2sp_tag_cmd",
588                 &css_queues.host2sp_tag_cmd_queue_handle);
589 #endif
590 }