staging: vc04_services: vc-sm-cma: Explicitly set DMA mask

The platform model originally handled the DMA mask. Now that
we are on the vchiq_bus we need to explicitly set this.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham
2024-06-06 16:38:02 +01:00
committed by Dom Cobley
parent 62fa016a3b
commit c536f73d12

View File

@@ -1477,8 +1477,17 @@ err_remove_debugfs:
/* Driver loading. */
static int bcm2835_vc_sm_cma_probe(struct vchiq_device *device)
{
int err;
pr_info("%s: Videocore shared memory driver\n", __func__);
err = dma_set_mask_and_coherent(&device->dev, DMA_BIT_MASK(32));
if (err) {
dev_err(&device->dev, "dma_set_mask_and_coherent failed: %d\n",
err);
return err;
}
sm_state = devm_kzalloc(&device->dev, sizeof(*sm_state), GFP_KERNEL);
if (!sm_state)
return -ENOMEM;