Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2242708ybl; Thu, 9 Jan 2020 09:14:36 -0800 (PST) X-Google-Smtp-Source: APXvYqyYfS6swe3lUmHhA1G8gIxbMjaLJksUQZP/920xO0Dm2218EFcAy+1owjzk30fIFoCjpmYM X-Received: by 2002:a05:6830:1e37:: with SMTP id t23mr9511457otr.16.1578590076342; Thu, 09 Jan 2020 09:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578590076; cv=none; d=google.com; s=arc-20160816; b=b1IZt5awaGKkcZbeb0/FhBp6tY66jKBP0H+qmR6d8u6c8xceqY/EnL3OFjICnMTAYx 9IZoFF49/8jqQPFobptJBuULF07rkJMkeJ7bNzqquyvWO3ekFtzBzpPs18eRhPm9HqvY oTqtH+Au+pZ/gGZRe65FNCLcS3lM6h4VoJfgks/gG/DVHrjeEGf+4X4YrIy3JdpsyEXj 2YMPggHgYp/nRePi3CxgdsDMQhYOmnWifE6HN7BKg++gJXiaTCZH48bhwL1wrO2tVus5 1eDIZIC21VDBJ3yidQmPaKXyHHzTb9ESCpcBa6ABjQJHvPOy6/EcYjZtgw4AwYqcBW/D 9Q/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=l9JbocNHfnh1XqW7inbeZStXqy4i5tQV+FKPW4yJ/6Y=; b=OO+5U4bAA+niBR+w1P7phYtXD7DlrIhvAwmU7VWI9vzsN6K8Rpt/L4h/H9YgTJe3e/ YoWIkuIZJ8nyp93Zenog9VuMpHMumh9T3jeImq84ljSjyPgtgyCf0mT3pJDA1k1R2JW+ gtI4NzRFyRaVnb9f/etAQjh/K2LcNmStlVVGwnm/ODbdG0jD+8fuWbH7K6QxmJWTdFen mwjqnBHZkkCFVAyMyQFeZ/tpVPQTZmrtTreGP2qQ6YE4+DK215D/8FNV9nI0ZlEzeU1S CSSS2e3kpdy7XtND4/l7F2rWCA6ho3/01Xb5Rb7g9lCqelvfC5mjLuJrAwxhN1pIiK9W eJmw== 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 w2si4330496otq.31.2020.01.09.09.14.23; Thu, 09 Jan 2020 09:14:36 -0800 (PST) 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 S1731564AbgAIOOk (ORCPT + 99 others); Thu, 9 Jan 2020 09:14:40 -0500 Received: from verein.lst.de ([213.95.11.211]:54875 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731559AbgAIOOk (ORCPT ); Thu, 9 Jan 2020 09:14:40 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 30C4468C4E; Thu, 9 Jan 2020 15:14:37 +0100 (CET) Date: Thu, 9 Jan 2020 15:14:36 +0100 From: Christoph Hellwig To: Woody Suwalski Cc: hch@lst.de, DRI mailing list , LKML , Christian =?iso-8859-1?Q?K=F6nig?= , "Deucher, Alexander" , Pavel Machek Subject: Re: Regression in 5.4 kernel on 32-bit Radeon IBM T40 Message-ID: <20200109141436.GA22111@lst.de> References: <400f6ce9-e360-0860-ca2a-fb8bccdcdc9b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <400f6ce9-e360-0860-ca2a-fb8bccdcdc9b@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Woody, sorry for the late reply, I've been off to a vacation over the holidays. On Sat, Dec 14, 2019 at 10:17:15PM -0500, Woody Suwalski wrote: > Regression in 5.4 kernel on 32-bit Radeon IBM T40 > triggered by > commit 33b3ad3788aba846fc8b9a065fe2685a0b64f713 > Author: Christoph Hellwig > Date:?? Thu Aug 15 09:27:00 2019 +0200 > > Howdy, > The above patch has triggered a display problem on IBM Thinkpad T40, where > the screen is covered with a lots of random short black horizontal lines, > or distorted letters in X terms. > > The culprit seems to be that the dma_get_required_mask() is returning a > value 0x3fffffff > which is smaller than dma_get_mask()0xffffffff.That results in > dma_addressing_limited()==0 in ttm_bo_device(), and using 40-bits dma > instead of 32-bits. Which is the intended behavior assuming your system has 1GB of memory. Does it? > If I hardcode "1" as the last parameter to ttm_bo_device_init() in place of > a call to dma_addressing_limited(),the problem goes away. I'll need some help from the drm / radeon / TTM maintainers if there are any other side effects from not passing the need_dma32 paramters. Obviously if the device doesn't have more than 32-bits worth of dram and no DMA offset we can't feed unaddressable memory to the device. Unfortunately I have a very hard time following the implementation of the TTM pool if it does anything else in this case.