[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251031-b4-vc-sm-cma-v1-4-0dd5c0ec3f5c@ideasonboard.com>
Date: Fri, 31 Oct 2025 22:57:24 +0530
From: Jai Luthra <jai.luthra@...asonboard.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>,
Raspberry Pi Kernel Maintenance <kernel-list@...pberrypi.com>,
bcm-kernel-feedback-list@...adcom.com
Cc: Dave Stevenson <dave.stevenson@...pberrypi.com>,
Phil Elwell <phil@...pberrypi.com>, Stefan Wahren <wahrenst@....net>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Kieran Bingham <kieran.bingham@...asonboard.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Christian König <christian.koenig@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Jai Luthra <jai.luthra@...asonboard.com>,
Dave Stevenson <dave.stevenson@...pberrypi.org>
Subject: [PATCH 04/13] platform/raspberrypi: vchiq-mmal: Fix
client_component for 64 bit kernel
From: Dave Stevenson <dave.stevenson@...pberrypi.org>
The MMAL client_component field is used with the event
mechanism to allow the client to identify the component for
which the event is generated.
The field is only 32bits in size, therefore we can't use a
pointer to the component in a 64 bit kernel.
Component handles are already held in an array per VCHI
instance, so use the array index as the client_component handle
to avoid having to create a new IDR for this purpose.
Signed-off-by: Dave Stevenson <dave.stevenson@...pberrypi.org>
Signed-off-by: Jai Luthra <jai.luthra@...asonboard.com>
---
drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c b/drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c
index 1ad00bb0a02b482719a75749ed6ca50f43df24b2..6381495fc3867013f74bd3754ed64e0a1ce01574 100644
--- a/drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c
+++ b/drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c
@@ -459,9 +459,9 @@ buffer_from_host(struct vchiq_mmal_instance *instance,
static void event_to_host_cb(struct vchiq_mmal_instance *instance,
struct mmal_msg *msg, u32 msg_len)
{
- /* FIXME: Not going to work on 64 bit */
+ int comp_idx = msg->u.event_to_host.client_component;
struct vchiq_mmal_component *component =
- (struct vchiq_mmal_component *)msg->u.event_to_host.client_component;
+ &instance->component[comp_idx];
struct vchiq_mmal_port *port = NULL;
struct mmal_msg_context *msg_context;
u32 port_num = msg->u.event_to_host.port_num;
--
2.51.0
Powered by blists - more mailing lists