public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Umang Jain <umang.jain@ideasonboard.com>
To: linux-staging@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Adrien Thierry <athierry@redhat.com>,
	Dan Carpenter <error27@gmail.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Umang Jain <umang.jain@ideasonboard.com>
Subject: [PATCH v12 1/6] staging: vc04_services: bcm2835-camera: Explicitly set DMA mask
Date: Sat, 23 Sep 2023 20:01:55 +0530	[thread overview]
Message-ID: <20230923143200.268063-2-umang.jain@ideasonboard.com> (raw)
In-Reply-To: <20230923143200.268063-1-umang.jain@ideasonboard.com>

In the following patches, vchiq_arm will be migrated to create and use
its own bus and all the vchiq drivers (bcm2835-camera, bcm2835-audio)
will be registered to it. Since the platform driver/device model
internally sets the DMA mask for its registered devices, we would have
to do it ourself when we remove the platform driver/device registration
for vchiq devices.

This patch explicitly sets the DMA mask to bcm2835-camera so as not
to introduce a regression when we move away from platform
device/driver model.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
 .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c   | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 346d00df815a..fcad5118f3e8 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1852,6 +1852,12 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
 	unsigned int resolutions[MAX_BCM2835_CAMERAS][2];
 	int i;
 
+	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	if (ret) {
+		dev_err(&pdev->dev, "dma_set_mask_and_coherent failed: %d\n", ret);
+		return ret;
+	}
+
 	ret = vchiq_mmal_init(&instance);
 	if (ret < 0)
 		return ret;
-- 
2.40.1


  reply	other threads:[~2023-09-23 14:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-23 14:31 [PATCH v12 0/6] staging: vc04_services: vchiq: Register devices with a custom bus_type Umang Jain
2023-09-23 14:31 ` Umang Jain [this message]
2023-09-23 14:31 ` [PATCH v12 2/6] staging: vc04_services: bcm2835-audio: Explicitly set DMA mask Umang Jain
2023-09-23 14:31 ` [PATCH v12 3/6] staging: vc04_services: vchiq_arm: Add new bus type and device type Umang Jain
2023-10-05  8:03   ` Greg Kroah-Hartman
2023-09-23 14:31 ` [PATCH v12 4/6] staging: vc04_services: vchiq_arm: Register vchiq_bus_type Umang Jain
2023-09-23 14:31 ` [PATCH v12 5/6] staging: bcm2835-camera: Register bcm2835-camera with vchiq_bus_type Umang Jain
2023-10-05  8:04   ` Greg Kroah-Hartman
2023-10-09  4:20     ` Umang Jain
2023-10-09 10:12       ` Greg Kroah-Hartman
2023-09-23 14:32 ` [PATCH v12 6/6] staging: bcm2835-audio: Register bcm2835-audio " Umang Jain
2023-10-05  8:04   ` Greg Kroah-Hartman
2023-09-23 14:33 ` [PATCH v12 0/6] staging: vc04_services: vchiq: Register devices with a custom bus_type Umang Jain
2023-09-30 10:10 ` Stefan Wahren
2023-10-05  8:05 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230923143200.268063-2-umang.jain@ideasonboard.com \
    --to=umang.jain@ideasonboard.com \
    --cc=athierry@redhat.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=error27@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox