Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1851839imm; Thu, 23 Aug 2018 09:47:33 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdafx7dUHHQdDKcNFZdlgbIzNqlP0hTPV5iBGVAREcitA1FJr5tXUBiiBKLZ1EdsD0E3AEUU X-Received: by 2002:a17:902:6681:: with SMTP id e1-v6mr1501964plk.109.1535042853382; Thu, 23 Aug 2018 09:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535042853; cv=none; d=google.com; s=arc-20160816; b=hbuMtcsCJJWjka836OwX887l6565FJ4YtL4VsnzyodTnaEbgjRDZfbfAI1ALQaKgqE Cw3+a510tBYs90Lm/hdmg0Nz8sCCf+1XB4R2SKbNd+2O9UKWbhCfzjiTk5uYFYRDyW+E Wo5EobCVZfUjUyAyNFAod0W8Jw1svS6yoXmX/HGsCKWIkBEoemewjYkjFQs4HgkSeraq berqh3CR77tf3k0zN/rasoc1FKoY0MJcYJfi46w5jJ4DArFhOm6Do6EmgUEyYJkl8Kgq azTJUi+41Df+EO28VS8GvR1rq6wYVOiFs6Uv79eRCisWEHhZZJYXNi3ts89xCeCnGsM+ 4fFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Aq9yB5oOirNbd6cfBQvzA6jlwpBTNpN4VpImQO/CuYA=; b=uDBe529UfSo2+UOh5DJomaJ/3/pyT0QxAgHWu5i/RWpqsNYU8VN84iCr0MF/6q0X+s Kk+tYn7lqSol+bnSO6m5qXX9IOD4MwSQhg+SVrLJlWcHH9JE6FCQ+0lWEtJ0+LEczXlF 7uCiSYDw4yYlNxQfEVblRGu6isBbwJiVSpStjr0o4FyvS6Z4KCYC1RsKUvHWwO+Ps8uD PxiUMfOjibvPdcX+5gqrXpfpafoV6AAo1O7AjU/UBh8HA2eA0v/04kZn92gjbW9ZBNjk DCezDe1UC6Lb/mdqbnlIluyYdic9e8ekvAnI7YMrwkZDHR1YRYmyY8Ubji3YJi/lXhda 3lHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b="Xnv/1t05"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2-v6si5176367pfb.365.2018.08.23.09.47.18; Thu, 23 Aug 2018 09:47:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b="Xnv/1t05"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726402AbeHWUJS (ORCPT + 99 others); Thu, 23 Aug 2018 16:09:18 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:38232 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726018AbeHWUJS (ORCPT ); Thu, 23 Aug 2018 16:09:18 -0400 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 Cc: Lucas Stach , Christoph Hellwig , linux-kernel@vger.kernel.org, Vineet Gupta , Alexey Brodkin , Russell King , Christian Gmeiner , dri-devel@lists.freedesktop.org, Eugeniy Paltsev 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; -- 2.14.4