[libcamera-devel] [PATCH 5/6] include: linux: intel-ipu3: Force alignement to 32 bytes
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri May 24 21:37:22 CEST 2019
Hi Jacopo,
On Fri, May 24, 2019 at 06:21:38PM +0200, Jacopo Mondi wrote:
> Fix compilation error:
> include/linux/intel-ipu3.h:2475:35: error: ‘ipu3_uapi_acc_param::awb_fr’
> offset 36756 in ‘ipu3_uapi_acc_param’ isn’t aligned to 32
> [-Werror=packed-not-aligned]
>
> by forcing alignment to 32 bytes for struct ipu3_uapi_awb_fr_config_s.
>
> As the header is exported from Linux v5.1 this is a workaround and
> should probably be fixed in the kernel headers themselves.
Does it change the layout of the structure in memory ? If so we can't do
this, as the structure is passed to the hardware (or rather firmware) so
its layout is fixed.
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
> include/linux/intel-ipu3.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h
> index f758c9ba230b..fe6e8ed15eb1 100644
> --- a/include/linux/intel-ipu3.h
> +++ b/include/linux/intel-ipu3.h
> @@ -2472,7 +2472,7 @@ struct ipu3_uapi_acc_param {
> struct ipu3_uapi_yuvp1_yds_config yds2 __attribute__((aligned(32)));
> struct ipu3_uapi_yuvp2_tcc_static_config tcc __attribute__((aligned(32)));
> struct ipu3_uapi_anr_config anr;
> - struct ipu3_uapi_awb_fr_config_s awb_fr;
> + struct ipu3_uapi_awb_fr_config_s awb_fr __attribute__((aligned(32)));
> struct ipu3_uapi_ae_config ae;
> struct ipu3_uapi_af_config_s af;
> struct ipu3_uapi_awb_config awb;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list