Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1377643imm; Thu, 23 Aug 2018 01:56:48 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxBOWwzM+a7kyv8iBAegXPxi0KH1GNsQ6PE1kagvbQYG1Vt9D9znQD/t+ri4oKPdOONojIr X-Received: by 2002:a17:902:70cc:: with SMTP id l12-v6mr57555848plt.132.1535014608926; Thu, 23 Aug 2018 01:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535014608; cv=none; d=google.com; s=arc-20160816; b=Ad8zwb0jTK3lnd8NcrD5MikAkWXeT50JQg9Vsnt47oi3zYuOAbQoVWoqp0QCBIcptZ R7SB9mZqqLUlU5Hft6CGISmNMdwngdMimXOu6FCK49lVCcpGb0ukOokDjaRQditPn7HE B/H5A5sfTE45AAChIkNQNJCRIV1+t1FW9W/6Qo811kAL8NbivigFk7Pdh7DQh6VHvran NjW0N04Z8rYPuwwakU5IrglWbTOOT7lULIDuENUjKTHP5cZhe2Ft21PcTxblZ4LTOOY9 p5g9I/6sbMe7E1gr4XSlmuVO0YoykSWDNCJh7wbsfrKQY0JvUmIsnFTtaZG2Uw828PiI JxeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=DAoKs0xPrqxJNnVTtzHN/rB+UuMFss/p5mnls+67gAQ=; b=xoZ7ZiJxZXqFWjWxpX1QpYUclS8d7tfBbR+qNLx/T/O61sCsDZteXRVMkHKwkiEDmM GS3PDIceOCZIhq9Gb31NxKD7AYuji8kfw/ylS+143pCNZKoxtgWTrQT4BuoVdErCAQDT NOdQoRiIpnDBCSheyuJcKSjC8iWj5B1ZDWuOiSqrF/KgA2i0zPFhZLQEFktcShkbK0zd XU28gxotEJf+XOe43p46U5USZbeFJU3u4sBGB4KdHgLu63NaJ7waKwHRw4dOzMz1Sop6 ohnRoVgXKKfma4m7yWxjQx3dRlBb2ZnGn3mKmEiRKoNKeB8a7n1gU6JGlR7heMRLRTHs rG4g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n22-v6si3991679pgd.375.2018.08.23.01.56.33; Thu, 23 Aug 2018 01:56:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727941AbeHWMXC (ORCPT + 99 others); Thu, 23 Aug 2018 08:23:02 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:34131 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727067AbeHWMXB (ORCPT ); Thu, 23 Aug 2018 08:23:01 -0400 Received: from kresse.hi.pengutronix.de ([2001:67c:670:100:1d::2a]) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1fslNi-0004th-QY; Thu, 23 Aug 2018 10:54:18 +0200 Message-ID: <1535014456.2724.1.camel@pengutronix.de> Subject: Re: [RFC] etnaviv: missing dma_mask From: Lucas Stach To: Christoph Hellwig , Eugeniy Paltsev Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, Vineet Gupta , Alexey Brodkin , Russell King , Christian Gmeiner , etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Thu, 23 Aug 2018 10:54:16 +0200 In-Reply-To: <20180817064222.GB10811@lst.de> References: <20180814141225.6123-1-Eugeniy.Paltsev@synopsys.com> <20180817064222.GB10811@lst.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::2a X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Freitag, den 17.08.2018, 08:42 +0200 schrieb Christoph Hellwig: > On Tue, Aug 14, 2018 at 05:12:25PM +0300, Eugeniy Paltsev wrote: > > 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): > > This looks ok is a minimal fix: > > Reviewed-by: Christoph Hellwig > > But why doesn't this device have a dma-range property in DT? Because the etnaviv device is a virtual device not represented in DT, as it is only used to expose the DRM device, which may cover multiple GPU core devices. The GPU core devices are properly configured from DT, but unfortunately many of the dma related operations happen through the DRM device. We could fix this by replacing many of the DRM helpers with etnaviv specific functions handling dma per GPU core, but it isn't a clear win right now, as generally on SoCs with multiple GPU cores, the devices are on the same bus and have the same dma requirements. Regards, Lucas