From patchwork Sat Sep 23 14:31:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 143933 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp242491vqu; Sat, 23 Sep 2023 08:34:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5U0SWK8W29C+AaEa6msI27jYw001EdXevShTYUM61h3iwFZxIXaxNSs3tfUQy+I94GvDC X-Received: by 2002:a17:902:e552:b0:1c4:16f7:d95b with SMTP id n18-20020a170902e55200b001c416f7d95bmr2010079plf.63.1695483260216; Sat, 23 Sep 2023 08:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695483260; cv=none; d=google.com; s=arc-20160816; b=b5tuf4ZoKWuHdz27P9fPvJ6f4zwQ33CORqG8mvmZQEzyw4jU0plK0ttr/vRJEhmlrr PgCIwNxueRuQnoeA3cYnVwiohrBC3FGfOEYYQpLacsAzQ4RFdxr7ORGXkieOIIukcfcZ py4EjufOEf+S6mTf5vWz+/R9oEnByuFxNGNfsyDq30acLgvOTNPqAIyQpvK8khVo0k6p UmdtR6UsDdOqwoeWHLjAqAuR4CTx+PafF/2VEbyfJ2m0BMUzRkSU/skH844hYZX0xLCi 07+cLYn5lZiySFCx4ncT5EX6hC8b/EcMk/BAidxXKBbceqs4ppD62/1Bp3XjouBX+ICX ZlYg== 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.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ja17-20020a170902efd100b001bf2dc67da3si5703515plb.209.2023.09.23.08.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 08:34:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; 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.36 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 pete.vger.email (Postfix) with ESMTP id A970E807CEF7; Sat, 23 Sep 2023 07:32:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231640AbjIWOcP (ORCPT + 29 others); Sat, 23 Sep 2023 10:32:15 -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 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 pete.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 (pete.vger.email [0.0.0.0]); Sat, 23 Sep 2023 07:32:52 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777843054763498394 X-GMAIL-MSGID: 1777843054763498394 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;