diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2017-11-22 16:34:49 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2017-11-22 16:41:24 +0900 |
commit | c36ccbb086a833901cfe6eb24c0e9aaa25d43174 (patch) | |
tree | 904701983a86f73c334fbf934eeb09de8960f860 | |
parent | ffab0d4d01571fc174adcdb4c711b84b786165e7 (diff) | |
download | linux-rpi3-c36ccbb086a833901cfe6eb24c0e9aaa25d43174.tar.gz linux-rpi3-c36ccbb086a833901cfe6eb24c0e9aaa25d43174.tar.bz2 linux-rpi3-c36ccbb086a833901cfe6eb24c0e9aaa25d43174.zip |
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 <sw0312.kim@samsung.com>
-rw-r--r-- | drivers/media/platform/bcm2835/mmal-vchiq.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |