From owner-freebsd-x11@FreeBSD.ORG Fri Sep 21 17:52:47 2012 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B614106566B for ; Fri, 21 Sep 2012 17:52:47 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id BED788FC19 for ; Fri, 21 Sep 2012 17:52:46 +0000 (UTC) Received: by wibhi8 with SMTP id hi8so1928864wib.13 for ; Fri, 21 Sep 2012 10:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7x632TuxDm97fsVtm+ZosK2hRjEefC20OFVUVxSRlpY=; b=JfSN0889Dfg4/X2Ped9PpNfhJcAZYAb7xvb/EDsKspN7HK7zgwzACtB+NE9O3DVzEW R4HeEqN5GUrtHdhzAxA8U3b0IYXnNWEZjlyK/EH3wEPFrA1Bsyj82Yn91q6Z6OHNDSbx FEWqQx4qpNdhpx08FldQCPfak8NVUd5Lx+doYWG755gG7P6YNXoCLdaigJOtyrjiQp8Z 0URMrVXaZaJT/uy2GM4USmn3MSf4OgwlBQx4akeodqsL9DrQ/VmySrC1gDs59LjIpu1q jCnwagnuMH21TIbqvBVKLbzEngMUsCOu2XIE5uuul+TWKO+Q17ndbwBY+q0ug54bcPQJ bGBw== MIME-Version: 1.0 Received: by 10.180.90.201 with SMTP id by9mr5890218wib.5.1348249959779; Fri, 21 Sep 2012 10:52:39 -0700 (PDT) Received: by 10.223.66.194 with HTTP; Fri, 21 Sep 2012 10:52:39 -0700 (PDT) In-Reply-To: <20120612110704.GM2337@deviant.kiev.zoral.com.ua> References: <4E8DF3F9.3090201@gmail.com> <20111006184623.GS1511@deviant.kiev.zoral.com.ua> <4E8E02E8.9000402@gmail.com> <4FD63519.1090507@gmail.com> <20120612110704.GM2337@deviant.kiev.zoral.com.ua> Date: Fri, 21 Sep 2012 10:52:39 -0700 Message-ID: From: Kevin Oberman To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: Andrey Kosachenko , freebsd-x11@freebsd.org Subject: Re: intel GPU hangs X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 17:52:47 -0000 On Tue, Jun 12, 2012 at 4:07 AM, Konstantin Belousov wrote: > On Mon, Jun 11, 2012 at 09:12:41PM +0300, Andrey Kosachenko wrote: >> I'd like to revive this topic. >> (It was started pretty much ago >> http://lists.freebsd.org/pipermail/freebsd-x11/2011-October/011210.html) >> >> Briefly: >> I've experienced sporadic GPU hangs (using 10-Current and trying >> different kms patches starting from the very beginning up to the latest >> all.15.*.patch). It has happened on my "workhorse" ThinkPad T410 (intel >> integrated graphics, chipset "Arrandale"). GPU hungs were not tied to >> usage of heavy 3D apps or whatever. Indeed I've never managed to >> identify what was wrong and I don't remember that smb. reported the >> same. Moreover somewhere around all.12.x.patch issue occurrence >> decreased almost to zero (once or twice per month) and so I abandoned to >> report it (recompiled kernel w/o debug stuff and forgot about it). >> >> Several weeks ago I had to use software for my private needs that is not >> working under BSD (I'm talking about Google Sketchup actually, free >> software (basic version) that allows to make 3D sketches easily). So I >> employed a VM for this (VirtualBox). So far so good. But as the >> complexity of models grew I started to catch more GPU hangups. It made >> me crazy. At last point it was enough to load model + perform 2-3 >> rotates and GPU reliably hanged >> --- smth. like below was in dmesg output >> [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung >> --- > This part of the report is meaningless, since almost all GPU problems > are reported as hung GPU with hangcheck timer report. The real information > about problem should be obtained after the hang. The procedure is > described on Intel_GPU wiki page. > >> >> I googled for a while and found several pretty similar reports in linux >> world. They experienced the same issue with SandyBridge hardware. I >> tried various patches (at least those I could apply) and it appeared >> that the following patch eliminates GPU hangs in my case: >> >> >> Index: sys/dev/drm2/i915/i915_irq.c >> =================================================================== >> --- sys/dev/drm2/i915/i915_irq.c (revision 236796) >> +++ sys/dev/drm2/i915/i915_irq.c (working copy) >> @@ -1524,7 +1524,19 @@ >> dev->dev_private); >> >> I915_WRITE(HWSTAM, 0xeffe); >> + if (IS_GEN6(dev)) { >> + /* Workaround stalls observed on Sandy Bridge GPUs by >> + * making the blitter command streamer generate a >> + * write to the Hardware Status Page for >> + * MI_USER_INTERRUPT. This appears to serialize the >> + * previous seqno write out before the interrupt >> + * happens. >> + */ >> + I915_WRITE(GEN6_BLITTER_HWSTAM, >> ~GEN6_BLITTER_USER_INTERRUPT); >> + I915_WRITE(GEN6_BSD_HWSTAM, ~GEN6_BSD_USER_INTERRUPT); >> + } >> >> + >> /* XXX hotplug from PCH */ >> >> I915_WRITE(DEIMR, 0xffffffff); > I remember this workaround and its removal. I am not in the position to > actually have access to any erratas to the chip. I think the only route > forward there is to try to reproduce your hang on recent Linux kernel > with same version of usermode and then ask on intel-gfx@. FWIW, I have a T520 (Sandybridge) and I also run Google (now Trimble) Sketch in a VirtualBox VM. I have yet to see any hangs of the GPU on my system which is running 9-Stable which I update every couple of weeks and built WITH_NEW_XORG and WITH_KMS. Just a data point. -- R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com