Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp241243ybn; Thu, 3 Oct 2019 04:31:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/LXtq9WowNWWv/MfEuXedouHR8gO1AVhbhC62yluBn06MMB+J2jZ8ZKCCtnr4fBWh6wjZ X-Received: by 2002:a17:906:f4a:: with SMTP id h10mr7066385ejj.158.1570102276193; Thu, 03 Oct 2019 04:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570102276; cv=none; d=google.com; s=arc-20160816; b=syw2eitEVRxHmDWqeE2/oRbpcKw86zMEsQCe0u4GiFfEth+JNPov5GoSIOGdjXnnHw nZJpXV9M0zp9+C88LaGk0acWJeXYyNpXkjaNO/0tviw0+fJNL1AEwBTGXcMCywBCBFiO VD8SOdkXC0lSBBdjQCL0QuaImtvUluEaYNVyv0CBMDcQgv/UqxTI+sNgTgsIUXj8Wmhk aT0b+8urzACOEKNLDpjCZ9Ca8AytpuuQbgdGyxdaMF4F4pz7/utjiobIS/UfkfpwHu9O 9j3isj+ALv4ogg2QFKx2tlu/+J2WZV1KaXeGn16wn/UN6OIrPGAOZL4OSym/zBe+hpnN 18ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=7FouVJ/dIv1OkEidSp7KDCs1I7o7vmlSASd6XzF4SQs=; b=CAmQgpRP0Y+onYbmWct53JzC24EHjsfGimKP/GntzhM3zdmtCC8ki5f99xuKAbkhq/ E3EDtujOi2zqtzD+1y8mEogaf4LIHkGieIm692gVvltAzSBxDAOGU9SJBytr5FE9bu3m iEbXttgQQbfQCYRqhjc2LGM4WZl73k3t/4lO6KqswdbcUrWUSvhrCuq1xHI7Js2OIWZM 0AAvnImVYHN6fSgHfszFZ/CmLe1a7OCplVIvZVj4ZJZACqnxPVwS4lZEsAOMvxbEXPfj XR48eUpYvvHyAZ3ItdtqL8+e6fikbfcjXdynxI9IuTofOtnGybNsSkDdCS+Dt9iZJeJG 8OOw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h42si1323885eda.90.2019.10.03.04.30.51; Thu, 03 Oct 2019 04:31:16 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730041AbfJCLaW (ORCPT + 99 others); Thu, 3 Oct 2019 07:30:22 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:32834 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729912AbfJCLaW (ORCPT ); Thu, 3 Oct 2019 07:30:22 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x93BRXVd017056 for ; Thu, 3 Oct 2019 07:30:20 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2vdfcjsp0y-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 03 Oct 2019 07:30:20 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 Oct 2019 12:30:18 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 3 Oct 2019 12:30:14 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x93BUDku57016436 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Oct 2019 11:30:13 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7F81A11C058; Thu, 3 Oct 2019 11:30:13 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9FA8511C052; Thu, 3 Oct 2019 11:30:12 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.8.153]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 3 Oct 2019 11:30:12 +0000 (GMT) Date: Thu, 3 Oct 2019 14:30:10 +0300 From: Mike Rapoport To: Russell King - ARM Linux admin Cc: Adam Ford , Fabio Estevam , Catalin Marinas , Linux Kernel Mailing List , Christoph Hellwig , The etnaviv authors , arm-soc , Linux Memory Management List , Andrew Morton , Lucas Stach Subject: Re: [PATCH v2 00/21] Refine memblock API References: <20190926160433.GD32311@linux.ibm.com> <20190928073331.GA5269@linux.ibm.com> <20191002073605.GA30433@linux.ibm.com> <20191003053451.GA23397@linux.ibm.com> <20191003084914.GV25745@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191003084914.GV25745@shell.armlinux.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 19100311-0012-0000-0000-00000353A8D8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19100311-0013-0000-0000-0000218EAF93 Message-Id: <20191003113010.GC23397@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-03_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910030107 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 03, 2019 at 09:49:14AM +0100, Russell King - ARM Linux admin wrote: > On Thu, Oct 03, 2019 at 08:34:52AM +0300, Mike Rapoport wrote: > > (trimmed the CC) > > > > On Wed, Oct 02, 2019 at 06:14:11AM -0500, Adam Ford wrote: > > > On Wed, Oct 2, 2019 at 2:36 AM Mike Rapoport wrote: > > > > > > > > > > Before the patch: > > > > > > # cat /sys/kernel/debug/memblock/memory > > > 0: 0x10000000..0x8fffffff > > > # cat /sys/kernel/debug/memblock/reserved > > > 0: 0x10004000..0x10007fff > > > 34: 0x2fffff88..0x3fffffff > > > > > > > > > After the patch: > > > # cat /sys/kernel/debug/memblock/memory > > > 0: 0x10000000..0x8fffffff > > > # cat /sys/kernel/debug/memblock/reserved > > > 0: 0x10004000..0x10007fff > > > 36: 0x80000000..0x8fffffff > > > > I'm still not convinced that the memblock refactoring didn't uncovered an > > issue in etnaviv driver. > > > > Why moving the CMA area from 0x80000000 to 0x30000000 makes it fail? > > I think you have that the wrong way round. I'm relying on Adam's reports of working and non-working versions. According to that etnaviv works when CMA area is at 0x80000000 and does not work when it is at 0x30000000. He also sent logs a few days ago [1], they also confirm that. [1] https://lore.kernel.org/linux-mm/CAHCN7xJEvS2Si=M+BYtz+kY0M4NxmqDjiX9Nwq6_3GGBh3yg=w@mail.gmail.com/ > > BTW, the code that complained about "command buffer outside valid memory > > window" has been removed by the commit 17e4660ae3d7 ("drm/etnaviv: > > implement per-process address spaces on MMUv2"). > > > > Could be that recent changes to MMU management of etnaviv resolve the > > issue? > > The iMX6 does not have MMUv2 hardware, it has MMUv1. With MMUv1 > hardware requires command buffers within the first 2GiB of physical > RAM. I've mentioned that patch because it removed the check for cmdbuf address for MMUv1: @@ -785,15 +768,7 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) PAGE_SIZE); if (ret) { dev_err(gpu->dev, "could not create command buffer\n"); - goto unmap_suballoc; - } - - if (!(gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION) && - etnaviv_cmdbuf_get_va(&gpu->buffer, &gpu->cmdbuf_mapping) > 0x80000000) { - ret = -EINVAL; - dev_err(gpu->dev, - "command buffer outside valid memory window\n"); - goto free_buffer; + goto fail; } /* Setup event management */ I really don't know how etnaviv works, so I hoped that people who understand it would help. > I've reported the problem previously but there was no resolution, > other than pointing the blame at CMA. > > https://lists.freedesktop.org/archives/dri-devel/2019-June/thread.html#223516 > > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up > According to speedtest.net: 11.9Mbps down 500kbps up -- Sincerely yours, Mike.