From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0950CA9EB9 for ; Wed, 23 Oct 2019 21:06:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70E762064A for ; Wed, 23 Oct 2019 21:06:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HwnKOtoK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70E762064A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3Nr6S4waQ+JY9qKAntbhXdQuQt+r/owjVhW7/WSSoeY=; b=HwnKOtoKtDsQc6 rusNVwhU1Fk/3dzH+7OaGFfhTaur4lLnQDaDxqaw4Luv1KIXBOGVNmbaQHhwG8g69IPEpN9/GiL0l oExrViheH7K65uvm/vhy+ZgMsqXlN2pvwvXMfUOppEs977+vQzvIJmkYrcJpQXzsR6e2HJDMGaHVu e712oz2f0JjC4802b9bjUwmXxQJIyTAQizAZUQvmpdp9DAaegpCJkPCwbfNFmIHb9EujkG0fC3BO3 aUzkiuCCbgraHon7IpD2L0D3GEnWUK+Rh0GE1xsruTf68PvS3DflZpp7CjrlM9ArXWB69JFUvvOut VcpMrR/92DlyJlXXIQ9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNNq7-0001lw-F0; Wed, 23 Oct 2019 21:06:43 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNNq4-0001ke-0Z; Wed, 23 Oct 2019 21:06:41 +0000 X-UUID: ae29dd25e3374e02892ee7938699e740-20191023 X-UUID: ae29dd25e3374e02892ee7938699e740-20191023 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1647297005; Wed, 23 Oct 2019 13:06:31 -0800 Received: from mtkmbs05n2.mediatek.inc (172.21.101.140) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 23 Oct 2019 14:06:31 -0700 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 24 Oct 2019 05:06:29 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 24 Oct 2019 05:06:21 +0800 Message-ID: <1571864784.19128.8.camel@mtksdaap41> Subject: Re: [PATCH 5/6] drm/mediatek: Convert to use CMA helpers From: CK Hu To: Rob Herring Date: Thu, 24 Oct 2019 05:06:24 +0800 In-Reply-To: References: <20191021214550.1461-1-robh@kernel.org> <20191021214550.1461-6-robh@kernel.org> <1cbca96c-19dd-1d15-949c-7fbcc15369b4@gmail.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191023_140640_059012_7D797A62 X-CRM114-Status: GOOD ( 20.98 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko =?ISO-8859-1?Q?St=FCbner?= , Neil Armstrong , David Airlie , Liviu Dudau , Sandy Huang , Laurent Pinchart , Benjamin Gaignard , Yannick Fertre , Nicolas Boichat , Kevin Hilman , Xinwei Kong , Xinliang Liu , "open list:ARM/Rockchip SoC..." , Chen-Yu Tsai , Noralf =?ISO-8859-1?Q?Tr=F8nnes?= , "James \(Qian\) Wang" , Philipp Zabel , Ulrich Hecht , Alexandre Torgue , Chen Feng , Maarten Lankhorst , Maxime Ripard , "moderated list:ARM/Mediatek SoC support" , dri-devel , Matthias Brugger , Daniel Vetter , Sean Paul , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Philippe Cornu , Vincent Abriou , Kieran Bingham , Maxime Coquelin , Rongrong Zou Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hi, Rob: On Wed, 2019-10-23 at 12:42 -0500, Rob Herring wrote: > On Tue, Oct 22, 2019 at 12:07 PM Matthias Brugger > wrote: > > > > Hi Rob, > > > > On 21/10/2019 23:45, Rob Herring wrote: > > > The only reason the Mediatek driver doesn't use the CMA helpers is it > > > sets DMA_ATTR_NO_KERNEL_MAPPING and does a vmap() on demand. Using > > > vmap() is not even guaranteed to work as DMA buffers may not have a > > > struct page. Now that the CMA helpers support setting > > > DMA_ATTR_NO_KERNEL_MAPPING as needed or not, convert Mediatek driver to > > > use CMA helpers. > > > > > > Cc: CK Hu > > > Cc: Philipp Zabel > > > Cc: David Airlie > > > Cc: Daniel Vetter > > > Cc: Matthias Brugger > > > Cc: linux-arm-kernel@lists.infradead.org > > > Cc: linux-mediatek@lists.infradead.org > > > Signed-off-by: Rob Herring > > > --- > > > > I tested this on my Chromebook with some patches on top of v5.4-rc1 [1], which > > work. If I add your patches on top of that, the system does not boot up. > > Unfortunately I don't have a serial console, so I wasn't able to see if there is > > any error message. > > Thanks for testing. I'm based on drm-misc-next, but don't see anything > obvious there that would matter. There are some mmap changes, but I > think they shouldn't matter. > > Did you have fbcon enabled? That may give more clues about where the problem is. There are priv->dma_dev for dma device, but it is not drm device. In mt8173.dtsi [1], there are mmsys device and ovl device, mmsys device is drm device and ovl device is mmsys's sub device which provide dma function, so ovl is the priv->dma_dev. I think your patch directly use drm device for dma operation and this would cause dma function fail. Please use priv->dma_dev for dma operation. Regards, CK [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/mediatek/mt8173.dtsi?h=v5.4-rc4 > > Rob _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek