From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116AbdJPJms (ORCPT ); Mon, 16 Oct 2017 05:42:48 -0400 Received: from hermes.aosc.io ([199.195.250.187]:47515 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbdJPJmr (ORCPT ); Mon, 16 Oct 2017 05:42:47 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 16 Oct 2017 17:42:46 +0800 From: icenowy@aosc.io To: maxime.ripard@free-electrons.com Cc: Chen-Yu Tsai , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [linux-sunxi] Re: [PATCH 5/7] drm/sun4i: backend: Offset layer buffer address by DRAM starting address In-Reply-To: <20171016080043.xqpcxj7xfckcxdem@flea.lan> References: <20171014040252.9621-1-wens@csie.org> <20171014040252.9621-6-wens@csie.org> <20171016080043.xqpcxj7xfckcxdem@flea.lan> Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2017-10-16 16:00,Maxime Ripard 写道: > Hi, > > I've applied all the other patches. > > On Sat, Oct 14, 2017 at 12:02:50PM +0800, Chen-Yu Tsai wrote: >> The display backend, as well as other peripherals that have a DRAM >> clock gate and access DRAM directly, bypassing the system bus, >> address the DRAM starting from 0x0, while physical addresses the >> system uses starts from 0x40000000 (or 0x20000000 in A80's case). >> >> Correct the address configured into the backend layer registers >> by PHYS_OFFSET to account for this. > > However, I'm a bit confused at this. > > The driver has been working so far, which it wouldn't have been able > to if the address was wrong. How was this problem noticed, and how can > that fix not be an issue in itself? On devices with <=1GiB (0x40000000) DRAM, the DRAM access will just wrap back and no problem would be seen. > > Thanks! > Maxime > > -- > Maxime Ripard, Free Electrons > Embedded Linux and Kernel engineering > http://free-electrons.com