From: Seung-Woo Kim Date: Wed, 22 Nov 2017 07:34:49 +0000 (+0900) Subject: bcm2835-camera: fix for WORKAROUND to build on arm64 X-Git-Tag: submit/tizen/20171207.072626~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c36ccbb086a833901cfe6eb24c0e9aaa25d43174;p=platform%2Fkernel%2Flinux-rpi3.git bcm2835-camera: fix for WORKAROUND to build on arm64 The bcm2835-v4l2 module has build error on arm64 because of not matched struct size and l2 cache function. Fix for WORKAROUND to build on arm64 with commenting out them. NOTE: it comments out cache operations and does not check vchiq message size, so it is not clear to work properly. Change-Id: Icd3e811cea4311499c3382d5a3bc9a2fbb1ad9f6 Signed-off-by: Seung-Woo Kim --- diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.c b/drivers/media/platform/bcm2835/mmal-vchiq.c index ec2853ba9d4b..b05319526338 100644 --- a/drivers/media/platform/bcm2835/mmal-vchiq.c +++ b/drivers/media/platform/bcm2835/mmal-vchiq.c @@ -276,9 +276,11 @@ static int bulk_receive(struct vchiq_mmal_instance *instance, msg_context->u.bulk.dts = msg->u.buffer_from_host.buffer_header.dts; msg_context->u.bulk.pts = msg->u.buffer_from_host.buffer_header.pts; +#ifdef CONFIG_ARM // only need to flush L1 cache here, as VCHIQ takes care of the L2 // cache. __cpuc_flush_dcache_area(msg_context->u.bulk.buffer->buffer, rd_len); +#endif /* queue the bulk submission */ vchi_service_use(instance->handle); @@ -714,7 +716,7 @@ static int send_synchronous_mmal_msg(struct vchiq_mmal_instance *instance, /* payload size must not cause message to exceed max size */ if (payload_len > (MMAL_MSG_MAX_SIZE - sizeof(struct mmal_msg_header))) { - pr_err("payload length %d exceeds max:%d\n", payload_len, + pr_err("payload length %d exceeds max:%lu\n", payload_len, (MMAL_MSG_MAX_SIZE - sizeof(struct mmal_msg_header))); return -EINVAL; } @@ -1873,6 +1875,7 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance) * directly (de)serialised from memory. */ +#ifdef CONFIG_ARM /* ensure the header structure has packed to the correct size */ BUILD_BUG_ON(sizeof(struct mmal_msg_header) != 24); @@ -1881,6 +1884,7 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance) /* mmal port struct is correct size */ BUILD_BUG_ON(sizeof(struct mmal_port) != 64); +#endif /* create a vchi instance */ status = vchi_initialise(&vchi_instance);