From patchwork Tue Sep 10 13:03:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 2866011 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CC2E6BF43F for ; Tue, 10 Sep 2013 13:15:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE6F42018A for ; Tue, 10 Sep 2013 13:15:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 806C02012F for ; Tue, 10 Sep 2013 13:15:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 24B7BE7189 for ; Tue, 10 Sep 2013 06:15:16 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 688 seconds by postgrey-1.32 at gabe; Tue, 10 Sep 2013 06:14:54 PDT Received: from smtp-vbr7.xs4all.nl (smtp-vbr7.xs4all.nl [194.109.24.27]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E59DE70A7 for ; Tue, 10 Sep 2013 06:14:54 -0700 (PDT) Received: from tschai.lan (166.80-203-20.nextgentel.com [80.203.20.166] (may be forged)) (authenticated bits=0) by smtp-vbr7.xs4all.nl (8.13.8/8.13.8) with ESMTP id r8AD3AYD045567; Tue, 10 Sep 2013 15:03:11 +0200 (CEST) (envelope-from hverkuil@xs4all.nl) Received: from [127.0.0.1] (localhost [127.0.0.1]) by tschai.lan (Postfix) with ESMTPSA id 0EAB52A0764; Tue, 10 Sep 2013 15:03:06 +0200 (CEST) Message-ID: <522F1889.7090508@xs4all.nl> Date: Tue, 10 Sep 2013 15:03:05 +0200 From: Hans Verkuil User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130630 Icedove/17.0.7 MIME-Version: 1.0 To: Alex Deucher Subject: Re: drm/radeon: "ring test failed" on PA-RISC Linux References: <995101375614033@web11d.yandex.ru> <197191378745089@web11j.yandex.ru> In-Reply-To: X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Maling list - DRI developers X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 09/10/2013 02:37 PM, Alex Deucher wrote: > On Tue, Sep 10, 2013 at 5:20 AM, Alex Ivanov wrote: >> Alex, >> >> 09.09.2013, ? 21:43, Alex Deucher ???????(?): >> >>> On Mon, Sep 9, 2013 at 12:44 PM, Alex Ivanov wrote: >>>> Folks, >>>> >>>> We (people at linux-parisc @ vger.kernel.org mail list) are trying to make >>>> native video options of the latest PA-RISC servers and workstations >>>> (these are ATIs, most of which are based on R100/R300/R420 chips) work >>>> correctly on this platform (big endian pa-risc). >>>> >>>> However, we hadn't much success. DRM fails every time with >>>> "ring test failed" for both AGP & PCI. >>>> >>>> Maybe you would give us some suggestions that we could check? >>>> >>>> Topic started here: >>>> http://www.spinics.net/lists/linux-parisc/msg04908.html >>>> And continued there: >>>> http://www.spinics.net/lists/linux-parisc/msg04995.html >>>> http://www.spinics.net/lists/linux-parisc/msg05006.html >>>> >>>> Problems we've already resolved without any signs of progress: >>>> - Checked the successful microcode load >>>> "parisc AGP GART code writes IOMMU entries in the wrong byte order and >>>> doesn't add the coherency information SBA code adds" >>>> "our PCI BAR setup doesn't really work very well together with the Radeon >>>> DRM address setup. DRM will generate addresses, which are even outside >>>> of the connected LBA" >>>> >>>> Things planned for a check: >>>> "The drivers/video/aty uses >>>> an endian config bit DRM doesn't use, but I haven't tested whether >>>> this makes a difference and how it is connected to the overall picture." >>> >>> I don't think that will any difference. radeon kms works fine on >>> other big endian platforms such as powerpc. >> >> Good! I'll opt it out then. Actually, I am experiencing exactly the same problem on a Sam460ex ppc system, at least as of 3.9 (the last time I tried it). Very rarely the ringtest would pass, but then it would fail somewhere else. I never could figure it out since as far as I could tell all the addresses and logic was correct. It wasn't important enough for me to work more on it, but I'd be happy to test code. I'm travelling for the next week and a half, so I can't do anything right now. One bug I found when working on drm/kms support for the ppc was that in struct ttm_bus_placement the base address type was wrong: it should be phys_addr_t, not unsigned long. The PPC460 is in 32-bit mode but physical addresses are >32 bits. The patch below fixes that. I always wanted to post this fix, but never got around to it... Regards, Hans Signed-off-by: Hans Verkuil --- arch/powerpc/sysdev/ppc4xx_msi.c | 6 +++--- drivers/gpu/drm/radeon/radeon_device.c | 2 +- include/drm/ttm/ttm_bo_api.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 49b0659..fa33568 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1066,7 +1066,7 @@ int radeon_device_init(struct radeon_device *rdev, if (rdev->rmmio == NULL) { return -ENOMEM; } - DRM_INFO("register mmio base: 0x%08X\n", (uint32_t)rdev->rmmio_base); + DRM_INFO("register mmio base: 0x%llx\n", (uint64_t)rdev->rmmio_base); DRM_INFO("register mmio size: %u\n", (unsigned)rdev->rmmio_size); /* io port mapping */ diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 3cb5d84..fcdb208 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h @@ -81,7 +81,7 @@ struct ttm_placement { */ struct ttm_bus_placement { void *addr; - unsigned long base; + phys_addr_t base; unsigned long size; unsigned long offset; bool is_iomem;