Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Feb 2016 05:09:09 +0200
From:      Arto Pekkanen <isoa@kapsi.fi>
To:        freebsd-x11@freebsd.org
Subject:   Testing drm-i915-update-38 (c6d9af5) with patched i915_gem.c, encouraging results.
Message-ID:  <4cafc77ad57d53684808a0611b0305e2@kapsi.fi>

next in thread | raw e-mail | index | archive | help
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: <owner-freebsd-x11@freebsd.org>
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 <freebsd-x11@mailman.ysv.freebsd.org>;
 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 <freebsd-x11@freebsd.org>; 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 <freebsd-x11@freebsd.org>; 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 <freebsd-x11@freebsd.org> (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 <alexander.m.mishurov@gmail.com>
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 <freebsd-x11.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-x11>,
 <mailto:freebsd-x11-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-x11/>;
List-Post: <mailto:freebsd-x11@freebsd.org>
List-Help: <mailto:freebsd-x11-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-x11>,
 <mailto:freebsd-x11-request@freebsd.org?subject=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.
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4cafc77ad57d53684808a0611b0305e2>