From patchwork Tue Aug 14 14:12:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 957534 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mwA95OMh"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="H+NXMFoC"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41qZLS2hF1z9sBx for ; Wed, 15 Aug 2018 00:12:48 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=sh4B9NUIEycWkXwTquuBoBKAB9PzhWp182AC0Z85Ed4=; b=mwA 95OMh5Ff88etaaHFiujHVhENyBm8q/lwXhY3ZtBYXtzJ249khK5bdBcMJ4yd2Sz9bGRuQYazdfjFT vNQ+Sq3V4Tlhc1DcQ7JhBUccUduQgYE7mpD6ehadUfQOijbEujb3b9Kfd52W7qXJoYVUfdEoorQ15 sgQaKM8LUapY+4J6XQV/328hVxGx1B1tmob88DTRGMT+ve2g46MFP48wRqxLLwCA/PV69n7uLhfnk HnCzywBrOD3X/FrVj0dXqzaDg1t8T7HM6sp6x3l7m6NVWnOTFLGMiFjMoGUUwqEideMxFRkdsGJdH zCTYdN0akz+lx+BEDg0Dii7B58f8swg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpa3y-00009P-0p; Tue, 14 Aug 2018 14:12:46 +0000 Received: from smtprelay2.synopsys.com ([198.182.60.111] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpa3v-00008E-CP for linux-snps-arc@lists.infradead.org; Tue, 14 Aug 2018 14:12:44 +0000 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 5FDD310C119D; Tue, 14 Aug 2018 07:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1534255952; bh=b+txpZOEHf4h8yNlZzz73CQXA+OuI/U6s98MsOHuw3o=; h=From:To:Cc:Subject:Date:From; b=H+NXMFoCJEzgMgdl8OkSi+lkFGt4/0grOxfX1DLXMg67/GTiFBOhT03DxjycZJJId oYPhaFE0URZi8kybEDroWx4wsUtXogPCukX+1rgVkhNx45/xXojAH1MbcrgWegCYtS 3BAwCNe8+rLyOE02X2YbL68M8Y/FE3cU31AyMOHkecxzi+oq6vahXHM+kYs9480Pc1 5p7jLOUxYoH/zNsaM4EWnYJC+zI7YRDYDmgellYQEZ4TjOIPWG6XavM0GZU4M3KpuY Z3wuS731m310JmYlc723ZnD4UVvzEjJpJaoItqozvjTLsCqYx/uTydmUaT54GUugEY 93KBDLu63AY+A== Received: from paltsev-e7480.internal.synopsys.com (paltsev-e7480.internal.synopsys.com [10.121.8.86]) by mailhost.synopsys.com (Postfix) with ESMTP id 7931756E2; Tue, 14 Aug 2018 07:12:28 -0700 (PDT) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org, Lucas Stach , Christoph Hellwig Subject: [RFC] etnaviv: missing dma_mask Date: Tue, 14 Aug 2018 17:12:25 +0300 Message-Id: <20180814141225.6123-1-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.14.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180814_071243_437529_B44DF82A X-CRM114-Status: GOOD ( 11.07 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.60.111 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vineet Gupta , Alexey Brodkin , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org, Christian Gmeiner , Russell King , Eugeniy Paltsev MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi Lucas, Christoph, After switching ARC to generic dma_noncoherent cache ops etnaviv driver start failing on dma maping functions because of dma_mask lack. So I'm wondering is it valid case to have device which is DMA capable and doesn't have dma_mask set? If not, then I guess something like that should work (at least it works for ARC): Signed-off-by: Eugeniy Paltsev Reviewed-by: Christoph Hellwig --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 540b59fb4103..69d80937e021 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -593,7 +593,7 @@ static int etnaviv_pdev_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct component_match *match = NULL; - dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); + dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (!dev->platform_data) { struct device_node *core_node;