From patchwork Thu Aug 23 16:38:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 961478 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="It+Sgv6K"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="Xnv/1t05"; 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 41x9935sM7z9s2P for ; Fri, 24 Aug 2018 02:39:03 +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=YjEcaOnIJ+RqAVaiJMw4/CK9q9BoAq3otyhz/j+F2Go=; b=It+ Sgv6KkXx0r7OX2E6JwUrb+Mqfx+SQCCttyS4n05ATqxVsEZNa+Po0dpiHMU9C3ng3OsrISBBUkj+d Epwwr1u0L3ACqkrwMuyg4BAR8FXGD0+E6u534zPMfl2808lR9qkcsMs2HGwowRVm+vxS/NgeLu3Mp PQr8n3xnA1/qns5+kIamJMTjej8IrIg7lTnnb+PLxCgj2x8KQVRSi7XpBcY8Bs+54iG7gBjZy7zCb IwZvQ8ApDRJrl7+lYWZQM8SvlCmZ685vJXkgKGNPiQdtxe3Sn4rt2Vcy+34TdlpNAkV8FnVg0W/ei qTv1vgybhqWTe43geFPPLkhTEENTAeQ==; 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 1fssdR-0005O3-Tl; Thu, 23 Aug 2018 16:39:01 +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 1fssdP-0005Mf-4S for linux-snps-arc@lists.infradead.org; Thu, 23 Aug 2018 16:39:00 +0000 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 235D110C1B2B; Thu, 23 Aug 2018 09:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1535042327; bh=R0h6vbexWZTqWKlDLR1ODkMZKV20PzRe29mWCzJRIlw=; h=From:To:Cc:Subject:Date:From; b=Xnv/1t05G+01tTZ+4YLgxRmH7H1n4qMVRuvB5oDVKwoop2HyXxKmSTuLtroDouSpT Oithc2aveARy7b5ZidaXD8isp4hueg3B4B8TmAz5Xx3sx2jfGL1e3XK8woQ5Zcrldk xxTn53ly+IInH9dZOwJ8VSD/QkqpT24FQ9jJNYjbe/pkxZy//ZecgEJ5qpbzN7Dx5/ IT3dqGJTlv/8sN+qDEWjLK2vyHRl0XsUwp2Ekxgd/Faoh91Ds8HXZVAONfX/CE8JIT SAIIXKgyaKc1MSh6flcAa8SDKknUzo39NK2anplmhJt7mUj7k/hxhFkBfkCNoacRRQ WpoxwQRevFuZg== Received: from paltsev-e7480.internal.synopsys.com (paltsev-e7480.internal.synopsys.com [10.121.3.36]) by mailhost.synopsys.com (Postfix) with ESMTP id 032FD5BE5; Thu, 23 Aug 2018 09:38:42 -0700 (PDT) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org, etnaviv@lists.freedesktop.org Subject: [PATCH] etnaviv: setup missing dma_mask Date: Thu, 23 Aug 2018 19:38:39 +0300 Message-Id: <20180823163839.14824-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-20180823_093859_180210_837BB86F X-CRM114-Status: GOOD ( 11.01 ) 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_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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, Christian Gmeiner , Russell King , Eugeniy Paltsev , Christoph Hellwig , Lucas Stach MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org As for today etnaviv device doesn't setup dma_mask. The etnaviv device is a virtual device not represented in DT so missing dma_mask isn't setup by generic plaform code (by of_dma_configure function). Missing dma_mask causes fails in some dma cache ops functions. For example it causes fails on map_* operations in generic dma_noncoherent_ops and dma_direct_ops. We faced with this behaviour after switching ARC to generic dma_noncoherent cache ops using. So fix this by setting dma_mask via dma_coerce_mask_and_coherent() Reviewed-by: Christoph Hellwig Signed-off-by: Eugeniy Paltsev --- 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;