From patchwork Fri Aug 1 11:36:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWFyZWsgT2zFocOhaw==?= X-Patchwork-Id: 4662421 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9770F9F36A for ; Fri, 1 Aug 2014 11:37:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E37D20204 for ; Fri, 1 Aug 2014 11:37:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7DBF1201DE for ; Fri, 1 Aug 2014 11:37:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CE2A6E1C4; Fri, 1 Aug 2014 04:37:24 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 8ABAC89C07 for ; Fri, 1 Aug 2014 04:37:22 -0700 (PDT) Received: by mail-la0-f54.google.com with SMTP id hz20so3137420lab.27 for ; Fri, 01 Aug 2014 04:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=38TkhJrYgAEEp7yhAAN/rmw37nyPgiIN+VlIjKmihls=; b=xNFzhPa5bYxtX6vyyowThjMJRWOazlGkqlUexHk5Jz2vJVnTZFRIYiyhJiaauTM54a Y0vWPe0JpCUBapjUhXJ8C9/ukzcHJSCLZcnabqQRRR7/a1CIJQXjbxKWOe7GFi1Rq5YB Maspr1FOwVwQjT2V+cKlfbpxiqLvPlZAnIVw5CRa876mLB5elqNdSnA3uAhIn7NUQdoN WCmgV05uggE1Gj5yD+NUTgU9N4uIc2Iis8DpIVy3tct0adVczcm3boCuAerg1eiuyJiP a0RKdSN+46Ug1MpHuPuG1qmTy660aHM8ORrc73AWeZApK4zekKECyVrllugzc/tr7bks Vfzw== X-Received: by 10.152.42.196 with SMTP id q4mr5026398lal.47.1406893040700; Fri, 01 Aug 2014 04:37:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.68.166 with HTTP; Fri, 1 Aug 2014 04:36:39 -0700 (PDT) In-Reply-To: References: <53D286A4.20904@t-online.de> <53DB40FE.3090306@t-online.de> From: =?UTF-8?B?TWFyZWsgT2zFocOhaw==?= Date: Fri, 1 Aug 2014 13:36:39 +0200 Message-ID: Subject: =?UTF-8?B?UmU6IFtSYWRlb24gUlYyODBdIHJhZGVvbl9jc19nZW0uYzoxODE6IGNzX2dlbV93cml0ZQ==?= =?UTF-8?B?X3JlbG9jOiBBc3NlcnRpb24gwrtib2ktPnNwYWNlX2FjY291bnRlZMKrIGZhaWxlZCwgY29yZSBkdW1w?= =?UTF-8?B?ZWQ=?= To: Jochen Rollwagen Cc: Maling list - DRI developers X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Does the attached libdrm patch fix the issue for you? Marek On Fri, Aug 1, 2014 at 1:16 PM, Marek Olšák wrote: > Not in this case. You added a fail path to a function which isn't > supposed to fail under these circumstances. No wonder Mesa couldn't > cope with it. It really has nothing to do with your original issue. > > Marek > > On Fri, Aug 1, 2014 at 9:25 AM, Jochen Rollwagen wrote: >> I've built the latest libdrm and replaced the assertion in radeon_cs_gem.c. >> with >> >> if (!boi->space_accounted) return -EINVAL; >> >> I now get the following crash in the cutscene: >> >> >> CS section size missmatch start at (r200_state_init.c,ctx_emit_cs,487) 28 vs >> 24 >> CS section end at (r200_state_init.c,ctx_emit_cs,520) >> CS section size missmatch start at (r200_state_init.c,tex_emit_mm,572) 13 vs >> 11 >> CS section end at (r200_state_init.c,tex_emit_mm,588) >> drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. >> See dmesg for more info. >> >> >> dmesg output is: >> >> [ 1232.744676] [drm:radeon_cs_packet_next_reloc] *ERROR* No packet3 for >> relocati >> on for packet at 34. >> [ 1232.744691] [drm] ib[34]=0x00000712 >> [ 1232.744694] [drm] ib[35]=0x00010340 >> [ 1232.744698] [drm:r200_packet0_check] *ERROR* No reloc for ib[33]=0x1C40 >> [ 1232.744701] [drm] ib[32]=0x00000710 >> [ 1232.744704] [drm] ib[33]=0x00000000 >> [ 1232.744707] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream ! >> >> So it's really a mesa bug :-( >> >> >> >> Am 27.07.2014 um 14:47 schrieb Marek Olšák: >>> >>> I think the problem is the driver hasn't called >>> >>> radeon_cs_space_add_persistent_bo. >>> >>> Marek >>> >>> On Fri, Jul 25, 2014 at 6:32 PM, Jochen Rollwagen >>> wrote: >>>> >>>> I've recently ported the peopsxgl OpenGL-GPU-Plugin for the pcsx >>>> Playstation1 Emulator to the Powerpc-architecture. When running certain >>>> games (for instance "Vagrant Stories") during longer cut-scenes i get a >>>> reproducible crash of the radeon drm driver (i.e. it always crashes at >>>> certain points in the scene) with the following message (in german): >>>> >>>> pcsx: radeon_cs_gem.c:181: cs_gem_write_reloc: Zusicherung >>>> »boi->space_accounted« nicht erfüllt. >>>> Abgebrochen (Speicherabzug geschrieben) >>>> >>>> This happens with all the latest 3.10, 3.12 and 3.14 kernels. >>>> >>>> Other than that i'm running the latest xorg-ati driver, libdrm and mesa >>>> from >>>> git on a Mac Mini G4 (PowerPC). >>>> >>>> OpenGL vendor string: Mesa Project >>>> OpenGL renderer string: Mesa DRI R200 (RV280 5962) TCL DRI2 >>>> OpenGL version string: 1.3 Mesa 10.1.6 (git-42f86ef) >>>> >>>> I guess the issue is memory/vm/swap-related since the machine only has 1 >>>> gb >>>> RAM. The GPU has 64 MB VRAM. >>>> >>>> Any ideas what i could do to avoid these crashes ? >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> dri-devel mailing list >>>> dri-devel@lists.freedesktop.org >>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel >> >> From a9410a10d2b0986b93d76d1e14c545d64c4e70bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 1 Aug 2014 13:30:50 +0200 Subject: [PATCH] radeon: allow write_reloc with unaccounted buffers to cope with Mesa bug --- radeon/radeon_cs_gem.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c index b87c6b1..bcfa05b 100644 --- a/radeon/radeon_cs_gem.c +++ b/radeon/radeon_cs_gem.c @@ -178,6 +178,15 @@ static int cs_gem_write_reloc(struct radeon_cs_int *cs, uint32_t idx; unsigned i; + if (!boi->space_accounted) { + struct radeon_cs *rcs = (struct radeon_cs*)cs; + int r; + + radeon_cs_space_add_persistent_bo(rcs, bo, read_domain, write_domain); + r = radeon_cs_space_check(rcs); + if (r) + return r; + } assert(boi->space_accounted); /* check domains */ -- 1.9.1