From owner-freebsd-x11@freebsd.org Mon Feb 8 03:09:14 2016 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27F1AAA1A73 for ; Mon, 8 Feb 2016 03:09:14 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from mail.kapsi.fi (mx1.kapsi.fi [IPv6:2001:1bc8:1004::1:25]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0ACEA26 for ; Mon, 8 Feb 2016 03:09:13 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from karviainen.kapsi.fi ([217.30.184.182] helo=roundcube.kapsi.fi) by mail.kapsi.fi with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1aScCL-0006Rj-61 for freebsd-x11@freebsd.org; Mon, 08 Feb 2016 05:09:09 +0200 MIME-Version: 1.0 Date: Mon, 08 Feb 2016 05:09:09 +0200 From: Arto Pekkanen To: freebsd-x11@freebsd.org Message-ID: <4cafc77ad57d53684808a0611b0305e2@kapsi.fi> X-Sender: isoa@kapsi.fi User-Agent: RoundCube Webmail/0.9.4 X-SA-Exim-Connect-IP: 217.30.184.182 X-SA-Exim-Mail-From: isoa@kapsi.fi X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 Subject: Testing drm-i915-update-38 (c6d9af5) with patched i915_gem.c, encouraging results. X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mail.kapsi.fi) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2016 03:09:14 -0000 Hi again. I realized that previously the drm-i915-update-38 (c6d9af5) kernel crashed because of a BUG_ON trap in i915_gem.c, not because of actual code fault. Then I found the following discussion in GitHub: https://github.com/freebsd/freebsd-base-graphics/issues/2 There the user myfreeweb "McGyver'd" the BUG_ON trap away by replacing it with WARN_ON -macro. I wanted to see if the driver would work, so I did the same. Attached is the diff that replaces BUG_ON with WARN_ON in i915_gem.c and thus makes the kernel not crash while playing games/openarena. The results: - kernel boots - vt console works - LVDS + 2 monitors on HDMI2 and HDMI3, all work with native resolutions, NOTE: this is an IMPROVEMENT! Previously X.org would HANG if I enabled more than 2 monitors! - video playback is perfect, no tearing, minimal CPU use, tested with - www/chromium - multimedia/mpv (with VAAPI enabled in multimedia/mpv and multimedia/ffmpeg) - games/openarena works just fine In fact, I can actually run games/openarena at the same time with www/chromium wathing https://www.youtube.com/watch?v=5xkNy9gfKOg (full HD tearing test video), with some stuttering on both ... but this is to be expected, because the kernel has to serve 2 OpenGL pipes at the same time which is problematic. And because I can now use 3 outputs at the same time, I am very impressed. I see many warnings like this in dmesg: Feb 8 04:33:15 leno kernel: error: [drm:pid1073:i915_gem_object_move_to_inactive] *ERROR* WARN ON: obj->base.write_domain & ~I915_GEM_GPU_DOMAINS The frequency between these errors is about one second when I run games/openarena. With www/chromium I do not see these warnings. The only real gripe I have is that the FreeBSD 11 -based kernel does not detect my Intel Wifi chip, yet stock FreeBSD 10.2 was able to do that. Should I report this as a regression somewhere? The problem with reporting this is that I am running FreeBSD 10.2 userland, and I feel like the developers might not want to deal with that. I will leave the laptop on while I sleep, leave it running the Tearing Test -video mentioned above. If it crashes I will post core dump etc. -- Arto Pekkanen From owner-freebsd-x11@freebsd.org Mon Feb 8 05:51:16 2016 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6A92AA034C for ; Mon, 8 Feb 2016 05:51:16 +0000 (UTC) (envelope-from alexander.m.mishurov@gmail.com) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com [IPv6:2a00:1450:4010:c04::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6909B897 for ; Mon, 8 Feb 2016 05:51:16 +0000 (UTC) (envelope-from alexander.m.mishurov@gmail.com) Received: by mail-lb0-x22f.google.com with SMTP id dx2so77083372lbd.3 for ; Sun, 07 Feb 2016 21:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=gTGogODh/1kl+0LkAzvyUkGcpatgJrA3oA2885f/oiA=; b=lkGwDdbz1PLQCnfbr1B8MqSb1E6SWfwdnoTh/0f29RDq7zHxCtR5Bkh0z93s9o4CR4 PzfOC9h9hKJEvzuWbItVmHiKmKhgKldO1nFXnk6lBM3AJmXdcTIidFRhwdfVAxh7wV8o ur+HhairvkhOCZdus9t1KGlLM0OP9EmZsQD5YKSUu45jPl4H2oS5GyZJQ0o8XgLOonER OTrDkx6LK9NL0H0mpjk/YdPtp1NnZ22X5fzWj2NdBlgteQqkINyiboNNpAzdQ0Xo/+x6 ovjMxN2tcYrZ/zvxLS+SXKb2z4n/qYhz8NUlGsockcsVyO1AmUF9gwpnlnUnqPNyKL46 x5Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=gTGogODh/1kl+0LkAzvyUkGcpatgJrA3oA2885f/oiA=; b=fkobfpqgDUqe8ps9fOB05meNEEkAtR4KqJQTcEBjNb1j7BO6l7T3b9rlBoAmKZV6WN gO+qn/br/W/R5ZemxSk69tjcTf3gKIuebmZf2Axz65xPFXbixgjulQlCPGXInW8QFHkj GzV7Zlw9R/cSBhkj2JsSrarZsCJ92uL0USPV1X9U+jyehRnpN9dlYrtWYfLnbmqaCfw0 OhdfJHLlMXUBEUue34uQ19H7DX7Q6rLPfYe9pppRZZr7j1lKnHj1og9ywmkozldMgsH5 QcSntQp8nNh0CeldSkuPdMhOwPCtWm2+opyIWnHAxYRZhJ8Bp5S7qvQ9H1ay5JkELA+x Ej8w== X-Gm-Message-State: AG10YORJYyMTpMr8IPEO4b6CeAM6lJI42ZZvA/14JflVZo+idvxthUFoXtztepOe1zfkzg== X-Received: by 10.112.199.41 with SMTP id jh9mr10706319lbc.125.1454910674120; Sun, 07 Feb 2016 21:51:14 -0800 (PST) Received: from [192.168.0.27] ([176.194.172.197]) by smtp.gmail.com with ESMTPSA id 87sm3854464lft.20.2016.02.07.21.51.13 for (version=TLSv1/SSLv3 cipher=OTHER); Sun, 07 Feb 2016 21:51:13 -0800 (PST) Subject: Re: Testing drm-i915-update-38 (c6d9af5) with patched i915_gem.c, encouraging results. To: freebsd-x11@freebsd.org References: <4cafc77ad57d53684808a0611b0305e2@kapsi.fi> From: Alexander Mishurov Message-ID: <56B82CD0.7060209@gmail.com> Date: Mon, 8 Feb 2016 08:51:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <4cafc77ad57d53684808a0611b0305e2@kapsi.fi> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2016 05:51:16 -0000 This is a bug actually, seems to be related to some kind of race condition. Original Intel driver from Linux even in later versions uses BUG_ON for this expression. On 08/02/16 06:09, Arto Pekkanen wrote: > Hi again. > > I realized that previously the drm-i915-update-38 (c6d9af5) kernel > crashed because of a BUG_ON trap in i915_gem.c, not because of actual > code fault. > > Then I found the following discussion in GitHub: > https://github.com/freebsd/freebsd-base-graphics/issues/2 > > There the user myfreeweb "McGyver'd" the BUG_ON trap away by replacing > it with WARN_ON -macro. I wanted to see if the driver would work, so I > did the same. > > Attached is the diff that replaces BUG_ON with WARN_ON in i915_gem.c > and thus makes the kernel not crash while playing games/openarena. > > The results: > - kernel boots > - vt console works > - LVDS + 2 monitors on HDMI2 and HDMI3, all work with native resolutions, > NOTE: this is an IMPROVEMENT! Previously X.org would HANG if I > enabled more than 2 monitors! > - video playback is perfect, no tearing, minimal CPU use, tested with > - www/chromium > - multimedia/mpv (with VAAPI enabled in multimedia/mpv and > multimedia/ffmpeg) > - games/openarena works just fine > > In fact, I can actually run games/openarena at the same time with > www/chromium wathing https://www.youtube.com/watch?v=5xkNy9gfKOg (full > HD tearing test video), with some stuttering on both ... but this is > to be expected, because the kernel has to serve 2 OpenGL pipes at the > same time which is problematic. > > And because I can now use 3 outputs at the same time, I am very > impressed. > > I see many warnings like this in dmesg: > Feb 8 04:33:15 leno kernel: error: > [drm:pid1073:i915_gem_object_move_to_inactive] *ERROR* WARN ON: > obj->base.write_domain & ~I915_GEM_GPU_DOMAINS > > The frequency between these errors is about one second when I run > games/openarena. With www/chromium I do not see these warnings. > > The only real gripe I have is that the FreeBSD 11 -based kernel does > not detect my Intel Wifi chip, yet stock FreeBSD 10.2 was able to do > that. Should I report this as a regression somewhere? The problem with > reporting this is that I am running FreeBSD 10.2 userland, and I feel > like the developers might not want to deal with that. > > I will leave the laptop on while I sleep, leave it running the Tearing > Test -video mentioned above. If it crashes I will post core dump etc. >