1616#ifndef _SH_CSS_INTERNAL_H_
1717#define _SH_CSS_INTERNAL_H_
1818
19+ #include <linux/build_bug.h>
20+ #include <linux/stdarg.h>
21+
1922#include <system_global.h>
2023#include <math_support.h>
2124#include <type_support.h>
2225#include <platform_support.h>
23- #include <linux/stdarg.h>
2426
2527#include "input_formatter.h"
2628#include "input_system.h"
104106 */
105107#define CALC_ALIGNMENT_MEMBER (x , y ) (CEIL_MUL(x, y) - x)
106108#define SIZE_OF_HRT_VADDRESS sizeof(hive_uint32)
107- #define SIZE_OF_IA_CSS_PTR sizeof(uint32_t)
108109
109110/* Number of SP's */
110111#define NUM_OF_SPS 1
@@ -202,6 +203,8 @@ struct sh_css_ddr_address_map {
202203 (SH_CSS_MAX_STAGES * IA_CSS_NUM_MEMORIES * SIZE_OF_HRT_VADDRESS) + \
203204 (16 * SIZE_OF_HRT_VADDRESS))
204205
206+ static_assert (sizeof (struct sh_css_ddr_address_map ) == SIZE_OF_SH_CSS_DDR_ADDRESS_MAP_STRUCT );
207+
205208/* xmem address map allocation per pipeline */
206209struct sh_css_ddr_address_map_size {
207210 size_t isp_param ;
@@ -705,6 +708,8 @@ struct sh_css_hmm_buffer {
705708 SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT + \
706709 CALC_ALIGNMENT_MEMBER(SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT, 8))
707710
711+ static_assert (sizeof (struct sh_css_hmm_buffer ) == SIZE_OF_SH_CSS_HMM_BUFFER_STRUCT );
712+
708713enum sh_css_queue_type {
709714 sh_css_invalid_queue_type = -1 ,
710715 sh_css_host2sp_buffer_queue ,
@@ -724,6 +729,8 @@ struct sh_css_event_irq_mask {
724729#define SIZE_OF_SH_CSS_EVENT_IRQ_MASK_STRUCT \
725730 (2 * sizeof(uint16_t))
726731
732+ static_assert (sizeof (struct sh_css_event_irq_mask ) == SIZE_OF_SH_CSS_EVENT_IRQ_MASK_STRUCT );
733+
727734struct host_sp_communication {
728735 /*
729736 * Don't use enum host2sp_commands, because the sizeof an enum is
@@ -761,6 +768,8 @@ struct host_sp_communication {
761768 ((3 + N_CSI_PORTS) * sizeof(uint32_t)) + \
762769 (NR_OF_PIPELINES * SIZE_OF_SH_CSS_EVENT_IRQ_MASK_STRUCT))
763770
771+ static_assert (sizeof (struct host_sp_communication ) == SIZE_OF_HOST_SP_COMMUNICATION_STRUCT );
772+
764773struct host_sp_queues {
765774 /*
766775 * Queues for the dynamic frame information,
@@ -831,6 +840,8 @@ struct host_sp_queues {
831840#define SIZE_OF_HOST_SP_QUEUES_STRUCT \
832841 (SIZE_OF_QUEUES_ELEMS + SIZE_OF_QUEUES_DESC)
833842
843+ static_assert (sizeof (struct host_sp_queues ) == SIZE_OF_HOST_SP_QUEUES_STRUCT );
844+
834845extern int __printf (1 , 0 ) (* sh_css_printf )(const char * fmt , va_list args );
835846
836847static inline void __printf (1 , 2 ) sh_css_print (const char * fmt , ...)
0 commit comments