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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 E0EFAC4741F for ; Mon, 28 Sep 2020 11:47:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70A5321D95 for ; Mon, 28 Sep 2020 11:47:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="SkNN19W1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726477AbgI1LrK (ORCPT ); Mon, 28 Sep 2020 07:47:10 -0400 Received: from crapouillou.net ([89.234.176.41]:58616 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726420AbgI1LrJ (ORCPT ); Mon, 28 Sep 2020 07:47:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1601293625; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DoVe+g+DYO+oFmZDLue8I5P2ojf9qtlA9KR9knBjw4s=; b=SkNN19W1v82/0aW5KrpnosZ0sPQb6t2LIROzYH12T4/aJLZAR9kEgeKI8tLMBwZe5/NLaK TfIngauhK7bDL8CLV4K+v2V05hBwXDEtEg6r9AOlmC2oTvViJLQFyHDvWNVfwsVRejVmmj 5z+qPulvDx1M9ipk3LpNvm6RRqawscU= Date: Mon, 28 Sep 2020 13:46:55 +0200 From: Paul Cercueil Subject: Re: linux-next: build failure after merge of the drm tree To: Christoph Hellwig Cc: Stephen Rothwell , Dave Airlie , DRI , Linux Next Mailing List , Linux Kernel Mailing List Message-Id: <72ADHQ.T6LL1SHQF0RG3@crapouillou.net> In-Reply-To: <20200928113415.GA555@lst.de> References: <20200928135405.73404219@canb.auug.org.au> <20200928060427.GA15041@lst.de> <20200928113415.GA555@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org Le lun. 28 sept. 2020 =E0 13:34, Christoph Hellwig a =E9crit=20 : > On Mon, Sep 28, 2020 at 12:15:56PM +0200, Paul Cercueil wrote: >> Hi Christoph, >>=20 >> Le lun. 28 sept. 2020 =E0 8:04, Christoph Hellwig a=20 >> =E9crit : >>> On Mon, Sep 28, 2020 at 01:54:05PM +1000, Stephen Rothwell wrote: >>>> Hi all, >>>>=20 >>>> After merging the drm tree, today's linux-next build (x86_64 >>>> allmodconfig) >>>> failed like this: >>>=20 >>> The driver needs to switch do dma_alloc_noncoherent +=20 >>> dma_sync_single* >>> like the other drivers converted in the dma tree. Paul, let me=20 >>> know if >>> you have any questions. >>=20 >> I don't dma_alloc* anything, DRM core does. I use the >> DMA_ATTR_NON_CONSISTENT attr with dma_mmap_attrs(). Is there a=20 >> replacement >> for that? >=20 > dma_mmap_attrs can only be used on allocations from dma_mmap_attrs=20 > with > the same attrs. As there is no allocation using=20 > DMA_ATTR_NON_CONSISTENT > in the drm core, something looks very fishy here. Is that a fact? I don't see why you couldn't change the cache settings=20 after allocation. In practice it works just fine. > Where does the allocation you try to mmap come from? All the=20 > allocations > in drivers/gpu/drm/drm_gem_cma_helper.c seems to use dma_alloc_wc (aka > dma_allloc_attrs with the DMA_ATTR_WRITE_COMBINE flag). It's the dma_alloc_wc. -Paul 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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 E9B39C4346E for ; Tue, 29 Sep 2020 07:13:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 516DF20754 for ; Tue, 29 Sep 2020 07:13:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="SkNN19W1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 516DF20754 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=crapouillou.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6161789E06; Tue, 29 Sep 2020 07:12:59 +0000 (UTC) Received: from crapouillou.net (crapouillou.net [89.234.176.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id C0A6689E69 for ; Mon, 28 Sep 2020 11:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1601293625; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DoVe+g+DYO+oFmZDLue8I5P2ojf9qtlA9KR9knBjw4s=; b=SkNN19W1v82/0aW5KrpnosZ0sPQb6t2LIROzYH12T4/aJLZAR9kEgeKI8tLMBwZe5/NLaK TfIngauhK7bDL8CLV4K+v2V05hBwXDEtEg6r9AOlmC2oTvViJLQFyHDvWNVfwsVRejVmmj 5z+qPulvDx1M9ipk3LpNvm6RRqawscU= Date: Mon, 28 Sep 2020 13:46:55 +0200 From: Paul Cercueil Subject: Re: linux-next: build failure after merge of the drm tree To: Christoph Hellwig Message-Id: <72ADHQ.T6LL1SHQF0RG3@crapouillou.net> In-Reply-To: <20200928113415.GA555@lst.de> References: <20200928135405.73404219@canb.auug.org.au> <20200928060427.GA15041@lst.de> <20200928113415.GA555@lst.de> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 29 Sep 2020 07:12:58 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Airlie , Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , DRI Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Le lun. 28 sept. 2020 =E0 13:34, Christoph Hellwig a =E9crit = : > On Mon, Sep 28, 2020 at 12:15:56PM +0200, Paul Cercueil wrote: >> Hi Christoph, >> = >> Le lun. 28 sept. 2020 =E0 8:04, Christoph Hellwig a = >> =E9crit : >>> On Mon, Sep 28, 2020 at 01:54:05PM +1000, Stephen Rothwell wrote: >>>> Hi all, >>>> = >>>> After merging the drm tree, today's linux-next build (x86_64 >>>> allmodconfig) >>>> failed like this: >>> = >>> The driver needs to switch do dma_alloc_noncoherent + = >>> dma_sync_single* >>> like the other drivers converted in the dma tree. Paul, let me = >>> know if >>> you have any questions. >> = >> I don't dma_alloc* anything, DRM core does. I use the >> DMA_ATTR_NON_CONSISTENT attr with dma_mmap_attrs(). Is there a = >> replacement >> for that? > = > dma_mmap_attrs can only be used on allocations from dma_mmap_attrs = > with > the same attrs. As there is no allocation using = > DMA_ATTR_NON_CONSISTENT > in the drm core, something looks very fishy here. Is that a fact? I don't see why you couldn't change the cache settings = after allocation. In practice it works just fine. > Where does the allocation you try to mmap come from? All the = > allocations > in drivers/gpu/drm/drm_gem_cma_helper.c seems to use dma_alloc_wc (aka > dma_allloc_attrs with the DMA_ATTR_WRITE_COMBINE flag). It's the dma_alloc_wc. -Paul _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel