Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp271165rdh; Sat, 23 Sep 2023 09:36:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0Mptk5Y5DugtlYbIG1bS+Vy3KkN2jQkRo1z8Ndfu4pZXYuQ2+2CQHhJU5dGUqPN/3/dkP X-Received: by 2002:a17:902:c409:b0:1c3:ed30:cdf4 with SMTP id k9-20020a170902c40900b001c3ed30cdf4mr2539571plk.4.1695487002247; Sat, 23 Sep 2023 09:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695487002; cv=none; d=google.com; s=arc-20160816; b=R3mjRvW4RqN3o4jQsjwy2g+zAYrMVahOFWuc0xvaEguSn+qPDoLO8VvADV8dJHJs5K xvt2VFhOoZpdxbzvP8DsJtp4ehjo8yiJlL2Y/xfrdcNKNRxnRGCdejUe688SVoZ6eDt0 eFxmpNhdSYH/eRCKAfJ2FOEJBh6XXy5sAb3xSWzHmlEWRhfImrULavhxdn1aik82ZGm0 cBhIliRdOpoHa9Kfp1Ygxl37y7LVLoNwonmbGMT7zUgOsFfCszX2hMnQEm0rI0+wlurw bx3k2AZ7gJ9y6WxMOMu9QsK0rujhl+747mRs058u9lyteGCAR51YmLxyNEYOudyiEXeg NmSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QfMg9999WgQhAtfgf8hzLqstfWiZqGKl0aHBM0xvXK4=; fh=x1hGPnZeYvyedQGDVaFY4F5NZX5OfdEJxyYqoMYIkPY=; b=0GvL+F78cnLUwL6Rp59xmFOrwmpLUv40RkeVSpEeHposezfiddRNu4pLojiB+0slbk kOgHXSmNvpGE6N1RLhd9ICoq14tk9m6yIOSWctRYesQLH7ba3IbUtifjduzYEzCycEAe 27mjAiB+cgDSYbYHJ3EvaXuj90iDlth4Xi0oC5mrbUhQgaiNMGik/3xsoKCwgcX7iaue yITQs03gSw+CC8MiGtlQGBD7OJZzVsHTPXH+MPwV6Vm3+MF50d4jEAzWsUYfaBOzzb7H 7n8iKpUPpdCFFwwspiIhXzOCZX0xagoX/d6uUXz5nbL8M57ZlIZjUbFPQXeerTY9XbxD vntQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=YU6fSHWG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o9-20020a170903210900b001c46d3dcebasi5787450ple.449.2023.09.23.09.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 09:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=YU6fSHWG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 2196D80FF2B8; Sat, 23 Sep 2023 07:32:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231622AbjIWOcO (ORCPT + 99 others); Sat, 23 Sep 2023 10:32:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbjIWOcN (ORCPT ); Sat, 23 Sep 2023 10:32:13 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD5F011D; Sat, 23 Sep 2023 07:32:07 -0700 (PDT) Received: from umang.lan (unknown [IPv6:2001:818:e7d2:8300:2412:6733:7e63:fb46]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C638910FE; Sat, 23 Sep 2023 16:30:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1695479427; bh=97rsLMbhlIPh3+VcgvhrEUZUnrr2n4j9XSww0+luu9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YU6fSHWGOVySECtHQmD007BAdRgpUBygTtN540U9BRwoDq61OCbJhqooIhR2hxgt3 4Fy/6QnJ0f1hdr3qrJz6pLuZNrJu+QXgnrCmt/0Bom5usPWWG3aXNOZ3i3l6Bdwb5w ZQ7D38drhJ9Cyg6gplbQ0JG1RSsEEe0qVd8EawsI= From: Umang Jain 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 , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v12 1/6] staging: vc04_services: bcm2835-camera: Explicitly set DMA mask Date: Sat, 23 Sep 2023 20:01:55 +0530 Message-Id: <20230923143200.268063-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230923143200.268063-1-umang.jain@ideasonboard.com> References: <20230923143200.268063-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 23 Sep 2023 07:32:16 -0700 (PDT) X-Spam-Level: ** 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 --- .../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